{"version":3,"sources":["webpack:///main.bundle.js","webpack:///./src/+app/services/core/api.service.ts","webpack:///./src/+app/services/cms/register.service.ts","webpack:///./src/+app/services/core/angular2-meta.ts","webpack:///./src/+app/services/core/auth.service.ts","webpack:///./src/+app/services/core/seo.service.ts","webpack:///./src/+app/services/cms/article.service.ts","webpack:///./src/+app/services/cms/header.service.ts","webpack:///./src/+app/services/core/application.service.ts","webpack:///./src/+app/services/core/company.service.ts","webpack:///./src/+app/services/core/messages.service.ts","webpack:///./src/+app/services/core/validation.service.ts","webpack:///./src/+app/services/inventory/product.service.ts","webpack:///./src/+app/services/cms/script.service.ts","webpack:///./src/+app/services/cms/login.service.ts","webpack:///./src/+app/services/core/cache.service.ts","webpack:///./src/+app/services/inventory/shopping-cart.service.ts","webpack:///./src/+app/models/document/quoting-submit-model.ts","webpack:///./src/+app/services/cms/breadcrumbs.service.ts","webpack:///./src/+app/models/cms/register.ts","webpack:///./src/+app/models/core/company.ts","webpack:///./src/+app/models/inventory/inventory.ts","webpack:///./src/+app/services/cms/check-existence.service.ts","webpack:///./src/+app/services/cms/order-payment.service.ts","webpack:///./src/+app/services/cms/recover-password.service.ts","webpack:///./src/+app/services/core/configuration.service.ts","webpack:///./src/+app/services/core/crypto.service.ts","webpack:///./src/+app/services/core/node-logger.service.ts","webpack:///./src/+app/services/core/paypal.service.ts","webpack:///./src/+app/services/inventory/category.service.ts","webpack:///./src/+app/services/inventory/search.service.ts","webpack:///./src/+app/services/cms/language.service.ts","webpack:///./src/+app/services/cms/currency.service.ts","webpack:///./src/+app/app.component.ts","webpack:///./src/+app/components/cms/article/sys/article-category.component.ts","webpack:///./src/+app/components/cms/article/sys/blog-page.component.ts","webpack:///./src/+app/components/cms/article/sys/news-page.component.ts","webpack:///./src/+app/components/cms/header/widget/search.component.ts","webpack:///./src/+app/components/cms/homepage/sys/home.component.ts","webpack:///./src/+app/components/cms/page/sys/cms-page.component.ts","webpack:///./src/+app/components/cms/page/sys/cookie-policy.component.ts","webpack:///./src/+app/components/cms/page/sys/faq.component.ts","webpack:///./src/+app/services/settings/template.service.ts","webpack:///./src/+app/components/cms/page/sys/info-request.component.ts","webpack:///./src/+app/components/cms/page/sys/newsletter-confirmation-page.component.ts","webpack:///./src/+app/components/cms/page/sys/newsletter-page.component.ts","webpack:///./src/+app/components/cms/page/sys/privacy-policy.component.ts","webpack:///./src/+app/components/cms/page/sys/purchase-condition.component.ts","webpack:///./src/+app/components/core/sys/cart-empty-page.component.ts","webpack:///./src/+app/components/core/sys/not-found-page.component.ts","webpack:///./src/+app/components/core/sys/offline-page.component.ts","webpack:///./src/+app/components/document/sys/client-area-order-list.component.ts","webpack:///./src/+app/components/inventory/category/sys/category.component.ts","webpack:///./src/+app/components/inventory/product/sys/other-product.component.ts","webpack:///./src/+app/components/inventory/product/sys/product-details.component.ts","webpack:///./src/+app/components/inventory/product/sys/product-page-list.component.ts","webpack:///./src/+app/components/inventory/product/sys/promotions.component.ts","webpack:///./src/+app/components/inventory/shopping-cart/sys/cart-cash.component.ts","webpack:///./src/+app/components/inventory/shopping-cart/sys/cart-submitted.component.ts","webpack:///./src/+app/components/inventory/shopping-cart/sys/cart.component.ts","webpack:///./src/+app/components/settings/client-area/sys/client-area-home.component.ts","webpack:///./src/+app/components/settings/client-area/sys/client-area-invoices.component.ts","webpack:///./src/+app/components/settings/client-area/sys/client-area-order-details.component.ts","webpack:///./src/+app/services/core/component-helper.service.ts","webpack:///./src/+app/components/settings/client-area/sys/client-area-profile.component.ts","webpack:///./src/+app/components/settings/client-area/sys/payment-confirmation.component.ts","webpack:///./src/+app/components/settings/client-area/sys/payment-nexi-confirmation.component.ts","webpack:///./src/+app/components/settings/client-area/sys/payment-unicredit-confirmation.component.ts","webpack:///./src/+app/components/settings/user/sys/quick-registration.component.ts","webpack:///./src/+app/components/settings/user/sys/register.component.ts","webpack:///./src/+app/components/settings/user/sys/registration-complete.component.ts","webpack:///./src/+app/components/settings/user/sys/registration-confirmation.component.ts","webpack:///./src/+app/components/settings/user/sys/user-login.component.ts","webpack:///./src/+app/components/settings/user/sys/user-password.component.ts","webpack:///./src/+app/services/core/bootbox.service.ts","webpack:///./src/+app/models/cms/news-list.ts","webpack:///./src/+app/services/cms/cms-content.service.ts","webpack:///./src/+app/services/cms/cms-menu-list.service.ts","webpack:///./src/+app/services/cms/faq.service.ts","webpack:///./src/+app/services/cms/info-request.service.ts","webpack:///./src/+app/services/cms/slider.service.ts","webpack:///./src/+app/services/cms/trustpilot.service.ts","webpack:///./src/+app/services/core/cookie-policy.service.ts","webpack:///./src/+app/services/core/cookie/cookie-options.ts","webpack:///./src/+app/services/core/privacy-policy.service.ts","webpack:///./src/+app/services/core/purchase-condition.service.ts","webpack:///./src/+app/services/core/system-configuration.service.ts","webpack:///./src/+app/services/inventory/customerscanvas.service.ts","webpack:///./src async","webpack:///./src/__workaround.browser.ts","webpack:///./src/browser.module.ts","webpack:///./src/+app/services/core/helper.service.ts","webpack:///./src/+app/models/document/quoting-model.ts","webpack:///./src/+app/app.module.ts","webpack:///./src/+app/components/cms/article/widget/news-list.component.ts","webpack:///./src/+app/components/cms/footer/widget/footer.component.ts","webpack:///./src/+app/components/cms/footer/widget/newsletter.component.ts","webpack:///./src/+app/components/cms/header/widget/header.component.ts","webpack:///./src/+app/components/cms/homepage/sys/home.module.ts","webpack:///./src/+app/components/cms/homepage/widget/side-bar-menu.component.ts","webpack:///./src/+app/components/cms/page/sys/cms-page.module.ts","webpack:///./src/+app/services/core/routes.service.ts","webpack:///./src/+app/components/core/widget/canvas-widget.components.ts","webpack:///./src/+app/components/core/widget/slider-widget.component.ts","webpack:///./src/+app/components/core/widget/trustpilot-widget.component.ts","webpack:///./src/+app/components/document/widget/quoting-result/wizard/widget/quoting-order-totals.component.ts","webpack:///./src/+app/components/document/widget/quoting/other-product-form.component.ts","webpack:///./src/+app/components/document/widget/quoting/quoting-main.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-adesivi.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-banner.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-buste.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-commerciale.component.ts","webpack:///./src/+app/services/document/quoting.service.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-editoria.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-etichette.component.ts","webpack:///./src/+app/components/document/widget/quoting/wizard/form/wizard-form-stampa.component.ts","webpack:///./src/+app/components/inventory/category/sys/inventory-category.module.ts","webpack:///./src/+app/components/inventory/product/sys/inventory-product.module.ts","webpack:///./src/+app/components/settings/user/sys/settings.module.ts","webpack:///./src/+app/models/cms/breadcrumbs.ts","webpack:///./src/+app/models/cms/info-request.ts","webpack:///./src/+app/models/constants/quoting-constants.ts","webpack:///./src/+app/models/constants/shared-constants.ts","webpack:///./src/+app/services/core/cookie/cookie-browser.service.ts","webpack:///./src/+app/services/core/cookie/cookie-node.service.ts","webpack:///./src/+app/services/core/default-request-options.ts","webpack:///./src/+app/services/core/loading-overlay.service.ts","webpack:///./src/+app/services/core/local-storage.ts","webpack:///./src/+app/services/core/routes-browser.service.ts","webpack:///./src/+app/services/multi-language/browser/index.ts","webpack:///./src/+app/services/multi-language/browser/translate-static-loader.service.ts","webpack:///./src/+app/shared/model/model.service.ts","webpack:///./src/+app/app.component.html","webpack:///./src/+app/components/document/widget/quoting/quoting-excluding.component.ts","webpack:///./src/+app/models/cms/user-login.ts","webpack:///./src/+app/services/settings/client-area.service.ts","webpack:///./src/+app/services/cms/cms-component.service.ts","webpack:///./src/+app/services/cms/newsletter.service.ts","webpack:///./src/+app/services/core/cookie/index.ts","webpack:///./src/+app/shared/shared.module.ts","webpack:///./src/client.prod.ts","webpack:///./src/+app/shared/mapping.ts","webpack:///./src/+app/models/core/cart.ts","webpack:///./src/+app/models/settings/client-area.ts"],"names":["webpackJsonp","10","module","exports","__webpack_require__","core_1","http_1","Observable_1","cache_service_1","node_logger_service_1","cookie_1","responseStatuses","noContent","authRequired","ApiService","http","cache","nodeLogger","isBrowser","cookie","this","clientSideCaching","prototype","get","url","options","_this","has","obs","Observable","of","clear","createAuthorizationHeader","map","extractData","do","json","set","catch","err","handleError","startDate","Date","AddLogWithTime","endDate","timeDiff","Math","abs","getTime","diffMs","ceil","getUniversalCached","post","body","token","headers","Headers","append","res","status","empty","handleUnauthorized","throw","window","location","href","__decorate","Injectable","__param","Inject","__metadata","_a","Http","Object","_b","CacheService","_c","NodeLoggerService","Boolean","_d","CookieService","100","shopping_cart_service_1","api_service_1","mapping_1","language_service_1","auth_service_1","RegisterService","_api","_cache","mappings","cartService","languageService","authService","sendInfoRequest","parameters","cartId","getCartId","CartId","EmailRegister","toLowerCase","EmailRepeat","PecEmail","Web_Api_Post_Register","result","share","getRegisterPageData","lang","customerId","GetUserId","Web_Api_Get_Register_Data","replace","confirmationRegistration","id","Web_Api_Post_Confirm_Registration","setFacebookLoginData","registerData","facebookLoginData","getFacebookLoginData","getRegistrationCompletePageData","getLongLang","Web_Api_Get_Registration_Complete_Page_Data","Mappings","ShoppingCartService","_e","LanguageService","_f","AuthService","101","dom_adapter_1","platform_browser_1","Meta","_document","_dom","getDOM","addTags","tags","_i","arguments","length","presentTags","_flattenArray","tag","_addInternal","getTag","selector","query","updateTag","meta","_prepareMetaElement","removeTagBySelector","removeTagElement","_removeMetaElement","setTitle","title","_createMetaElement","_appendMetaElement","createElement","el","keys","forEach","prop","setAttribute","head","appendChild","parentElement","removeChild","input","out","i","item","Array","isArray","push","DOCUMENT","11","user_login_1","cookie_service_1","router_1","crypto_service_1","router","cryptoService","loggedInUser","GetData","user","UserLogin","getObject","regUser","username","isAuthenticated","registeredUser","decryptedUserId","encryptedUserId","encryptNumber","Number","GetDecryptedUserId","decryptNumber","Login","cryptedUserId","putObject","put","Logout","remove","reload","navigateByUrl","getCurrentUserId","Router","CryptoService","12","angular2_meta_1","core_2","SeoService","metaService","translate","setSeoInformation","seoInformation","name","content","Keywords","Description","property","Title","SeoRobots","updateCanonicalTag","rel","Url","setSeoUserArea","getLabel","label","message","subscribe","getCanonicalLink","canonical","_prepareLinkElement","_addInternalCanonical","generateSeoDomServerSide","document","renderer","seoData","rootElement","h1","h2","h3","nodeList","description","setElementClass","H1","createText","H2","H3","ShortDescription","setElementProperty","LongDescription","projectNodes","generateSiteMapList","SiteMapList","siteMapHtml","stringToInject","element","appendHtmlString","template","div","setInnerHTML","insertAllBefore","lastChild","childNodes","appendScriptsToDOM","childNodesAsList","insertAfter","setSeoMetaData","imgLink","updateMetaDataTitle","createMetaTagUniversalAttribute","createMetaTagUniversalProperty","value","setText","selectRootElement","elementType","propertyNameFirst","valueFirst","propertyNameSecond","valueSecond","elem","setElementAttribute","_createLinkElement","_appendLinkElement","TranslateService","128","ArticleService","getArticleList","category","listtype","Web_Api_Get_Article_List","getArticleDetails","Web_Api_Get_News_Details","toString","getArticleByUrl","seoUrl","Web_Api_Get_Article_By_Url","GetArticleByCategoryIdandRows","categoryId","startRowIndex","maxRows","Web_Api_Get_Article_By_Category_Id","getBlogData","Web_Api_Get_Blog_Data","getArticleListCategory","Web_Api_Get_Article_List_Category","getCategoryArticleById","Web_Api_Get_Article_Category_By_Id","getArticleCategoryByUrl","categoryUrl","Web_Api_Get_Article_Category_By_Url","129","rxjs_1","HeaderService","toShowQuickRegistration","loginInfo","BehaviorSubject","getLoggedInUser","asObservable","setLoggedInUser","next","setToShowQuickRegistration","toShow","130","ApplicationService","api","isNode","getConfig","defineProperty","ACCESS_TOKEN_KEY","enumerable","configurable","getToken","params","getCredentialsParams","config","apiUrl","Web_Api_Get_Token_Url","access_token","URLSearchParams","credentials","password","fs","JSON","parse","readFileSync","setConfigToCache","APPLICATION_CONFIG","privateKeys","configForCache","key","hasOwnProperty","indexOf","131","CompanyService","getCompany","Web_Api_Get_Default_Company","132","MessagesService","setMessagesAsRead","Web_Api_Get_Client_Area_Messages","133","ValidationService","validatePhoneNumber","event","pattern","inputChar","String","fromCharCode","charCode","test","preventDefault","134","currency_service_1","ProductService","currencyService","getProductDetails","productId","productType","curr","getCurrency","Web_Api_Get_Product_Details","getProductsPromotionsData","Web_Api_Get_Products_In_Promotion_Data","getProductDetailsBySeoUrl","Web_Api_Get_Product_By_Url","getPriceData","Web_Api_Get_Price_Data","CurrencyService","16","seo_service_1","ScriptService","language","seo","typeSystemPage","typeArticleCategory","typeArticle","typeCmsPage","typeCatalogCategory","typeCatalogOtherProduct","typeCatalogProduct","infoRequestId","userAreaId","privacyPolicyId","purchaseConditionsId","faqsId","cookiesId","homeId","loginId","blogHomeId","productsCatalogId","promotionsId","cartCashId","cartSubmittedId","userRegistrationId","userRecoverPasswordId","subscriptionId","cartEmptyId","ThankYouPagePaypalId","ThankYouPagePagOnlineId","ThankYouNexiId","subscriptionConfirmationId","registrationCompletePageId","SearchPageId","SearchWithPagingPageId","getScript","type","rowId","longLang","Web_Api_Get_Script","getScriptHead","Web_Api_Get_Script_Head","checkIfScriptResponseIsValid","retVal","getSystemPageRowId_OrderId","PageRowId","OrderId","setupExternalScripts","pageType","SeoInformation","HasScripts","response","setGoogleScripts","seoInfo","AnalyticsId","gtag","page_path","UrlForSeo","178","LoginService","langService","sendLoginRequest","email","Web_Api_Post_Send_Login_Request","Email","Password","btoa","CartID","authentificateUser","firstName","lastName","Web_Api_Post_User_Authentification","FirstName","LastName","Lang","quickRegister","userInfo","CustomerGroup","CodiceFiscale","PartitaIva","Newsletter","19","_key","normalizeKey","_escapedHtml","encodeURIComponent","decodeURIComponent","delete","clearAll","dehydrate","rehydrate","toJSON","isDevMode","_isInvalidValue","Error","isNaN","KEY","20","cart_1","cookieService","customizationData","isProductCanvasEdited","saveCart","userId","paymentId","shipmentId","Web_Api_Get_Save_Cart","applyVoucher","voucherCode","getCustomerId","getLang","Web_Api_Set_Cart_Voucher","param","CustomerID","Voucher","Language","Currency","setJobName","jobName","Web_Api_Set_Job_Name","ProductID","JobName","setAddress","addressObject","Web_Api_Set_Cart_Address","AddressCity","City","AddressID","Id","AddressMobile","Mobile","AddressPhone","Phone","AddressPostalCode","ZipCode","AddressProvince","Province","AddressRecipient","Recipient","AddressStreet","Address","confirmOrder","Web_Api_Post_Cart_Confirm_Order","clearCartAfterConfirmation","cartData","CartInfo","Products","Addresses","Payments","Shipments","getCartPaymentShipment","Web_Api_Get_Cart_Payment_Shipment","addWizardCalcolatoToCart","wizardId","lavId","canvasData","getIfProductIsCanvasEdited","getCustomizationCanvasData","isCanvasEdited","Web_Api_Add_Wizard_Calcolato_To_Cart","LavID","CanvasStateId","stateId","CanvasHiResOutputUrls","hiResOutputUrls","addApProductToCart","addWizardCalcolatoScontisticaToCart","dateId","Web_Api_Add_Wizard_Calcolato_Scontistica_To_Cart","DateID","addWizardListinoToCart","quantityId","Web_Api_Add_Wizard_Listino_To_Cart","QuantityID","addOtherProductListinoToCart","combinationId","Web_Api_Add_Other_Product_Listino_To_Cart","CombinationId","addOtherProductListinoScontisticaToCart","Web_Api_Add_Other_Product_Listino_Scontistica_To_Cart","addOtherProductCalcolatoListinoToCart","strVariantiCalcolate","Web_Api_Add_Other_Product_Listino_Calcolato_To_Cart","StrVariantiCalcolate","addOtherProductCalcolatoListinoScontisticaToCart","Web_Api_Add_Other_Product_Listino_Calcolato_Scontistica_To_Cart","addOtherProductCalcolatoScontisticaToCart","Web_Api_Add_Other_Product_Calcolato_Scontistica_To_Cart","addWizardListinoScontisticaBusteToCart","idPantoneFronte1","idPantoneFronte2","idPantoneRetro1","idPantoneRetro2","Web_Api_Add_Wizard_Buste_Listino_Buste_To_Cart","IdPantoneFronte1","IdPantoneFronte2","IdPantoneRetro1","IdPantoneRetro2","addWizardListinoBusteToCart","Web_Api_Add_Wizard_Buste_Listino_To_Cart","addWizardListinoScontisticaToCart","Web_Api_Add_Wizard_Listino_Scontistica_To_Cart","addStaticProductToCart","Web_Api_Add_Static_Product_To_Cart","addStaticProductScontisticaToCart","Web_Api_Add_Static_Product_Scontistica_To_Cart","addMatrixProductToCart","Web_Api_Add_Matrix_Product_To_Cart","Type","setCartId","updateCart","getCart","initCart","setPayment","Web_Api_Set_Cart_Payment","PaymentID","setShipment","Web_Api_Set_Cart_Shipment","ShippmentID","removeFromCart","Web_Api_Remove_From_Cart","isCartValid","flagPayment","Selected","flagShipment","getEmptyCartPageData","Web_Api_Empty_Cart_Page","setIfProductIsCanvasEdited","isEdited","setCustomizationCanvasData","newData","resetCanvasData","emptyObj","_g","21","wizardFormEditoriaModel","numCopie","idCopie","tipoCopie","numFacciate","idFacciate","tipoFacciate","idFormati","idColori1","idCarte1","nomeCarte1","nomeCarte2","idGrammature1","nomeGrammature1","idPlastificazioni1","idCopertine","idColori2","idCarte2","idGrammature2","nomeGrammature2","idPlastificazioni2","idRilegature","taglio","sezione","tipoStampaInternoSoloFronte","stampa1_colori_fronte","stampa1_colori_retro","stampa2_colori_fronte","stampa2_colori_retro","tipoStampaCopertinaSoloFronte","macrocategoryWizardId","richiestaName","richiestaSubName","richiestaEmail","isRichiestaEmailValid","richiestaTelephone","richiestaSocieta","richiestaJobname","richiestaCondizioni","richiestaNote","idPiegature","soggettiMultipli","numSoggetti","baseFormato","altezzaFormato","idTagli","idBusta","idMaterialiFlessibili","idSupportiRigidi","idOcchielli","idAsole","idCuciture","idElettrosaldature","disposizione_occhielli_id","distanza_occhielli","diametro_asola","disposizione_asola_id","disposizione_cucitura_id","disposizione_elettrosaldatura_id","tipoBifacciale","idBiancoCoprente","currency","idCartoncino","nomeCartoncino","idGrammatureCartoncino","nomeGrammatureCartoncino","numDiametroInternoAnimaLabel","numDiametroMassimoEsternoAnimaLabel","numEtichette","idAvvolgimento","idFustella","idFormatoTipo","idTipoLavoroLabel","subSection","MatrixModelCalculation","LavorazioniAccessorieModel","valoreLavorazione","numWidthFormValue","numHeightFormValue","numDepthFormValue","tipo","PriceEstimationModel","UnitPrice","Imponibile","Iva","Total","TotalAmount","WeightUm","Weight","DayName","DayNumber","Quantity","AltezzaDorso","PrezzoOriginaleimporto","DayDescriptionName","FileCombinationModel","wizardFormAdesiviModel","wizardFormBandieraModel","wizardFormBannerModel","wizardFormBusteModel","fronte","wizardFormCommercialeModel","wizarFormEtichetteModel","wizardFormStampaModel","22","breadcrumbs_1","BreadcrumbsService","translateService","homeIsInit","setHomeBreadcrumb","breadcrumbsList","Level","getShortLang","homeLink","bread","Breadcrumbs","BreadcrumbLink","BreadcrumbName","unshift","setBreadcrumbs","breadcrumbs","x","toLocaleLowerCase","getBreadcrumbs","252","Register","QuickRegister","emailRepeat","telephone","customerGroup","CF","PIVA","oldGroup","Telephone","info_privacy","IsQuickRegistered","controlFormReset","253","Company","254","Product","PhotoGalleryViewModel","Category","SliderViewModel","MegaMenu","255","CheckIfExistService","emailType","partitaIvaType","codiceFiscaleType","checkIfEmailExistsInDb","Web_Api_Check_If_Param_Exists_In_Db","checkIfPartitaIvaExistsInDb","checkIfCodiceFiscaleExistsInDb","256","OrderPaymentService","setOrderAsPayed","orderId","Web_Api_Set_Order_As_Payed","orderID","parseInt","CheckIsOrderPayedUnicredit","Web_Api_Check_Is_Order_Payed_Unicredit","257","RecoverPasswordService","recoverPasswordRequest","Web_Api_Recover_Password","getRecoverPasswordData","Web_Api_Get_Recover_Password_Data","258","ConfigurationService","getConfiguration","Web_Api_Get_Configuration","getRoutes","Web_Api_Get_Routes","259","output","Exception","encryptedString","stringWithoutPrefix","substring","stringwithoutSufix","decryptString","text","decryptedText","text_1","c","unicode","charCodeAt","260","isLogActive","logFilepath","mex","dateObj","year","getFullYear","month","getMonth","getDate","getHours","getMinutes","getSeconds","getMilliseconds","appendFile","261","PaypalService","isPaypalScriptLoaded","isError","errMessage","loadPaypalService","externalScriptLink","createPaypalPaymentAPI","executePaypalPaymentAPI","data","paypalBtnStyle","UsePaypalProduction","renderPaypalBtn","loadExternalScript","then","scriptUrl","Promise","resolve","reject","scriptElement","src","onload","styleObj","getPaypalBtnStyle","paypal","Button","render","env","commit","locale","style","payment","request","onAuthorize","orderData","actions","executePaymentObj","paymentID","payerID","intent","paymentToken","returnUrl","CustomerId","CustomerOrderId","IsError","height","getPaypalBtnHeight","PaypalButtonHeight","color","PaypalButtonColor","shape","PaypalButtonShape","PaypalButtonLabel","tagline","PaypalButtonTagline","size","PaypalButtonSize","paypalButtonHeight","262","CategoryService","getCategory","Web_Api_Get_Category_Details","getCatalogCategoriesData","Web_Api_Get_Catalog_Categories_Data","getCategoryByUrl","Web_Api_Get_Category_By_Url","getCategoryInfo","Web_Api_Post_Send_Category_Info_Request","getCategoryPriceData","Web_Api_Get_Catalog_Categories_Price_Data","263","SearchService","queryText","getCategoriesAndProducts","startRow","endRow","Web_Api_Get_Product_And_Categories","getQueryValue","setQueryValue","newQuery","setQueryPlainTextValue","getQueryPlainTextValue","3","application_service_1","appService","currentLang","getCurrentLanguage","LanguageObj","32","currencyVal","getCurrencyBackend","Web_Api_Get_DefaultCurrency","getDefaultCurrency","setDefaultCurrency","371","Subscription_1","template_service_1","routes_service_1","router_2","AppComponent","routesService","subManager","Subscription","sub","events","navigationInterceptor","currencysub","add","NavigationStart","showPageLoader","NavigationCancel","hidePageLoader","NavigationError","ngOnInit","templateSub","getHeadFootData","headFootData","HeadTemplateHtml","FootTemplateHtml","clearMemory","unsubscribe","ngOnDestroy","Component","changeDetection","ChangeDetectionStrategy","Default","encapsulation","ViewEncapsulation","Emulated","TemplateService","RoutesService","372","breadcrumbs_service_1","cms_component_service_1","news_list_1","article_service_1","component_helper_service_1","script_service_1","helper_service_1","ArticleCategoryComponent","_compiler","componentHelper","_elementRef","articleService","route","cmsComponentService","scriptService","articleCategory","ArticleCategory","routeReuseStrategy","shouldReuseRoute","routeSub","pageNumber","page","header","headDataSub","getHeaderData","SideMenuData","getSideMenuData","result1","Categories","categoryId_1","categorySubId","onGetArticleSuccess","pageNumber_1","slice","lastIndexOf","categorySubUrl","CategoryDetails","currentPage","subComponent","createSubComponent","injectComponent","ChildComponent","seoService","helperService","breadcrumbsService","blogs","ArticleCategoryList","pageIsInit","blogCategoryPageName","blogCategoryPageNumber","blogPageName","homePageName","currentPageNumber","disablePreviousPage","disableNextPage","numberOfPages","NumberOfArticles","pages","createRange","zeroPage","BreadcrumbsInfo","footerData","FooterData","headerData","setTimeout","articleCategories","ArticleCategories","getRoutePath","imageTitle","imgPath","GetFileNameFromPath","number","items","showClickedPage","index","navigate","showPreviousPage","previousPage","showNextPage","nextPage","ngAfterViewChecked","TemplateHtml","HelperService","ViewContainerRef","_h","_j","Compiler","ComponentHelperService","ActivatedRoute","CmsComponentService","_k","Renderer","_l","373","BlogPageComponent","activatedRoute","paramsSub","blogSub","company","blogPageNumber","374","newsletter_service_1","ArticleComponent","templateService","newsDetails","NewsDetails","paramSub","Id_1","subArticleId","onGetPageSuccess","HeaderImage","subArticleUrl","newsResult","newsObj","getComponentTemplate","newsletterService","slidesNews","SliderImages","model","Checkbox","privacyPageNameArticle","setupSocialNetworks","layoutTheme","initCarousel","initLightbox","shareurl","encodeURI","$","click","open","onSubmit","form","spinnerNewslatterArticle","subNewsletter","newsletterSubscribe","alreadySubscribedArticle","successfullySubscribedArticle","NewsletterService","_m","375","search_service_1","SearchComponent","searchService","decodedQuery","decoded","catAndProdSub","SearchResult","handleSearchError","defaultImageUrl","redirectUrlNone","NumberOfResults","searchResultsPage","searchResultsPageWithPagination","numberOfResult","SearchModelList","searchResults","ImageUrl","RedirectUrl","376","customerscanvas_service_1","HomeComponent","clearCache","homePageInfo","SideMenu","promo","highlith","highlightPromo","getproductHilightpromo","Promotions","Highlights","homeSub","getHomePageDataOptimized","canvasService","productsPageName","promotionsPageName","categories","highlights","promotions","articles","sideMenuData","sliderData","SliderData","newsletterSubmitted","privacySubmitted","alreadySubscribed","successfullySubscribed","spinnerNewslatter","CheckboxSubscribe","filteraArticleOfType","numReturn","count","filter","Code_Category","res_1","newsSub","initAnimate","initVideo","nullifyAllReferences","doSomething","CustomersCanvasService","377","cms_content_service_1","cms_menu_list_service_1","CmsPageComponent","cmsContentService","longLangCode","subParams","pageId_1","cmsIdSub","getCmsPageById","TopImage","cmsUrlSub","getCmsPageByUrl","IdLevel","cmsResult","cmsPageObj","cmsMenuListService","cmspage","menuItems","CmsMenuListService","CmsContentService","378","cookie_policy_service_1","CookiePolicyComponent","cookiePolicyService","cookieSub","getCookiePolicyData","configuration","ConfigurationInfo","CookiePolicyService","379","faq_service_1","company_service_1","FaqComponent","faqlistService","faqSub","getFaqData","companyService","faqlist","FaqList","initToggle","FaqListService","38","getThankYouPagePaypalInfo","componentType","Web_Api_Get_Information_ThankYouPage_Paypal_Url","getThankYouPagOnlineInfo","Web_Api_Get_Information_ThankYouPage_PagOnline_Url","getThankYouNexiInfo","messaggio","orario","Web_Api_Get_Information_ThankYouPage_Nexi_Url","Web_Api_Get_Template_Url","getComponentTemplatePageNotFound","Web_Api_Get_Template_Url_Page_Not_Found","Web_Api_Get_Head_Foot_Data","380","info_request_service_1","info_request_1","InfoRequestComponent","infoRequestService","infoSub","getInfoRequestData","componentInfo","spinnerContact","valid","infoRequestSuccess","infoRequestFailed","InfoRequest","Where","initMap","google","geocoder","maps","Geocoder","street","StreetAddress","address","PostalCode","htmlCode","Name","geocode","results","initLongitude","geometry","lng","initLatitude","lat","mapMarkers","html","icon","image","iconsize","iconanchor","popup","mapSettings","controls","draggable","panControl","zoomControl","mapTypeControl","scaleControl","streetViewControl","overviewMapControl","scrollwheel","markers","latitude","longitude","zoom","gMap","InfoRequestService","381","NewsletterConfirmationPageComponent","newsConfirmSub","getNewsletterConfirmationPageData","382","NewsletterPageComponent","newsPageSub","getNewsletterPageData","newsletterCompletePage","console","log","383","privacy_policy_service_1","PrivacyPolicyComponent","privacyPolicyService","privacySub","getPrivacyPolicyData","PrivacyPolicyService","384","purchase_condition_service_1","PurchaseConditionComponent","purchaseConditionService","conditionSub","getPurchaseConditionServiceData","PurchaseConditionService","385","CartEmptyPageComponent","emptyCartSub","EmptyCartData","userLoginImg","UserLoginImg_Url","386","NotFoundPageComponent","notFoundSub","headerClass","setAutoHeightAndWeightToLogo","hasClass","attr","387","OfflinePageComponent","offlinePageData","offlineSub","getOfflinePageData","pageData","OfflineMessage","388","client_area_service_1","messages_service_1","ClientAreaOrderListComponent","clientAreaService","ClientAreaOrderListTemplate_1","header_1","showAll","orderListSub","getClientAreaOrdersList1","ClientAreaOrderListTemplate","apiService","messagesService","rows","columns","orderNumber","shortLang","modalTitle","modalBody","numberOfMessages","bodyMod","isSettedFilter","load","multipleShipmentActive","isActiveMultipleShipment","isActiveInvoicesModule","areaClientiHome","areaClientiOrdini","areaChangeProfile","areaClientiInvoices","italianLang","sProcessing","sLengthMenu","sZeroRecords","sInfo","sInfoEmpty","sInfoFiltered","sInfoPostFix","sUrl","oPaginate","sPrevious","sNext","englishLang","translateTableColumnTitle","columnTitle","ClientAreaOrderList","DataTable","searching","ordering","sDom","oLanguage","not","hide","datetimepicker","format","useCurrent","on","e","minDate","date","maxDate","onClick","indexRow","columnName","orderDetailsPage","loginRoute","order","OrderNoteList","messReadSub","showModal","messagesDetails","modal","hideModal","getOrdersList","dateFrom","dateTo","orderStatus","resetTable","tableData","destroy","resetFilter","from","to","val","filterOrdersList","numberOfOrder","changeDate","stringDate","Input","ClientAreaService","_o","_p","389","inventory_1","category_service_1","bootbox_service_1","CategoryComponent","categoryService","catIdSub","onGetCategorySuccess","catUrlSub","categoryResult","Active","createSubComponentRedirect","notFoundPage","categoryObj","bootboxService","SubCategories","products","SubProducts","loginPageName","registerPageName","spinnerForm","contactFormSent","contactFormFailed","showSpinner","showTable","Lastname","Amount","Message","Configuration","TipoVisualizzazione","catPriceSub","PriceData","catInfoSub","showedFileBoxWizard","IdWizardMaster","ManageAttachmentWizard","addMatrixCommercialeProductToCart","addToCartSub","i18nAlert","addMatrixEditoriaProductToCart","addMatEdToCartSub","addMatToCartSub","initThumbGallery","popover","BootboxService","390","product_service_1","OtherProductComponent","productService","product","productId_1","productByIdSub","onGetProductSuccess","Thumbnail","productByUrlSub","productResult","otherproductObj","shareOnFacebook","shareOnTwitter","showedFileBox","ManageAttachment","391","ProductDetailsComponent","prodByIdSub","prodByUrlSub","productDetails","productObj","showSpinnerClick","currentRowIndex","currentColumnIndex","facebookShareUrl","HeaderData","IsWizard","productId_2","pricesSub","staticProdSub","dayId","statProdScontSub","isRowSelected","rowIndex","isColumnSelected","columnIndex","setSelectedIndex","clearSelectedIndex","isPriceDiscounted","price","priceDiscounted","priceInt","parseFloat","priceDiscountedInt","392","ProductPageListComponent","categoriesSub","CatalogCategories","393","PromotionsComponent","promotionsSub","ProductPromotionList","394","cart_2","cart_3","validation_service_1","CartCashComponent","cmsSub","getShoppingCartCashData","shoppingCartCashData","shoppingCartService","validationService","currentAddress","CartAddressModel","carrello","ShoppingCart","selectedAddress","selectedPayment","CartPaymentModel","selectedShipment","CartShipmentModel","showValidationLabels","cartCashAccepted","isVoucherValid","isVoucherInvalid","isVoucherApplied","disableButtonCart","spinnerCartCash","pageIsOnDestroy","pageIsInitAfter","carrelloPageName","spinnerCart","payments","shipments","shipment","CurrentAddress","completeAddress","lastIndex","addressStreet","addressNumber","AddressNumber","validatePhone","addAddressVerificationScripts","addressKey","before","removeAddressVerificationScripts","checkAddressValidation","setAddressValue","streetTypeId","startsWith","updateCartAddress","currentStreet","trim","cartSub","changeAddress","addressId","addresses","addressVal","lastIndex_1","addressStreet_1","shopCartSub","jobNameSub","coupon","voucherSub","validProducts","confirmOrderSub","cartOrderDetailPageUrl","ngAfterViewInit","altezza","outerHeight","margintop","css","paddingntop","altezza1","margintop1","paddingntop1","altezzaHead","margintopHead","paddingntopHead","sticky","topSpacing","bottomSpacing","isActiveAddressVerificationModule","addressVerificationKey","AddressVerificationCode","395","md5_1","paypal_service_1","CartSubmittedComponent","getShoppingCartSubmittedData","scriptId","cartSubmittedData","sanitizer","paypalService","areaClientiName","authentication","clientArea","OrderDetail","criptedOrderID","Md5","hashStr","isTipologiaPagamentoBonifico","numeroTrnInvalid","numeroCroInvalid","bonificoUploadUrl","bypassSecurityTrustResourceUrl","BonificoUploadUrl","bonificoUploadedFiles","BonificoUploadedFilesNames","pageIsAfterViewInit","paymentUrl","PaymentDoneUrl","paymentCompleteUrl","CurrencyCode","confirmBonificoDetails","BonificoTrn","updateBonificoPaymentDetails","BonificoCro","hideBonificoModal","checkNumeroTrn","inputText","checkNumeroCro","inputNumber","getBonificoUploadedFiles","showBonificoModal","orderDetailsRedirect","fileUploadRedirect","payWithPaypal","paypalText","translatePaypal","formHtml","GatewayUrl","GatewayAccount","OrderNumber","TotalCost","submit","payWithNexi","NexiForm","NexiText","NexiModel","requestUrl","alias","importo","divisa","codTrans","url_back_ultimoStepCarrello","mac","num_contratto","gruppo","PaymentType","PaymentStatus","StrTotalBeforeTax","IsNewPaypalIntegration","Paypal_JS_Lirary_Url","Web_Api_Create_Paypal_Payment","Web_Api_Execute_Paypal_Payment","PaypalButtonStyle","DomSanitizer","396","register_service_1","company_1","CartComponent","cartDataSub","getShoppingCartData","shoppingCartData","registerService","selectedPaymentId","selectedShipmentId","userLogin","disableModalCartButtons","showProceedBtn","parentWidgetData","CanvasInfo","clickedProductId","canvasSub","isCanvasModalOpened$","isModalOpened","scrollTo","canvasEditedSub","isCanvasProductDesignApproved$","isDesignApproved","canvasData_1","RowIdPrev","updateCanvas","updatePrevCanvasInfo","find","obj","openCanvasEditor","CanvasUrl","canvasConfigData","setCanvasConfig","TemplateImagesFolderPath","CustomerCanvasUserName","Watermark","WatermarkText","CanvasApiKey","ApiKey","toShowCanvasButton","isModuleActive","IsActiveCanvasModule","isUserAuthenticated","removeCustomersCanvasState","selectedProduct","deleteCustomerCanvasState","goRegistrationPage","quickRegistration","navigationExtras","queryParams","registerRoute","isCompletedRegistration","userData","goLoginPage","goToConfirmPurchasePage","goToModifyProfile","saveCartSub","selectRadioPayment","paymentSub","selectRadioShipment","shipmentSub","removeCartSub","idOfProduct","UserData","IsCompletedRegistration","Id_User_Group","CodiceDestinatarioSDL","397","client_area_1","ClientAreaHomeComponent","clientDetailsSub","getDetailsClientArea","ClientAreaHomeTemplate","ClientAreaDetails","messagesList","lastOrderDetailsPage","userName","NewNoteOrdersCount","lastOrderId","LastOrderId","setMessSub","398","ClientAreaInvoicesComponent","ClientAreaInvoicesListTemplate","invoicesSub","getClientAreaInvoicesList","redirectToHomepage","documentTypeSelect","invoiceNumber","ClientAreaInvoicesList","getInvoicesList","documentType","filterInvoicesList","filterOrderNumber","filterInvoiceNumber","399","client_area_2","client_area_3","ClientAreaOrderDetailsComponent","ClientAreaOrderDetails","templateHtml","UserId","orderIdSub","getClientAreaOrderDetails","orderNotFoundSub","ProcessOrder","processingSubject","clientAreaList","orderProcessMessageList","ClientAreaProcessingOrders","idord","upload","info","comunicazioni","noMessages","checkValues","waitingDetails","startTrnValue","startCroValue","len","nameLast","translatedName","routeParamsSub","pagefrom","orderId_1","url_back_dettaglioOrdine","ProcessingOrderList","process","FileUploadSecuredUrl","FileUploadUrl","PreflightUploadSecuredUrl","PreflightUploadUrl","TrackingUrl","addClass","removeClass","cancelOrders","cancelOrdSub","Status","isDisabled","processMessage","postMessageSub","postClientAreaSendProcessOrderMessageint","UserCreated","OrderProcessMessageList","ClientAreaOrderProcessMessages","CreatedBy","StringDateCreated","From","Subject","refreshProcessFiles","processFilesSub","getProcessOrderFiles","ListOfFiles","Size","endsWith","FileState","Files","_q","_r","4","shared_module_1","compiler","containterRef","componentToInject","DynamicModule","NgModule","imports","SharedModule","declarations","compileModuleAndAllComponentsAsync","moduleWithFactories","compFactory","componentFactories","cmpRef","createComponent","400","register_1","ClientAreaProfileComponent","templateHtmlUserProfile","userProfileSub","getUserAreaProfile","userProfile","onCreate","EventEmitter","Prov","Cap","CompanyName","Piva","TaxCode","SubName","CodiceDestinatario","CurrentPassword","PasswordRepeat","AddressRadio","DefaultAddress","modelAddAndRemoveAddress","AddressId","clientAreaProfile","ClientAreaUserProfile","clientAddress","ClientAreaUserAddress","register","isExist","userGroup","UserGroup","ContactFirstName","ContactLastName","AreaCode","ContactPhone","DefaultAddressId","ContactMobile","id1","isCodDestRequired","isPecEmailRequired","cap","changeUserProfile","updateProfileSub","updateUserProfile","updateSuccessful","updateFailed","addNewAddress","newAddressSub","SubmitPassword","updatePassSub","updateUserPassword","changePasswordSuccessful","changePasswordFailed","setDefaultAddress","resetAddress","updateUserAddresses","updateAddressSub","updateAddresses","defaultFound","updateAddressFailed","updateAddressSuccessful","removeAddress","removeAddressSub","splice","exception","Output","401","order_payment_service_1","PaymentConfirmationComponent","paramsObj","isNewPaypalImplementation","orderCheckout","orderid","thankYouSub","typeId","urlParams","orderPaymentService","success","failed","serverError","createScript","item_number","hashedOrderId","paramsRouteSub","encryptedOrder","st","setOrderAsPaid","orderPaySub","402","PaymentNexiConfirmationComponent","errorMessage","403","PaymentUnicreditConfirmationComponent","checkPaymentSub","split","404","login_service_1","check_existence_service_1","configuration_service_1","header_service_1","QuickRegistrationComponent","companyInfo","quickRegistrationData","loginService","checkExists","activeRoute","configurationService","headerService","isEmailValid","emailExists","isPivaValid","pivaExists","isCFValid","CFExists","pageFrom","modelRegistration","paramPageFrom","setConfiguration","finishQuickRegistration","submitButton","nativeElement","disabled","quickRegisterUserObj","setQuickRegisterObject","sendInfoSub","hideModalQuickRegistration","Id_User_Dettail","showQuickRegistrationSuccessModal","QuickEmailUser","QuickPartitaIva","QuickCodiceFiscale","QuickClientType","QuickTelephone","hideModalQuickRegistrationEmail","showModalQuickRegistration","checkEmail","checkEmailSub","checkPiva","field","checkCF","resultConfiguration","companySub","resultCompany","Privacy","join","onCustomerGroupChange","setValuesOnCustomerGroupChange","saveOldGroup","resetForm","showModalQuickRegistrationEmail","hideQuickRegistrationSuccessModal","hideModalQuickRegistrationEmailAndResetEmail","modalId","querySelector","zIndex","ViewChild","ElementRef","405","RegisterComponent","isQuickRegistration","snapshot","registerSub","IsActiveQuickRegistration","isQuickRegistrationActive","siteKey","theme","emailError","passwordError","validEmail","showEmailInvalid","showPivaInvalid","showCFInvalid","isValidCodDest","isValidPecEmail","isRequiredPecEmail","quickRegisteredUser","registerViaFbData","disableFbDataFields","cartRoute","homepageRoute","customerTypeList","UserTypes","CustomerType","setModelDataFromCookies","setModelDataFromFb","isQuickRegistered","disableFieldsFilledFromFbData","reg","emailValid","piva","selected","navigateToCorespondingPage","isRegisterFailed","registrationCompletePage","setVerified","isCaptchaInvalid","onCustomerTypeChange","_s","_t","_u","406","RegistrationConfirmationPageComponent","registrationDoneSub","isRegisteredViaFacebook","407","RegistrationConfirmationComponent","registrationConfirmation","compTemplateSub","active","userid","checkActivation","confirmRegSub","408","recover_password_service_1","UserLoginComponent","cmsService","loginData","loginSub","getLoginPageData","recoverPasswordService","countFb","userLoginUrl","emailErrorRecover","constructorIsInit","isActiveFacebookModule","modelRecover","onFacebookLoginClick","FB","login","getUserInfoFromFb","scope","getUserFromFb","authSub","userNotActive","userNotFound","error","first_name","last_name","loginDataSub","fbCode","FacebookAppID","initFacebook","init","appId","xfbml","version","recoverPassword","recoverPassSub","recoverPasswordFailed","recoverPasswordSuccess","409","UserPasswordComponent","41","procededToBuy","goToCart","bot_1","bootbox","dialog","backdrop","buttons","confirm","cancel","callback","navigateToCart","className","alert","410","News","UrlRedirect","411","pageId","Web_Api_Menu_GetCmsPageById","pageUrl","Web_Api_Menu_GetCmsPageByUrl","412","setPageUrl","menus","SeoUrl","Children","LoadData","Web_Api_Get_Cms_Menu_List","413","Web_Api_Get_FaqData","414","Web_Api_Post_Send_Info_Request","Web_Api_Get_Info_Request_Data","415","SliderService","416","TrustpilotService","getTrustpilotData","Web_Api_Get_Trustpilot_Data","417","Web_Api_Get_Cookie_Policy_Data","418","CookieOptions","path","domain","expires","secure","isPresent","merge","419","Web_Api_Get_Privacy_Policy_Data","420","Web_Api_Get_Purchase_Condition_Data","421","home_component_1","faq_component_1","cookie_policy_component_1","privacy_policy_component_1","purchase_condition_component_1","info_request_component_1","user_login_component_1","user_password_component_1","register_component_1","cms_page_component_1","category_component_1","product_details_component_1","product_page_list_component_1","promotions_component_1","news_page_component_1","other_product_component_1","blog_page_component_1","article_category_component_1","client_area_home_component_1","client_area_order_list_component_1","client_area_profile_component_1","cart_component_1","cart_cash_component_1","cart_submitted_component_1","cart_empty_page_component_1","client_area_order_details_component_1","registration_confirmation_component_1","offline_page_component_1","payment_confirmation_component_1","payment_unicredit_confirmation_component_1","payment_nexi_confirmation_component_1","not_found_page_component_1","search_component_1","client_area_invoices_component_1","newsletter_confirmation_page_component_1","newsletter_page_component_1","registration_complete_component_1","quick_registration_component_1","SysConfig","getComponentByName","componentName","component","getAllComponents","44","common_1","isCanvasModalOpenedSource","isCanvasProductDesignApprovedSource","toShowCanvasContainer","approveData","renderData","saveData","editor","loadData","workflowPages","documentLinks","setCanvasState","isOpened","setCanvasProductDesignState","isApproved","canvasInfo","isStateId","canvasUrl","canvasScript","node","async","charset","instanciateIframe","getElementsByTagName","productDefinition","templateImagesFolderPath","canvasUserUsername","watermark","surfaces","editorFrame","getElementById","initialMode","opacity","widgets","FinishButton","mode","GalleryDialog","defaultTabName","tabs","translationKey","canEdit","canUpload","subFolderName","CustomersCanvas","IframeApi","loadEditor","saveCanvasProduct","saveProduct","getImagesLinks","editorPage","approvePage","finishOrderPage","design","elements","approve","finish","getProofImages","proofImageUrls","setupPage","setBackgroundImagesUrl","sliderImageElements","differenceItems","parentLi","parents","link","foundDomElement","finishProductCustomization","finishProductDesign","setupPageAfterProductCustomization","openDocumentInNewTab","sliderElements","openNewProductInEditor","revertProduct","reopenProductInEditor","destPageData","generatedIdHide","fadeOut","generatedIdShow","show","Web_Api_Update_Prev_Canvas_Info","decryptedApiKey","baseUrl","Canvas_Web_Api_Base_Url","Web_Api_Delete_Customers_Canvas_State","apiKeyFinal","PlatformLocation","464","webpackEmptyContext","req","467","__compiler__","__core_private__","ViewUtils","view_utils","SelectorMatcher","CssSelector","o","__compiler_private__","468","getLRU","lru","Map","getRequest","getResponse","TranslateStaticLoaderFactory","browser_2","TranslateStaticLoader","forms_1","browser_1","idle_preload_1","app_module_1","default_request_options_1","routes_browser_service_1","UNIVERSAL_KEY","MainModule","routes","doRehydrate","use","loadRoutes","defaultValue","serverCache","_getCacheValue","win","bootstrap","UniversalModule","FormsModule","TranslateModule","forRoot","loader","provide","TranslateLoader","useFactory","a","deps","RouterModule","useHash","preloadingStrategy","IdlePreload","IdlePreloadModule","AppModule","providers","RequestOptions","useClass","DefaultRequestOptions","CookieBrowserService","RoutesBrowserService","useValue","49","filePath","fileName","pop","57","QuotingModel","categorieCarteCount","categorieCarteCopertinaCount","carte1Count","carte2Count","colori1Count","colori2Count","grammature1Count","grammature2Count","plastificazioni1Count","plastificazioni2Count","piegatureCount","materialiFlessibiliCount","copieCount","supportiRigidiCount","elettrosaldatureCount","tagliCount","copertineCount","rilegatureCount","facciateCount","tipologieBustaCount","multiploFacciate","copieIsValid","facciateIsValid","formatiIsValid","carte1IsValid","grammature1IsValid","carte2IsValid","grammature2IsValid","copertineIsValid","rilegatureIsValid","lavorazioniIsValid","taglioShowed","isTaglioVisible","copieOrder","facciateOrder","formatiOrder","stampaInternoFronteOrder","stampaInternoOrder","carteInternoOrder","plastificazioniInternoOrder","copertineOrder","stampaCopertinaFronteOrder","stampaCopertinaOrder","cartaCopertinaOrder","plastificazioniCopertinaOrder","cartoncinoOrder","rilegatureOrder","rifiloOrder","lavorazioniAccessorieOrder","piegatureIsValid","plastificazione1IsValid","plastificazione2IsValid","soggettiOrder","soggettiIsValid","baseFormatoIsValid","baseFormatoMessage","altezzaFormatoIsValid","altezzaFormatoMessage","formatiVisual","stampaInternoVisual","carteInternoVisual","plastificazioniInternoVisual","copertineVisual","stampaCopertinaVisual","cartaCopertinaVisual","plastificazioniCopertinaVisual","rilegatureVisual","lavorazioniAccessorieVisual","piegatureVisual","taglioOrder","taglioIsValid","bustaOrder","bustaIsValid","materialeOrder","materialeIsValid","supportoOrder","supportoIsValid","idGruppo","occhiellaturaOrder","occhiellaturaIsValid","occhielliCount","occhielliDisposizioneCount","asolaOrder","asolaIsValid","asoleCount","asoleDisposizioniCount","cucituraOrder","cucituraIsValid","cucitureCount","cucitureDisposizioniCount","elettroOrder","elettroIsValid","elettrosaldatureDisposizioniCount","bifaccialeOrder","biancoCoprenteOrder","biancoCoprenteCount","distanzaOcchielliIsValid","diametroAsolaIsValid","pantoniCount","colori1IsValid","cartoncinoIsValid","cartoncinoVisual","cartonciniCount","grammatureCartoncinoIsValid","grammatureCartoncinoCount","basePackagingIsValid","profonditaPackagingIsValid","idBasePackaging","idProfonditaPackaging","formatiCount","gapLabel","diametroInterno","diametroMassimoEsterno","formatiTipoLabelCount","formatiTipoLabelIsValid","fustelleLabelCount","fustellaLabelIsValid","avvolgimentiCount","avvolgimentiIsValid","numEtichetteIsValid","DiametroInternoAnimaEditabileLabel","DiametroInternoAnimaIsValid","DiametroMassimoEsternoAnimaEditabile","DiametroMassimoEsternoAnimaIsValid","isVisible","WizardListinoScontistica","SelectObject","MyVarianteMatrice","MyLavorazioneAccessoria","isValid","valoriCount","Regola","MyLavorazioneAccessoriaReturn","LavorazioniComponents","checkBox","inputBox","selectBox","592","app_component_1","home_module_1","cms_page_module_1","inventory_product_module_1","inventory_category_module_1","settings_module_1","system_configuration_service_1","ng2_table_1","entryComponents","HomeModule","CmsPageModule","InventoryProductModule","InventoryCategoryModule","SettingsModule","Ng2TableModule","app_component_2","593","NewsListComponent","subComponentTemplateUrl","newsOrientation","templateData","headerTypeNews","inputItems","inputCategory","inputNewsOrientation","inputHeaderTypeNews","inputColumns","ArticleList","594","FooterComponent","parentFooterData","footerData_1","footerSub","getFooterData","loggedIdUser","isActiveQuickRegistration","faqPageName","privacyPageName","cookiePageName","purchasePageName","contactPageName","passwordPageName","areaClientiPageName","isArrayInit","linkStart","linkSecuredStart","Facebook","Youtube","Twitter","Website","Instagram","newsletterSub","595","NewsletterComponent","pageTemplateSub","CheckboxFooter","privacyPageNameNewsletter","596","router_state_1","HeaderComponent","parentHeaderData","headerInfo_1","headerInfo","headerIsInit","MenuList","megaMenuItems","QuickRegistrationData","isLazyLoadActive","isEnableLAzyLoad","languagesList","Languages","currentLanguage","shoppingCart","disableModalButtons","spinner","entry","ShortCode","setLanguage","logout","getSearchResults","inputVal","subParam","encodedQuery","uriString","searchRoute","plainSearchText","keyup","keyCode","initNavMenu","initStickyHeader","initLazy","webStoreStatus","597","598","SideBarMenuComponent","sideType","parentSideMenuData","bredcrumpInfo","599","6","visiblePageLoader","getRoutesWithComponents","rawRoutes","assign","getOnlyOfflineRoutes","offlineRawRoutes","rawRoutes_1","rowRoute","redirectToRoute","redirectTo","pathMatch","offlineRoute","fallBackRoute","locales","langFromUrlMatch","langFromUrl","match","cookieLang","COOKIE_LANG_KEY","existLang","_loop_1","existBrowserLang","this_1","browserLangs","state_1","routeName","routePath","getPage","Location","600","CanvasWidgetComponent","canvasWidgetComponent","finishDesign","isCanvasModalOpened","initSlider","601","slider_service_1","SliderWidgetComponent","parentSliderData","sliderData_1","sliderDataSub","getSliderData","sliderService","elementRef","slides","Slides","sliderIsInit","setElementStyle","goToUrl","602","trustpilot_service_1","TrustpilotWidgetComponent","trustpilotService","trustpilotType","trustpilotSub","trustpilotData","trustboxesRef","querySelectorAll","singleTrustboxInstance","Trustpilot","loadFromElement","603","QuotingOrderTotalsComponent","orderTotalSub","_elementChildRef","604","quoting_service_1","quoting_submit_model_1","quoting_submit_model_2","quoting_submit_model_3","quoting_constants_1","quoting_excluding_component_1","shared_constants_1","quoting_model_1","OtherProductFormComponent","autentification","otherProdSub","getOtherProductData","formInfo","InputresourceId","_quotingService","formData","FormData","resourceId","resultPrice","resultCalculation","isDataInitialized","requestInfoSuccess","showErrorMessage","companyInformation","CompanyInfo","isFormValid","sumQtaMatrix","totalQtaForMatrix","isCalculatedProduct","isVisibleMatrixLav","ExcludingRules","ExcludingComponent","responseModel","array","TablePriceList","TableScontisticaPriceList","typePriceResult","gruppi","group","varianti","VarianteMatrix","createMatriceObj","setMacrocategory","SharedConstants","OTHER_PRODUCTS_TYPE","convertLogicalToViewQuotingModel","checkValidation","listaRegole","calculationType","companyCondizioni","lavorazioniAccessorie","lavAcc","convertLogicalToViewModelVarianti","obbligatorio","hasInfo","showInfo","valori","lavorazioneCheckValue","isCalculated","tipoSelezione","idVarianteMatriceOrizzontale","idVarianteMatriceVerticale","valore","intFormValue","variante","varianteMatrice","VarianteVerticale","VarianteOrizzontale","isMatrix","option","varianteMatverticale","chiave","nome","colore","colorExaForMatrix","mostraPerVariantiMatrice","varianti2","option2","varianteMat2","qta","option3","varianteMat3","checkRegoleOtherProducts","lavAccArray_1","lav","lavorazioneId","ResetRegole","ApplicaRegoleLavorazioniAccessorie","count_1","lavorazione","lavAccArray_2","lavorazioneOld","dropDownChange","checkBoxChanged","isrules","descrizione","lavorazioniAccessorieComboVisualChange","checkForm","getCalculationModel","checkFormRichiestaPrevIsValid","QuotingConstants","WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO","isCustomerLoggedIn","sendRequestInfo","showHideLavDescription","isCalculationTypeCalcolato","isCalculationTypeCalcolatoScontistica","quantity","minCopie","minimo_quantita","maxCopie","maximo_quantita","isQuantityValidated","copieMessage","copie","ismatrixPresent","attribute","minQta","minQtaInput","maxQta","maxQtaInput","isValidated","lavorazioneMessage","convertedWidth","convertedHeight","convertedDepth","isWidthValidated","isHeightValidated","isDepthValidated","widthErrorMex","max_base","min_base","heightErrorMex","max_altezza","min_altezza","hasDepth","depthErrorMex","max_profondita","min_profondita","isQuantityMatrixValidated","MatrixMessage","StrCustomerId","lavorazione_1","matrixValues","matrix","quantita","lavorazioneOrizzontaleId","lavorazioneVerticaleId","calculationSub_1","getCalculatedAp","scontisticaTable","Price","setPriceResult","isCalculationTypeListino","isCalculationTypeCalcolatoListino","isCalculationTypeCalcolatoListinoFornitori","tableScontisticaPriceListSliced","slicedPriceRow","setListinoPriceResult","isCalculationTypeListinoScontistica","isCalculationTypeCalcolatoListinoScontistica","isCalculationTypeCalcolatoListinoFornitoriScontistica","breakFlag","tableScontisticaPriceListSliced_1","priceRow","reverse","reverse_1","setListinoScontisticaPriceResult","isCalculationTypeCalcolatoQuotigPrev","WIZARD_CALCULATION_TYPE_CALCOLATO","WIZARD_CALCULATION_TYPE_CALCOLATO_SCONTISTICA","WIZARD_CALCULATION_TYPE_LISTINO","WIZARD_CALCULATION_TYPE_LISTINO_SCONTISTICA","WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO","WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI","WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_SCONTISTICA","WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI_SCONTISTICA","checkEmailIsValid","EMAIL_REGEXP","RowIndex","ColumnIndex","isRowSelectedListino","isCellSelectedListino","t","isCellSelected","isColumnSelectedListino","IsSelected","StrDiscountedPrice","DataId","DayId","QuantityId","DayDescriptionStatus","StrUnitPrice","StrIva","StrDiscountedPriceWithTax","StrWeight","StrWeightUm","PrezzoOriginalestato","setTypePriceResult","setSelectedIndexListino","addToCartApProduct","RowId","addToCartOtherProductCalcolatoScontistica","addToCartWizardListino","addToCartWizardListinoScontistica","Varianti","textAreaCheck","setPopoverVariableForMAtrix","QuotingService","605","QuotingMainComponent","compSub","QResourceId","QMacroCat","QType","InputMacroCatId","InputTypeId","ParentComponent","606","quoting_submit_model_4","WizardAdesiviComponent","wizardSub","getWizardAdesiviData","waiting","carteValue","blockquoting","isCalculatedWizard","addToCartWizardCalcolato","addToCartWizardCalcolatoScontistica","valueStampaInternoSoloFronte","valueStampaCopertinaSoloFronte","parameterValidation","isUserLoggedIn","CheckRegoleAdesivi","oldMateriale","oldSupporto","oldFormato","oldPlastificazione","lavAccArray","idFormato","ApplicaRegole","onFormatiChange","onPlastificationInternoChange","onMaterialeChange","onSuportoChange","lavorazioniAccessorieComboChange","CheckRegoleManifesti","CheckRegolePannelli","lavAccArray_3","validationCopie","validationSoggetti","validationFormati","validationBaseFormati","validationAltezzaFormati","validationMateriali","validationSupporti","countPlastificazioni","validationLavorazioneAccessoria","selectFileCombination","plastificazioni1","listaFile","FilesCombinazioniObj","listaFilesCombinazioni","file","FormatId","fileObj","PathFile","NomeFile","FileName","PathIstruzioni","NomeIstruzioni","FileIstructionName","checkZero","lavorazioneAccessoria","sort","b","calcWizSub","getCalculatedWizard","$wrapper","dataset","appendTo","base","minBase","minimoBase","maxBase","massimoBase","minAltezza","minimoAltezza","maxAltezza","massimoAltezza","soggettiMessage","minimoCopie","massimoCopie","formati","formatiMessage","materialiFlessibili","materialeMessage","supportiRigidi","supportoMessage","transSub","checkIsPlastificazioneInternoIsShowed","isAttributeFixed","tipoLavorazione","checkIsLavorazioneAccessoriaCheckShowed","checkIsLavorazioneAccessoriaNumericShowed","checkIsLavorazioneAccessoriaTextAreaShowed","checkIsLavorazioneAccessoriaComboShowed","selectedValue","checkIsLavorazioneAccessoriaDescrittivoShowed","formato","formatoDescription","formatoImage","formatiHasInfo","formatiShowInfo","onFormatiVisualChange","formatId","materiale","materialeDescription","materialeImage","materialeHasInfo","materialeShowInfo","onMaterialeVisualChange","materialeId","supporto","supportoDescription","supportoImage","supportoHasInfo","supportoShowInfo","onSuportoVisualChange","supportoId","plastification","plastificazioni1Description","plastificazioni1Image","plastificazioni1HasInfo","plastificazioni1ShowInfo","onPlastificationInternoViasualChange","plastificationId","showHideFormatDescription","showHideMaterialeDescription","showHideSupportoDescription","showHidePlastficationInternoDescription","wizCalSub","wizSconSub","wizLisSub","wizLisSconSub","607","WizardBannerComponent","getWizardBannerData","CheckRegoleBanner","oldAsola","oldElettro","oldOcchielli","onOcchielliChange","onAsoleChange","onElettrosaldatureChange","checkIsAsolaIsShowed","asole","checkIsCucituraIsShowed","cuciture","checkIsElettroIsShowed","elettrosaldature","checkIsOcchielliIsShowed","occhielli","CheckRegoleBandiere","oldCucitura","onCucitureChange","isBannerQuotingForm","isBandiereQuotingForm","validationElettro","validationCuciture","validationAsole","validationDiametroAsole","validationOcchielli","validationDistanzaOcchielli","countOcchielliDisposizione","countAsoleDisposizioni","countTelettrosaldature","countTelettrosaldatureDisposizioni","countCucitureDisposizioni","occhielliDisposizione","asoleDisposizioni","elettrosaldatureDisposizioni","cucitureDisposizioni","occhiellaturaMessage","asolaMessage","diametro","diametroAsolaMessage","distanza","distanzaOcchielliMessage","elettroMessage","cucituraMessage","occhiellatura","occhiellaturaDescription","occhiellaturaImage","occhiellaturaHasInfo","occhiellaturaShowInfo","onOcchielliVisualChange","occhielliId","asola","asolaDescription","asolaImage","asolaHasInfo","asolaShowInfo","onAsoleVisualChange","asoleId","elettro","elettroDescription","elettroImage","elettroHasInfo","elettroShowInfo","onElettrosaldatureVisualChange","elettroId","cucitura","cucituraDescription","cucituraImage","cucituraHasInfo","cucituraShowInfo","onCucitureVisualChange","cucituraId","showHideOcchiellaturaDescription","showHideAsolaDescription","showHideElettrosaldatureDescription","showHideCucitureDescription","608","WizardBusteComponent","getWizardBusteData","resultPriceQuantity","resultPriceImponibile","resultPriceCurrency","tipoTaglio","getTableValues","onStampaRetroChangeDocta","colori1","col","onStampaFronteChangeDocta","colori2","validationBusta","validationColori","countPantoni","pantoni","sub_1","colori1Message","tipologieBusta","bustaMessage","onBustaChange","busta","bustaDescription","bustaImage","bustaHasInfo","bustaShowInfo","onBustaVisualChange","bustaId","onPantoneFronte1VisualChange","pantoneValue","onPantoneFronte1Change","pantone","pantoneFronte1Description","pantoneFronte1Image","pantoneFronte1HasInfo","pantoneFronte1ShowInfo","onPantoneFronte2VisualChange","onPantoneFronte2Change","pantoneFronte2Description","pantoneFronte2Image","pantoneFronte2HasInfo","pantoneFronte2ShowInfo","onPantoneRetro1VisualChange","onPantoneRetro1Change","pantoneRetro1Description","pantoneRetro1Image","pantoneRetro1HasInfo","pantoneRetro1ShowInfo","onPantoneRetro2VisualChange","onPantoneRetro2Change","pantoneRetro2Description","pantoneRetro2Image","pantoneRetro2HasInfo","pantoneRetro2ShowInfo","onStampaInternoVisualChange","stampaInternoValue","onStampaRetroVisualChange","stampaCopertinaValue","showHideBusteDescription","showHidePantoneFronte1Description","showHidePantoneFronte2Description","showHidePantoneRetro1Description","showHidePantoneRetro2Description","isPantoneFronte1Showed","isPantoneFronte2Showed","isPantoneRetro1Showed","isPantoneRetro2Showed","609","WizardCommercialeComponent","getWizardCommercialeData","listaProfonditaPackaging","listaFormatiFull","IsPackagingWizard","onBasePackagingChange","CheckRegoleCommerciale","oldCarta","oldPiegature","idCarta","isTaglioCalculated","onCartaInternoFieldChanged","onPiegaturaChange","validationBasePackaging","validationProfonditaPackaging","validationCarteInterno","validationGrammatureCarteInterno","validationPiegatura","validationPlastificazione","countCartaCategories","categorieCarte","carte1","carta","grammature1","grammatureInterno","basePackagingMessage","profonditaPackagingMessage","carte1Message","grammature1Message","piegature","piegatureMessage","plastificazione1Message","tipoCalcoloTaglio","checkIsTaglioShowed","onCategoriaCartaInternoFieldChanged","selectedPaper","carte","idCategorieCarte1","parentId","carte1Description","carte1Image","carte1HasInfo","carte1ShowInfo","subElements","wrap_valore","grammature","onCartaInternoVisualFieldChanged","paperId","listaPackagingParameter","IdBase","listPackagingRelProfondita","IdProfondita","onProfonditaPackagingChange","firstFormato","profondita","listPackagingRelFormato","formatiRel","IdFormato","onGrammatureInternoVisualFieldChanged","grammatureId","piegatura","piegatureDescription","piegatureImage","piegatureHasInfo","piegatureShowInfo","onPiegaturaVisualChange","piegaturaId","showHidePiegatureDescription","showHidePaperInternoDescription","setActive","PiegaId","61","getWizardStampaData","modelType","Web_Api_Get_Wizard_Stampa_Data","Web_Api_Get_Wizard_Banner_Data","Web_Api_Get_Wizard_Adesivi_Data","Web_Api_Get_Wizard_Buste_Data","getWizardEtichetteData","Web_Api_Get_Wizard_Etichette_Data","Web_Api_Get_Wizard_Commerciale_Data","getWizardEditoriaData","Web_Api_Get_Wizard_Editoria_Data","getWizardDataRequest","Web_Api_Get_Wizard_Data_Address","Web_Api_Post_Get_Wizard_Price_Estimation","Web_Api_Post_Get_Ap_Price_Estimation","Web_Api_Post_Send_Request_Info_Wizard","610","quoting_model_2","WizardEditoriaComponent","resourceType","InputresourceType","components","EditioriaCopertinaSelect","carte2","cartaCopertina","grammature2","grammatureCopertina","cartoncini","cartaCartoncino","grammatureCartoncino","dorsoString","dorso","toFixed","checkIsCopertinaShowed","checkIsCartoncinoShowed","checkIsPlastificazioneCopertinaIsShowed","plastificazioni2","lavIsVisible","onCartoncinoFieldChanged","cartoncinoDescription","cartoncinoImage","cartoncinoHasInfo","cartoncinoShowInfo","onCartoncinoVisualFieldChanged","onCategoriaCartaCopertinaFieldChanged","carteCopertina","idCategorieCarte2","carte2Description","carte2Image","carte2HasInfo","carte2ShowInfo","onCartaCopertinaFieldChanged","grammatureCartaCopertina","onCopertineFieldChange","onCopertineFieldVisualChange","copertinaId","onCartaCopertinaVisualFieldChanged","onStampaCopertinaVisualChange","onGrammatureCartoncinoVisualFieldChanged","onGrammatureCopertinaVisualFieldChanged","onPlastificationCopertinaChange","plastificazioni2Description","plastificazioni2Image","plastificazioni2HasInfo","plastificazioni2ShowInfo","onPlastificationCopertinaVisualChange","onRilegaturaChange","rilegature","rilegatureDescription","rilegatureImage","rilegatureHasInfo","rilegatureShowInfo","onRilegaturaVisualChange","rilegaturaId","showHidePaperCartoncinoDescription","showHidePaperCopertinaDescription","showHidePlastficationCopertinaDescription","showHideRilegatureDescription","CheckRegoleEditoria","oldCartaCopertina","oldPlastificazioneCopertina","oldCopertina","oldRilegatura","validationFacciate","validationPlastificazioneInterno","validationCopertina","validationCarteCopertina","validationGrammatureCarteCopertina","validationPlastificazioneCopertina","validationCartoncino","validationGrammatureCartoncino","validationRilegatura","countCategorieCarteCopertina","categorieCarteCopertina","minFacciate","minimoFacciate","maxFacciate","massimoFacciate","objGrammaturaFacciateValidation","checkValidationRulesGrammatureFacciate","Facciate","MassimoFacciate","facciate","facciateMessage","cartoncinoMessage","grammatureCartoncinoMessage","plastificazione2Message","carte2Message","grammature2Message","copertine","copertineMessage","rilegatureMessage","idGrammatura","listaRegoleGrammaturaFacciate","IdGrammatura","611","WizardEtichetteComponent","enableAltezzaLabel","CheckRegoleEtichette","oldTaglio","onTaglioChange","isLabelField","validationNumEtichetteLabel","validationDiametroInternoAnimaLabel","validationDiametroMassimoEsternoAnimaLabel","enableOrDisableAltezzaLabelByTipoFormato","countTagli","countFustelle","countFormatiTipoLabel","tagli","ListafustelleLabel","TipologiaFormatiLabel","minDistEtichette","minimaDistanzaEtichetteLabel","maxDistEtichette","massimaDistanzaEtichetteLabel","numEtichetteMessage","numDiametroInternoAnimaCustomer","numDiametroInternoAnima","numDiametroInternoAnimaEditabileLabel","DiametroInternoAnimaMessage","numDiametroMassimoEsternoCustomer","numDiametroMassimoEsterno","numDiametroMassimoEsternoAnimaEditabile","DiametroMassimoEsternoAnimaMessage","checkIsTaglioIsShowed","taglioDescription","taglioImage","taglioHasInfo","taglioShowInfo","onTaglioVisualChange","taglioId","onFormatiTipoLabelChange","formatoTipo","formatiTipoImage","formatiTipoHasInfo","formatiTipoLabelShowInfo","tipoFormato","onFormatiTipoLabelVisualChange","fotmatoTipoId","onAvvolgimentiChange","avvolgimentiLabel","avvolgimento","avvolgimentiImage","avvolgimentiHasInfo","avvolgimentiShowInfo","onAvvolgimentiVisualChange","avvolgimentoId","showHideTaglioDescription","showHideFormatiTipoLabelDescription","showHideAvvolgimentiDescription","612","WizardStampaComponent","isStampaBifaccialeNoHide","isStampaBifaccialeSiHide","CheckRegoleStampa","countBiancoCoprente","biancoCoprente","stampaBifacciale","checkIsBifaccialeShowed","613","614","615","616","617","618","619","620","cookie_options_1","setOptions","defaultOptions","cookieReader","getAll","cookieWriter","stringify","removeAll","cookies","cookieArray","rawDocument","lastCookies","lastCookieString","that","currentCookieString","safeDecodeURIComponent","isBlank","buildCookieString","str","cookiePath","defaultOpts","opts","mergeOptions","isString","toUTCString","cookieLength","providedOpts","newOpts","621","CookieNodeService","generateOptions","clearCookie","622","623","_super","apply","Content-Type","__extends","BaseRequestOptions","624","LoadingOverlayService","showPageLoadingOverlay","jQuery","hidePageLoadingOverlay","625","LocalStorageService","Write","localStorage","setItem","Read","getItem","Helper","toInstance","Remove","removeItem","jsonObj","fromJSON","propName","626","call","getBrowserLangs","resetConfig","navigator","languages","browserLanguage","userLanguage","627","__export","m","p","628","application","getTranslation","observable$","appConfig","templateName","finally","629","hashCodeString","hash","ModelService","create","638","71","getMacrocategory","Macrocategory","macrocategory","getModelItemName","removeSelectRules","getLowerCase","lavorazioneKey","subKey","removeRuleFromComponent","valoriSubKey","removeSelectRuleFromList","regoles","regoleKey","Categoria_2","Id_Elemento_2","Sezione_2","list","returnList","getRegole","regolesList","categoria","allRegoles","categoryRegoles","regolesKey","getLavorazioneValue","hideFinituraValue","regole","macro","hideLavorazioneValue","Id_Elemento_Sottochiave_2","hideSelectValue","elemento","sezioneInput","Categoria_1","Id_Elemento_1","Id_Elemento_Sottochiave_1","inputString","outString","setSelectRules","rulesList","sotoelemento","regoleList","macroCategoria","sottoElemento","responseModelOtherProduct","flagReset","regoleToReset","FindRegole","regoleToReset_1","regola","CheckMacroCategoria","ApplicaRegola","regoleToApply","regoleToApply_1","hideOrShow","Tipo_Regola","idElemento","idSottoElemento","hideOrShowComboItem","idElemento_1","hideOrShowAttribute","idLavorazione","idVariante","hideOrShowLavorazioneAccessoria","attributo","hideOrShowRadComboItem","hideOrShowAllRadComboItems","parameterList","emptyValue","parameterList_1","parameter","parameterList_2","Tipo","Sezione_1","Macro_Categoria_1","Macro_Categoria_2","toUpperCase","tipoLavorazioneAccessoria","getComboValue","display","idLav","comboItemNumber","firstVariableVisible","reflectChangesOnOtherProducts","isFoundElement","responseModelOtherProduct_1","comboOption","72","73","74","Web_Api_Get_Client_Area_Details","Web_Api_Get_Client_Area_User_Profile","Web_Api_Post_Client_Area_Update_User_Password","collection","Web_Api_Post_Client_Area_Update_User_Profile","Web_Api_Post_Client_Area_Add_New_Address","defaultAddress","Web_Api_Post_Client_Area_Update_User_Address","Web_Api_Post_Client_Area_Remove_Address","Web_Api_Get_Client_Area_Order_Details","getClientAreaOrdersList","Web_Api_Get_Client_Area_Order_List","toTimeString","Web_Api_Get_Client_Area_Invoices","orderRowId","sendTo","messageObject","Web_Api_Get_Client_Area_Order_Send_Message","OrderRowId","SendTo","MessageObject","processId","Web_Api_Get_Client_Area_Proccess_Order_File","ProcessId","Web_Api_Post_Cancel_Order","numeroCro","numeroTrn","Web_Api_Get_Client_Area_Update_Bonifico_Payment","IdOrder","Web_Api_Post_Get_Bonifico_Uploaded_Files","8","Web_Api_Get_Header_Data","Web_Api_Get_Side_Menu_Data","Web_Api_Get_Home_Page_Data_Optimized","Web_Api_Get_Home_HilightPromoProduct","getSeoData","Web_Api_Get_Seo_Data","Web_Api_Get_Slider_Data","Web_Api_Get_Footer_Data","Web_Api_Get_Shopping_Cart_Data","Web_Api_Get_Shopping_Cart_Cash_Data","Web_Api_Get_Shopping_Cart_Submitted_Data","Web_Api_Get_Other_Product_Form_Data","Web_Api_Get_Offline_Page_Data","Web_Api_Get_Login_Page_Data","85","Web_Api_Post_Newsletter_Subscribe","Web_Api_Get_Newsletter_Page_Data","Web_Api_Get_Newsletter_Confirmation_Page_Data","86","87","model_service_1","local_storage_1","loading_overlay_service_1","header_component_1","footer_component_1","news_list_component_1","side_bar_menu_component_1","newsletter_component_1","quoting_main_component_1","wizard_form_commerciale_component_1","wizard_form_editoria_component_1","wizard_form_adesivi_component_1","wizard_form_banner_component_1","wizard_form_buste_component_1","wizard_form_etichette_component_1","wizard_form_stampa_component_1","other_product_form_component_1","quoting_order_totals_component_1","slider_widget_component_1","angular2_material_datepicker_1","ng2_bs3_modal_1","canvas_widget_components_1","trustpilot_widget_component_1","MODULES","CommonModule","ReactiveFormsModule","DatepickerModule","Ng2Bs3ModalModule","PIPES","COMPONENTS","PROVIDERS","ngModule","concat","895","896","main","webfontloader_1","families","platformRef","bootstrapModule","browser_module_1","bootloader_1","enableProdMode","platformUniversalDynamic","bootloader","9","Web_Api_Base_Url","Google_Maps_Key","Web_Api_Get_Home_Page_Data","Auth_User_Cookie","WscPrinter_Lang","Default_Lang","Offers_Image_Url","Products_Image_Url","WizardCheck_Image_Url","WizardAlert_Image_Url","98","CartProductModel","99","ClientAreaOrderNote","PaypalButtonStyleModel","ClientAreaOrderProcessFile"],"mappings":"AAAAA,cAAc,IAERC,GACA,SAAUC,EAAQC,EAASC,GAEjC,YCLA,IAAAC,GAAAD,EAAmC,GACnCE,EAAAF,EAA4D,IAC5DG,EAAAH,EAA2B,EAC3BA,GAAO,KACPA,EAAO,KACPA,EAAO,KACPA,EAAO,IAEP,IAAAI,GAAAJ,EAA6B,IAC7BK,EAAAL,EAAkC,KAClCM,EAAAN,EAA8B,IAExBO,GACJC,UAAW,IACXC,aAAc,KAIhBC,EAAA,WAIE,QAAAA,GAAoBC,EACAC,EACAC,EACqBC,EACIC,GAJzBC,KAAAL,OACAK,KAAAJ,QACAI,KAAAH,aACqBG,KAAAF,YACIE,KAAAD,SAN7CC,KAAAC,qBAwJF,MA5IEP,GAAAQ,UAAAC,IAAA,SAAIC,EAAaC,GAAjB,GAAAC,GAAAN,IAEE,IAA6B,GAA1BA,KAAKC,kBACR,CACE,GAAID,KAAKF,WAAaE,KAAKJ,MAAMW,IAAIH,GAAM,CACzC,GAAII,GAAMrB,EAAAsB,WAAWC,GAAGV,KAAKJ,MAAMO,IAAIC,GAEvC,OADAJ,MAAKJ,MAAMe,MAAMP,GACVI,EAGT,MADAH,GAAUL,KAAKY,0BAA0BP,GAClCL,KAAKL,KACTQ,IAAIC,EAAKC,GACTQ,IAAInB,EAAWoB,aACfC,GAAG,SAAAC,GACGV,EAAKR,WACRQ,EAAKV,MAAMqB,IAAIb,EAAKY,KAGvBE,MAAM,SAACC,GAAa,MAAAb,GAAKc,YAAYD,KAKxC,GAAInB,KAAKJ,MAAMW,IAAIH,GAAM,CACvB,GAAII,GAAMrB,EAAAsB,WAAWC,GAAGV,KAAKJ,MAAMO,IAAIC,GACvC,OAAOI,GAETH,EAAUL,KAAKY,0BAA0BP,EAGzC,IAAIgB,GAAY,GAAIC,KAGpB,OAFAtB,MAAKH,WAA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main.bundle.js","sourcesContent":["webpackJsonp([0],{\n\n/***/ 10:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar http_1 = __webpack_require__(96);\r\nvar Observable_1 = __webpack_require__(1);\r\n__webpack_require__(432);\r\n__webpack_require__(185);\r\n__webpack_require__(433);\r\n__webpack_require__(430);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar node_logger_service_1 = __webpack_require__(260);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar responseStatuses = {\r\n noContent: 204,\r\n authRequired: 401\r\n};\r\nvar ApiService = (function () {\r\n function ApiService(http, cache, nodeLogger, isBrowser, cookie) {\r\n this.http = http;\r\n this.cache = cache;\r\n this.nodeLogger = nodeLogger;\r\n this.isBrowser = isBrowser;\r\n this.cookie = cookie;\r\n this.clientSideCaching = true;\r\n }\r\n /**\r\n * whatever domain/feature method name\r\n */\r\n ApiService.prototype.get = function (url, options) {\r\n var _this = this;\r\n if (this.clientSideCaching == false) {\r\n if (this.isBrowser && this.cache.has(url)) {\r\n var obs = Observable_1.Observable.of(this.cache.get(url));\r\n this.cache.clear(url);\r\n return obs;\r\n }\r\n options = this.createAuthorizationHeader(options);\r\n return this.http\r\n .get(url, options)\r\n .map(ApiService.extractData)\r\n .do(function (json) {\r\n if (!_this.isBrowser) {\r\n _this.cache.set(url, json);\r\n }\r\n })\r\n .catch(function (err) { return _this.handleError(err); });\r\n }\r\n else {\r\n if (this.cache.has(url)) {\r\n var obs = Observable_1.Observable.of(this.cache.get(url));\r\n return obs;\r\n }\r\n options = this.createAuthorizationHeader(options);\r\n var startDate = new Date();\r\n this.nodeLogger.AddLogWithTime(\"START REQUEST \" + url);\r\n return this.http\r\n .get(url, options)\r\n .map(ApiService.extractData)\r\n .do(function (json) {\r\n var endDate = new Date();\r\n var timeDiff = Math.abs(endDate.getTime() - startDate.getTime());\r\n var diffMs = Math.ceil(timeDiff);\r\n _this.nodeLogger.AddLogWithTime(\"END REQUEST \" + url + \"(\" + diffMs + \")\");\r\n _this.cache.set(url, json);\r\n })\r\n .catch(function (err) { return _this.handleError(err); });\r\n }\r\n };\r\n /**\r\n * whatever domain/feature method name\r\n */\r\n ApiService.prototype.getUniversalCached = function (url, options) {\r\n var _this = this;\r\n if (this.isBrowser && this.cache.has(url)) {\r\n var obs = Observable_1.Observable.of(this.cache.get(url));\r\n this.cache.clear(url);\r\n return obs;\r\n }\r\n options = this.createAuthorizationHeader(options);\r\n return this.http\r\n .get(url, options)\r\n .map(ApiService.extractData)\r\n .do(function (json) {\r\n if (!_this.isBrowser) {\r\n _this.cache.set(url, json);\r\n }\r\n })\r\n .catch(function (err) { return _this.handleError(err); });\r\n };\r\n ApiService.prototype.post = function (url, body, options) {\r\n var _this = this;\r\n options = this.createAuthorizationHeader(options);\r\n return this.http\r\n .post(url, body, options)\r\n .map(ApiService.extractData)\r\n .catch(function (err) { return _this.handleError(err); });\r\n };\r\n ApiService.prototype.createAuthorizationHeader = function (options) {\r\n if (options === void 0) { options = {}; }\r\n //Token is read from cache and not cookie. \r\n //Note: Before it was read form cookie and it was not containing the last token.\r\n //Because the set cookie is done on the response and the get cookie is done on the request.\r\n var token = this.cache.get('__ACCESS_TOKEN__');\r\n if (token) {\r\n if (!options.headers) {\r\n options.headers = new http_1.Headers();\r\n }\r\n options.headers.append('Authorization', \"Bearer \" + token);\r\n }\r\n return options;\r\n };\r\n ApiService.extractData = function (res) {\r\n if (res.status === responseStatuses.noContent) {\r\n return {};\r\n }\r\n var body = res.json();\r\n return body || {};\r\n };\r\n ApiService.prototype.handleError = function (err) {\r\n this.nodeLogger.AddLogWithTime(\"Error: \" + err);\r\n var cookieToken = this.cookie.get('accessToken');\r\n var cacheToken = this.cache.get('__ACCESS_TOKEN__');\r\n if (!this.isBrowser) {\r\n return Observable_1.Observable.empty();\r\n }\r\n switch (err.status) {\r\n case 401:\r\n this.handleUnauthorized();\r\n break;\r\n default:\r\n break;\r\n }\r\n return Observable_1.Observable.throw(err);\r\n };\r\n ApiService.prototype.handleUnauthorized = function () {\r\n //If the token expires while using the application, the user is redirected to home page to get a new token and start navigation from there.\r\n if (this.isBrowser) {\r\n window.location.href = \"/\";\r\n }\r\n };\r\n ApiService = __decorate([\r\n core_1.Injectable(),\r\n __param(3, core_1.Inject('isBrowser')),\r\n __param(4, core_1.Inject('CookieService')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof http_1.Http !== 'undefined' && http_1.Http) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof node_logger_service_1.NodeLoggerService !== 'undefined' && node_logger_service_1.NodeLoggerService) === 'function' && _c) || Object, Boolean, (typeof (_d = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _d) || Object])\r\n ], ApiService);\r\n return ApiService;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.ApiService = ApiService;\r\n\n\n/***/ }),\n\n/***/ 100:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar RegisterService = (function () {\r\n function RegisterService(_api, _cache, mappings, cartService, languageService, authService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n this.cartService = cartService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n }\r\n RegisterService.prototype.sendInfoRequest = function (parameters) {\r\n var cartId = this.cartService.getCartId();\r\n parameters.CartId = cartId;\r\n parameters.EmailRegister = parameters.EmailRegister ? parameters.EmailRegister.toLowerCase() : \"\";\r\n parameters.EmailRepeat = parameters.EmailRepeat ? parameters.EmailRepeat.toLowerCase() : \"\";\r\n parameters.PecEmail = parameters.PecEmail ? parameters.PecEmail.toLowerCase() : \"\";\r\n return this._api.post(this.mappings.Web_Api_Post_Register, parameters)\r\n .do(function (result) { return result; })\r\n .share();\r\n };\r\n RegisterService.prototype.getRegisterPageData = function (lang) {\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Register_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);\r\n return this._api.get(url);\r\n };\r\n RegisterService.prototype.confirmationRegistration = function (id) {\r\n var url = this.mappings.Web_Api_Post_Confirm_Registration.replace('{id}', id);\r\n return this._api.post(url);\r\n };\r\n RegisterService.prototype.setFacebookLoginData = function (registerData) {\r\n this.facebookLoginData = registerData;\r\n };\r\n RegisterService.prototype.getFacebookLoginData = function () {\r\n return this.facebookLoginData;\r\n };\r\n RegisterService.prototype.getRegistrationCompletePageData = function () {\r\n var lang = this.languageService.getLongLang();\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Registration_Complete_Page_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);\r\n return this._api.get(url);\r\n };\r\n RegisterService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object])\r\n ], RegisterService);\r\n return RegisterService;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.RegisterService = RegisterService;\r\n\n\n/***/ }),\n\n/***/ 101:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * @license\r\n * Copyright Google Inc. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://angular.io/license\r\n */\r\n\r\nvar core_1 = __webpack_require__(0);\r\n// es6-modules are used here\r\nvar dom_adapter_1 = __webpack_require__(31);\r\nvar platform_browser_1 = __webpack_require__(7);\r\n/**\r\n * A service that can be used to get and add meta tags.\r\n *\r\n * @experimental\r\n */\r\nvar Meta = (function () {\r\n function Meta(_document) {\r\n this._document = _document;\r\n this._dom = dom_adapter_1.getDOM();\r\n }\r\n /**\r\n * Adds a new meta tag to the dom.\r\n *\r\n * ### Example\r\n *\r\n * ```ts\r\n * const name: MetaDefinition = {name: 'application-name', content: 'Name of my application'};\r\n * const desc: MetaDefinition = {name: 'description', content: 'A description of the page'};\r\n * const tags: HTMLMetaElement[] = this.meta.addTags([name, desc]);\r\n * ```\r\n *\r\n * @param tags\r\n * @returns {HTMLMetaElement[]}\r\n */\r\n Meta.prototype.addTags = function () {\r\n var _this = this;\r\n var tags = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n tags[_i - 0] = arguments[_i];\r\n }\r\n var presentTags = this._flattenArray(tags);\r\n if (presentTags.length === 0)\r\n return [];\r\n return presentTags.map(function (tag) { return _this._addInternal(tag); });\r\n };\r\n /**\r\n * Gets the meta tag by the given selector. Returns element or null\r\n * if there's no such meta element.\r\n *\r\n * ### Example\r\n *\r\n * ```ts\r\n * const meta: HTMLMetaElement = this.meta.getTag('name=description');\r\n * const twitterMeta: HTMLMetaElement = this.meta.getTag('name=\"twitter:title\"');\r\n * const fbMeta: HTMLMetaElement = this.meta.getTag('property=\"fb:app_id\"');\r\n * ```\r\n *\r\n * @param selector\r\n * @returns {HTMLMetaElement}\r\n */\r\n Meta.prototype.getTag = function (selector) {\r\n if (!selector)\r\n return null;\r\n return this._dom.query(\"meta[\" + selector + \"]\");\r\n };\r\n /**\r\n * Updates the meta tag with the given selector.\r\n *\r\n * * ### Example\r\n *\r\n * ```ts\r\n * const meta: HTMLMetaElement = this.meta.updateTag('name=description', {name: 'description',\r\n * content: 'New description'});\r\n * console.log(meta.content); // 'New description'\r\n * ```\r\n *\r\n * @param selector\r\n * @param tag updated tag definition\r\n * @returns {HTMLMetaElement}\r\n */\r\n Meta.prototype.updateTag = function (selector, tag) {\r\n var meta = this.getTag(selector);\r\n if (!meta) {\r\n // create element if it doesn't exist\r\n return this._addInternal(tag);\r\n }\r\n return this._prepareMetaElement(tag, meta);\r\n };\r\n /**\r\n * Removes meta tag with the given selector from the dom.\r\n *\r\n * ### Example\r\n *\r\n * ```ts\r\n * this.meta.removeTagBySelector('name=description');\r\n * ```\r\n *\r\n * @param selector\r\n */\r\n Meta.prototype.removeTagBySelector = function (selector) {\r\n var meta = this.getTag(selector);\r\n this.removeTagElement(meta);\r\n };\r\n /**\r\n * Removes given meta element from the dom.\r\n *\r\n * ### Example\r\n * ```ts\r\n * const elem: HTMLMetaElement = this.meta.getTag('name=description');\r\n * this.meta.removeTagElement(elem);\r\n * ```\r\n *\r\n * @param meta meta element\r\n */\r\n Meta.prototype.removeTagElement = function (meta) {\r\n if (meta) {\r\n this._removeMetaElement(meta);\r\n }\r\n };\r\n Meta.prototype.setTitle = function (title) {\r\n this._document.title = title;\r\n };\r\n Meta.prototype._addInternal = function (tag) {\r\n var meta = this._createMetaElement();\r\n this._prepareMetaElement(tag, meta);\r\n this._appendMetaElement(meta);\r\n return meta;\r\n };\r\n Meta.prototype._createMetaElement = function () {\r\n return this._dom.createElement('meta');\r\n };\r\n Meta.prototype._prepareMetaElement = function (tag, el) {\r\n var _this = this;\r\n Object.keys(tag).forEach(function (prop) { return _this._dom.setAttribute(el, prop, tag[prop]); });\r\n return el;\r\n };\r\n Meta.prototype._appendMetaElement = function (meta) {\r\n var head = this._document.head;\r\n this._dom.appendChild(head, meta);\r\n };\r\n Meta.prototype._removeMetaElement = function (meta) {\r\n var head = this._dom.parentElement(meta);\r\n this._dom.removeChild(head, meta);\r\n };\r\n Meta.prototype._flattenArray = function (input, out) {\r\n if (out === void 0) { out = []; }\r\n if (input) {\r\n for (var i = 0; i < input.length; i++) {\r\n var item = input[i];\r\n if (Array.isArray(item)) {\r\n this._flattenArray(item, out);\r\n }\r\n else if (item) {\r\n out.push(item);\r\n }\r\n }\r\n }\r\n return out;\r\n };\r\n Meta = __decorate([\r\n core_1.Injectable(),\r\n __param(0, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [Object])\r\n ], Meta);\r\n return Meta;\r\n}());\r\nexports.Meta = Meta;\r\n\n\n/***/ }),\n\n/***/ 11:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\n//Model\r\nvar user_login_1 = __webpack_require__(72);\r\nvar cookie_service_1 = __webpack_require__(73);\r\nvar router_1 = __webpack_require__(13);\r\nvar crypto_service_1 = __webpack_require__(259);\r\nvar AuthService = (function () {\r\n function AuthService(_api, _cache, cookie, router, cryptoService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.cookie = cookie;\r\n this.router = router;\r\n this.cryptoService = cryptoService;\r\n this.loggedInUser = null;\r\n }\r\n AuthService.prototype.GetData = function () {\r\n var user = new user_login_1.UserLogin();\r\n if (this.cookie.getObject(\"user\") === undefined) {\r\n this.loggedInUser = null;\r\n }\r\n else if (this.cookie.getObject(\"user\") != undefined) {\r\n var regUser = this.cookie.getObject(\"user\");\r\n user.username = regUser[\"username\"];\r\n user.isAuthenticated = Boolean(regUser[\"isAuthenticated\"]);\r\n var registeredUser = { \"isAuthenticated\": user.isAuthenticated, \"username\": user.username };\r\n this.loggedInUser = registeredUser;\r\n user = this.loggedInUser;\r\n }\r\n return user;\r\n };\r\n AuthService.prototype.GetUserId = function () {\r\n var decryptedUserId = \"0\";\r\n var encryptedUserId = this.cookie.get(\"qazwsxedc\");\r\n if (encryptedUserId != null || encryptedUserId != undefined) {\r\n decryptedUserId = encryptedUserId;\r\n }\r\n else {\r\n decryptedUserId = this.cryptoService.encryptNumber(Number(decryptedUserId));\r\n }\r\n return decryptedUserId;\r\n };\r\n AuthService.prototype.GetDecryptedUserId = function () {\r\n var decryptedUserId = 0;\r\n var encryptedUserId = this.cookie.get(\"qazwsxedc\");\r\n if (encryptedUserId != null || encryptedUserId != undefined) {\r\n decryptedUserId = this.cryptoService.decryptNumber(encryptedUserId);\r\n }\r\n else {\r\n decryptedUserId = Number(this.cryptoService.encryptNumber(decryptedUserId));\r\n }\r\n return decryptedUserId;\r\n };\r\n AuthService.prototype.Login = function (id, username) {\r\n var user = new user_login_1.UserLogin();\r\n // user.id = Number(id);\r\n user.isAuthenticated = true;\r\n user.username = username;\r\n var cryptedUserId = this.cryptoService.encryptNumber(Number(id));\r\n this.cookie.putObject(\"user\", { \"isAuthenticated\": \"true\", \"username\": username });\r\n this.cookie.put(\"qazwsxedc\", cryptedUserId);\r\n };\r\n AuthService.prototype.Logout = function () {\r\n this.loggedInUser = null;\r\n this.cookie.remove(\"user\");\r\n this.cookie.remove(\"qazwsxedc\");\r\n var currentRoute = this.router.url;\r\n if (currentRoute == \"/it/home\" || \"/en/home\") {\r\n window.location.reload();\r\n }\r\n this.router.navigateByUrl(\"\");\r\n };\r\n AuthService.prototype.getCurrentUserId = function () {\r\n var userId = this.GetUserId();\r\n return userId;\r\n };\r\n AuthService = __decorate([\r\n core_1.Injectable(),\r\n __param(2, core_1.Inject('CookieService')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _c) || Object, (typeof (_d = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _d) || Object, (typeof (_e = typeof crypto_service_1.CryptoService !== 'undefined' && crypto_service_1.CryptoService) === 'function' && _e) || Object])\r\n ], AuthService);\r\n return AuthService;\r\n var _a, _b, _c, _d, _e;\r\n}());\r\nexports.AuthService = AuthService;\r\n\n\n/***/ }),\n\n/***/ 12:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar angular2_meta_1 = __webpack_require__(101);\r\nvar dom_adapter_1 = __webpack_require__(31);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar core_2 = __webpack_require__(27);\r\nvar SeoService = (function () {\r\n function SeoService(_document, metaService, translate) {\r\n this._document = _document;\r\n this.metaService = metaService;\r\n this.translate = translate;\r\n this._dom = dom_adapter_1.getDOM();\r\n }\r\n SeoService.prototype.setSeoInformation = function (seoInformation) {\r\n this.metaService.updateTag('name=Keywords', { name: 'Keywords', content: seoInformation.Keywords });\r\n this.metaService.updateTag('name=Description', { name: 'Description', content: seoInformation.Description });\r\n this.metaService.updateTag('property=\"og:description\"', { property: 'og:description', content: seoInformation.Description });\r\n this.metaService.updateTag('property=\"og:title\"', { property: 'og:title', content: seoInformation.Title });\r\n this.metaService.updateTag('name=Robots', { name: 'Robots', content: seoInformation.SeoRobots });\r\n this.metaService.setTitle(seoInformation.Title);\r\n this.updateCanonicalTag('link', { rel: 'canonical', href: seoInformation.Url });\r\n };\r\n SeoService.prototype.setSeoUserArea = function (url) {\r\n this.metaService.updateTag('name=Keywords', { name: 'Keywords', content: \"\" });\r\n this.metaService.updateTag('name=Description', { name: 'Description', content: \"\" });\r\n this.metaService.updateTag('property=\"og:description\"', { property: 'og:description', content: \"\" });\r\n this.metaService.updateTag('property=\"og:title\"', { property: 'og:title', content: \"\" });\r\n this.metaService.updateTag('name=Robots', { name: 'Robots', content: \"index,follow\" });\r\n var title = this.getLabel(\"user_area\");\r\n this.metaService.setTitle(title);\r\n this.updateCanonicalTag('link', { rel: 'canonical', href: url });\r\n };\r\n SeoService.prototype.getLabel = function (label) {\r\n var message;\r\n this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n return message;\r\n };\r\n SeoService.prototype.getCanonicalLink = function (selector) {\r\n if (!selector)\r\n return null;\r\n return this._dom.query(selector);\r\n };\r\n SeoService.prototype.updateCanonicalTag = function (selector, tag) {\r\n var canonical = this.getCanonicalLink(selector);\r\n if (!canonical) {\r\n //create element if it doesn't exist\r\n return this._addInternalCanonical(tag);\r\n }\r\n return this._prepareLinkElement(tag, canonical);\r\n };\r\n //-- *********************************** ANGULAR SERVER SIDE SEO SETUP START ***********************************\r\n SeoService.prototype.generateSeoDomServerSide = function (document, renderer, seoData) {\r\n var rootElement, h1, h2, h3, linkEl, nodeList, description;\r\n if (!seoData)\r\n return;\r\n //-- Creating root element which will be hidden, but available for crawling\r\n rootElement = renderer.createElement(document.body, 'div');\r\n renderer.setElementClass(rootElement, 'd-none', true);\r\n nodeList = [];\r\n //-- Creating h1 element\r\n if (seoData.H1) {\r\n h1 = renderer.createElement(document.body, 'h1');\r\n renderer.createText(h1, seoData.H1);\r\n nodeList.push(h1);\r\n }\r\n //-- Creating h2 element\r\n if (seoData.H2) {\r\n h2 = renderer.createElement(document.body, 'h2');\r\n renderer.createText(h2, seoData.H2);\r\n nodeList.push(h2);\r\n }\r\n //-- Creating h3 element\r\n if (seoData.H3) {\r\n h3 = renderer.createElement(document.body, 'h3');\r\n renderer.createText(h3, seoData.H3);\r\n nodeList.push(h3);\r\n }\r\n //-- Creating p short description element\r\n if (seoData.ShortDescription) {\r\n description = renderer.createElement(document.body, 'p');\r\n renderer.setElementProperty(description, 'innerHTML', seoData.ShortDescription);\r\n nodeList.push(description);\r\n }\r\n //-- Creating p short description element\r\n if (seoData.LongDescription) {\r\n description = renderer.createElement(document.body, 'p');\r\n renderer.setElementProperty(description, 'innerHTML', seoData.LongDescription);\r\n nodeList.push(description);\r\n }\r\n //-- Appending all elements to the root element as a children\r\n renderer.projectNodes(rootElement, nodeList);\r\n //generate sitemap list for all pages\r\n this.generateSiteMapList(document, seoData.SiteMapList);\r\n };\r\n SeoService.prototype.generateSiteMapList = function (document, siteMapHtml) {\r\n var stringToInject = \"\");\r\n this.appendHtmlString(document.body, stringToInject);\r\n };\r\n SeoService.prototype.appendHtmlString = function (el, template) {\r\n var div = this._dom.createElement('');\r\n this._dom.setInnerHTML(div, template);\r\n this._dom.insertAllBefore(el.lastChild, this._dom.childNodes(div));\r\n };\r\n SeoService.prototype.appendScriptsToDOM = function (el, template) {\r\n var _this = this;\r\n var div = this._dom.createElement('div');\r\n this._dom.setInnerHTML(div, template);\r\n var listEl = this._dom.childNodesAsList(div);\r\n listEl.forEach(function (element) { return _this._dom.insertAfter(el.lastChild, element); });\r\n };\r\n SeoService.prototype.setSeoMetaData = function (document, renderer, seoData, imgLink) {\r\n if (imgLink === void 0) { imgLink = \"\"; }\r\n //console.log( seoData)\r\n if (!seoData)\r\n return;\r\n //console.log( seoData.Title)\r\n this.updateMetaDataTitle(renderer, seoData.Title || '');\r\n //-- Setting canonicals\r\n this.createMetaTagUniversalAttribute(document, renderer, 'link', 'rel', 'canonical', 'href', seoData.Url || '');\r\n //-- Setting meta tags and open graph tags\r\n this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'Keywords', 'content', seoData.Keywords || '');\r\n this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'Robots', 'content', seoData.SeoRobots || '');\r\n this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'description', 'content', seoData.Description || '');\r\n this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:description', 'content', seoData.Description || '');\r\n this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:title', 'content', seoData.Title || '');\r\n if (imgLink != null && imgLink.length > 0) {\r\n this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:image', 'content', imgLink || '');\r\n }\r\n this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:type', 'content', 'article');\r\n };\r\n //-- Updating of title for seo optimization\r\n SeoService.prototype.updateMetaDataTitle = function (renderer, value) {\r\n if (renderer && value)\r\n renderer.setText(renderer.selectRootElement('title'), value);\r\n };\r\n //-- Creating meta attributes for seo\r\n SeoService.prototype.createMetaTagUniversalAttribute = function (document, renderer, elementType, propertyNameFirst, valueFirst, propertyNameSecond, valueSecond) {\r\n if (propertyNameSecond === void 0) { propertyNameSecond = \"\"; }\r\n if (valueSecond === void 0) { valueSecond = \"\"; }\r\n var elem = renderer.createElement(document.head, elementType);\r\n if (propertyNameFirst && valueFirst) {\r\n renderer.setElementAttribute(elem, propertyNameFirst, valueFirst);\r\n }\r\n if (propertyNameSecond && valueSecond)\r\n renderer.setElementAttribute(elem, propertyNameSecond, valueSecond);\r\n };\r\n //-- Creating meta properties for social networks seo\r\n SeoService.prototype.createMetaTagUniversalProperty = function (document, renderer, elementType, propertyNameFirst, valueFirst, propertyNameSecond, valueSecond) {\r\n if (propertyNameSecond === void 0) { propertyNameSecond = \"\"; }\r\n if (valueSecond === void 0) { valueSecond = \"\"; }\r\n var elem = renderer.createElement(document.head, elementType);\r\n if (propertyNameFirst && valueFirst) {\r\n renderer.setElementProperty(elem, propertyNameFirst, valueFirst);\r\n }\r\n if (propertyNameSecond && valueSecond)\r\n renderer.setElementProperty(elem, propertyNameSecond, valueSecond);\r\n };\r\n //-- ************************************ ANGULAR SERVER SIDE SEO SETUP END*************************************\r\n SeoService.prototype._addInternalCanonical = function (tag) {\r\n var canonical = this._createLinkElement();\r\n this._prepareLinkElement(tag, canonical);\r\n this._appendLinkElement(canonical);\r\n return canonical;\r\n };\r\n SeoService.prototype._prepareLinkElement = function (tag, el) {\r\n var _this = this;\r\n Object.keys(tag).forEach(function (prop) { return _this._dom.setAttribute(el, prop, tag[prop]); });\r\n return el;\r\n };\r\n SeoService.prototype._appendLinkElement = function (meta) {\r\n var head = this._document.head;\r\n this._dom.appendChild(head, meta);\r\n };\r\n SeoService.prototype._createLinkElement = function () {\r\n return this._dom.createElement('link');\r\n };\r\n SeoService = __decorate([\r\n core_1.Injectable(),\r\n __param(0, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [Object, (typeof (_a = typeof angular2_meta_1.Meta !== 'undefined' && angular2_meta_1.Meta) === 'function' && _a) || Object, (typeof (_b = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _b) || Object])\r\n ], SeoService);\r\n return SeoService;\r\n var _a, _b;\r\n}());\r\nexports.SeoService = SeoService;\r\n\n\n/***/ }),\n\n/***/ 128:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar ArticleService = (function () {\r\n function ArticleService(_api, _cache, mappings, languageService, cartService, authService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n this.languageService = languageService;\r\n this.cartService = cartService;\r\n this.authService = authService;\r\n }\r\n ArticleService.prototype.getArticleList = function (category, listtype) {\r\n var lang = this.languageService.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Article_List.replace('{category}', category).replace('{listtype}', listtype).replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ArticleService.prototype.getArticleDetails = function (id, lang) {\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_News_Details.replace('{lang}', lang).replace('{id}', id.toString()).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ArticleService.prototype.getArticleByUrl = function (lang, seoUrl) {\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Article_By_Url.replace('{lang}', lang).replace('{seoUrl}', seoUrl).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ArticleService.prototype.GetArticleByCategoryIdandRows = function (categoryId, lang, startRowIndex, maxRows) {\r\n var url = this.mappings.Web_Api_Get_Article_By_Category_Id.replace('{categoryId}', categoryId.toString()).replace('{lang}', lang).replace('{startRowIndex}', startRowIndex.toString()).replace('{maxRows}', maxRows.toString());\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ArticleService.prototype.getBlogData = function (lang, startRowIndex, maxRows) {\r\n var numberOfItems = 15;\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Blog_Data.replace('{lang}', lang).replace('{startRowIndex}', startRowIndex.toString()).replace('{maxRows}', maxRows.toString()).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ArticleService.prototype.getArticleListCategory = function (lang) {\r\n var url = this.mappings.Web_Api_Get_Article_List_Category.replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ArticleService.prototype.getCategoryArticleById = function (categoryId, lang, startRowIndex, maxRows) {\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Article_Category_By_Id\r\n .replace('{categoryId}', categoryId)\r\n .replace('{lang}', lang)\r\n .replace('{startRowIndex}', startRowIndex.toString())\r\n .replace('{maxRows}', maxRows.toString())\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ArticleService.prototype.getArticleCategoryByUrl = function (lang, categoryUrl, startRowIndex, maxRows) {\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Article_Category_By_Url\r\n .replace('{lang}', lang)\r\n .replace('{startRowIndex}', startRowIndex.toString())\r\n .replace('{maxRows}', maxRows.toString())\r\n .replace('{categoryUrl}', categoryUrl)\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ArticleService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object])\r\n ], ArticleService);\r\n return ArticleService;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.ArticleService = ArticleService;\r\n\n\n/***/ }),\n\n/***/ 129:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar rxjs_1 = __webpack_require__(265);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar HeaderService = (function () {\r\n function HeaderService(_api, authService) {\r\n this._api = _api;\r\n this.authService = authService;\r\n this.toShowQuickRegistration = false;\r\n // Observable source of logged in user\r\n this.loginInfo = this.authService.GetData();\r\n this.loggedInUser = new rxjs_1.BehaviorSubject(this.loginInfo);\r\n }\r\n HeaderService.prototype.getLoggedInUser = function () {\r\n return this.loggedInUser.asObservable();\r\n };\r\n HeaderService.prototype.setLoggedInUser = function (user) {\r\n this.loggedInUser.next(user);\r\n };\r\n HeaderService.prototype.setToShowQuickRegistration = function (toShow) {\r\n this.toShowQuickRegistration = toShow;\r\n };\r\n HeaderService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _b) || Object])\r\n ], HeaderService);\r\n return HeaderService;\r\n var _a, _b;\r\n}());\r\nexports.HeaderService = HeaderService;\r\n\n\n/***/ }),\n\n/***/ 130:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar http_1 = __webpack_require__(96);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar node_logger_service_1 = __webpack_require__(260);\r\nvar ApplicationService = (function () {\r\n function ApplicationService(api, isNode, cookie, cache, nodeLogger) {\r\n this.api = api;\r\n this.isNode = isNode;\r\n this.cookie = cookie;\r\n this.cache = cache;\r\n this.nodeLogger = nodeLogger;\r\n this.getConfig();\r\n }\r\n Object.defineProperty(ApplicationService.prototype, \"accessToken\", {\r\n get: function () {\r\n return this.cookie.get(ApplicationService.ACCESS_TOKEN_KEY);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ApplicationService.prototype.getToken = function () {\r\n var _this = this;\r\n if (!this.isNode /*|| 'string' === typeof this.accessToken*/) {\r\n return;\r\n }\r\n var startDate = new Date();\r\n var params = this.getCredentialsParams();\r\n var headers = new http_1.Headers();\r\n headers.append('Content-Type', 'application/x-www-form-urlencoded');\r\n return this.api\r\n .post(\"\" + this.config.apiUrl + mapping_1.Mappings.Web_Api_Get_Token_Url, params, { headers: headers })\r\n .do(function (_a) {\r\n var access_token = _a.access_token;\r\n if (access_token) {\r\n _this.cache.set('__ACCESS_TOKEN__', access_token);\r\n _this.cookie.put(ApplicationService.ACCESS_TOKEN_KEY, access_token);\r\n }\r\n });\r\n };\r\n ApplicationService.prototype.getCredentialsParams = function () {\r\n var config = this.getConfig();\r\n var params = new http_1.URLSearchParams();\r\n params.set('grant_type', 'password');\r\n params.set('username', config.credentials.username);\r\n params.set('password', config.credentials.password);\r\n return params;\r\n };\r\n ApplicationService.prototype.getConfig = function () {\r\n if (this.config) {\r\n return this.config;\r\n }\r\n if (this.isNode) {\r\n var fs = __webpack_require__(427);\r\n this.config = JSON.parse(fs.readFileSync('src/assets/config.json', 'utf8'));\r\n this.setConfigToCache();\r\n }\r\n else {\r\n this.config = this.cache.get(ApplicationService.APPLICATION_CONFIG);\r\n }\r\n return this.config;\r\n };\r\n ApplicationService.prototype.setConfigToCache = function () {\r\n var privateKeys = ['credentials'];\r\n var configForCache = {};\r\n for (var key in this.config)\r\n if (this.config.hasOwnProperty(key)) {\r\n if (privateKeys.indexOf(key) === -1) {\r\n configForCache[key] = this.config[key];\r\n }\r\n }\r\n this.cache.set(ApplicationService.APPLICATION_CONFIG, configForCache);\r\n };\r\n ApplicationService.ACCESS_TOKEN_KEY = 'accessToken';\r\n ApplicationService.APPLICATION_CONFIG = 'ApplicationConfig';\r\n ApplicationService = __decorate([\r\n core_1.Injectable(),\r\n __param(1, core_1.Inject('isNode')),\r\n __param(2, core_1.Inject('CookieService')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _b) || Object, (typeof (_c = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _c) || Object, (typeof (_d = typeof node_logger_service_1.NodeLoggerService !== 'undefined' && node_logger_service_1.NodeLoggerService) === 'function' && _d) || Object])\r\n ], ApplicationService);\r\n return ApplicationService;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.ApplicationService = ApplicationService;\r\n\n\n/***/ }),\n\n/***/ 131:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n//Angular\r\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\n//System\r\nvar mapping_1 = __webpack_require__(9);\r\n//Services\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar CompanyService = (function () {\r\n function CompanyService(_api, _cache, mappings) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n }\r\n CompanyService.prototype.getCompany = function () {\r\n var url = this.mappings.Web_Api_Get_Default_Company;\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n CompanyService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n ], CompanyService);\r\n return CompanyService;\r\n var _a, _b, _c;\r\n}());\r\nexports.CompanyService = CompanyService;\r\n\n\n/***/ }),\n\n/***/ 132:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar router_1 = __webpack_require__(13);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar MessagesService = (function () {\r\n function MessagesService(router, _api, mappings) {\r\n this.router = router;\r\n this._api = _api;\r\n this.mappings = mappings;\r\n }\r\n MessagesService.prototype.setMessagesAsRead = function (params) {\r\n var url = this.mappings.Web_Api_Get_Client_Area_Messages;\r\n return this._api.post(url, params);\r\n };\r\n MessagesService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n ], MessagesService);\r\n return MessagesService;\r\n var _a, _b, _c;\r\n}());\r\nexports.MessagesService = MessagesService;\r\n\n\n/***/ }),\n\n/***/ 133:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar router_1 = __webpack_require__(13);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar ValidationService = (function () {\r\n function ValidationService(router, _api, mappings) {\r\n this.router = router;\r\n this._api = _api;\r\n this.mappings = mappings;\r\n }\r\n //validation of phone numbers, disable writing any characters in input except of numbers \r\n ValidationService.prototype.validatePhoneNumber = function (event) {\r\n var pattern = /[0-9]/;\r\n var inputChar = String.fromCharCode(event.charCode);\r\n if (!pattern.test(inputChar)) {\r\n // invalid character, prevent input\r\n event.preventDefault();\r\n }\r\n };\r\n ValidationService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n ], ValidationService);\r\n return ValidationService;\r\n var _a, _b, _c;\r\n}());\r\nexports.ValidationService = ValidationService;\r\n\n\n/***/ }),\n\n/***/ 134:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar ProductService = (function () {\r\n function ProductService(_api, _cache, currencyService, ShoppingCartService, mappings, authService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.currencyService = currencyService;\r\n this.ShoppingCartService = ShoppingCartService;\r\n this.mappings = mappings;\r\n this.authService = authService;\r\n }\r\n ProductService.prototype.getProductDetails = function (productId, productType, lang) {\r\n //Reading userId\r\n var customerId = this.authService.getCurrentUserId();\r\n var curr = this.currencyService.getCurrency();\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Product_Details\r\n .replace('{productId}', productId.toString())\r\n .replace('{productType}', productType)\r\n .replace('{lang}', lang)\r\n .replace('{customerid}', customerId)\r\n .replace('{currency}', curr)\r\n .replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ProductService.prototype.getProductsPromotionsData = function (lang) {\r\n var customerId = this.authService.getCurrentUserId();\r\n var curr = this.currencyService.getCurrency();\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Products_In_Promotion_Data.replace('{lang}', lang).replace('{currency}', curr).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ProductService.prototype.getProductDetailsBySeoUrl = function (lang, seoUrl) {\r\n //Reading userId\r\n var customerId = this.authService.GetUserId();\r\n var curr = this.currencyService.getCurrency();\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Product_By_Url\r\n .replace('{lang}', lang)\r\n .replace('{customerid}', customerId)\r\n .replace('{currency}', curr)\r\n .replace('{seoUrl}', seoUrl)\r\n .replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ProductService.prototype.getPriceData = function (productId, lang) {\r\n //Reading userId\r\n var customerId = this.authService.getCurrentUserId();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Get_Price_Data\r\n .replace('{productId}', productId.toString())\r\n .replace('{lang}', lang)\r\n .replace('{customerid}', customerId)\r\n .replace('{currency}', curr);\r\n return this._api.get(url);\r\n };\r\n ProductService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object])\r\n ], ProductService);\r\n return ProductService;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.ProductService = ProductService;\r\n\n\n/***/ }),\n\n/***/ 16:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar dom_adapter_1 = __webpack_require__(31);\r\nvar platform_browser_1 = __webpack_require__(7);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar angular2_meta_1 = __webpack_require__(101);\r\nvar ScriptService = (function () {\r\n function ScriptService(_api, document, mappings, language, seo, metaService) {\r\n this._api = _api;\r\n this.document = document;\r\n this.mappings = mappings;\r\n this.language = language;\r\n this.seo = seo;\r\n this.metaService = metaService;\r\n this._dom = dom_adapter_1.getDOM();\r\n this.typeSystemPage = \"systemPage\";\r\n this.typeArticleCategory = \"articleCategory\";\r\n this.typeArticle = \"article\";\r\n this.typeCmsPage = \"page\";\r\n this.typeCatalogCategory = \"category\";\r\n this.typeCatalogOtherProduct = \"otherProduct\";\r\n this.typeCatalogProduct = \"product\";\r\n this.infoRequestId = \"26\";\r\n this.userAreaId = \"18\";\r\n this.privacyPolicyId = \"36\";\r\n this.purchaseConditionsId = \"37\";\r\n this.faqsId = \"38\";\r\n this.cookiesId = \"35\";\r\n this.homeId = \"1\";\r\n this.loginId = \"2\";\r\n this.blogHomeId = \"40\";\r\n this.productsCatalogId = \"29\";\r\n this.promotionsId = \"16\";\r\n this.cartId = \"12\";\r\n this.cartCashId = \"15\";\r\n this.cartSubmittedId = \"43\";\r\n this.userRegistrationId = \"5\";\r\n this.userRecoverPasswordId = \"7\";\r\n this.subscriptionId = \"45\";\r\n this.cartEmptyId = \"42\";\r\n this.ThankYouPagePaypalId = \"47\";\r\n this.ThankYouPagePagOnlineId = \"48\";\r\n this.ThankYouNexiId = \"52\";\r\n this.subscriptionConfirmationId = \"46\";\r\n this.registrationCompletePageId = \"49\";\r\n this.SearchPageId = \"50\";\r\n this.SearchWithPagingPageId = \"51\";\r\n }\r\n ScriptService.prototype.getScript = function (type, rowId) {\r\n //reading language\r\n var longLang = this.language.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Script\r\n .replace('{rowid}', rowId)\r\n .replace('{type}', type)\r\n .replace('{lang}', longLang);\r\n return this._api.get(url);\r\n };\r\n ScriptService.prototype.getScriptHead = function (type, rowId) {\r\n //reading language\r\n var longLang = this.language.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Script_Head\r\n .replace('{rowid}', rowId)\r\n .replace('{type}', type)\r\n .replace('{lang}', longLang);\r\n return this._api.get(url);\r\n };\r\n ScriptService.prototype.checkIfScriptResponseIsValid = function (content) {\r\n var retVal = true;\r\n if (typeof content === 'object') {\r\n retVal = false;\r\n }\r\n else if (typeof content === 'string') {\r\n if (!content) {\r\n retVal = false;\r\n }\r\n }\r\n else {\r\n retVal = false;\r\n }\r\n return retVal;\r\n };\r\n ScriptService.prototype.getSystemPageRowId_OrderId = function (PageRowId, OrderId) {\r\n return PageRowId + \"_\" + OrderId;\r\n };\r\n ScriptService.prototype.setupExternalScripts = function (result, pageType, id) {\r\n var _this = this;\r\n //-- Retrieving the script to append\r\n if (result.SeoInformation.HasScripts) {\r\n this.getScriptHead(pageType, id).subscribe(function (response) {\r\n var isValidResponse = _this.checkIfScriptResponseIsValid(response);\r\n if (isValidResponse) {\r\n _this.seo.appendScriptsToDOM(_this.document.head, response);\r\n }\r\n });\r\n this.getScript(pageType, id).subscribe(function (response) {\r\n var isValidResponse = _this.checkIfScriptResponseIsValid(response);\r\n if (isValidResponse) {\r\n _this.seo.appendScriptsToDOM(_this.document.body, response);\r\n }\r\n });\r\n }\r\n };\r\n ScriptService.prototype.setGoogleScripts = function (seoInfo) {\r\n if (!seoInfo)\r\n return;\r\n //-- Updating title on client side\r\n if (seoInfo.Title)\r\n this.metaService.setTitle(seoInfo.Title);\r\n //-- Update google analytics\r\n if (seoInfo.HasScripts && seoInfo.AnalyticsId)\r\n gtag('config', seoInfo.AnalyticsId, { 'page_path': seoInfo.UrlForSeo });\r\n };\r\n ScriptService = __decorate([\r\n core_1.Injectable(),\r\n __param(1, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _d) || Object, (typeof (_e = typeof angular2_meta_1.Meta !== 'undefined' && angular2_meta_1.Meta) === 'function' && _e) || Object])\r\n ], ScriptService);\r\n return ScriptService;\r\n var _a, _b, _c, _d, _e;\r\n}());\r\nexports.ScriptService = ScriptService;\r\n\n\n/***/ }),\n\n/***/ 178:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar language_service_1 = __webpack_require__(3);\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar LoginService = (function () {\r\n function LoginService(_api, _cache, mappings, cartService, langService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n this.cartService = cartService;\r\n this.langService = langService;\r\n }\r\n LoginService.prototype.sendLoginRequest = function (email, password) {\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Post_Send_Login_Request;\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n Email: email.toLowerCase(),\r\n Password: btoa(password),\r\n CartID: cartId\r\n };\r\n return this._api.post(url, params);\r\n };\r\n LoginService.prototype.authentificateUser = function (email, firstName, lastName) {\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Post_User_Authentification;\r\n var lang = this.langService.getLongLang();\r\n var key = url;\r\n var params = {\r\n Email: email.toLowerCase(),\r\n Password: \"\",\r\n FirstName: firstName,\r\n LastName: lastName,\r\n CartID: cartId,\r\n Lang: lang\r\n };\r\n return this._api.post(url, params);\r\n };\r\n LoginService.prototype.quickRegister = function (userInfo) {\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Post_User_Authentification;\r\n var lang = this.langService.getLongLang();\r\n var key = url;\r\n var params = {\r\n Email: userInfo.EmailRegister != null ? userInfo.EmailRegister.toLowerCase() : '',\r\n Password: userInfo.Password,\r\n FirstName: '',\r\n LastName: '',\r\n CustomerGroup: userInfo.CustomerGroup,\r\n CartID: cartId,\r\n Lang: lang,\r\n CodiceFiscale: userInfo.CodiceFiscale,\r\n PartitaIva: userInfo.PartitaIva,\r\n Newsletter: userInfo.Newsletter\r\n };\r\n return this._api.post(url, params);\r\n };\r\n LoginService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object])\r\n ], LoginService);\r\n return LoginService;\r\n var _a, _b, _c, _d, _e;\r\n}());\r\nexports.LoginService = LoginService;\r\n\n\n/***/ }),\n\n/***/ 19:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar CacheService = (function () {\r\n function CacheService(_cache) {\r\n this._cache = _cache;\r\n }\r\n /**\r\n * check if there is a value in our store\r\n */\r\n CacheService.prototype.has = function (key) {\r\n var _key = this.normalizeKey(key);\r\n return this._cache.has(_key);\r\n };\r\n /**\r\n * store our state\r\n */\r\n CacheService.prototype.set = function (key, value) {\r\n var _key = this.normalizeKey(key);\r\n if (value && 'string' === typeof value && (/<[a-z][\\s\\S]*>/i).test(value)) {\r\n value = {\r\n _escapedHtml: encodeURIComponent(value)\r\n };\r\n }\r\n this._cache.set(_key, value);\r\n };\r\n /**\r\n * get our cached value\r\n */\r\n CacheService.prototype.get = function (key) {\r\n var _key = this.normalizeKey(key);\r\n var value = this._cache.get(_key);\r\n if (value && 'object' === typeof value && value._escapedHtml) {\r\n value = decodeURIComponent(value._escapedHtml);\r\n }\r\n return value;\r\n };\r\n /**\r\n * release memory ref\r\n */\r\n CacheService.prototype.clear = function (key) {\r\n this._cache.delete(key);\r\n };\r\n /**\r\n * release memory all refs\r\n */\r\n CacheService.prototype.clearAll = function () {\r\n this._cache.clear();\r\n };\r\n /**\r\n * convert to json for the client\r\n */\r\n CacheService.prototype.dehydrate = function () {\r\n var json = {};\r\n this._cache.forEach(function (value, key) { return json[key] = value; });\r\n return json;\r\n };\r\n /**\r\n * convert server json into out initial state\r\n */\r\n CacheService.prototype.rehydrate = function (json) {\r\n var _this = this;\r\n Object.keys(json).forEach(function (key) {\r\n var _key = _this.normalizeKey(key);\r\n var value = json[_key];\r\n _this._cache.set(_key, value);\r\n });\r\n };\r\n /**\r\n * allow JSON.stringify to work\r\n */\r\n CacheService.prototype.toJSON = function () {\r\n return this.dehydrate();\r\n };\r\n /**\r\n * convert numbers into strings\r\n */\r\n CacheService.prototype.normalizeKey = function (key) {\r\n if (core_1.isDevMode() && this._isInvalidValue(key)) {\r\n throw new Error('Please provide a valid key to save in the CacheService');\r\n }\r\n return key + '';\r\n };\r\n CacheService.prototype._isInvalidValue = function (key) {\r\n return key === null ||\r\n key === undefined ||\r\n key === 0 ||\r\n key === '' ||\r\n typeof key === 'boolean' ||\r\n Number.isNaN(key);\r\n };\r\n CacheService.KEY = 'CacheService';\r\n CacheService = __decorate([\r\n core_1.Injectable(),\r\n __param(0, core_1.Inject('LRU')), \r\n __metadata('design:paramtypes', [Object])\r\n ], CacheService);\r\n return CacheService;\r\n}());\r\nexports.CacheService = CacheService;\r\n\n\n/***/ }),\n\n/***/ 20:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\n//Services\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar cookie_service_1 = __webpack_require__(73);\r\n//Models\r\nvar mapping_1 = __webpack_require__(9);\r\nvar cart_1 = __webpack_require__(98);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar ShoppingCartService = (function () {\r\n function ShoppingCartService(_api, _cache, mappings, authService, languageService, currencyService, cookieService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n this.authService = authService;\r\n this.languageService = languageService;\r\n this.currencyService = currencyService;\r\n this.cookieService = cookieService;\r\n this.cartId = 0;\r\n // value of customizationData is set from canvas-widget component after editing is approved. After we can get that data inside of parent component and send it to a server\r\n this.customizationData = null;\r\n this.isProductCanvasEdited = false;\r\n }\r\n ShoppingCartService.prototype.saveCart = function (userId, cartId, paymentId, shipmentId) {\r\n var url = this.mappings.Web_Api_Get_Save_Cart.replace('{userId}', userId).replace('{cartId}', cartId.toString()).replace('{paymentId}', paymentId.toString()).replace('{shipmentId}', shipmentId.toString());\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ShoppingCartService.prototype.applyVoucher = function (voucherCode) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Set_Cart_Voucher;\r\n var param = {\r\n CartID: cartId,\r\n CustomerID: customerId,\r\n Voucher: voucherCode,\r\n Language: lang,\r\n Currency: curr\r\n };\r\n var key = url;\r\n return this._api.post(url, param);\r\n };\r\n ShoppingCartService.prototype.setJobName = function (rowId, jobName) {\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var url = this.mappings.Web_Api_Set_Job_Name;\r\n var param = {\r\n CartID: cartId,\r\n ProductID: rowId,\r\n JobName: jobName\r\n };\r\n var key = url;\r\n return this._api.post(url, param);\r\n };\r\n ShoppingCartService.prototype.setAddress = function (addressObject) {\r\n var cartId = this.getCartId();\r\n var url = this.mappings.Web_Api_Set_Cart_Address;\r\n var param = {\r\n CartID: cartId,\r\n AddressCity: addressObject.City,\r\n AddressID: addressObject.Id,\r\n AddressMobile: addressObject.Mobile,\r\n AddressPhone: addressObject.Phone,\r\n AddressPostalCode: addressObject.ZipCode,\r\n AddressProvince: addressObject.Province,\r\n AddressRecipient: addressObject.Recipient,\r\n AddressStreet: addressObject.Address,\r\n CustomerID: addressObject.CustomerID,\r\n Language: addressObject.Language\r\n };\r\n var key = url;\r\n return this._api.post(url, param);\r\n };\r\n ShoppingCartService.prototype.confirmOrder = function () {\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var param = {\r\n CartID: cartId,\r\n Language: lang\r\n };\r\n var url = this.mappings.Web_Api_Post_Cart_Confirm_Order;\r\n return this._api.post(url, param);\r\n };\r\n ShoppingCartService.prototype.clearCartAfterConfirmation = function () {\r\n this.cookieService.remove(\"cartId\");\r\n this.cartData = new cart_1.CartInfo();\r\n this.cartData.Products = [];\r\n this.cartData.Addresses = [];\r\n this.cartData.Payments = [];\r\n this.cartData.Shipments = [];\r\n };\r\n ShoppingCartService.prototype.getCartPaymentShipment = function (cartId, lang) {\r\n var userId = this.getCustomerId();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Get_Cart_Payment_Shipment.replace('{userId}', userId).replace('{cartId}', cartId.toString()).replace('{lang}', lang).replace('{currency}', curr);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ShoppingCartService.prototype.addWizardCalcolatoToCart = function (wizardId, lavId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var curr = this.currencyService.getCurrency();\r\n var canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n var isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n var url = this.mappings.Web_Api_Add_Wizard_Calcolato_To_Cart;\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n LavID: lavId.toString(),\r\n Currency: curr,\r\n isCanvasEdited: isCanvasEdited,\r\n CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addApProductToCart = function (productId, lavId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Add_Wizard_Calcolato_To_Cart;\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: productId.toString(),\r\n LavID: lavId.toString(),\r\n Currency: curr\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addWizardCalcolatoScontisticaToCart = function (wizardId, dateId, lavId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n var isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n var url = this.mappings.Web_Api_Add_Wizard_Calcolato_Scontistica_To_Cart;\r\n var curr = this.currencyService.getCurrency();\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n LavID: lavId.toString(),\r\n DateID: dateId.toString(),\r\n Currency: curr,\r\n isCanvasEdited: isCanvasEdited,\r\n CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addWizardListinoToCart = function (wizardId, quantityId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var url = this.mappings.Web_Api_Add_Wizard_Listino_To_Cart;\r\n var curr = this.currencyService.getCurrency();\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addOtherProductListinoToCart = function (combinationId, quantityId, wizardId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var url = this.mappings.Web_Api_Add_Other_Product_Listino_To_Cart;\r\n var curr = this.currencyService.getCurrency();\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr,\r\n CombinationId: combinationId.toString()\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addOtherProductListinoScontisticaToCart = function (combinationId, quantityId, wizardId, dateId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var url = this.mappings.Web_Api_Add_Other_Product_Listino_Scontistica_To_Cart;\r\n var curr = this.currencyService.getCurrency();\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr,\r\n CombinationId: combinationId.toString(),\r\n DateID: dateId.toString()\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addOtherProductCalcolatoListinoToCart = function (combinationId, quantityId, wizardId, strVariantiCalcolate) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var url = this.mappings.Web_Api_Add_Other_Product_Listino_Calcolato_To_Cart;\r\n var curr = this.currencyService.getCurrency();\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr,\r\n CombinationId: combinationId.toString(),\r\n StrVariantiCalcolate: strVariantiCalcolate\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addOtherProductCalcolatoListinoScontisticaToCart = function (combinationId, quantityId, wizardId, dateId, strVariantiCalcolate) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var url = this.mappings.Web_Api_Add_Other_Product_Listino_Calcolato_Scontistica_To_Cart;\r\n var curr = this.currencyService.getCurrency();\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr,\r\n CombinationId: combinationId.toString(),\r\n DateID: dateId.toString(),\r\n StrVariantiCalcolate: strVariantiCalcolate,\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addOtherProductCalcolatoScontisticaToCart = function (productId, lavId, dateId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Add_Other_Product_Calcolato_Scontistica_To_Cart;\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: productId.toString(),\r\n LavID: lavId.toString(),\r\n DateID: dateId.toString(),\r\n Currency: curr\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addWizardListinoScontisticaBusteToCart = function (wizardId, quantityId, dateId, idPantoneFronte1, idPantoneFronte2, idPantoneRetro1, idPantoneRetro2) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var url = this.mappings.Web_Api_Add_Wizard_Buste_Listino_Buste_To_Cart;\r\n var curr = this.currencyService.getCurrency();\r\n var canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n var isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n var key = url;\r\n var x = 0;\r\n if (idPantoneFronte1 == null || idPantoneFronte1 == \"\") {\r\n idPantoneFronte1 = \"0\";\r\n }\r\n if (idPantoneFronte2 == null || idPantoneFronte2 == \"\") {\r\n idPantoneFronte2 = \"0\";\r\n }\r\n if (idPantoneRetro1 == null || idPantoneRetro1 == \"\") {\r\n idPantoneRetro1 = \"0\";\r\n }\r\n if (idPantoneRetro2 == null || idPantoneRetro2 == \"\") {\r\n idPantoneRetro2 = \"0\";\r\n }\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n DateID: dateId.toString(),\r\n IdPantoneFronte1: idPantoneFronte1.toString(),\r\n IdPantoneFronte2: idPantoneFronte2.toString(),\r\n IdPantoneRetro1: idPantoneRetro1.toString(),\r\n IdPantoneRetro2: idPantoneRetro2.toString(),\r\n Currency: curr,\r\n isCanvasEdited: isCanvasEdited,\r\n CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addWizardListinoBusteToCart = function (wizardId, quantityId, idPantoneFronte1, idPantoneFronte2, idPantoneRetro1, idPantoneRetro2) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var url = this.mappings.Web_Api_Add_Wizard_Buste_Listino_To_Cart;\r\n var curr = this.currencyService.getCurrency();\r\n var canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n var isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n var key = url;\r\n var x = 0;\r\n if (idPantoneFronte1 == null || idPantoneFronte1 == \"\") {\r\n idPantoneFronte1 = \"0\";\r\n }\r\n if (idPantoneFronte2 == null || idPantoneFronte2 == \"\") {\r\n idPantoneFronte2 = \"0\";\r\n }\r\n if (idPantoneRetro1 == null || idPantoneRetro1 == \"\") {\r\n idPantoneRetro1 = \"0\";\r\n }\r\n if (idPantoneRetro2 == null || idPantoneRetro2 == \"\") {\r\n idPantoneRetro2 = \"0\";\r\n }\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n IdPantoneFronte1: idPantoneFronte1.toString(),\r\n IdPantoneFronte2: idPantoneFronte2.toString(),\r\n IdPantoneRetro1: idPantoneRetro1.toString(),\r\n IdPantoneRetro2: idPantoneRetro2.toString(),\r\n Currency: curr,\r\n isCanvasEdited: isCanvasEdited,\r\n CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls : null\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addWizardListinoScontisticaToCart = function (wizardId, quantityId, dateId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var url = this.mappings.Web_Api_Add_Wizard_Listino_Scontistica_To_Cart;\r\n var curr = this.currencyService.getCurrency();\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n DateID: dateId.toString(),\r\n Currency: curr\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addStaticProductToCart = function (productId, quantityId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Add_Static_Product_To_Cart;\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: productId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addStaticProductScontisticaToCart = function (productId, quantityId, dateId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Add_Static_Product_Scontistica_To_Cart;\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: productId.toString(),\r\n QuantityID: quantityId.toString(),\r\n DateID: dateId.toString(),\r\n Currency: curr\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.addMatrixProductToCart = function (productId, quantityId, type) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Add_Matrix_Product_To_Cart;\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: productId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Type: type,\r\n Currency: curr\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.getCartId = function () {\r\n //Reading cartId from cookie\r\n var cartId = this.cookieService.get(\"cartId\");\r\n if (cartId == null || cartId == \"\") {\r\n cartId = \"0\";\r\n }\r\n return cartId;\r\n };\r\n ShoppingCartService.prototype.setCartId = function (cartId) {\r\n this.cookieService.put(\"cartId\", cartId.toString());\r\n this.cartId = cartId;\r\n };\r\n ShoppingCartService.prototype.getCustomerId = function () {\r\n var userId = this.authService.GetUserId();\r\n return userId;\r\n };\r\n ShoppingCartService.prototype.getLang = function () {\r\n var lang = this.languageService.getLongLang();\r\n return lang;\r\n };\r\n ShoppingCartService.prototype.updateCart = function (cartData) {\r\n var currentCartId = this.getCartId();\r\n if (currentCartId == \"0\") {\r\n this.setCartId(cartData.CartID);\r\n }\r\n //refreshing cart data\r\n this.cartData = cartData;\r\n };\r\n ShoppingCartService.prototype.getCart = function () {\r\n return this.cartData;\r\n };\r\n ShoppingCartService.prototype.initCart = function (cartData) {\r\n if (this.cartData == null) {\r\n this.cartData = cartData;\r\n }\r\n };\r\n ShoppingCartService.prototype.setPayment = function (paymentId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Set_Cart_Payment;\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n PaymentID: paymentId,\r\n CustomerID: customerId,\r\n Language: lang,\r\n Currency: curr\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.setShipment = function (shipmentId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Set_Cart_Shipment;\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n ShippmentID: shipmentId,\r\n CustomerID: customerId,\r\n Language: lang,\r\n Currency: curr\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ShoppingCartService.prototype.removeFromCart = function (rowId) {\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var lang = this.getLang();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Remove_From_Cart;\r\n var key = url;\r\n var x = 0;\r\n var params = {\r\n CartID: cartId.toString(),\r\n ProductID: rowId,\r\n CustomerID: customerId.toString(),\r\n Language: lang,\r\n Currency: curr\r\n };\r\n return this._api.post(url, params);\r\n };\r\n //Check if the cart data is valid to access to the second step\r\n ShoppingCartService.prototype.isCartValid = function () {\r\n var res = false;\r\n var cartId = this.getCartId();\r\n var customerId = this.getCustomerId();\r\n //Checking if user is logged-ing\r\n if (customerId != null && customerId != \"\" && customerId != \"0\") {\r\n //Checking if there is a cart set\r\n if (cartId != null && cartId != \"\" && cartId != \"0\") {\r\n //Checking if there are products\r\n if (this.cartData.Products != null && this.cartData.Products.length > 0) {\r\n //Checking if there is a payment set\r\n if (this.cartData.Payments != null && this.cartData.Payments.length > 0) {\r\n var flagPayment = false;\r\n for (var _i = 0, _a = this.cartData.Payments; _i < _a.length; _i++) {\r\n var payment = _a[_i];\r\n if (payment.Selected == true) {\r\n flagPayment = true;\r\n break;\r\n }\r\n }\r\n //Checking if there is a shipment set\r\n if (flagPayment == true) {\r\n if (this.cartData.Shipments != null && this.cartData.Shipments.length > 0) {\r\n var flagShipment = false;\r\n for (var _b = 0, _c = this.cartData.Shipments; _b < _c.length; _b++) {\r\n var shipment = _c[_b];\r\n if (shipment.Selected == true) {\r\n flagShipment = true;\r\n break;\r\n }\r\n }\r\n if (flagShipment == true) {\r\n res = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return res;\r\n };\r\n //Getting Empty cart page data\r\n ShoppingCartService.prototype.getEmptyCartPageData = function () {\r\n var lang = this.getLang();\r\n var customerId = this.getCustomerId();\r\n var cartId = this.getCartId();\r\n var url = this.mappings.Web_Api_Empty_Cart_Page.replace(\"{lang}\", lang).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n return this._api.get(url);\r\n };\r\n ShoppingCartService.prototype.setIfProductIsCanvasEdited = function (isEdited) {\r\n this.isProductCanvasEdited = isEdited;\r\n };\r\n ShoppingCartService.prototype.getIfProductIsCanvasEdited = function () {\r\n return this.isProductCanvasEdited;\r\n };\r\n ShoppingCartService.prototype.getCustomizationCanvasData = function () {\r\n return this.customizationData;\r\n };\r\n ShoppingCartService.prototype.setCustomizationCanvasData = function (newData) {\r\n this.customizationData = newData;\r\n };\r\n // reset canvas state because of next adding to a cart\r\n ShoppingCartService.prototype.resetCanvasData = function () {\r\n var emptyObj = {};\r\n this.setIfProductIsCanvasEdited(false);\r\n this.setCustomizationCanvasData(emptyObj);\r\n };\r\n ShoppingCartService = __decorate([\r\n core_1.Injectable(),\r\n __param(6, core_1.Inject('CookieService')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _f) || Object, (typeof (_g = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _g) || Object])\r\n ], ShoppingCartService);\r\n return ShoppingCartService;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.ShoppingCartService = ShoppingCartService;\r\n\n\n/***/ }),\n\n/***/ 21:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar wizardFormEditoriaModel = (function () {\r\n function wizardFormEditoriaModel() {\r\n this.numCopie = \"\";\r\n this.idCopie = \"\";\r\n this.tipoCopie = \"\";\r\n this.numFacciate = \"\";\r\n this.idFacciate = \"\";\r\n this.tipoFacciate = \"\";\r\n this.idFormati = \"\";\r\n this.idColori1 = \"\";\r\n this.idCarte1 = \"\";\r\n this.nomeCarte1 = \"\";\r\n this.nomeCarte2 = \"\";\r\n this.idGrammature1 = \"\";\r\n this.nomeGrammature1 = \"\";\r\n this.idPlastificazioni1 = \"\";\r\n this.idCopertine = \"\";\r\n this.idColori2 = \"\";\r\n this.idCarte2 = \"\";\r\n this.idGrammature2 = \"\";\r\n this.nomeGrammature2 = \"\";\r\n this.idPlastificazioni2 = \"\";\r\n this.idRilegature = \"\";\r\n this.taglio = false;\r\n this.sezione = \"\";\r\n this.tipoStampaInternoSoloFronte = false;\r\n this.stampa1_colori_fronte = \"\";\r\n this.stampa1_colori_retro = \"\";\r\n this.stampa2_colori_fronte = \"\";\r\n this.stampa2_colori_retro = \"\";\r\n this.wizardId = 0;\r\n this.tipoStampaCopertinaSoloFronte = false;\r\n this.macrocategoryWizardId = 0;\r\n this.richiestaName = \"\";\r\n this.richiestaSubName = \"\";\r\n this.richiestaEmail = \"\";\r\n this.isRichiestaEmailValid = false;\r\n this.richiestaTelephone = \"\";\r\n this.richiestaSocieta = \"\";\r\n this.richiestaJobname = \"\";\r\n this.richiestaCondizioni = false;\r\n this.richiestaNote = \"\";\r\n this.idPiegature = \"\";\r\n this.soggettiMultipli = false;\r\n this.numSoggetti = \"\";\r\n this.baseFormato = \"\";\r\n this.altezzaFormato = \"\";\r\n this.idTagli = \"\";\r\n this.idBusta = \"\";\r\n this.idMaterialiFlessibili = \"\";\r\n this.idSupportiRigidi = \"\";\r\n this.idOcchielli = \"\";\r\n this.idAsole = \"\";\r\n this.idCuciture = \"\";\r\n this.idElettrosaldature = \"\";\r\n this.disposizione_occhielli_id = \"\";\r\n this.distanza_occhielli = \"\";\r\n this.diametro_asola = \"\";\r\n this.disposizione_asola_id = \"\";\r\n this.disposizione_cucitura_id = \"\";\r\n this.disposizione_elettrosaldatura_id = \"\";\r\n this.tipoBifacciale = \"\";\r\n this.idBiancoCoprente = \"\";\r\n this.language = \"\";\r\n this.currency = \"\";\r\n this.idPantoneFronte1 = \"\";\r\n this.idPantoneFronte2 = \"\";\r\n this.idPantoneRetro1 = \"\";\r\n this.idPantoneRetro2 = \"\";\r\n this.idCartoncino = \"\";\r\n this.nomeCartoncino = \"\";\r\n this.idGrammatureCartoncino = \"\";\r\n this.nomeGrammatureCartoncino = \"\";\r\n this.numDiametroInternoAnimaLabel = 0;\r\n this.numDiametroMassimoEsternoAnimaLabel = 0;\r\n this.numEtichette = \"\";\r\n this.idAvvolgimento = \"\";\r\n this.idFustella = \"\";\r\n this.idFormatoTipo = \"\";\r\n this.idTipoLavoroLabel = \"\";\r\n this.subSection = \"\";\r\n }\r\n return wizardFormEditoriaModel;\r\n}());\r\nexports.wizardFormEditoriaModel = wizardFormEditoriaModel;\r\nvar MatrixModelCalculation = (function () {\r\n function MatrixModelCalculation() {\r\n }\r\n return MatrixModelCalculation;\r\n}());\r\nexports.MatrixModelCalculation = MatrixModelCalculation;\r\nvar LavorazioniAccessorieModel = (function () {\r\n function LavorazioniAccessorieModel() {\r\n this.valoreLavorazione = \"\";\r\n this.numWidthFormValue = \"\";\r\n this.numHeightFormValue = \"\";\r\n this.numDepthFormValue = \"\";\r\n this.tipo = 0;\r\n }\r\n return LavorazioniAccessorieModel;\r\n}());\r\nexports.LavorazioniAccessorieModel = LavorazioniAccessorieModel;\r\nvar PriceEstimationModel = (function () {\r\n function PriceEstimationModel() {\r\n this.Currency = \"€\";\r\n this.UnitPrice = \"0,00\";\r\n this.Imponibile = \"0,00\";\r\n this.Iva = \"0,00\";\r\n this.Total = \"0,00\";\r\n this.TotalAmount = \"0,00\";\r\n this.WeightUm = \"Kg\";\r\n this.Weight = \"0,00\";\r\n this.DayName = \"\";\r\n this.DayNumber = \"\";\r\n this.Quantity = 0;\r\n this.AltezzaDorso = 0.00;\r\n this.PrezzoOriginaleimporto = 0.00;\r\n this.DayDescriptionName = \"\";\r\n }\r\n return PriceEstimationModel;\r\n}());\r\nexports.PriceEstimationModel = PriceEstimationModel;\r\nvar FileCombinationModel = (function () {\r\n function FileCombinationModel() {\r\n }\r\n return FileCombinationModel;\r\n}());\r\nexports.FileCombinationModel = FileCombinationModel;\r\nvar wizardFormAdesiviModel = (function () {\r\n function wizardFormAdesiviModel() {\r\n }\r\n return wizardFormAdesiviModel;\r\n}());\r\nexports.wizardFormAdesiviModel = wizardFormAdesiviModel;\r\nvar wizardFormBandieraModel = (function () {\r\n function wizardFormBandieraModel() {\r\n }\r\n return wizardFormBandieraModel;\r\n}());\r\nexports.wizardFormBandieraModel = wizardFormBandieraModel;\r\nvar wizardFormBannerModel = (function () {\r\n function wizardFormBannerModel() {\r\n }\r\n return wizardFormBannerModel;\r\n}());\r\nexports.wizardFormBannerModel = wizardFormBannerModel;\r\nvar wizardFormBusteModel = (function () {\r\n function wizardFormBusteModel() {\r\n this.fronte = \"\";\r\n }\r\n return wizardFormBusteModel;\r\n}());\r\nexports.wizardFormBusteModel = wizardFormBusteModel;\r\nvar wizardFormCommercialeModel = (function () {\r\n function wizardFormCommercialeModel() {\r\n }\r\n return wizardFormCommercialeModel;\r\n}());\r\nexports.wizardFormCommercialeModel = wizardFormCommercialeModel;\r\nvar wizarFormEtichetteModel = (function () {\r\n function wizarFormEtichetteModel() {\r\n this.fronte = \"\";\r\n }\r\n return wizarFormEtichetteModel;\r\n}());\r\nexports.wizarFormEtichetteModel = wizarFormEtichetteModel;\r\nvar wizardFormStampaModel = (function () {\r\n function wizardFormStampaModel() {\r\n }\r\n return wizardFormStampaModel;\r\n}());\r\nexports.wizardFormStampaModel = wizardFormStampaModel;\r\n\n\n/***/ }),\n\n/***/ 22:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\nvar core_2 = __webpack_require__(27);\r\nvar breadcrumbs_1 = __webpack_require__(616);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar BreadcrumbsService = (function () {\r\n function BreadcrumbsService(router, languageService, translateService, isBrowser) {\r\n this.router = router;\r\n this.languageService = languageService;\r\n this.translateService = translateService;\r\n this.isBrowser = isBrowser;\r\n this.homeIsInit = false;\r\n }\r\n BreadcrumbsService.prototype.setHomeBreadcrumb = function () {\r\n if (this.breadcrumbsList != null && this.breadcrumbsList.length > 0) {\r\n if (this.breadcrumbsList[0].Level == 0) {\r\n return;\r\n }\r\n }\r\n var lang = this.languageService.getShortLang();\r\n var homeLink = \"/home\";\r\n if (lang != null && lang != \"\") {\r\n homeLink = lang + homeLink;\r\n }\r\n else {\r\n homeLink = homeLink;\r\n }\r\n var bread = new breadcrumbs_1.Breadcrumbs();\r\n bread.BreadcrumbLink = homeLink;\r\n bread.BreadcrumbName = this.translateService.get(\"home_area_message_home\")[\"value\"];\r\n bread.Level = 0;\r\n this.breadcrumbsList.unshift(bread);\r\n this.homeIsInit = true;\r\n };\r\n BreadcrumbsService.prototype.setBreadcrumbs = function (breadcrumbs, type) {\r\n this.breadcrumbsList = [];\r\n if (type != \"cmspage\") {\r\n if (breadcrumbs != null && breadcrumbs.length > 0) {\r\n breadcrumbs.forEach(function (x) {\r\n x.BreadcrumbLink = x.BreadcrumbLink.toLocaleLowerCase();\r\n });\r\n }\r\n }\r\n this.breadcrumbsList = breadcrumbs;\r\n // this.setHomeBreadcrumb();\r\n };\r\n BreadcrumbsService.prototype.getBreadcrumbs = function () {\r\n var breadcrumbs = this.breadcrumbsList;\r\n return breadcrumbs;\r\n };\r\n BreadcrumbsService = __decorate([\r\n core_1.Injectable(),\r\n __param(3, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _c) || Object, Boolean])\r\n ], BreadcrumbsService);\r\n return BreadcrumbsService;\r\n var _a, _b, _c;\r\n}());\r\nexports.BreadcrumbsService = BreadcrumbsService;\r\n\n\n/***/ }),\n\n/***/ 252:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Register = (function () {\r\n function Register() {\r\n }\r\n return Register;\r\n}());\r\nexports.Register = Register;\r\nvar QuickRegister = (function () {\r\n function QuickRegister(email, emailRepeat, password, telephone, customerGroup, CF, PIVA, oldGroup) {\r\n if (email === void 0) { email = ''; }\r\n if (emailRepeat === void 0) { emailRepeat = ''; }\r\n if (password === void 0) { password = ''; }\r\n if (telephone === void 0) { telephone = ''; }\r\n if (customerGroup === void 0) { customerGroup = '5'; }\r\n if (CF === void 0) { CF = ''; }\r\n if (PIVA === void 0) { PIVA = ''; }\r\n if (oldGroup === void 0) { oldGroup = '5'; }\r\n this.EmailRegister = '';\r\n this.EmailRepeat = '';\r\n this.Password = '';\r\n this.PartitaIva = '';\r\n this.CodiceFiscale = '';\r\n this.Telephone = '';\r\n this.CustomerGroup = '5';\r\n this.info_privacy = '';\r\n this.IsQuickRegistered = false;\r\n this.CustomerGroup = customerGroup;\r\n this.controlFormReset(oldGroup, CF, PIVA);\r\n this.EmailRegister = email;\r\n this.EmailRepeat = emailRepeat;\r\n this.Password = password;\r\n this.Telephone = telephone;\r\n }\r\n //-- If client type is changed inside of form from societa to dita individuale, we don't want to reset a PIVA field value also\r\n //-- If client type is changed inside of form from privato to associazione, we don't want to reset a CF field value also\r\n QuickRegister.prototype.controlFormReset = function (oldGroup, CF, PIVA) {\r\n if (((this.CustomerGroup === '5' || this.CustomerGroup === '6') && (oldGroup === '5' || oldGroup === '6')))\r\n this.PartitaIva = PIVA;\r\n else\r\n this.PartitaIva = '';\r\n if (((this.CustomerGroup === '4' || this.CustomerGroup === '7') && (oldGroup === '4' || oldGroup === '7')))\r\n this.CodiceFiscale = CF;\r\n else\r\n this.CodiceFiscale = '';\r\n };\r\n return QuickRegister;\r\n}());\r\nexports.QuickRegister = QuickRegister;\r\n\n\n/***/ }),\n\n/***/ 253:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Company = (function () {\r\n function Company() {\r\n }\r\n return Company;\r\n}());\r\nexports.Company = Company;\r\n\n\n/***/ }),\n\n/***/ 254:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Product = (function () {\r\n function Product() {\r\n }\r\n return Product;\r\n}());\r\nexports.Product = Product;\r\nvar PhotoGalleryViewModel = (function () {\r\n function PhotoGalleryViewModel() {\r\n }\r\n return PhotoGalleryViewModel;\r\n}());\r\nexports.PhotoGalleryViewModel = PhotoGalleryViewModel;\r\nvar AtachmentViewModel = (function () {\r\n function AtachmentViewModel() {\r\n }\r\n return AtachmentViewModel;\r\n}());\r\nvar Category = (function () {\r\n function Category() {\r\n }\r\n return Category;\r\n}());\r\nexports.Category = Category;\r\nvar SliderViewModel = (function () {\r\n function SliderViewModel() {\r\n }\r\n return SliderViewModel;\r\n}());\r\nexports.SliderViewModel = SliderViewModel;\r\nvar MegaMenu = (function () {\r\n function MegaMenu() {\r\n }\r\n return MegaMenu;\r\n}());\r\nexports.MegaMenu = MegaMenu;\r\n\n\n/***/ }),\n\n/***/ 255:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar CheckIfExistService = (function () {\r\n function CheckIfExistService(_api, _cache, mappings) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n //for sending of checking type, because we are using same method on server side for all checking\r\n this.emailType = \"email\";\r\n this.partitaIvaType = \"partitaIva\";\r\n this.codiceFiscaleType = \"codiceFiscale\";\r\n }\r\n CheckIfExistService.prototype.checkIfEmailExistsInDb = function (value) {\r\n var url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.emailType).replace('{value}', value);\r\n return this._api.get(url);\r\n };\r\n CheckIfExistService.prototype.checkIfPartitaIvaExistsInDb = function (value) {\r\n var url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.partitaIvaType).replace('{value}', value);\r\n return this._api.get(url);\r\n };\r\n CheckIfExistService.prototype.checkIfCodiceFiscaleExistsInDb = function (value) {\r\n var url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.codiceFiscaleType).replace('{value}', value);\r\n return this._api.get(url);\r\n };\r\n CheckIfExistService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n ], CheckIfExistService);\r\n return CheckIfExistService;\r\n var _a, _b, _c;\r\n}());\r\nexports.CheckIfExistService = CheckIfExistService;\r\n\n\n/***/ }),\n\n/***/ 256:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar OrderPaymentService = (function () {\r\n function OrderPaymentService(_api, _cache, mappings) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n }\r\n OrderPaymentService.prototype.setOrderAsPayed = function (orderId) {\r\n var url = this.mappings.Web_Api_Set_Order_As_Payed;\r\n var orderID = {\r\n OrderId: parseInt(orderId)\r\n };\r\n return this._api.post(url, orderID);\r\n };\r\n OrderPaymentService.prototype.CheckIsOrderPayedUnicredit = function (orderId) {\r\n var url = this.mappings.Web_Api_Check_Is_Order_Payed_Unicredit.replace('{orderId}', orderId.toString());\r\n return this._api.post(url);\r\n };\r\n OrderPaymentService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n ], OrderPaymentService);\r\n return OrderPaymentService;\r\n var _a, _b, _c;\r\n}());\r\nexports.OrderPaymentService = OrderPaymentService;\r\n\n\n/***/ }),\n\n/***/ 257:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar RecoverPasswordService = (function () {\r\n function RecoverPasswordService(_api, language, _cache, mappings, cartService, authService) {\r\n this._api = _api;\r\n this.language = language;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n this.cartService = cartService;\r\n this.authService = authService;\r\n }\r\n RecoverPasswordService.prototype.recoverPasswordRequest = function (email) {\r\n email = email.toLowerCase();\r\n var lang = this.language.getLongLang();\r\n return this._api.post(this.mappings.Web_Api_Recover_Password, { Email: email, Lang: lang })\r\n .do(function (result) { return result; })\r\n .share();\r\n };\r\n RecoverPasswordService.prototype.getRecoverPasswordData = function (lang) {\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Recover_Password_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);\r\n return this._api.get(url);\r\n };\r\n RecoverPasswordService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _c) || Object, (typeof (_d = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object])\r\n ], RecoverPasswordService);\r\n return RecoverPasswordService;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.RecoverPasswordService = RecoverPasswordService;\r\n\n\n/***/ }),\n\n/***/ 258:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\n//System\r\nvar mapping_1 = __webpack_require__(9);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar ConfigurationService = (function () {\r\n function ConfigurationService(_api, _cache, mappings) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n }\r\n ConfigurationService.prototype.getConfiguration = function (lang) {\r\n var url = this.mappings.Web_Api_Get_Configuration.replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n //Return the routes for a given language\r\n ConfigurationService.prototype.getRoutes = function (lang) {\r\n var url = this.mappings.Web_Api_Get_Routes.replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ConfigurationService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n ], ConfigurationService);\r\n return ConfigurationService;\r\n var _a, _b, _c;\r\n}());\r\nexports.ConfigurationService = ConfigurationService;\r\n\n\n/***/ }),\n\n/***/ 259:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar CryptoService = (function () {\r\n function CryptoService() {\r\n }\r\n CryptoService.prototype.encryptNumber = function (param) {\r\n var prefix = \"xyZ\";\r\n var sufix = \"xpNw\";\r\n var output = \"\";\r\n try {\r\n if (param != null) {\r\n var newNumber = param + 1264;\r\n output = prefix + newNumber.toString() + sufix;\r\n }\r\n }\r\n catch (Exception) {\r\n throw Exception;\r\n }\r\n return output;\r\n };\r\n CryptoService.prototype.decryptNumber = function (encryptedString) {\r\n var output = -1;\r\n try {\r\n if (encryptedString != null || encryptedString != \"\") {\r\n var stringWithoutPrefix = encryptedString.substring(3, encryptedString.length);\r\n var stringwithoutSufix = stringWithoutPrefix.substring(0, stringWithoutPrefix.length - 4);\r\n output = Number(stringwithoutSufix) - 1264;\r\n }\r\n }\r\n catch (Exception) {\r\n throw Exception;\r\n }\r\n return output;\r\n };\r\n CryptoService.prototype.decryptString = function (text) {\r\n text = text.substring(4, text.length);\r\n text = text.substring(0, text.length - 4);\r\n var decryptedText = '';\r\n for (var _i = 0, text_1 = text; _i < text_1.length; _i++) {\r\n var c = text_1[_i];\r\n var unicode = c.charCodeAt(0);\r\n unicode -= 5;\r\n decryptedText += String.fromCharCode(unicode);\r\n }\r\n return decryptedText;\r\n };\r\n CryptoService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [])\r\n ], CryptoService);\r\n return CryptoService;\r\n}());\r\nexports.CryptoService = CryptoService;\r\n\n\n/***/ }),\n\n/***/ 260:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar NodeLoggerService = (function () {\r\n function NodeLoggerService(isNode) {\r\n this.isNode = isNode;\r\n this.isLogActive = false; //Defines if the log is active or not\r\n this.logFilepath = \"src/assets/log.txt\"; //logfile\r\n }\r\n NodeLoggerService.prototype.AddLogWithTime = function (mex) {\r\n if (this.isNode) {\r\n if (this.isLogActive == false) {\r\n return;\r\n }\r\n var fs = __webpack_require__(427);\r\n var dateObj = new Date();\r\n var year = dateObj.getFullYear();\r\n var month = dateObj.getMonth() + 1;\r\n var day = dateObj.getDate();\r\n var hour = dateObj.getHours();\r\n var minutes = dateObj.getMinutes();\r\n var seconds = dateObj.getSeconds();\r\n var milliseconds = dateObj.getMilliseconds();\r\n var dateStr = day + \"/\" + month + \"/\" + year + \" \" + hour + \":\" + minutes + \":\" + seconds + \":\" + milliseconds;\r\n //Prepending date to message\r\n mex = dateStr + \": \" + mex + \"\\n\";\r\n fs.appendFile('src/assets/log.txt', mex, 'utf8', function (err) {\r\n if (err) {\r\n }\r\n else {\r\n }\r\n });\r\n }\r\n };\r\n NodeLoggerService = __decorate([\r\n core_1.Injectable(),\r\n __param(0, core_1.Inject('isNode')), \r\n __metadata('design:paramtypes', [Boolean])\r\n ], NodeLoggerService);\r\n return NodeLoggerService;\r\n}());\r\nexports.NodeLoggerService = NodeLoggerService;\r\n\n\n/***/ }),\n\n/***/ 261:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar PaypalService = (function () {\r\n function PaypalService() {\r\n this.isPaypalScriptLoaded = false;\r\n this.isError = false;\r\n this.errMessage = \"\";\r\n }\r\n PaypalService.prototype.loadPaypalService = function (externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction) {\r\n var _this = this;\r\n if (UsePaypalProduction === void 0) { UsePaypalProduction = true; }\r\n //-- Load paypal script if it is not already loaded, else only render a paypal button\r\n if (!this.isPaypalScriptLoaded) {\r\n this.loadExternalScript(externalScriptLink).then(function () {\r\n _this.renderPaypalBtn(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction);\r\n });\r\n }\r\n else {\r\n this.renderPaypalBtn(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction);\r\n }\r\n };\r\n PaypalService.prototype.loadExternalScript = function (scriptUrl) {\r\n var _this = this;\r\n return new Promise(function (resolve, reject) {\r\n var scriptElement = document.createElement('script');\r\n scriptElement.src = scriptUrl;\r\n scriptElement.onload = resolve;\r\n document.body.appendChild(scriptElement);\r\n _this.isPaypalScriptLoaded = true;\r\n });\r\n };\r\n PaypalService.prototype.renderPaypalBtn = function (externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction) {\r\n var styleObj = this.getPaypalBtnStyle(paypalBtnStyle);\r\n paypal.Button.render({\r\n env: UsePaypalProduction ? 'production' : 'sandbox',\r\n /* Show the buyer a 'Pay Now' button in the checkout flow */\r\n commit: true,\r\n locale: 'it_IT',\r\n style: styleObj,\r\n /* payment() is called when the button is clicked */\r\n payment: function () {\r\n /* Make a call to your server to set up the payment */\r\n return paypal.request.post(createPaypalPaymentAPI, data)\r\n .then(function (response) {\r\n return response.id;\r\n });\r\n },\r\n /* onAuthorize() is called when the buyer approves the payment */\r\n onAuthorize: function (orderData, actions) {\r\n var _this = this;\r\n //-- Generating of execute payment object that we need on server side\r\n var executePaymentObj = {\r\n paymentID: orderData.paymentID,\r\n payerID: orderData.payerID,\r\n intent: orderData.intent,\r\n orderID: orderData.orderID,\r\n paymentToken: orderData.paymentToken,\r\n returnUrl: orderData.returnUrl,\r\n CustomerId: data.CustomerId,\r\n //-- This is our orderId paypal also returns property with same name, so we renamed our OrderId property\r\n CustomerOrderId: data.OrderId,\r\n Lang: data.Lang\r\n };\r\n /* Make a call to your server to execute the payment */\r\n return paypal.request.post(executePaypalPaymentAPI, executePaymentObj)\r\n .then(function (res) {\r\n _this.isError = res.IsError;\r\n if (!res.IsError)\r\n _this.isError = false;\r\n _this.errMessage = res.message;\r\n if (!res.message)\r\n _this.errMessage = \"\";\r\n if (_this.isError) {\r\n window.location.href = orderData.returnUrl + \"&orderId=\" + executePaymentObj.CustomerOrderId + \"&isError=\" + _this.isError + \"&message=\" + _this.errMessage;\r\n }\r\n else {\r\n window.location.href = orderData.returnUrl + \"&orderId=\" + executePaymentObj.CustomerOrderId + \"&isError=\" + _this.isError;\r\n }\r\n }).catch(function (err) {\r\n window.location.href = orderData.returnUrl + \"&orderId=\" + executePaymentObj.CustomerOrderId + \"&isError=true&message=\" + err.message;\r\n });\r\n }\r\n }, '#paypal-btn');\r\n };\r\n PaypalService.prototype.getPaypalBtnStyle = function (paypalBtnStyle) {\r\n var styleObj = {};\r\n if (paypalBtnStyle) {\r\n var height = this.getPaypalBtnHeight(paypalBtnStyle.PaypalButtonHeight);\r\n styleObj = {\r\n color: paypalBtnStyle.PaypalButtonColor || 'gold',\r\n shape: paypalBtnStyle.PaypalButtonShape || 'rect',\r\n label: paypalBtnStyle.PaypalButtonLabel || 'paypal',\r\n height: height || 40,\r\n tagline: paypalBtnStyle.PaypalButtonTagline || false,\r\n size: paypalBtnStyle.PaypalButtonSize || 'responsive'\r\n };\r\n }\r\n else {\r\n styleObj = {\r\n color: 'gold',\r\n shape: 'rect',\r\n label: 'paypal',\r\n height: 40,\r\n tagline: false,\r\n size: \"responsive\"\r\n };\r\n }\r\n return styleObj;\r\n };\r\n PaypalService.prototype.getPaypalBtnHeight = function (paypalButtonHeight) {\r\n var retVal = 40;\r\n if (paypalButtonHeight) {\r\n if (paypalButtonHeight === 'small')\r\n retVal = 30;\r\n else if (paypalButtonHeight === 'large')\r\n retVal = 50;\r\n }\r\n return retVal;\r\n };\r\n PaypalService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [])\r\n ], PaypalService);\r\n return PaypalService;\r\n}());\r\nexports.PaypalService = PaypalService;\r\n\n\n/***/ }),\n\n/***/ 262:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar CategoryService = (function () {\r\n function CategoryService(_api, _cache, currencyService, mappings, authService, languageService, ShoppingCartService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.currencyService = currencyService;\r\n this.mappings = mappings;\r\n this.authService = authService;\r\n this.languageService = languageService;\r\n this.ShoppingCartService = ShoppingCartService;\r\n }\r\n CategoryService.prototype.getCategory = function (categoryId, lang) {\r\n //Reading userId\r\n var customerId = this.authService.getCurrentUserId();\r\n var curr = this.currencyService.getCurrency();\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Category_Details\r\n .replace('{categoryId}', categoryId.toString())\r\n .replace('{lang}', lang)\r\n .replace('{customerid}', customerId)\r\n .replace('{currency}', curr)\r\n .replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n CategoryService.prototype.getCatalogCategoriesData = function (lang) {\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var curr = this.currencyService.getCurrency();\r\n var customerId = this.authService.getCurrentUserId();\r\n var url = this.mappings.Web_Api_Get_Catalog_Categories_Data.replace('{lang}', lang).replace('{currency}', curr).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n CategoryService.prototype.getCategoryByUrl = function (lang, seoUrl) {\r\n //Reading userId\r\n var customerId = this.authService.GetUserId();\r\n var curr = this.currencyService.getCurrency();\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Category_By_Url\r\n .replace('{lang}', lang)\r\n .replace('{customerid}', customerId)\r\n .replace('{currency}', curr)\r\n .replace('{seoUrl}', seoUrl)\r\n .replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n CategoryService.prototype.getCategoryInfo = function (parameters) {\r\n return this._api.post(this.mappings.Web_Api_Post_Send_Category_Info_Request, parameters);\r\n };\r\n CategoryService.prototype.getCategoryPriceData = function (categoryId) {\r\n //Reading userId\r\n var customerId = this.authService.getCurrentUserId();\r\n var curr = this.currencyService.getCurrency();\r\n var lang = this.languageService.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Catalog_Categories_Price_Data\r\n .replace('{categoryId}', categoryId.toString())\r\n .replace('{customerid}', customerId)\r\n .replace('{lang}', lang)\r\n .replace('{currency}', curr);\r\n return this._api.get(url);\r\n };\r\n CategoryService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _c) || Object, (typeof (_d = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _g) || Object])\r\n ], CategoryService);\r\n return CategoryService;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.CategoryService = CategoryService;\r\n\n\n/***/ }),\n\n/***/ 263:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar SearchService = (function () {\r\n function SearchService(_api, _cache, currencyService, mappings, authService, languageService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.currencyService = currencyService;\r\n this.mappings = mappings;\r\n this.authService = authService;\r\n this.languageService = languageService;\r\n this.queryText = \"\";\r\n }\r\n SearchService.prototype.getCategoriesAndProducts = function (query, startRow, endRow) {\r\n var lang = this.languageService.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Product_And_Categories\r\n .replace('{startRowIndex}', startRow)\r\n .replace('{maxRows}', endRow)\r\n .replace('{lang}', lang)\r\n .replace('{query}', query);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n SearchService.prototype.getQueryValue = function () {\r\n var response = this.query;\r\n return response;\r\n };\r\n SearchService.prototype.setQueryValue = function (newQuery) {\r\n this.query = newQuery;\r\n };\r\n SearchService.prototype.setQueryPlainTextValue = function (newQuery) {\r\n this.queryText = newQuery;\r\n };\r\n SearchService.prototype.getQueryPlainTextValue = function () {\r\n var response = this.queryText;\r\n return response;\r\n };\r\n SearchService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _c) || Object, (typeof (_d = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object])\r\n ], SearchService);\r\n return SearchService;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.SearchService = SearchService;\r\n\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\nvar application_service_1 = __webpack_require__(130);\r\nvar LanguageService = (function () {\r\n function LanguageService(translate, appService) {\r\n this.translate = translate;\r\n this.appService = appService;\r\n this.lang = this.translate.currentLang;\r\n }\r\n LanguageService.prototype.getLongLang = function () {\r\n switch (this.lang) {\r\n case 'it': return 'it-IT';\r\n case 'en': return 'en-GB';\r\n case 'al': return 'sq-AL';\r\n default: return '';\r\n }\r\n };\r\n LanguageService.prototype.getShortLang = function () {\r\n return this.lang;\r\n };\r\n //Return an object containing all the information for the current language (eg. code, lable, icon etc.)\r\n LanguageService.prototype.getCurrentLanguage = function () {\r\n var result = new LanguageObj();\r\n switch (this.lang) {\r\n case \"it\":\r\n }\r\n return result;\r\n };\r\n LanguageService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _a) || Object, (typeof (_b = typeof application_service_1.ApplicationService !== 'undefined' && application_service_1.ApplicationService) === 'function' && _b) || Object])\r\n ], LanguageService);\r\n return LanguageService;\r\n var _a, _b;\r\n}());\r\nexports.LanguageService = LanguageService;\r\nvar LanguageObj = (function () {\r\n function LanguageObj() {\r\n }\r\n return LanguageObj;\r\n}());\r\nexports.LanguageObj = LanguageObj;\r\n\n\n/***/ }),\n\n/***/ 32:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar CurrencyService = (function () {\r\n function CurrencyService(_api, mappings) {\r\n this._api = _api;\r\n this.mappings = mappings;\r\n this.currencyVal = \"\";\r\n }\r\n CurrencyService.prototype.getCurrency = function () {\r\n var param = '$';\r\n switch (param) {\r\n case '$': return 'USD';\r\n case '€': return 'EUR';\r\n default: return 'EUR';\r\n }\r\n };\r\n CurrencyService.prototype.getCurrencyBackend = function () {\r\n var url = this.mappings.Web_Api_Get_DefaultCurrency;\r\n return this._api.get(url);\r\n };\r\n CurrencyService.prototype.getDefaultCurrency = function () {\r\n return this.currencyVal;\r\n };\r\n CurrencyService.prototype.setDefaultCurrency = function (currency) {\r\n this.currencyVal = currency;\r\n };\r\n CurrencyService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object])\r\n ], CurrencyService);\r\n return CurrencyService;\r\n var _a, _b;\r\n}());\r\nexports.CurrencyService = CurrencyService;\r\n\n\n/***/ }),\n\n/***/ 371:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar core_1 = __webpack_require__(0);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar dom_adapter_1 = __webpack_require__(31);\r\nvar router_1 = __webpack_require__(13);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar router_2 = __webpack_require__(13);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar AppComponent = (function () {\r\n function AppComponent(template, document, isNode, cache, mappings, router, currency, routesService) {\r\n var _this = this;\r\n this.template = template;\r\n this.document = document;\r\n this.isNode = isNode;\r\n this.cache = cache;\r\n this.mappings = mappings;\r\n this.router = router;\r\n this.currency = currency;\r\n this.routesService = routesService;\r\n this._dom = dom_adapter_1.getDOM();\r\n this.subManager = new Subscription_1.Subscription();\r\n var sub = router.events.subscribe(function (event) {\r\n _this.navigationInterceptor(event);\r\n });\r\n var currencysub = currency.getCurrencyBackend().subscribe(function (result) {\r\n currency.setDefaultCurrency(result);\r\n });\r\n this.subManager.add(sub);\r\n this.subManager.add(currencysub);\r\n }\r\n // Shows and hides the loading spinner during RouterEvent changes\r\n AppComponent.prototype.navigationInterceptor = function (event) {\r\n if (event instanceof router_2.NavigationStart) {\r\n this.routesService.showPageLoader();\r\n }\r\n // Set loading state to false in both of the below events to hide the spinner in case a request fails\r\n if (event instanceof router_2.NavigationCancel) {\r\n this.routesService.hidePageLoader();\r\n }\r\n if (event instanceof router_2.NavigationError) {\r\n this.routesService.hidePageLoader();\r\n }\r\n };\r\n AppComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isNode) {\r\n return;\r\n }\r\n var templateSub = this.template.getHeadFootData()\r\n .subscribe(function (headFootData) {\r\n //Dynamically adding head css, js to the page (head.html)\r\n _this.appendHtmlString(_this.document.head, headFootData.HeadTemplateHtml);\r\n //Dynamically adding head css, js to the page (foot.html)\r\n _this.appendHtmlString(_this.document.body, headFootData.FootTemplateHtml);\r\n });\r\n this.subManager.add(templateSub);\r\n };\r\n AppComponent.prototype.appendHtmlString = function (el, template) {\r\n var div = this._dom.createElement('div');\r\n this._dom.setInnerHTML(div, template);\r\n this._dom.insertAllBefore(el.lastChild, this._dom.childNodes(div));\r\n };\r\n AppComponent.prototype.clearMemory = function () {\r\n this._dom = null;\r\n this.subManager.unsubscribe();\r\n this.cache.clearAll();\r\n this.document = null;\r\n };\r\n AppComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.clearMemory();\r\n };\r\n AppComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n selector: 'app',\r\n template: __webpack_require__(638)\r\n }),\r\n __param(1, core_1.Inject(platform_browser_1.DOCUMENT)),\r\n __param(2, core_1.Inject('isNode')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _a) || Object, Object, Boolean, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _d) || Object, (typeof (_e = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object])\r\n ], AppComponent);\r\n return AppComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.AppComponent = AppComponent;\r\n\n\n/***/ }),\n\n/***/ 372:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar news_list_1 = __webpack_require__(410);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar article_service_1 = __webpack_require__(128);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar ArticleCategoryComponent = (function () {\r\n function ArticleCategoryComponent(_compiler, componentHelper, _elementRef, articleService, languageService, route, router, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.articleService = articleService;\r\n this.languageService = languageService;\r\n this.route = route;\r\n this.router = router;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.articleCategory = new news_list_1.ArticleCategory();\r\n this.subManager = new Subscription_1.Subscription();\r\n this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n }\r\n ArticleCategoryComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n //Reading Language information\r\n var lang = this.languageService.getLongLang();\r\n //Reading id from url\r\n //If id is set, then the information is retrived by id, else by url\r\n var routeSub = this.route.params.subscribe(function (params) {\r\n var id = params['id'];\r\n var pageNumber = params['page'];\r\n var startRowIndex = 0;\r\n var maxRows = 15;\r\n if (pageNumber == undefined) {\r\n pageNumber = 0;\r\n startRowIndex = pageNumber * maxRows;\r\n }\r\n else if (pageNumber < 0) {\r\n pageNumber = 0;\r\n startRowIndex = pageNumber * maxRows;\r\n }\r\n else {\r\n startRowIndex = (pageNumber - 1) * maxRows;\r\n }\r\n var header;\r\n var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n _this.subManager.add(headDataSub);\r\n if (id !== undefined) {\r\n var categoryId_1 = id;\r\n var categorySubId = _this.articleService.getCategoryArticleById(categoryId_1, lang, startRowIndex, maxRows)\r\n .subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n _this.onGetArticleSuccess(result, pageNumber, maxRows, header, categoryId_1);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeArticleCategory, categoryId_1);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(categorySubId);\r\n }\r\n else {\r\n var url = _this.router.url;\r\n var pageNumber_1 = params['page'];\r\n if (pageNumber_1 != undefined) {\r\n url = url.slice(0, url.lastIndexOf('/'));\r\n }\r\n else {\r\n pageNumber_1 = 0;\r\n }\r\n var categorySubUrl = _this.articleService.getArticleCategoryByUrl(lang, url, startRowIndex, maxRows).subscribe(function (result) {\r\n if (_this.isBrowser) {\r\n _this.onGetArticleSuccess(result, pageNumber_1, maxRows, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeArticleCategory, result.CategoryDetails.Id);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(categorySubUrl);\r\n }\r\n });\r\n this.subManager.add(routeSub);\r\n };\r\n ArticleCategoryComponent.prototype.ngOnDestroy = function () {\r\n this.subManager.unsubscribe();\r\n };\r\n ArticleCategoryComponent.prototype.onGetArticleSuccess = function (result, currentPage, maxRows, header, categoryId) {\r\n ////Creating sub-component with the returned information\r\n var subComponent = this.createSubComponent(result, currentPage, maxRows, header, categoryId);\r\n ////Injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n };\r\n ArticleCategoryComponent.prototype.createSubComponent = function (result, currentPage, maxRows, header, categoryId) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, scriptService, helperService, isBrowser, _elementRef, languageService, articleService, routesService, router, breadcrumbsService) {\r\n this.seoService = seoService;\r\n this.scriptService = scriptService;\r\n this.helperService = helperService;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.languageService = languageService;\r\n this.articleService = articleService;\r\n this.routesService = routesService;\r\n this.router = router;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.articleCategory = result.CategoryDetails;\r\n this.seoInfo = result.SeoInformation;\r\n this.blogs = result.ArticleCategoryList;\r\n this.pageIsInit = false;\r\n this.lang = this.languageService.getLongLang();\r\n this.categoryId = 0;\r\n this.startRowIndex = 0;\r\n this.maxRows = maxRows;\r\n this.blogCategoryPageName = [];\r\n this.blogCategoryPageNumber = [];\r\n this.blogPageName = [];\r\n this.homePageName = [];\r\n this.currentPageNumber = currentPage;\r\n this.disablePreviousPage = false;\r\n this.disableNextPage = false;\r\n this.numberOfPages = Math.ceil(result.NumberOfArticles / this.maxRows);\r\n this.pages = this.createRange(this.numberOfPages);\r\n this.zeroPage = 0;\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n this.footerData = result.FooterData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n if (this.currentPageNumber == 0) {\r\n this.zeroPage = 1;\r\n }\r\n if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n this.disablePreviousPage = true;\r\n }\r\n else if (this.currentPageNumber == this.numberOfPages) {\r\n this.disableNextPage = true;\r\n }\r\n this.articleCategories = result.ArticleCategories;\r\n this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n this.homePageName = this.routesService.getRoutePath('HOME');\r\n if (categoryId != undefined) {\r\n this.blogCategoryPageName = this.routesService.getRoutePath('ArticleCategoryPage');\r\n this.blogCategoryPageNumber = this.routesService.getRoutePath('ArticleCategoryPageWithPaging');\r\n }\r\n else {\r\n this.blogCategoryPageName.push(this.router.url);\r\n }\r\n };\r\n ChildComponent.prototype.imageTitle = function (imgPath) {\r\n var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n };\r\n ChildComponent.prototype.createRange = function (number) {\r\n var items = [];\r\n for (var i = 1; i <= number; i++) {\r\n items.push(i);\r\n }\r\n return items;\r\n };\r\n ChildComponent.prototype.showClickedPage = function (index) {\r\n var page = index + 1;\r\n var url;\r\n if (categoryId != undefined) {\r\n url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', page.toString());\r\n }\r\n else {\r\n if (this.currentPageNumber == 0) {\r\n url = this.blogCategoryPageName + \"/\" + page.toString();\r\n }\r\n else {\r\n url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + page.toString();\r\n }\r\n }\r\n this.router.navigate([url]);\r\n };\r\n ChildComponent.prototype.showPreviousPage = function () {\r\n var previousPage = this.currentPageNumber - 1;\r\n if (previousPage > 0) {\r\n var url = void 0;\r\n if (categoryId != undefined) {\r\n url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', previousPage.toString());\r\n }\r\n else {\r\n if (this.currentPageNumber == 0) {\r\n url = this.blogCategoryPageName + \"/\" + previousPage.toString();\r\n }\r\n else {\r\n url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + previousPage.toString();\r\n }\r\n }\r\n this.router.navigate([url]);\r\n }\r\n };\r\n ChildComponent.prototype.showNextPage = function () {\r\n var page = Number(this.currentPageNumber);\r\n if (this.currentPageNumber == 0) {\r\n page = 1;\r\n }\r\n var nextPage = page + 1;\r\n var url;\r\n if (nextPage <= this.numberOfPages) {\r\n if (categoryId != undefined) {\r\n url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', nextPage.toString());\r\n }\r\n else {\r\n if (this.currentPageNumber == 0) {\r\n url = this.blogCategoryPageName + \"/\" + nextPage.toString();\r\n }\r\n else {\r\n url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + nextPage.toString();\r\n }\r\n }\r\n this.router.navigate([url]);\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(3, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _b) || Object, (typeof (_c = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _c) || Object, Boolean, (typeof (_d = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _f) || Object, (typeof (_g = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _g) || Object, (typeof (_h = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _h) || Object, (typeof (_j = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _j) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n }());\r\n return ChildComponent;\r\n };\r\n ArticleCategoryComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(8, core_1.Inject('isBrowser')),\r\n __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object, (typeof (_l = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _l) || Object])\r\n ], ArticleCategoryComponent);\r\n return ArticleCategoryComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.ArticleCategoryComponent = ArticleCategoryComponent;\r\n\n\n/***/ }),\n\n/***/ 373:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar article_service_1 = __webpack_require__(128);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(13);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar BlogPageComponent = (function () {\r\n function BlogPageComponent(_compiler, componentHelper, _elementRef, articleService, languageService, activatedRoute, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.articleService = articleService;\r\n this.languageService = languageService;\r\n this.activatedRoute = activatedRoute;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.categoryId = 0;\r\n this.startRowIndex = 0;\r\n this.maxRows = 15;\r\n this.currentPageNumber = 0;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n BlogPageComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var paramsSub = this.activatedRoute.params.subscribe(function (params) {\r\n _this.currentPageNumber = params['page'];\r\n if (_this.currentPageNumber == undefined) {\r\n _this.currentPageNumber = 1;\r\n _this.startRowIndex = (_this.currentPageNumber - 1) * _this.maxRows;\r\n }\r\n else if (_this.currentPageNumber < 1) {\r\n _this.currentPageNumber = 1;\r\n _this.startRowIndex = (_this.currentPageNumber - 1) * _this.maxRows;\r\n }\r\n else {\r\n _this.startRowIndex = (_this.currentPageNumber - 1) * _this.maxRows;\r\n }\r\n var header;\r\n var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n _this.subManager.add(headDataSub);\r\n var blogSub = _this.articleService.getBlogData(_this.lang, _this.startRowIndex, _this.maxRows).subscribe(function (result) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the blog information to inject\r\n var subComponent = _this.createSubComponent(result, _this.currentPageNumber, _this.maxRows, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.blogHomeId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(blogSub);\r\n });\r\n this.subManager.add(paramsSub);\r\n };\r\n BlogPageComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n BlogPageComponent.prototype.createSubComponent = function (result, currentPage, maxRows, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, _elementRef, isBrowser, scriptService, helperService, languageService, articleService, routesService, router, activatedRoute, breadcrumbsService) {\r\n this.seoService = seoService;\r\n this._elementRef = _elementRef;\r\n this.isBrowser = isBrowser;\r\n this.scriptService = scriptService;\r\n this.helperService = helperService;\r\n this.languageService = languageService;\r\n this.articleService = articleService;\r\n this.routesService = routesService;\r\n this.router = router;\r\n this.activatedRoute = activatedRoute;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.blogs = result.ArticleCategoryList;\r\n this.seoInfo = result.SeoInformation;\r\n this.company = result.Company;\r\n this.pageIsInit = false;\r\n this.lang = this.languageService.getLongLang();\r\n this.categoryId = 0;\r\n this.startRowIndex = 0;\r\n this.maxRows = maxRows;\r\n this.blogPageName = [];\r\n this.blogPageNumber = [];\r\n this.numberOfPages = Math.ceil(result.NumberOfArticles / this.maxRows);\r\n this.pages = this.createRange(this.numberOfPages);\r\n this.currentPageNumber = currentPage;\r\n this.disableNextPage = false;\r\n this.disablePreviousPage = false;\r\n this.homePageName = [];\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n this.footerData = result.FooterData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n this.articleCategories = result.ArticleCategories;\r\n if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n this.disablePreviousPage = true;\r\n }\r\n else if (this.currentPageNumber == this.numberOfPages) {\r\n this.disableNextPage = true;\r\n }\r\n this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n this.blogPageNumber = this.routesService.getRoutePath('BLOG_WITH_PAGINATION');\r\n this.homePageName = this.routesService.getRoutePath('HOME');\r\n };\r\n ChildComponent.prototype.imageTitle = function (imgPath) {\r\n var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n };\r\n //PAGINATION START************************************************************\r\n ChildComponent.prototype.createRange = function (number) {\r\n var items = [];\r\n for (var i = 1; i <= number; i++) {\r\n items.push(i);\r\n }\r\n return items;\r\n };\r\n ChildComponent.prototype.showClickedPage = function (index) {\r\n var page = index + 1;\r\n var url = this.blogPageNumber[0].replace(':page', page.toString());\r\n this.router.navigate([url]);\r\n };\r\n ChildComponent.prototype.showPreviousPage = function () {\r\n var previousPage = this.currentPageNumber - 1;\r\n if (previousPage > 0) {\r\n var url = this.blogPageNumber[0].replace(':page', previousPage.toString());\r\n this.router.navigate([url]);\r\n }\r\n };\r\n ChildComponent.prototype.showNextPage = function () {\r\n var nextPage = Number(this.currentPageNumber) + 1;\r\n if (nextPage <= this.numberOfPages) {\r\n var url = this.blogPageNumber[0].replace(':page', nextPage.toString());\r\n this.router.navigate([url]);\r\n }\r\n };\r\n //PAGINATION END************************************************************\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _f) || Object, (typeof (_g = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _g) || Object, (typeof (_h = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _h) || Object, (typeof (_j = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _j) || Object, (typeof (_k = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _k) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n }());\r\n return ChildComponent;\r\n };\r\n BlogPageComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(7, core_1.Inject('isBrowser')),\r\n __param(10, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _h) || Object, (typeof (_j = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _j) || Object, Object, (typeof (_k = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _k) || Object])\r\n ], BlogPageComponent);\r\n return BlogPageComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n}());\r\nexports.BlogPageComponent = BlogPageComponent;\r\n\n\n/***/ }),\n\n/***/ 374:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar article_service_1 = __webpack_require__(128);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar news_list_1 = __webpack_require__(410);\r\nvar newsletter_service_1 = __webpack_require__(85);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar ArticleComponent = (function () {\r\n function ArticleComponent(_elementRef, _compiler, componentHelper, languageService, router, route, articleService, templateService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._elementRef = _elementRef;\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this.languageService = languageService;\r\n this.router = router;\r\n this.route = route;\r\n this.articleService = articleService;\r\n this.templateService = templateService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.newsDetails = new news_list_1.NewsDetails();\r\n this.subManager = new Subscription_1.Subscription();\r\n this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n }\r\n ArticleComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n //Reading Language information\r\n var lang = this.languageService.getLongLang();\r\n var paramSub = this.route.params.subscribe(function (params) {\r\n var id = params['id'];\r\n var header;\r\n var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n _this.subManager.add(headDataSub);\r\n //Reading id from url\r\n //If id is set, then the page is retrived by id, else by url\r\n if (id !== undefined) {\r\n var Id_1 = id;\r\n var subArticleId = _this.articleService.getArticleDetails(Id_1, lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n _this.onGetPageSuccess(result, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeArticle, Id_1);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.HeaderImage);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(subArticleId);\r\n }\r\n else {\r\n var url = _this.router.url;\r\n var subArticleUrl = _this.articleService.getArticleByUrl(lang, url).subscribe(function (result) {\r\n if (_this.isBrowser) {\r\n _this.onGetPageSuccess(result, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeArticle, result.Id);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.HeaderImage);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(subArticleUrl);\r\n }\r\n });\r\n this.subManager.add(paramSub);\r\n };\r\n ArticleComponent.prototype.ngOnDestroy = function () {\r\n this.subManager.unsubscribe();\r\n };\r\n ArticleComponent.prototype.onGetPageSuccess = function (newsResult, header) {\r\n ////Creating sub-component with the returned information\r\n var subComponent = this.createSubComponent(newsResult, header);\r\n ////Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n };\r\n ArticleComponent.prototype.createSubComponent = function (newsObj, header) {\r\n if (newsObj.Id == 0) {\r\n var templateSub = this.templateService.getComponentTemplate(\"newsletterConfirmationTemplate\").subscribe(function (result) {\r\n newsObj.TemplateHtml = result;\r\n });\r\n this.subManager.add(templateSub);\r\n }\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, isBrowser, _elementRef, scriptService, helperService, newsletterService, routesService, articleService, languageService, breadcrumbsService) {\r\n this.seoService = seoService;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.helperService = helperService;\r\n this.newsletterService = newsletterService;\r\n this.routesService = routesService;\r\n this.articleService = articleService;\r\n this.languageService = languageService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.newsDetails = newsObj;\r\n this.slidesNews = newsObj.SliderImages;\r\n this.pageIsInit = false;\r\n this.seoInfo = newsObj.SeoInformation;\r\n this.model = {\r\n Email: \"\",\r\n Checkbox: false\r\n };\r\n this.privacyPageNameArticle = this.routesService.getRoutePath('INFO PRIVACY');\r\n this.lang = this.languageService.getLongLang();\r\n this.categoryId = 0;\r\n this.startRowIndex = 0;\r\n this.maxRows = 999999;\r\n this.blogPageName = [];\r\n this.homePageName = [];\r\n this.breadcrumbs = newsObj.BreadcrumbsInfo;\r\n this.subManager = new Subscription_1.Subscription();\r\n this.footerData = newsObj.FooterData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n this.articleCategories = newsObj.ArticleCategories;\r\n this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n this.homePageName = this.routesService.getRoutePath('HOME');\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n this.setupSocialNetworks();\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n layoutTheme.initCarousel();\r\n layoutTheme.initLightbox();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.setupSocialNetworks = function () {\r\n var shareurl = window.location.href;\r\n var title = this.newsDetails.Title;\r\n var text = encodeURI(title);\r\n /********************************** SET THIS PART DYNAMICALY **************************************** */\r\n //setting twitter profile name \r\n var companyTwitterProfile = \"DynamicsoftSrl\";\r\n //setting linkedin profile name\r\n var companyLinkedinProfile = \"DynamicsoftSrl\";\r\n /**************************************************************************************************** */\r\n //encoded current page\r\n var currentPage = encodeURI(shareurl);\r\n //sharing of current page on Facebook\r\n $('.fbsharelink').click(function () {\r\n window.open('https://www.facebook.com/sharer/sharer.php?u=' + shareurl + '&t=' + document.title, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n return false;\r\n });\r\n //sharing of current page on LinkedIn\r\n $('.linkedinsharelink').click(function () {\r\n window.open('https://www.linkedin.com/shareArticle?mini=true&url=' + shareurl + '&title=' + document.title +\r\n '&summary=' + text + '&source=' + companyLinkedinProfile, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n });\r\n //sharing of currentpage on Twitter\r\n $('.twitter-share-button').click(function () {\r\n window.open('https://twitter.com/intent/tweet?text=' + text + '&url=' + currentPage + '&via=' + companyTwitterProfile, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n });\r\n };\r\n ChildComponent.prototype.onSubmit = function (form) {\r\n var _this = this;\r\n this.spinnerNewslatterArticle = true;\r\n if (form) {\r\n var subNewsletter = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(function (result) {\r\n if (result == \"-1\") {\r\n _this.alreadySubscribedArticle = true;\r\n _this.successfullySubscribedArticle = false;\r\n _this.spinnerNewslatterArticle = false;\r\n }\r\n else {\r\n _this.alreadySubscribedArticle = false;\r\n _this.successfullySubscribedArticle = true;\r\n _this.spinnerNewslatterArticle = false;\r\n }\r\n });\r\n this.subManager.add(subNewsletter);\r\n }\r\n else {\r\n this.spinnerNewslatterArticle = false;\r\n }\r\n };\r\n ChildComponent.prototype.imageTitle = function (imgPath) {\r\n var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: newsObj.TemplateHtml\r\n }),\r\n __param(1, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _d) || Object, (typeof (_e = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _g) || Object, (typeof (_h = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _h) || Object, (typeof (_j = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _j) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n }());\r\n return ChildComponent;\r\n };\r\n ArticleComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(9, core_1.Inject('isBrowser')),\r\n __param(12, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _a) || Object, (typeof (_b = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _b) || Object, (typeof (_c = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _g) || Object, (typeof (_h = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _h) || Object, (typeof (_j = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _j) || Object, Boolean, (typeof (_k = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _k) || Object, (typeof (_l = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _l) || Object, Object, (typeof (_m = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _m) || Object])\r\n ], ArticleComponent);\r\n return ArticleComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\r\n}());\r\nexports.ArticleComponent = ArticleComponent;\r\n\n\n/***/ }),\n\n/***/ 375:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//System\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar search_service_1 = __webpack_require__(263);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar router_1 = __webpack_require__(13);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar SearchComponent = (function () {\r\n function SearchComponent(_compiler, componentHelper, _elementRef, searchService, cmsComponentService, activatedRoute, isBrowser, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.searchService = searchService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.activatedRoute = activatedRoute;\r\n this.isBrowser = isBrowser;\r\n this.scriptService = scriptService;\r\n this.startRow = 0;\r\n this.endRow = 10;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n SearchComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var paramSub = this.activatedRoute.params.subscribe(function (params) {\r\n var decodedQuery = params['query'];\r\n var decoded = decodeURIComponent(decodedQuery);\r\n _this.query = encodeURIComponent(decoded);\r\n _this.currentPageNumber = params['page'];\r\n if (_this.currentPageNumber == undefined) {\r\n _this.currentPageNumber = 1;\r\n _this.startRow = (_this.currentPageNumber - 1) * _this.endRow;\r\n }\r\n else if (_this.currentPageNumber < 1) {\r\n _this.currentPageNumber = 1;\r\n _this.startRow = (_this.currentPageNumber - 1) * _this.endRow;\r\n }\r\n else {\r\n _this.startRow = (_this.currentPageNumber - 1) * _this.endRow;\r\n }\r\n var header;\r\n var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n _this.subManager.add(headDataSub);\r\n var catAndProdSub = _this.searchService.getCategoriesAndProducts(_this.query, _this.startRow, _this.endRow).subscribe(function (result) {\r\n _this.SearchResult = result;\r\n if (_this.isBrowser) {\r\n // Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(header, _this.SearchResult, _this.query, _this.currentPageNumber, _this.endRow);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //Eventually retrieving the script to append\r\n if (_this.currentPageNumber == 0 || _this.currentPageNumber == 1) {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.SearchPageId);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.SearchWithPagingPageId);\r\n }\r\n }\r\n }, function (err) { return _this.handleSearchError(); });\r\n _this.subManager.add(catAndProdSub);\r\n });\r\n this.subManager.add(paramSub);\r\n };\r\n SearchComponent.prototype.handleSearchError = function () {\r\n var _this = this;\r\n this.query = null;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n this.searchService.getCategoriesAndProducts(this.query, this.startRow, this.endRow).subscribe(function (result) {\r\n _this.SearchResult = result;\r\n if (_this.isBrowser) {\r\n // Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(header, _this.SearchResult, _this.query, _this.currentPageNumber, _this.endRow);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //Eventually retrieving the script to append\r\n if (_this.currentPageNumber == 0 || _this.currentPageNumber == 1) {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.SearchPageId);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.SearchWithPagingPageId);\r\n }\r\n }\r\n });\r\n };\r\n SearchComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n SearchComponent.prototype.createSubComponent = function (header, SearchResult, query, currentPage, endRow) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(isBrowser, routesService, searchService, router, seoService, scriptService, _elementRef) {\r\n this.isBrowser = isBrowser;\r\n this.routesService = routesService;\r\n this.searchService = searchService;\r\n this.router = router;\r\n this.seoService = seoService;\r\n this.scriptService = scriptService;\r\n this._elementRef = _elementRef;\r\n this.seoInfo = SearchResult.SeoInformation;\r\n this.pageIsInit = false;\r\n this.defaultImageUrl = \"/global_app/img/noimage.jpg\";\r\n this.redirectUrlNone = \"javascript:void(0)\";\r\n //pagination\r\n this.query = query;\r\n this.currentPageNumber = currentPage;\r\n this.disablePreviousPage = false;\r\n this.disableNextPage = false;\r\n this.numberOfPages = Math.ceil(SearchResult.NumberOfResults / endRow);\r\n this.searchResultsPage = [];\r\n this.searchResultsPageWithPagination = [];\r\n this.pages = this.createRange(this.numberOfPages);\r\n this.numberOfResult = SearchResult.NumberOfResults;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n if (SearchResult.SearchModelList != null) {\r\n this.searchResults = SearchResult.SearchModelList;\r\n }\r\n if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n this.disablePreviousPage = true;\r\n }\r\n else if (this.currentPageNumber == this.numberOfPages) {\r\n this.disableNextPage = true;\r\n }\r\n this.searchResultsPage = this.routesService.getRoutePath('SEARCH - RESULTS');\r\n this.searchResultsPageWithPagination = this.routesService.getRoutePath('SEARCH RESULTS - PAGINATION');\r\n if (this.searchResults != null && this.searchResults != undefined) {\r\n for (var i = 0; i < this.searchResults.length; i++) {\r\n //setting of default image if image url is not defined\r\n if (this.searchResults[i].ImageUrl == null || this.searchResults[i].ImageUrl == \"\") {\r\n this.searchResults[i].ImageUrl = this.defaultImageUrl;\r\n }\r\n //setting of url href not to do nothing if url is not defined\r\n if (this.searchResults[i].RedirectUrl == null || this.searchResults[i].RedirectUrl == \"\") {\r\n this.searchResults[i].RedirectUrl = this.redirectUrlNone;\r\n }\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n //Pagination start\r\n ChildComponent.prototype.createRange = function (number) {\r\n var items = [];\r\n for (var i = 1; i <= number; i++) {\r\n items.push(i);\r\n }\r\n return items;\r\n };\r\n ChildComponent.prototype.showClickedPage = function (index) {\r\n var page = index + 1;\r\n var url = this.searchResultsPageWithPagination[0]\r\n .replace(':query', query)\r\n .replace(':page', page.toString());\r\n this.router.navigate([url]);\r\n };\r\n ChildComponent.prototype.showPreviousPage = function () {\r\n var previousPage = this.currentPageNumber - 1;\r\n if (previousPage > 0) {\r\n var url = this.searchResultsPageWithPagination[0]\r\n .replace(':query', query)\r\n .replace(':page', previousPage.toString());\r\n this.router.navigate([url]);\r\n }\r\n };\r\n ChildComponent.prototype.showNextPage = function () {\r\n var nextPage = Number(this.currentPageNumber) + 1;\r\n if (nextPage <= this.numberOfPages) {\r\n var url = this.searchResultsPageWithPagination[0]\r\n .replace(':query', query)\r\n .replace(':page', nextPage.toString());\r\n this.router.navigate([url]);\r\n }\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: SearchResult.TemplateHtml\r\n }),\r\n __param(0, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [Boolean, (typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof search_service_1.SearchService !== 'undefined' && search_service_1.SearchService) === 'function' && _b) || Object, (typeof (_c = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _c) || Object, (typeof (_d = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _d) || Object, (typeof (_e = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _e) || Object, (typeof (_f = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _f) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n }());\r\n return ChildComponent;\r\n };\r\n SearchComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n selector: \"\",\r\n template: ''\r\n }),\r\n __param(6, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof search_service_1.SearchService !== 'undefined' && search_service_1.SearchService) === 'function' && _d) || Object, (typeof (_e = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _g) || Object])\r\n ], SearchComponent);\r\n return SearchComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.SearchComponent = SearchComponent;\r\n\n\n/***/ }),\n\n/***/ 376:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\n//Services\r\nvar newsletter_service_1 = __webpack_require__(85);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar angular2_meta_1 = __webpack_require__(101);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar HomeComponent = (function () {\r\n function HomeComponent(_compiler, componentHelper, _elementRef, cmsComponentService, isBrowser, seo, renderer, scriptService, document) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.scriptService = scriptService;\r\n this.document = document;\r\n this.data = {};\r\n this.subManager = new Subscription_1.Subscription();\r\n this._compiler.clearCache();\r\n }\r\n HomeComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var homePageInfo;\r\n var header;\r\n var SideMenu;\r\n var promo;\r\n var highlith;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n SideMenu = result1;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var highlightPromo = this.cmsComponentService.getproductHilightpromo().subscribe(function (result) {\r\n //if (this.isBrowser) {\r\n if (result.Promotions) {\r\n promo = result.Promotions;\r\n }\r\n if (result.Highlights) {\r\n highlith = result.Highlights;\r\n }\r\n // }\r\n });\r\n this.subManager.add(highlightPromo);\r\n var homeSub = this.cmsComponentService.getHomePageDataOptimized().subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (SideMenu) {\r\n result.SideMenuData = SideMenu;\r\n }\r\n if (promo) {\r\n result.Promotions = promo;\r\n }\r\n if (highlith) {\r\n result.Highlights = highlith;\r\n }\r\n if (_this.isBrowser) {\r\n homePageInfo = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(homePageInfo, header);\r\n //let subComponent = this.createSubComponent(homePageInfo);\r\n _this._elementRef.clear();\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.homeId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(homeSub);\r\n };\r\n HomeComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n // this.cache.clearAll();\r\n };\r\n //Creates component to inject\r\n //private createSubComponent(homePageInfo: any) {\r\n HomeComponent.prototype.createSubComponent = function (homePageInfo, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(routesService, seoService, isBrowser, _elementRef, scriptService, helperService, currency, newsletterService, componentHelper, cache, canvasService, metaService) {\r\n this.routesService = routesService;\r\n this.seoService = seoService;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.helperService = helperService;\r\n this.currency = currency;\r\n this.newsletterService = newsletterService;\r\n this.componentHelper = componentHelper;\r\n this.cache = cache;\r\n this.canvasService = canvasService;\r\n this.metaService = metaService;\r\n this.homeIsInit = false;\r\n this.productsPageName = [];\r\n this.promotionsPageName = [];\r\n this.categories = homePageInfo.Categories;\r\n this.highlights = homePageInfo.Highlights;\r\n this.promotions = homePageInfo.Promotions;\r\n this.seoInfo = homePageInfo.SeoInformation;\r\n this.articles = homePageInfo.ArticleCategoryList;\r\n //private headerData: any = homePageInfo.HeaderData;\r\n this.headerData = header;\r\n this.footerData = homePageInfo.FooterData;\r\n this.sideMenuData = homePageInfo.SideMenuData;\r\n this.sliderData = homePageInfo.SliderData;\r\n //newsletter subsciption\r\n this.newsletterSubmitted = false;\r\n this.privacySubmitted = false;\r\n this.alreadySubscribed = false;\r\n this.successfullySubscribed = false;\r\n this.spinnerNewslatter = false;\r\n this.model = {\r\n Email: \"\",\r\n CheckboxSubscribe: false\r\n };\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n // private breadcrumbs : Breadcrumbs[] = homePageInfo.BreadcrumbsInfo;\r\n ChildComponent.prototype.ngOnInit = function () {\r\n // setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n this.sideMenuData.Categories = this.headerData.Categories;\r\n this.productsPageName = this.routesService.getRoutePath('CATALOGO PRODOTTI (HOME)');\r\n this.promotionsPageName = this.routesService.getRoutePath('CATALOGO - PRODOTTI IN OFFERTA');\r\n };\r\n ChildComponent.prototype.filteraArticleOfType = function (type, numReturn) {\r\n var count = 1;\r\n var result = new Array();\r\n var res = this.articles.filter(function (x) { return x.Code_Category == type; });\r\n for (var _i = 0, res_1 = res; _i < res_1.length; _i++) {\r\n var item = res_1[_i];\r\n if (count > numReturn) {\r\n return result;\r\n }\r\n result.push(item);\r\n count++;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.onSubmit = function (form) {\r\n var _this = this;\r\n this.spinnerNewslatter = true;\r\n if (form) {\r\n var newsSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(function (result) {\r\n if (result == \"-1\") {\r\n _this.alreadySubscribed = true;\r\n _this.successfullySubscribed = false;\r\n _this.spinnerNewslatter = false;\r\n }\r\n else {\r\n _this.alreadySubscribed = false;\r\n _this.successfullySubscribed = true;\r\n _this.spinnerNewslatter = false;\r\n }\r\n });\r\n this.subManager.add(newsSub);\r\n }\r\n else {\r\n this.spinnerNewslatter = false;\r\n }\r\n };\r\n ChildComponent.prototype.imageTitle = function (imgPath) {\r\n var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.homeIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n layoutTheme.initCarousel();\r\n layoutTheme.initAnimate();\r\n layoutTheme.initVideo();\r\n //Eventually retrieving the script to append\r\n // if (this.seoInfo.HasScripts == true) {\r\n // this.scriptService.appendHomeScript(this._elementRef.element.nativeElement);\r\n // }\r\n this.homeIsInit = true;\r\n };\r\n ChildComponent.prototype.nullifyAllReferences = function () {\r\n homePageInfo = null;\r\n this.productsPageName = null;\r\n this.promotionsPageName = null;\r\n this.categories = null;\r\n this.articles = null;\r\n this.highlights = null;\r\n this.promotions = null;\r\n this.seoInfo = null;\r\n this.headerData = null;\r\n this.footerData = null;\r\n this.sideMenuData = null;\r\n this.sliderData = null;\r\n this.model.CheckboxSubscribe = null;\r\n this.model.Email = null;\r\n };\r\n ChildComponent.prototype.doSomething = function () {\r\n this.nullifyAllReferences();\r\n this.subManager.unsubscribe();\r\n this.componentHelper.clearMemory();\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.nullifyAllReferences();\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: homePageInfo.TemplateHtml\r\n }),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, (typeof (_e = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _e) || Object, (typeof (_f = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _f) || Object, (typeof (_g = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _g) || Object, (typeof (_h = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _h) || Object, (typeof (_j = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _j) || Object, (typeof (_k = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _k) || Object, (typeof (_l = typeof angular2_meta_1.Meta !== 'undefined' && angular2_meta_1.Meta) === 'function' && _l) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n }());\r\n return ChildComponent;\r\n };\r\n HomeComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: ''\r\n }),\r\n __param(4, core_1.Inject('isBrowser')),\r\n __param(8, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _e) || Object, (typeof (_f = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _f) || Object, (typeof (_g = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _g) || Object, Object])\r\n ], HomeComponent);\r\n return HomeComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.HomeComponent = HomeComponent;\r\n\n\n/***/ }),\n\n/***/ 377:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\n//System\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar dom_adapter_1 = __webpack_require__(31);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar cms_content_service_1 = __webpack_require__(411);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar cms_menu_list_service_1 = __webpack_require__(412);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar CmsPageComponent = (function () {\r\n function CmsPageComponent(_compiler, componentHelper, _elementRef, cmsContentService, route, languageService, router, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.cmsContentService = cmsContentService;\r\n this.route = route;\r\n this.languageService = languageService;\r\n this.router = router;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.subManager = new Subscription_1.Subscription();\r\n this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n }\r\n CmsPageComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n //Reading Language information\r\n var longLangCode = this.languageService.getLongLang();\r\n var shortLangCode = this.languageService.getShortLang();\r\n var subParams = this.route.params.subscribe(function (params) {\r\n var id = params['id'];\r\n var header;\r\n var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n _this.subManager.add(headDataSub);\r\n //Reading id from url\r\n //If id is set, then the page is retrived by id, else by url\r\n if (id !== undefined) {\r\n var pageId_1 = '' + id;\r\n var cmsIdSub = _this.cmsContentService.getCmsPageById(longLangCode, pageId_1).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n _this.onGetPageSuccess(result, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCmsPage, pageId_1);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.TopImage);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(cmsIdSub);\r\n }\r\n else {\r\n var url = _this.router.url;\r\n var cmsUrlSub = _this.cmsContentService.getCmsPageByUrl(longLangCode, url).subscribe(function (result) {\r\n if (_this.isBrowser) {\r\n _this.onGetPageSuccess(result, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCmsPage, result.IdLevel);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.TopImage);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(cmsUrlSub);\r\n }\r\n });\r\n this.subManager.add(subParams);\r\n };\r\n CmsPageComponent.prototype.ngOnDestroy = function () {\r\n this.subManager.unsubscribe();\r\n };\r\n CmsPageComponent.prototype.onGetPageSuccess = function (cmsResult, header) {\r\n //Creating subcomponent whith the object get from server\r\n var subComponent = this.createSubComponent(cmsResult, header);\r\n //injecting created component\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n };\r\n //Creates component to inject \r\n CmsPageComponent.prototype.createSubComponent = function (cmsPageObj, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, document, isBrowser, _elementRef, scriptService, helperService, cmsMenuListService, languageService, routesService, breadcrumbsService) {\r\n this.seoService = seoService;\r\n this.document = document;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.helperService = helperService;\r\n this.cmsMenuListService = cmsMenuListService;\r\n this.languageService = languageService;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this._dom = dom_adapter_1.getDOM();\r\n this.cmspage = cmsPageObj;\r\n this.seoInfo = cmsPageObj.SeoInformation;\r\n this.pageIsInit = false;\r\n this.menuItems = [];\r\n this.headerData = header;\r\n this.footerData = cmsPageObj.footerData;\r\n this.lang = this.languageService.getLongLang();\r\n this.breadcrumbs = [];\r\n //private breadcrumbs: Breadcrumbs[] = cmsPageObj.BreadcrumbsInfo;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var paramPage = \"cmspage\";\r\n //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n this.breadcrumbs = cmsPageObj.BreadcrumbsInfo;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n if (this.isBrowser == true) {\r\n setTimeout(function (x) { return _this.menuItems = cmsPageObj.menuItems; }, 1);\r\n }\r\n };\r\n ChildComponent.prototype.imageTitle = function (imgPath) {\r\n var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: cmsPageObj.TemplateHtml\r\n }),\r\n __param(1, core_1.Inject(platform_browser_1.DOCUMENT)),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, Object, Boolean, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _d) || Object, (typeof (_e = typeof cms_menu_list_service_1.CmsMenuListService !== 'undefined' && cms_menu_list_service_1.CmsMenuListService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _g) || Object, (typeof (_h = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _h) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n }());\r\n return ChildComponent;\r\n };\r\n CmsPageComponent = __decorate([\r\n core_1.Component({\r\n template: \"\",\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated\r\n }),\r\n __param(8, core_1.Inject('isBrowser')),\r\n __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_content_service_1.CmsContentService !== 'undefined' && cms_content_service_1.CmsContentService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object, (typeof (_l = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _l) || Object])\r\n ], CmsPageComponent);\r\n return CmsPageComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.CmsPageComponent = CmsPageComponent;\r\n\n\n/***/ }),\n\n/***/ 378:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar cookie_policy_service_1 = __webpack_require__(417);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar CookiePolicyComponent = (function () {\r\n function CookiePolicyComponent(_compiler, componentHelper, _elementRef, languageService, cookiePolicyService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.languageService = languageService;\r\n this.cookiePolicyService = cookiePolicyService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n CookiePolicyComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var cookieSub = this.cookiePolicyService.getCookiePolicyData(this.lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.cookiesId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(cookieSub);\r\n };\r\n CookiePolicyComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n CookiePolicyComponent.prototype.createSubComponent = function (result, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService) {\r\n this.seoService = seoService;\r\n this._elementRef = _elementRef;\r\n this.isBrowser = isBrowser;\r\n this.scriptService = scriptService;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.configuration = result.ConfigurationInfo;\r\n this.seoInfo = result.SeoInformation;\r\n this.pageIsInit = false;\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n this.footerData = result.footerData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml,\r\n }),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e;\r\n }());\r\n return ChildComponent;\r\n };\r\n CookiePolicyComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof cookie_policy_service_1.CookiePolicyService !== 'undefined' && cookie_policy_service_1.CookiePolicyService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], CookiePolicyComponent);\r\n return CookiePolicyComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.CookiePolicyComponent = CookiePolicyComponent;\r\n\n\n/***/ }),\n\n/***/ 379:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar faq_service_1 = __webpack_require__(413);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar company_service_1 = __webpack_require__(131);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar FaqComponent = (function () {\r\n function FaqComponent(_compiler, componentHelper, _elementRef, faqlistService, languageService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.faqlistService = faqlistService;\r\n this.languageService = languageService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n FaqComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var faqSub = this.faqlistService.getFaqData(this.lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the faq data to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.faqsId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(faqSub);\r\n };\r\n FaqComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n FaqComponent.prototype.createSubComponent = function (result, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(companyService, _elementRef, seoService, isBrowser, scriptService, routesService, breadcrumbsService) {\r\n this.companyService = companyService;\r\n this._elementRef = _elementRef;\r\n this.seoService = seoService;\r\n this.isBrowser = isBrowser;\r\n this.scriptService = scriptService;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.faqlist = result.FaqList;\r\n this.footerData = result.footerData;\r\n this.headerData = header;\r\n this.pageIsInit = false;\r\n this.seoInfo = result.SeoInformation;\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n layoutTheme.initToggle();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(3, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof company_service_1.CompanyService !== 'undefined' && company_service_1.CompanyService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _c) || Object, Boolean, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _f) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n }());\r\n return ChildComponent;\r\n };\r\n FaqComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof faq_service_1.FaqListService !== 'undefined' && faq_service_1.FaqListService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], FaqComponent);\r\n return FaqComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.FaqComponent = FaqComponent;\r\n\n\n/***/ }),\n\n/***/ 38:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar TemplateService = (function () {\r\n function TemplateService(_api, _cache, mappings, language, cache, cartService, authService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n this.language = language;\r\n this.cache = cache;\r\n this.cartService = cartService;\r\n this.authService = authService;\r\n }\r\n TemplateService.prototype.getThankYouPagePaypalInfo = function (componentType, id) {\r\n var currentLang = this.language.getLongLang();\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Information_ThankYouPage_Paypal_Url\r\n .replace('{type}', componentType)\r\n .replace('{orderid}', id)\r\n .replace('{lang}', currentLang)\r\n .replace('{cartid}', cartId)\r\n .replace('{userid}', customerId);\r\n return this._api.get(url);\r\n };\r\n TemplateService.prototype.getThankYouPagOnlineInfo = function (componentType, id) {\r\n var currentLang = this.language.getLongLang();\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Information_ThankYouPage_PagOnline_Url\r\n .replace('{type}', componentType)\r\n .replace('{orderid}', id)\r\n .replace('{lang}', currentLang)\r\n .replace('{cartid}', cartId)\r\n .replace('{userid}', customerId);\r\n return this._api.get(url);\r\n };\r\n TemplateService.prototype.getThankYouNexiInfo = function (componentType, id, messaggio, data, orario) {\r\n var currentLang = this.language.getLongLang();\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n //remove special char\r\n messaggio = messaggio.replace('%2B', ' ');\r\n messaggio = messaggio.replace('+', ' ');\r\n var url = this.mappings.Web_Api_Get_Information_ThankYouPage_Nexi_Url\r\n .replace('{type}', componentType)\r\n .replace('{orderid}', id)\r\n .replace('{messaggio}', messaggio)\r\n .replace('{data}', data)\r\n .replace('{orario}', orario)\r\n .replace('{lang}', currentLang)\r\n .replace('{cartid}', cartId)\r\n .replace('{userid}', customerId);\r\n return this._api.get(url);\r\n };\r\n /**\r\n * return the html template for a given component\r\n */\r\n TemplateService.prototype.getComponentTemplate = function (componentType) {\r\n var currentLang = this.language.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Template_Url\r\n .replace('{type}', componentType)\r\n .replace('{lang}', currentLang);\r\n return this._api.get(url);\r\n };\r\n TemplateService.prototype.getComponentTemplatePageNotFound = function (componentType) {\r\n var currentLang = this.language.getLongLang();\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Template_Url_Page_Not_Found\r\n .replace('{type}', componentType)\r\n .replace('{lang}', currentLang)\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);\r\n ;\r\n return this._api.get(url);\r\n };\r\n TemplateService.prototype.getHeadFootData = function () {\r\n var _this = this;\r\n var currentLang = this.language.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Head_Foot_Data.replace('{lang}', currentLang);\r\n return this._api.get(url).do(function (json) {\r\n _this.cache.clear(url);\r\n });\r\n };\r\n TemplateService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object, (typeof (_g = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _g) || Object])\r\n ], TemplateService);\r\n return TemplateService;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.TemplateService = TemplateService;\r\n\n\n/***/ }),\n\n/***/ 380:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar info_request_service_1 = __webpack_require__(414);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar info_request_1 = __webpack_require__(617);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar InfoRequestComponent = (function () {\r\n function InfoRequestComponent(_compiler, componentHelper, _elementRef, languageService, infoRequestService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.languageService = languageService;\r\n this.infoRequestService = infoRequestService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n InfoRequestComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var templateHtml;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var infoSub = this.infoRequestService.getInfoRequestData(this.lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.infoRequestId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(infoSub);\r\n };\r\n InfoRequestComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n InfoRequestComponent.prototype.createSubComponent = function (componentInfo, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(infoRequestService, seoService, router, _elementRef, scriptService, isBrowser, routesService, breadcrumbsService) {\r\n this.infoRequestService = infoRequestService;\r\n this.seoService = seoService;\r\n this.router = router;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.isBrowser = isBrowser;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.company = componentInfo.Company;\r\n this.pageIsInit = false;\r\n this.spinnerContact = false;\r\n this.breadcrumbs = componentInfo.BreadcrumbsInfo;\r\n this.footerData = componentInfo.footerData;\r\n this.headerData = header;\r\n this.subManager = new Subscription_1.Subscription();\r\n this.seoInfo = componentInfo.SeoInformation;\r\n }\r\n ChildComponent.prototype.onSubmit = function (form) {\r\n var _this = this;\r\n this.spinnerContact = true;\r\n if (form.valid) {\r\n var infoSub = this.infoRequestService.sendInfoRequest(this.model).subscribe(function (result) {\r\n if (result) {\r\n _this.infoRequestSuccess = true;\r\n _this.infoRequestFailed = false;\r\n _this.spinnerContact = false;\r\n }\r\n else {\r\n _this.infoRequestFailed = true;\r\n _this.infoRequestSuccess = false;\r\n _this.spinnerContact = false;\r\n }\r\n });\r\n this.subManager.add(infoSub);\r\n }\r\n else {\r\n this.infoRequestFailed = true;\r\n this.infoRequestSuccess = false;\r\n this.spinnerContact = false;\r\n }\r\n };\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n this.model = new info_request_1.InfoRequest();\r\n this.model.Where = \"motoriDiRicerca\";\r\n this.configuration = componentInfo.ConfigurationInfo;\r\n };\r\n ChildComponent.prototype.initMap = function () {\r\n if (google == undefined || google == null || !google) {\r\n this.initMap();\r\n }\r\n else {\r\n var geocoder = new google.maps.Geocoder();\r\n var street = this.company.StreetAddress.replace(\",\", \"\");\r\n var address = street + \" - \" + this.company.PostalCode + \", \" + this.company.City + \" (\" + this.company.Province + \")\";\r\n var htmlCode = \"\" + this.company.Name + \"
\" + address + \"
Telefono: \" + this.company.Phone;\r\n geocoder.geocode({ 'address': address }, function (results, status) {\r\n var initLongitude = results[0].geometry.location.lng();\r\n var initLatitude = results[0].geometry.location.lat();\r\n var mapMarkers = [{\r\n address: address,\r\n html: htmlCode,\r\n icon: {\r\n image: \"/global_app/writefolder/img/pin.png\",\r\n iconsize: [100, 100],\r\n iconanchor: [50, 100]\r\n },\r\n popup: true\r\n }];\r\n // Map Initial Location\r\n // Map Extended Settings\r\n var mapSettings = {\r\n controls: {\r\n draggable: true,\r\n panControl: true,\r\n zoomControl: true,\r\n mapTypeControl: true,\r\n scaleControl: true,\r\n streetViewControl: true,\r\n overviewMapControl: true\r\n },\r\n scrollwheel: false,\r\n markers: mapMarkers,\r\n latitude: initLatitude,\r\n longitude: initLongitude,\r\n zoom: 18\r\n };\r\n var map = $(\"#map\").gMap(mapSettings);\r\n // Map Center At\r\n var mapCenterAt = function (options, e) {\r\n e.preventDefault();\r\n $(\"#map\").gMap(\"centerAt\", options);\r\n };\r\n });\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.initMap();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: componentInfo.TemplateHtml\r\n }),\r\n __param(5, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof info_request_service_1.InfoRequestService !== 'undefined' && info_request_service_1.InfoRequestService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, (typeof (_c = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _c) || Object, (typeof (_d = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _d) || Object, (typeof (_e = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _g) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n }());\r\n return ChildComponent;\r\n };\r\n InfoRequestComponent = __decorate([\r\n core_1.Component({\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof info_request_service_1.InfoRequestService !== 'undefined' && info_request_service_1.InfoRequestService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], InfoRequestComponent);\r\n return InfoRequestComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.InfoRequestComponent = InfoRequestComponent;\r\n\n\n/***/ }),\n\n/***/ 381:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar newsletter_service_1 = __webpack_require__(85);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar NewsletterConfirmationPageComponent = (function () {\r\n function NewsletterConfirmationPageComponent(_compiler, componentHelper, _elementRef, languageService, newsletterService, isBrowser, seo, renderer, cmsComponentService, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.languageService = languageService;\r\n this.newsletterService = newsletterService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.cmsComponentService = cmsComponentService;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n NewsletterConfirmationPageComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var templateHtml;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var newsConfirmSub = this.newsletterService.getNewsletterConfirmationPageData().subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the result to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.subscriptionConfirmationId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(newsConfirmSub);\r\n };\r\n NewsletterConfirmationPageComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n NewsletterConfirmationPageComponent.prototype.createSubComponent = function (result, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService, newsletterService) {\r\n this.seoService = seoService;\r\n this._elementRef = _elementRef;\r\n this.isBrowser = isBrowser;\r\n this.scriptService = scriptService;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.newsletterService = newsletterService;\r\n this.seoInfo = result.SeoInformation;\r\n this.pageIsInit = false;\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n this.headerData = header;\r\n //newsletter subscription\r\n this.newsletterSubmitted = false;\r\n this.privacySubmitted = false;\r\n this.alreadySubscribed = false;\r\n this.successfullySubscribed = false;\r\n this.spinnerNewslatter = false;\r\n this.model = {\r\n Email: \"\",\r\n CheckboxSubscribe: false\r\n };\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object, (typeof (_f = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _f) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n }());\r\n return ChildComponent;\r\n };\r\n NewsletterConfirmationPageComponent = __decorate([\r\n core_1.Component({\r\n template: \"\"\r\n }),\r\n __param(5, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], NewsletterConfirmationPageComponent);\r\n return NewsletterConfirmationPageComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.NewsletterConfirmationPageComponent = NewsletterConfirmationPageComponent;\r\n\n\n/***/ }),\n\n/***/ 382:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar newsletter_service_1 = __webpack_require__(85);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar NewsletterPageComponent = (function () {\r\n function NewsletterPageComponent(_compiler, componentHelper, _elementRef, languageService, newsletterService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.languageService = languageService;\r\n this.newsletterService = newsletterService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n NewsletterPageComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var templateHtml;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var newsPageSub = this.newsletterService.getNewsletterPageData().subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the result to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.subscriptionId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(newsPageSub);\r\n };\r\n NewsletterPageComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n NewsletterPageComponent.prototype.createSubComponent = function (result, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService, newsletterService, router) {\r\n this.seoService = seoService;\r\n this._elementRef = _elementRef;\r\n this.isBrowser = isBrowser;\r\n this.scriptService = scriptService;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.newsletterService = newsletterService;\r\n this.router = router;\r\n this.seoInfo = result.SeoInformation;\r\n this.pageIsInit = false;\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n this.headerData = header;\r\n //newsletter subscription\r\n this.newsletterSubmitted = false;\r\n this.privacySubmitted = false;\r\n this.alreadySubscribed = false;\r\n this.successfullySubscribed = false;\r\n this.spinnerNewslatter = false;\r\n this.model = {\r\n Email: \"\",\r\n CheckboxSubscribe: false\r\n };\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n };\r\n ChildComponent.prototype.onSubmit = function (form) {\r\n var _this = this;\r\n this.spinnerNewslatter = true;\r\n if (form) {\r\n var newsSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(function (result) {\r\n if (result == \"-1\") {\r\n _this.alreadySubscribed = true;\r\n _this.successfullySubscribed = false;\r\n _this.spinnerNewslatter = false;\r\n }\r\n else {\r\n var newsletterCompletePage = _this.routesService.getRoutePath('NEWSLETTER - CONFIRMATION')[0];\r\n _this.router.navigate([newsletterCompletePage]);\r\n _this.alreadySubscribed = false;\r\n _this.successfullySubscribed = true;\r\n _this.spinnerNewslatter = false;\r\n }\r\n }, function (err) {\r\n console.log(err);\r\n });\r\n this.subManager.add(newsSub);\r\n }\r\n else {\r\n this.spinnerNewslatter = false;\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object, (typeof (_f = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n }());\r\n return ChildComponent;\r\n };\r\n NewsletterPageComponent = __decorate([\r\n core_1.Component({\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], NewsletterPageComponent);\r\n return NewsletterPageComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.NewsletterPageComponent = NewsletterPageComponent;\r\n\n\n/***/ }),\n\n/***/ 383:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar privacy_policy_service_1 = __webpack_require__(419);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar PrivacyPolicyComponent = (function () {\r\n function PrivacyPolicyComponent(_compiler, componentHelper, _elementRef, languageService, privacyPolicyService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.languageService = languageService;\r\n this.privacyPolicyService = privacyPolicyService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n PrivacyPolicyComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var privacySub = this.privacyPolicyService.getPrivacyPolicyData(this.lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the result information to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.privacyPolicyId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(privacySub);\r\n };\r\n PrivacyPolicyComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n PrivacyPolicyComponent.prototype.createSubComponent = function (result, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService) {\r\n this.seoService = seoService;\r\n this._elementRef = _elementRef;\r\n this.isBrowser = isBrowser;\r\n this.scriptService = scriptService;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.configuration = result.ConfigurationInfo;\r\n this.seoInfo = result.SeoInformation;\r\n this.pageIsInit = false;\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n this.footerData = result.footerData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e;\r\n }());\r\n return ChildComponent;\r\n };\r\n PrivacyPolicyComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof privacy_policy_service_1.PrivacyPolicyService !== 'undefined' && privacy_policy_service_1.PrivacyPolicyService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], PrivacyPolicyComponent);\r\n return PrivacyPolicyComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PrivacyPolicyComponent = PrivacyPolicyComponent;\r\n\n\n/***/ }),\n\n/***/ 384:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar purchase_condition_service_1 = __webpack_require__(420);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar PurchaseConditionComponent = (function () {\r\n function PurchaseConditionComponent(_compiler, componentHelper, _elementRef, languageService, purchaseConditionService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.languageService = languageService;\r\n this.purchaseConditionService = purchaseConditionService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n PurchaseConditionComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var templateHtml;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var conditionSub = this.purchaseConditionService.getPurchaseConditionServiceData(this.lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the result to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.purchaseConditionsId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(conditionSub);\r\n };\r\n PurchaseConditionComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n PurchaseConditionComponent.prototype.createSubComponent = function (result, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService) {\r\n this.seoService = seoService;\r\n this._elementRef = _elementRef;\r\n this.isBrowser = isBrowser;\r\n this.scriptService = scriptService;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.configuration = result.ConfigurationInfo;\r\n this.seoInfo = result.SeoInformation;\r\n this.pageIsInit = false;\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n this.footerData = result.footerData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e;\r\n }());\r\n return ChildComponent;\r\n };\r\n PurchaseConditionComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof purchase_condition_service_1.PurchaseConditionService !== 'undefined' && purchase_condition_service_1.PurchaseConditionService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], PurchaseConditionComponent);\r\n return PurchaseConditionComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PurchaseConditionComponent = PurchaseConditionComponent;\r\n\n\n/***/ }),\n\n/***/ 385:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//System\r\nvar mapping_1 = __webpack_require__(9);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar company_service_1 = __webpack_require__(131);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar script_service_1 = __webpack_require__(16);\r\n//Models\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar CartEmptyPageComponent = (function () {\r\n function CartEmptyPageComponent(_compiler, componentHelper, _elementRef, cartService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.cartService = cartService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n CartEmptyPageComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var emptyCartSub = this.cartService.getEmptyCartPageData().subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n var EmptyCartData = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(EmptyCartData, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.cartEmptyId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(emptyCartSub);\r\n };\r\n CartEmptyPageComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n CartEmptyPageComponent.prototype.createSubComponent = function (EmptyCartData, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(companyService, mappings, _elementRef, routesService, scriptService, isBrowser, breadcrumbsService, seoService) {\r\n this.companyService = companyService;\r\n this.mappings = mappings;\r\n this._elementRef = _elementRef;\r\n this.routesService = routesService;\r\n this.scriptService = scriptService;\r\n this.isBrowser = isBrowser;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.seoService = seoService;\r\n this.userLoginImg = this.mappings.UserLoginImg_Url;\r\n this.pageIsInit = false;\r\n this.seoInfo = EmptyCartData.SeoInformation;\r\n this.breadcrumbs = EmptyCartData.BreadcrumbsInfo;\r\n this.footerData = EmptyCartData.FooterData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: EmptyCartData.TemplateHtml\r\n }),\r\n __param(5, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof company_service_1.CompanyService !== 'undefined' && company_service_1.CompanyService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _f) || Object, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n }());\r\n return ChildComponent;\r\n };\r\n CartEmptyPageComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(5, core_1.Inject('isBrowser')),\r\n __param(8, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _g) || Object, Object, (typeof (_h = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _h) || Object])\r\n ], CartEmptyPageComponent);\r\n return CartEmptyPageComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n}());\r\nexports.CartEmptyPageComponent = CartEmptyPageComponent;\r\n\n\n/***/ }),\n\n/***/ 386:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar NotFoundPageComponent = (function () {\r\n function NotFoundPageComponent(_compiler, componentHelper, _elementRef, templateService, cmsComponentService, isBrowser, seo, renderer, document) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.templateService = templateService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n NotFoundPageComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var notFoundSub = this.templateService.getComponentTemplatePageNotFound(\"notfoundPageTemplate\").subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n }, \r\n //setting 404 page status code\r\n function (err) {\r\n if (!_this.isBrowser)\r\n return;\r\n //converting response to json\r\n var response = err.json();\r\n //Creating subcomponent whith the selected template to inject \r\n var subComponent = _this.createSubComponent(response.TemplateHtml, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(notFoundSub);\r\n };\r\n NotFoundPageComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n NotFoundPageComponent.prototype.createSubComponent = function (result, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(isBrowser, routesService) {\r\n this.isBrowser = isBrowser;\r\n this.routesService = routesService;\r\n this.pageIsInit = false;\r\n this.headerClass = false;\r\n this.footerData = result.FooterData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n };\r\n ChildComponent.prototype.setAutoHeightAndWeightToLogo = function () {\r\n this.headerClass = $(\"div\").hasClass(\"header-logo\");\r\n if (this.headerClass == false) {\r\n }\r\n else {\r\n $(\".header-logo\").attr(\"style\", \"height:auto!important\");\r\n $(\".header-logo\").attr(\"style\", \"width:auto!important\");\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.setAutoHeightAndWeightToLogo();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result\r\n }),\r\n __param(0, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [Boolean, (typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a;\r\n }());\r\n return ChildComponent;\r\n };\r\n NotFoundPageComponent = __decorate([\r\n core_1.Component({\r\n template: \"\"\r\n }),\r\n __param(5, core_1.Inject('isBrowser')),\r\n __param(8, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _g) || Object, Object])\r\n ], NotFoundPageComponent);\r\n return NotFoundPageComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.NotFoundPageComponent = NotFoundPageComponent;\r\n\n\n/***/ }),\n\n/***/ 387:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar core_2 = __webpack_require__(27);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar OfflinePageComponent = (function () {\r\n function OfflinePageComponent(_compiler, componentHelper, _elementRef, cmsComponentService, isBrowser, seo, renderer, document) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n OfflinePageComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var offlinePageData;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var offlineSub = this.cmsComponentService.getOfflinePageData().subscribe(function (result) {\r\n offlinePageData = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(offlinePageData, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(offlineSub);\r\n };\r\n OfflinePageComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n OfflinePageComponent.prototype.createSubComponent = function (pageData, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(translateService, routesService, isBrowser) {\r\n this.translateService = translateService;\r\n this.routesService = routesService;\r\n this.isBrowser = isBrowser;\r\n this.company = pageData.Company;\r\n this.pageIsInit = false;\r\n this.OfflineMessage = pageData.OfflineMessage;\r\n this.footerData = pageData.footerData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: pageData.TemplateHtml\r\n }),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object, Boolean])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b;\r\n }());\r\n return ChildComponent;\r\n };\r\n OfflinePageComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(4, core_1.Inject('isBrowser')),\r\n __param(7, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _e) || Object, (typeof (_f = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _f) || Object, Object])\r\n ], OfflinePageComponent);\r\n return OfflinePageComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.OfflinePageComponent = OfflinePageComponent;\r\n\n\n/***/ }),\n\n/***/ 388:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar script_service_1 = __webpack_require__(16);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(74);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar router_1 = __webpack_require__(13);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar core_2 = __webpack_require__(27);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar cookie_service_1 = __webpack_require__(73);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar messages_service_1 = __webpack_require__(132);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar ClientAreaOrderListComponent = (function () {\r\n function ClientAreaOrderListComponent(_compiler, componentHelper, _elementRef, templateService, authService, router, clientAreaService, cmsComponentService, isBrowser, seo, renderer, document) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.templateService = templateService;\r\n this.authService = authService;\r\n this.router = router;\r\n this.clientAreaService = clientAreaService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ClientAreaOrderListComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.authService.GetData().isAuthenticated || this.authService.GetData().isAuthenticated === undefined) {\r\n this.router.navigate([\"\"]);\r\n }\r\n else {\r\n var ClientAreaOrderListTemplate_1;\r\n var userId = this.authService.GetUserId();\r\n var showAll = \"-1\";\r\n var registrationConfirmation = void 0;\r\n var header_1;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header_1 = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header_1.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var orderListSub = this.clientAreaService.getClientAreaOrdersList1(userId, showAll, showAll, showAll, showAll).subscribe(function (result) {\r\n ClientAreaOrderListTemplate_1 = result;\r\n // Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(ClientAreaOrderListTemplate_1, header_1);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(orderListSub);\r\n }\r\n };\r\n ClientAreaOrderListComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ClientAreaOrderListComponent.prototype.createSubComponent = function (ClientAreaOrderListTemplate, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(cookie, clientAreaService, router, authService, routesService, apiService, messagesService, mappings, currency, languageService, translateService, isBrowser, seoService, breadcrumbsService, scriptService) {\r\n this.cookie = cookie;\r\n this.clientAreaService = clientAreaService;\r\n this.router = router;\r\n this.authService = authService;\r\n this.routesService = routesService;\r\n this.apiService = apiService;\r\n this.messagesService = messagesService;\r\n this.mappings = mappings;\r\n this.currency = currency;\r\n this.languageService = languageService;\r\n this.translateService = translateService;\r\n this.isBrowser = isBrowser;\r\n this.seoService = seoService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.scriptService = scriptService;\r\n this.pageIsInit = false;\r\n this.rows = [];\r\n this.columns = [];\r\n this.status = \"0\";\r\n this.orderNumber = \"\";\r\n this.lang = this.languageService.getLongLang();\r\n this.shortLang = this.languageService.getShortLang();\r\n this.modalTitle = \"MESSAGES:\";\r\n this.modalBody = \"\";\r\n this.numberOfMessages = 0;\r\n this.bodyMod = [];\r\n this.isSettedFilter = false;\r\n this.load = true;\r\n //checking if invoices and multiple shipment modules are active\r\n this.multipleShipmentActive = ClientAreaOrderListTemplate.isActiveMultipleShipment;\r\n this.isActiveInvoicesModule = ClientAreaOrderListTemplate.isActiveInvoicesModule;\r\n this.breadcrumbs = ClientAreaOrderListTemplate.BreadcrumbsInfo;\r\n //Routes for menu-tabs\r\n this.areaClientiHome = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n this.areaClientiOrdini = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n this.areaChangeProfile = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n this.areaClientiInvoices = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n this.italianLang = {\r\n \"sProcessing\": \"Attendere...\",\r\n \"sLengthMenu\": \"Visualizza _MENU_ record per pagina\",\r\n \"sZeroRecords\": \"Niente trovato\",\r\n \"sInfo\": \"Mostra _START_ a _END_ di _TOTAL_ record\",\r\n \"sInfoEmpty\": \"Non ci sono record\",\r\n \"sInfoFiltered\": \"(filtrato da _MAX_ record totali)\",\r\n \"sInfoPostFix\": \"\",\r\n \"sUrl\": \"\",\r\n \"oPaginate\": {\r\n \"sPrevious\": \"«\",\r\n \"sNext\": \"»\"\r\n }\r\n };\r\n this.englishLang = {\r\n \"oPaginate\": {\r\n \"sPrevious\": \"«\",\r\n \"sNext\": \"»\"\r\n }\r\n };\r\n this.subManager = new Subscription_1.Subscription();\r\n this.footerData = ClientAreaOrderListTemplate.FooterData;\r\n this.headerData = header;\r\n }\r\n //translating of header columns titles\r\n ChildComponent.prototype.translateTableColumnTitle = function (columnTitle) {\r\n var translation = this.translateService.get(columnTitle)[\"value\"];\r\n return translation;\r\n };\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n if (this.multipleShipmentActive == false) {\r\n this.columns = [\r\n { title: '' },\r\n { title: this.translateTableColumnTitle(\"Jobname\") },\r\n { title: this.translateTableColumnTitle(\"OrderNumber\") },\r\n { title: this.translateTableColumnTitle(\"OrderDate\") },\r\n { title: this.translateTableColumnTitle(\"PriceCell\") },\r\n { title: this.translateTableColumnTitle(\"Status\") },\r\n { title: this.translateTableColumnTitle(\"FileVerification\") },\r\n { title: this.translateTableColumnTitle(\"Payment\") },\r\n { title: this.translateTableColumnTitle(\"Shipment\") },\r\n { title: '' },\r\n { title: '' },\r\n ];\r\n }\r\n else {\r\n this.columns = [\r\n { title: '' },\r\n { title: this.translateTableColumnTitle(\"Jobname\") },\r\n { title: this.translateTableColumnTitle(\"OrderNumber\") },\r\n { title: this.translateTableColumnTitle(\"OrderDate\") },\r\n { title: this.translateTableColumnTitle(\"PriceCell\") },\r\n { title: this.translateTableColumnTitle(\"Status\") },\r\n { title: this.translateTableColumnTitle(\"FileVerification\") },\r\n { title: this.translateTableColumnTitle(\"Payment\") },\r\n { title: '' },\r\n { title: '' },\r\n ];\r\n }\r\n //getting of Datatable data\r\n this.rows = ClientAreaOrderListTemplate.ClientAreaOrderList;\r\n this.load = false;\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n if (this.shortLang == 'en') {\r\n this.currentLang = this.englishLang;\r\n }\r\n else {\r\n this.currentLang = this.italianLang;\r\n }\r\n //initialization of datatable\r\n $('#datatable').DataTable({\r\n searching: false,\r\n ordering: false,\r\n sDom: 'Rlfrtlip',\r\n oLanguage: this.currentLang\r\n });\r\n //hiding of first 'per page' section, because we added it on the bottom of the table\r\n $('.dataTables_length').not(':eq(1)').hide();\r\n //initialization of datetime picker from and to\r\n $('#fromDate').datetimepicker({\r\n locale: this.shortLang,\r\n format: 'DD/MM/YYYY'\r\n });\r\n $('#toDate').datetimepicker({\r\n locale: this.shortLang,\r\n useCurrent: false,\r\n format: 'DD/MM/YYYY'\r\n });\r\n $(\"#fromDate\").on(\"dp.change\", function (e) {\r\n $('#toDate').data(\"DateTimePicker\").minDate(e.date);\r\n });\r\n $(\"#toDate\").on(\"dp.change\", function (e) {\r\n $('#fromDate').data(\"DateTimePicker\").maxDate(e.date);\r\n });\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.onClick = function (indexRow, columnName) {\r\n var indexColumn;\r\n var orderId = this.rows[indexRow].OrderId;\r\n if (columnName == undefined) {\r\n var orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE')[0];\r\n orderDetailsPage = orderDetailsPage.replace(':id', orderId.toString());\r\n this.router.navigate([orderDetailsPage]);\r\n }\r\n else if (columnName == 'Upload') {\r\n var loginRoute = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n loginRoute = loginRoute.replace(\":id\", orderId);\r\n loginRoute = loginRoute.replace(\":pagefrom\", \"section_upload\");\r\n this.router.navigate([loginRoute]);\r\n }\r\n else if (columnName == 'OrderNotesCell') {\r\n var order = this.rows[indexRow];\r\n //Reading only the messsages for the selected order\r\n this.bodyMod = order.OrderNoteList;\r\n this.numberOfMessages = this.bodyMod.length;\r\n //The modal is showed only if there are messages\r\n if (this.bodyMod.length > 0) {\r\n var userId = this.authService.GetUserId();\r\n var params = {\r\n CustomerId: userId.toString(),\r\n OrderId: orderId.toString(),\r\n Lang: this.lang\r\n };\r\n //setting messages as read\r\n var messReadSub = this.messagesService.setMessagesAsRead(params)\r\n .subscribe(function (result) { });\r\n this.subManager.add(messReadSub);\r\n this.showModal();\r\n //reseting of value of OrderNoteList\r\n order.OrderNoteList = [];\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.messagesDetails = function (orderId) {\r\n $(\"#messagesModal\").modal(\"hide\");\r\n var id = orderId;\r\n var orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n orderDetailsPage = orderDetailsPage.replace(':id', id.toString()).replace(':pagefrom', \"section_comunicazioni\");\r\n this.router.navigate([orderDetailsPage]);\r\n return true;\r\n };\r\n ChildComponent.prototype.showModal = function () {\r\n $(\"#messagesModal\").modal(\"show\");\r\n };\r\n ChildComponent.prototype.hideModal = function () {\r\n $('#basic').modal('hide');\r\n this.bodyMod = [];\r\n };\r\n ChildComponent.prototype.getOrdersList = function (userId, dateFrom, dateTo, orderNumber, orderStatus) {\r\n var _this = this;\r\n this.load = true;\r\n var orderListSub = this.clientAreaService.getClientAreaOrdersList1(userId, dateFrom, dateTo, orderNumber, orderStatus)\r\n .subscribe(function (result) {\r\n _this.rows = result.ClientAreaOrderList;\r\n _this.load = false;\r\n _this.resetTable(_this.rows);\r\n });\r\n this.subManager.add(orderListSub);\r\n };\r\n //destroying of current context of table and creating a new one with new data\r\n ChildComponent.prototype.resetTable = function (tableData) {\r\n $('#datatable').DataTable().destroy();\r\n var currentLang = this.currentLang;\r\n setTimeout(function () {\r\n $('#datatable').DataTable({\r\n data: this.rows,\r\n searching: false,\r\n ordering: false,\r\n sDom: 'Rlfrtlip',\r\n oLanguage: currentLang\r\n });\r\n }, 0);\r\n setTimeout(function () { $('.dataTables_length').not(':eq(1)').hide(); }, 0);\r\n };\r\n ChildComponent.prototype.resetFilter = function () {\r\n this.from = \"\";\r\n this.to = \"\";\r\n $('#fromDate').val(\"\");\r\n $('#toDate').val(\"\");\r\n this.status = \"0\";\r\n this.orderNumber = \"\";\r\n if (this.isSettedFilter == true) {\r\n this.isSettedFilter = false;\r\n //this.rows = ClientAreaOrderListTemplate.ClientAreaOrderList;\r\n var userId = this.authService.GetUserId();\r\n var showAll = \"-1\";\r\n this.getOrdersList(userId, showAll, showAll, showAll, showAll);\r\n }\r\n };\r\n ChildComponent.prototype.filterOrdersList = function () {\r\n this.isSettedFilter = true;\r\n var orderStatus;\r\n var numberOfOrder;\r\n var userId = this.authService.GetUserId();\r\n this.from = $('#fromDate').val();\r\n this.to = $('#toDate').val();\r\n var dateFrom = this.changeDate(this.from);\r\n var dateTo = this.changeDate(this.to);\r\n if (dateFrom == \"\") {\r\n dateFrom = \"-1\";\r\n }\r\n if (dateTo == \"\") {\r\n dateTo = \"-1\";\r\n }\r\n if (dateFrom == \"Invalid date\" || null) {\r\n dateFrom = \"-1\";\r\n }\r\n if (dateTo == \"Invalid date\" || null) {\r\n dateTo = \"-1\";\r\n }\r\n if (this.status == \"0\") {\r\n orderStatus = \"-1\";\r\n }\r\n else {\r\n orderStatus = this.status;\r\n }\r\n if (this.orderNumber == \"\") {\r\n numberOfOrder = \"-1\";\r\n }\r\n else {\r\n numberOfOrder = this.orderNumber;\r\n }\r\n ;\r\n this.getOrdersList(userId, dateFrom, dateTo, numberOfOrder, orderStatus);\r\n };\r\n ChildComponent.prototype.changeDate = function (stringDate) {\r\n var date = stringDate.replace(/\\//g, \"-\");\r\n return date;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Object)\r\n ], ChildComponent.prototype, \"clientModel\", void 0);\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: ClientAreaOrderListTemplate.TemplateHtml\r\n }),\r\n __param(0, core_1.Inject('CookieService')),\r\n __param(11, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _a) || Object, (typeof (_b = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _b) || Object, (typeof (_c = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _f) || Object, (typeof (_g = typeof messages_service_1.MessagesService !== 'undefined' && messages_service_1.MessagesService) === 'function' && _g) || Object, (typeof (_h = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _h) || Object, (typeof (_j = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _j) || Object, (typeof (_k = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _k) || Object, (typeof (_l = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _l) || Object, Boolean, (typeof (_m = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _m) || Object, (typeof (_o = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _o) || Object, (typeof (_p = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _p) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\r\n }());\r\n return ChildComponent;\r\n };\r\n ClientAreaOrderListComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(8, core_1.Inject('isBrowser')),\r\n __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _f) || Object, (typeof (_g = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object])\r\n ], ClientAreaOrderListComponent);\r\n return ClientAreaOrderListComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n}());\r\nexports.ClientAreaOrderListComponent = ClientAreaOrderListComponent;\r\n\n\n/***/ }),\n\n/***/ 389:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Models\r\nvar inventory_1 = __webpack_require__(254);\r\n//Services\r\nvar category_service_1 = __webpack_require__(262);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar CategoryComponent = (function () {\r\n function CategoryComponent(_compiler, _elementRef, componentHelper, categoryService, languageService, route, router, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this._elementRef = _elementRef;\r\n this.componentHelper = componentHelper;\r\n this.categoryService = categoryService;\r\n this.languageService = languageService;\r\n this.route = route;\r\n this.router = router;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.category = new inventory_1.Category();\r\n this.subManager = new Subscription_1.Subscription();\r\n this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n }\r\n CategoryComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n //Reading Language information\r\n var lang = this.languageService.getLongLang();\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n //Reading id from url\r\n //If id is set, then the information is retrived by id, else by url\r\n var paramSub = this.route.params.subscribe(function (params) {\r\n var id = params['id'];\r\n if (id !== undefined) {\r\n var categoryId_1 = id;\r\n var catIdSub = _this.categoryService.getCategory(categoryId_1, lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n _this.onGetCategorySuccess(result, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogCategory, categoryId_1);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(catIdSub);\r\n }\r\n else {\r\n var seoUrl = _this.router.url;\r\n var catUrlSub = _this.categoryService.getCategoryByUrl(lang, seoUrl).subscribe(function (result) {\r\n if (_this.isBrowser) {\r\n _this.onGetCategorySuccess(result, header);\r\n }\r\n else {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogCategory, result.Id);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(catUrlSub);\r\n }\r\n });\r\n this.subManager.add(paramSub);\r\n };\r\n CategoryComponent.prototype.ngOnDestroy = function () {\r\n this.subManager.unsubscribe();\r\n };\r\n CategoryComponent.prototype.onGetCategorySuccess = function (categoryResult, header) {\r\n if (categoryResult.Active != true) {\r\n //Creating sub-component with the returned information\r\n var subComponent = this.createSubComponentRedirect();\r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //Creating sub-component with the returned information\r\n var subComponent = this.createSubComponent(categoryResult, header);\r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n };\r\n CategoryComponent.prototype.createSubComponentRedirect = function () {\r\n var ChildComponent = (function () {\r\n function ChildComponent(router, routesService) {\r\n this.router = router;\r\n this.routesService = routesService;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n this.router.navigate(notFoundPage);\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: \"\"\r\n }), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b;\r\n }());\r\n return ChildComponent;\r\n };\r\n CategoryComponent.prototype.createSubComponent = function (categoryObj, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, cartService, bootboxService, routesService, isBrowser, scriptService, _elementRef, helperService, currency, categoryService, languageService, breadcrumbsService) {\r\n this.seoService = seoService;\r\n this.cartService = cartService;\r\n this.bootboxService = bootboxService;\r\n this.routesService = routesService;\r\n this.isBrowser = isBrowser;\r\n this.scriptService = scriptService;\r\n this._elementRef = _elementRef;\r\n this.helperService = helperService;\r\n this.currency = currency;\r\n this.categoryService = categoryService;\r\n this.languageService = languageService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.category = categoryObj;\r\n this.categories = categoryObj.SubCategories;\r\n this.products = categoryObj.SubProducts;\r\n this.headerData = header;\r\n this.footerData = categoryObj.footerData;\r\n this.loginPageName = [];\r\n this.registerPageName = [];\r\n this.pageIsInit = false;\r\n this.seoInfo = categoryObj.SeoInformation;\r\n this.spinnerForm = false;\r\n this.contactFormSent = false;\r\n this.contactFormFailed = false;\r\n this.showSpinner = true;\r\n this.showTable = true;\r\n this.model = {\r\n Company: \"\",\r\n Name: \"\",\r\n Lastname: \"\",\r\n Email: \"\",\r\n Amount: \"\",\r\n Mobile: \"\",\r\n Message: \"\",\r\n Lang: \"\",\r\n options: 0\r\n };\r\n this.lang = this.languageService.getLongLang();\r\n this.breadcrumbs = [];\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n this.breadcrumbs = categoryObj.BreadcrumbsInfo;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n this.configuration = categoryObj.Configuration;\r\n if (this.isBrowser == true) {\r\n //if type of category is matrix, get prices\r\n if (categoryObj.TipoVisualizzazione == \"matrice\") {\r\n var catPriceSub = this.categoryService.getCategoryPriceData(categoryObj.Id)\r\n .subscribe(function (result) {\r\n _this.category.PriceData = result;\r\n _this.showSpinner = false;\r\n });\r\n this.subManager.add(catPriceSub);\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.onSubmit = function (form) {\r\n var _this = this;\r\n this.contactFormSent = false;\r\n this.contactFormFailed = false;\r\n this.spinnerForm = true;\r\n this.model.Lang = this.languageService.getLongLang();\r\n if (form.valid && this.model.options == 1) {\r\n this.model.Amount = this.model.Amount.toString();\r\n var catInfoSub = this.categoryService.getCategoryInfo(this.model)\r\n .subscribe(function (result) {\r\n if (result == true) {\r\n _this.spinnerForm = false;\r\n _this.contactFormSent = true;\r\n }\r\n else {\r\n _this.spinnerForm = false;\r\n _this.contactFormFailed = true;\r\n }\r\n });\r\n this.subManager.add(catInfoSub);\r\n }\r\n else {\r\n this.spinnerForm = false;\r\n }\r\n };\r\n ChildComponent.prototype.showedFileBoxWizard = function () {\r\n var result = true;\r\n if (this.category.IdWizardMaster <= 0) {\r\n result = false;\r\n }\r\n else {\r\n if (this.category.ManageAttachmentWizard == \"Combinazioni\") {\r\n result = false;\r\n }\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.addMatrixCommercialeProductToCart = function (productId, quantityId) {\r\n var _this = this;\r\n var addToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\").subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n }, function (err) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n this.subManager.add(addToCartSub);\r\n };\r\n ChildComponent.prototype.addMatrixEditoriaProductToCart = function (productId, quantityId) {\r\n var _this = this;\r\n var addMatEdToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"editoria\").subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n }, function (err) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n this.subManager.add(addMatEdToCartSub);\r\n };\r\n ChildComponent.prototype.addMatrixProductToCart = function (productId, quantityId) {\r\n var _this = this;\r\n var addMatToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\").subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n }, function (err) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n this.subManager.add(addMatToCartSub);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n layoutTheme.initCarousel();\r\n layoutTheme.initLightbox();\r\n setTimeout(function (x) { return layoutTheme.initThumbGallery(); }, 1);\r\n $('.popovers').popover();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.imageTitle = function (imgPath) {\r\n var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: categoryObj.TemplateHtml\r\n }),\r\n __param(4, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _b) || Object, (typeof (_c = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _e) || Object, (typeof (_f = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _f) || Object, (typeof (_g = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _g) || Object, (typeof (_h = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _h) || Object, (typeof (_j = typeof category_service_1.CategoryService !== 'undefined' && category_service_1.CategoryService) === 'function' && _j) || Object, (typeof (_k = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _k) || Object, (typeof (_l = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _l) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n }());\r\n return ChildComponent;\r\n };\r\n CategoryComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(8, core_1.Inject('isBrowser')),\r\n __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _c) || Object, (typeof (_d = typeof category_service_1.CategoryService !== 'undefined' && category_service_1.CategoryService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object, (typeof (_l = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _l) || Object])\r\n ], CategoryComponent);\r\n return CategoryComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.CategoryComponent = CategoryComponent;\r\n\n\n/***/ }),\n\n/***/ 390:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar product_service_1 = __webpack_require__(134);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar inventory_1 = __webpack_require__(254);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar OtherProductComponent = (function () {\r\n function OtherProductComponent(_compiler, componentHelper, _elementRef, productService, languageService, route, router, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.productService = productService;\r\n this.languageService = languageService;\r\n this.route = route;\r\n this.router = router;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.product = new inventory_1.Product();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n OtherProductComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n //Reading Language information\r\n var lang = this.languageService.getLongLang();\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n //Reading id from url\r\n //If id is set, then the information is retrived by id, else by url\r\n var paramsSub = this.route.params.subscribe(function (params) {\r\n var id = params['id'];\r\n if (id !== undefined) {\r\n var productId_1 = id;\r\n var productByIdSub = _this.productService.getProductDetails(productId_1, \"altroProdotto\", lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n _this.onGetProductSuccess(result, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogOtherProduct, productId_1);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.Thumbnail);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(productByIdSub);\r\n }\r\n else {\r\n var url = _this.router.url;\r\n var productByUrlSub = _this.productService.getProductDetailsBySeoUrl(lang, url).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n _this.onGetProductSuccess(result, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogOtherProduct, result.Id);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.Thumbnail);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(productByUrlSub);\r\n }\r\n });\r\n this.subManager.add(paramsSub);\r\n };\r\n OtherProductComponent.prototype.ngOnDestroy = function () {\r\n this.subManager.unsubscribe();\r\n };\r\n OtherProductComponent.prototype.onGetProductSuccess = function (productResult, header) {\r\n if (productResult.Active != true) {\r\n //Creating sub-component with the returned information\r\n var subComponent = this.createSubComponentRedirect();\r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n var subComponent = this.createSubComponent(productResult, header);\r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n };\r\n OtherProductComponent.prototype.createSubComponentRedirect = function () {\r\n var ChildComponent = (function () {\r\n function ChildComponent(router, routesService) {\r\n this.router = router;\r\n this.routesService = routesService;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n this.router.navigate(notFoundPage);\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: \"\"\r\n }), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b;\r\n }());\r\n return ChildComponent;\r\n };\r\n OtherProductComponent.prototype.createSubComponent = function (otherproductObj, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, routesService, isBrowser, _elementRef, scriptService, currency, helperService, breadcrumbsService) {\r\n this.seoService = seoService;\r\n this.routesService = routesService;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.currency = currency;\r\n this.helperService = helperService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.product = otherproductObj;\r\n this.seoInfo = otherproductObj.SeoInformation;\r\n this.loginPageName = [];\r\n this.registerPageName = [];\r\n this.pageIsInit = false;\r\n this.breadcrumbs = [];\r\n this.footerData = otherproductObj.FooterData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n this.breadcrumbs = otherproductObj.BreadcrumbsInfo;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n };\r\n ChildComponent.prototype.imageTitle = function (imgPath) {\r\n var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n };\r\n ChildComponent.prototype.shareOnFacebook = function () {\r\n window.open('https://www.facebook.com/sharer/sharer.php?u=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n };\r\n ChildComponent.prototype.shareOnTwitter = function () {\r\n window.open('https://twitter.com/intent/tweet?&url=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n };\r\n ChildComponent.prototype.showedFileBox = function () {\r\n var result = true;\r\n if (this.product.ManageAttachment == \"Combinazioni\") {\r\n result = false;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n layoutTheme.initCarousel();\r\n layoutTheme.initLightbox();\r\n setTimeout(function (x) { return layoutTheme.initThumbGallery(); }, 1);\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: otherproductObj.TemplateHtml\r\n }),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, (typeof (_e = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _e) || Object, (typeof (_f = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _f) || Object, (typeof (_g = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _g) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n }());\r\n return ChildComponent;\r\n };\r\n OtherProductComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(8, core_1.Inject('isBrowser')),\r\n __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof product_service_1.ProductService !== 'undefined' && product_service_1.ProductService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object, (typeof (_l = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _l) || Object])\r\n ], OtherProductComponent);\r\n return OtherProductComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.OtherProductComponent = OtherProductComponent;\r\n\n\n/***/ }),\n\n/***/ 391:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar angular2_meta_1 = __webpack_require__(101);\r\nvar core_1 = __webpack_require__(0);\r\n//Angular\r\nvar core_2 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar product_service_1 = __webpack_require__(134);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar inventory_1 = __webpack_require__(254);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar ProductDetailsComponent = (function () {\r\n function ProductDetailsComponent(_elementRef, _compiler, componentHelper, productService, languageService, route, router, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._elementRef = _elementRef;\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this.productService = productService;\r\n this.languageService = languageService;\r\n this.route = route;\r\n this.router = router;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.product = new inventory_1.Product();\r\n this.subManager = new Subscription_1.Subscription();\r\n this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n }\r\n ProductDetailsComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n //Reading Language information\r\n var lang = this.languageService.getLongLang();\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n //Reading id from url\r\n //If id is set, then the information is retrived by id, else by url\r\n var paramsSub = this.route.params.subscribe(function (params) {\r\n var id = params['id'];\r\n if (id !== undefined) {\r\n var productId_1 = id;\r\n var prodByIdSub = _this.productService.getProductDetails(productId_1, \"prodotti\", lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n _this.onGetProductSuccess(result, id, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogProduct, productId_1);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.Thumbnail);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(prodByIdSub);\r\n }\r\n else {\r\n var seoUrl = _this.router.url;\r\n var prodByUrlSub = _this.productService.getProductDetailsBySeoUrl(lang, seoUrl).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n _this.onGetProductSuccess(result, id, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeCatalogProduct, result.Id);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation, result.Thumbnail);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(prodByUrlSub);\r\n }\r\n });\r\n this.subManager.add(paramsSub);\r\n };\r\n ProductDetailsComponent.prototype.ngOnDestroy = function () {\r\n this.subManager.unsubscribe();\r\n };\r\n ProductDetailsComponent.prototype.onGetProductSuccess = function (productDetails, productId, header) {\r\n if (productDetails.Active != true) {\r\n //Creating sub-component with the returned information\r\n var subComponent = this.createSubComponentRedirect();\r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n var subComponent = this.createSubComponent(productDetails, productId, header);\r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n };\r\n ProductDetailsComponent.prototype.createSubComponentRedirect = function () {\r\n var ChildComponent = (function () {\r\n function ChildComponent(router, routesService) {\r\n this.router = router;\r\n this.routesService = routesService;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n this.router.navigate(notFoundPage);\r\n };\r\n ChildComponent = __decorate([\r\n core_2.Component({\r\n template: \"\"\r\n }), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b;\r\n }());\r\n return ChildComponent;\r\n };\r\n ProductDetailsComponent.prototype.createSubComponent = function (productObj, productId, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, cartService, bootboxService, routesService, isBrowser, _elementRef, scriptService, currency, helperService, productService, languageService, breadcrumbsService, metaService) {\r\n this.seoService = seoService;\r\n this.cartService = cartService;\r\n this.bootboxService = bootboxService;\r\n this.routesService = routesService;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.currency = currency;\r\n this.helperService = helperService;\r\n this.productService = productService;\r\n this.languageService = languageService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.metaService = metaService;\r\n this.showSpinner = true;\r\n this.showSpinnerClick = false;\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n this.product = new inventory_1.Product();\r\n this.loginPageName = [];\r\n this.registerPageName = [];\r\n this.facebookShareUrl = \"\";\r\n this.pageIsInit = false;\r\n this.seoInfo = productObj.SeoInformation;\r\n this.breadcrumbs = [];\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n this.breadcrumbs = productObj.BreadcrumbsInfo;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n var lang = this.languageService.getLongLang();\r\n this.product = productObj;\r\n this.product.HeaderData = header;\r\n if (this.isBrowser) {\r\n if (!this.product.IsWizard) {\r\n var productId_2 = this.product.Id;\r\n var pricesSub = this.productService.getPriceData(productId_2, lang).subscribe(function (response) {\r\n _this.product.PriceData = response;\r\n _this.showSpinner = false;\r\n });\r\n this.subManager.add(pricesSub);\r\n }\r\n }\r\n //console.log(this.product)\r\n this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n };\r\n ChildComponent.prototype.showedFileBox = function () {\r\n var result = true;\r\n if (this.product.ManageAttachment == \"Combinazioni\") {\r\n result = false;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.shareOnFacebook = function () {\r\n window.open('https://www.facebook.com/sharer/sharer.php?u=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n };\r\n ChildComponent.prototype.shareOnTwitter = function () {\r\n window.open('https://twitter.com/intent/tweet?&url=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n };\r\n ChildComponent.prototype.addStaticProductToCart = function (quantityId) {\r\n var _this = this;\r\n var productId = this.product.Id;\r\n this.showSpinnerClick = true;\r\n var staticProdSub = this.cartService.addStaticProductToCart(productId, quantityId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.showSpinnerClick = false;\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n }, function (err) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n this.subManager.add(staticProdSub);\r\n };\r\n ChildComponent.prototype.addStaticProductScontisticaToCart = function (dayId, quantityId) {\r\n var _this = this;\r\n var productId = this.product.Id;\r\n this.showSpinnerClick = true;\r\n var statProdScontSub = this.cartService.addStaticProductScontisticaToCart(productId, quantityId, dayId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.showSpinnerClick = false;\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n }, function (err) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n this.subManager.add(statProdScontSub);\r\n };\r\n ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n ChildComponent.prototype.clearSelectedIndex = function () {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n };\r\n ChildComponent.prototype.isPriceDiscounted = function (price, priceDiscounted) {\r\n var priceInt = parseFloat(price);\r\n var priceDiscountedInt = parseFloat(priceDiscounted);\r\n var result = false;\r\n if (priceDiscountedInt < priceInt) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n layoutTheme.initCarousel();\r\n layoutTheme.initLightbox();\r\n setTimeout(function (x) { return layoutTheme.initThumbGallery(); }, 1);\r\n $('.popovers').popover();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.imageTitle = function (imgPath) {\r\n var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_2.Component({\r\n template: productObj.TemplateHtml\r\n }),\r\n __param(4, core_2.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _b) || Object, (typeof (_c = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof core_2.ViewContainerRef !== 'undefined' && core_2.ViewContainerRef) === 'function' && _e) || Object, (typeof (_f = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _f) || Object, (typeof (_g = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _g) || Object, (typeof (_h = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _h) || Object, (typeof (_j = typeof product_service_1.ProductService !== 'undefined' && product_service_1.ProductService) === 'function' && _j) || Object, (typeof (_k = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _k) || Object, (typeof (_l = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _l) || Object, (typeof (_m = typeof angular2_meta_1.Meta !== 'undefined' && angular2_meta_1.Meta) === 'function' && _m) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\r\n }());\r\n return ChildComponent;\r\n };\r\n ProductDetailsComponent = __decorate([\r\n core_2.Component({\r\n changeDetection: core_2.ChangeDetectionStrategy.Default,\r\n encapsulation: core_2.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(8, core_2.Inject('isBrowser')),\r\n __param(11, core_2.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_2.ViewContainerRef !== 'undefined' && core_2.ViewContainerRef) === 'function' && _a) || Object, (typeof (_b = typeof core_2.Compiler !== 'undefined' && core_2.Compiler) === 'function' && _b) || Object, (typeof (_c = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _c) || Object, (typeof (_d = typeof product_service_1.ProductService !== 'undefined' && product_service_1.ProductService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _k) || Object, Object, (typeof (_l = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _l) || Object])\r\n ], ProductDetailsComponent);\r\n return ProductDetailsComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.ProductDetailsComponent = ProductDetailsComponent;\r\n\n\n/***/ }),\n\n/***/ 392:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar category_service_1 = __webpack_require__(262);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar ProductPageListComponent = (function () {\r\n function ProductPageListComponent(_compiler, componentHelper, _elementRef, categoryService, languageService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.categoryService = categoryService;\r\n this.languageService = languageService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ProductPageListComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var categoriesSub = this.categoryService.getCatalogCategoriesData(this.lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the catalog catgories information to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.productsCatalogId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(categoriesSub);\r\n };\r\n ProductPageListComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ProductPageListComponent.prototype.createSubComponent = function (result, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, isBrowser, _elementRef, scriptService, helperService, routesService, currency, breadcrumbsService) {\r\n this.seoService = seoService;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.helperService = helperService;\r\n this.routesService = routesService;\r\n this.currency = currency;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.columns = 4;\r\n this.pageIsInit = false;\r\n this.seoInfo = result.SeoInformation;\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n this.footerData = result.FooterData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n if (this.category == null) {\r\n this.items = result.CatalogCategories;\r\n }\r\n else {\r\n this.items = this.category.SubCategories;\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.imageTitle = function (imgPath) {\r\n var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(1, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _f) || Object, (typeof (_g = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _g) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n }());\r\n return ChildComponent;\r\n };\r\n ProductPageListComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof category_service_1.CategoryService !== 'undefined' && category_service_1.CategoryService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], ProductPageListComponent);\r\n return ProductPageListComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.ProductPageListComponent = ProductPageListComponent;\r\n\n\n/***/ }),\n\n/***/ 393:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar product_service_1 = __webpack_require__(134);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar PromotionsComponent = (function () {\r\n function PromotionsComponent(_compiler, componentHelper, _elementRef, productService, languageService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.productService = productService;\r\n this.languageService = languageService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n PromotionsComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var promotionsSub = this.productService.getProductsPromotionsData(this.lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the promotion page information to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.promotionsId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(promotionsSub);\r\n };\r\n PromotionsComponent.prototype.createSubComponent = function (result, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, isBrowser, _elementRef, scriptService, helperService, currency, routesService, breadcrumbsService) {\r\n this.seoService = seoService;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.helperService = helperService;\r\n this.currency = currency;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.seoInfo = result.SeoInformation;\r\n this.pageIsInit = false;\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n this.footerData = result.FooterData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n if (this.category == null) {\r\n //Reading data from server\r\n this.items = result.ProductPromotionList;\r\n }\r\n else {\r\n this.items = this.category.SubProducts;\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.imageTitle = function (imgPath) {\r\n var imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(1, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof helper_service_1.HelperService !== 'undefined' && helper_service_1.HelperService) === 'function' && _d) || Object, (typeof (_e = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _g) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n }());\r\n return ChildComponent;\r\n };\r\n PromotionsComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof product_service_1.ProductService !== 'undefined' && product_service_1.ProductService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], PromotionsComponent);\r\n return PromotionsComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PromotionsComponent = PromotionsComponent;\r\n\n\n/***/ }),\n\n/***/ 394:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar client_area_service_1 = __webpack_require__(74);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cart_1 = __webpack_require__(98);\r\nvar cart_2 = __webpack_require__(98);\r\nvar cart_3 = __webpack_require__(98);\r\nvar validation_service_1 = __webpack_require__(133);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar CartCashComponent = (function () {\r\n function CartCashComponent(_compiler, componentHelper, _elementRef, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n CartCashComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var cmsSub = this.cmsComponentService.getShoppingCartCashData().subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.cartCashId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(cmsSub);\r\n };\r\n CartCashComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n CartCashComponent.prototype.createSubComponent = function (shoppingCartCashData, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(router, shoppingCartService, languageService, authService, clientAreaService, routesService, seoService, bootboxService, isBrowser, _elementRef, scriptService, breadcrumbsService, validationService) {\r\n this.router = router;\r\n this.shoppingCartService = shoppingCartService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.clientAreaService = clientAreaService;\r\n this.routesService = routesService;\r\n this.seoService = seoService;\r\n this.bootboxService = bootboxService;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.validationService = validationService;\r\n this.currentAddress = new cart_3.CartAddressModel();\r\n this.carrello = shoppingCartCashData.ShoppingCart;\r\n this.selectedAddress = new cart_3.CartAddressModel();\r\n this.selectedPayment = new cart_1.CartPaymentModel();\r\n this.selectedShipment = new cart_2.CartShipmentModel();\r\n this.voucherCode = \"\";\r\n this.showValidationLabels = false;\r\n this.cartCashAccepted = false;\r\n this.lang = this.languageService.getLongLang();\r\n this.isVoucherValid = false;\r\n this.isVoucherInvalid = false;\r\n this.isVoucherApplied = false;\r\n this.disableButtonCart = false;\r\n this.spinnerCartCash = false;\r\n this.footerData = shoppingCartCashData.footerData;\r\n this.headerData = header;\r\n this.pageIsOnDestroy = false;\r\n this.seoInfo = shoppingCartCashData.SeoInformation;\r\n this.pageIsInit = false;\r\n this.pageIsInitAfter = false;\r\n this.carrelloPageName = [];\r\n this.userId = this.authService.GetUserId();\r\n this.configuration = shoppingCartCashData.ConfigurationInfo;\r\n this.breadcrumbs = shoppingCartCashData.BreadcrumbsInfo;\r\n this.spinnerCart = false;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n this.shoppingCartService.initCart(this.carrello);\r\n if (this.shoppingCartService.isCartValid() == false) {\r\n //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n window.open(this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n }\r\n else {\r\n //Reading selected payment method\r\n var payments = this.carrello.Payments;\r\n var count = payments.length;\r\n for (var i = 0; i < count; i++) {\r\n var payment = payments[i];\r\n if (payment.Selected == true) {\r\n this.selectedPayment = payment;\r\n }\r\n }\r\n //Reading selected shipment method\r\n var shipments = this.carrello.Shipments;\r\n count = shipments.length;\r\n for (var i = 0; i < count; i++) {\r\n var shipment = shipments[i];\r\n if (shipment.Selected == true) {\r\n this.selectedShipment = shipment;\r\n }\r\n }\r\n //Reading selected address\r\n var address = this.carrello.CurrentAddress;\r\n var completeAddress = address.Address;\r\n var lastIndex = completeAddress.lastIndexOf(\" \");\r\n var addressStreet = \"\";\r\n var addressNumber = \"\";\r\n if (lastIndex > -1) {\r\n addressStreet = completeAddress.slice(0, lastIndex);\r\n addressNumber = completeAddress.slice(lastIndex, completeAddress.length);\r\n }\r\n if (address != null) {\r\n this.currentAddress.Id = address.Id;\r\n this.currentAddress.Address = lastIndex > -1 ? addressStreet : address.Address;\r\n this.currentAddress.City = address.City;\r\n this.currentAddress.Recipient = address.Recipient;\r\n this.currentAddress.Province = address.Province;\r\n this.currentAddress.Phone = address.Phone;\r\n this.currentAddress.ZipCode = address.ZipCode;\r\n this.currentAddress.Mobile = address.Mobile;\r\n this.currentAddress.CustomerID = this.userId;\r\n this.currentAddress.Language = this.lang;\r\n this.currentAddress.AddressNumber = lastIndex > -1 ? addressNumber : \"\";\r\n }\r\n this.carrelloPageName = this.routesService.getRoutePath('CARRELLO');\r\n }\r\n };\r\n //validation of phone numbers, disable writing any characters in input except of numbers\r\n ChildComponent.prototype.validatePhone = function (event) {\r\n this.validationService.validatePhoneNumber(event);\r\n };\r\n //adding all scripts and elements connected to address verification feature \r\n ChildComponent.prototype.addAddressVerificationScripts = function (addressKey) {\r\n var suggest = \"\";\r\n var address = \"\";\r\n var jquery = \"\";\r\n $('body > universal-script').before(suggest);\r\n $('body > universal-script').before(jquery);\r\n $('body > universal-script').before(address);\r\n };\r\n //removing all scripts and elements connected to address verification feature \r\n ChildComponent.prototype.removeAddressVerificationScripts = function (addressKey) {\r\n $(\"#suggestId\").remove();\r\n $(\"#jqueryuicss\").remove();\r\n $(\"#jqueryuijs\").remove();\r\n $(\"#suggestcss\").remove();\r\n $(\"#initui\").remove();\r\n $(\"#inituicf\").remove();\r\n $(\"#ui-id-1\").remove();\r\n $(\"#ui-id-2\").remove();\r\n $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n $(\"#jqueryId\").remove();\r\n $(\"#addressVerificationId\").remove();\r\n };\r\n ChildComponent.prototype.checkAddressValidation = function () {\r\n this.currentAddress.Province = $(\"#Prov\").val();\r\n this.currentAddress.ZipCode = $(\"#Cap\").val();\r\n this.currentAddress.City = $(\"#City\").val();\r\n };\r\n ChildComponent.prototype.setAddressValue = function () {\r\n var streetTypeId = $(\"#streetTypeId\").val();\r\n var street = $(\"#Address\").val();\r\n this.currentAddress.Address = street;\r\n if (streetTypeId != null && streetTypeId != \"\") {\r\n if (!this.currentAddress.Address.startsWith(streetTypeId)) {\r\n this.currentAddress.Address = streetTypeId + \" \" + street;\r\n }\r\n }\r\n else {\r\n this.currentAddress.Address = street;\r\n }\r\n };\r\n ChildComponent.prototype.updateCartAddress = function () {\r\n var _this = this;\r\n //concating address street and number\r\n var model = this.currentAddress;\r\n var currentStreet = model.Address;\r\n model.Address = this.currentAddress.Address.trim() + \" \" + this.currentAddress.AddressNumber.replace(/\\s/g, \"\");\r\n var cartSub = this.shoppingCartService.setAddress(model).subscribe(function (result) {\r\n _this.shoppingCartService.updateCart(result);\r\n _this.carrello = _this.shoppingCartService.getCart();\r\n if (result == false) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n }, function (err) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n this.subManager.add(cartSub);\r\n model.Address = currentStreet;\r\n };\r\n ChildComponent.prototype.changeAddress = function (addressId) {\r\n var _this = this;\r\n //Reading selected address\r\n var addresses = this.carrello.Addresses;\r\n var count = addresses.length;\r\n var addressVal = $('#idSelectedAdress option:selected').text();\r\n for (var i = 0; i < count; i++) {\r\n var address = addresses[i];\r\n var completeAddress = address.Address;\r\n var lastIndex_1 = completeAddress.lastIndexOf(\" \");\r\n var addressStreet_1 = \"\";\r\n var addressNumber = \"\";\r\n if (lastIndex_1 > -1) {\r\n addressStreet_1 = completeAddress.slice(0, lastIndex_1);\r\n addressNumber = completeAddress.slice(lastIndex_1, completeAddress.length);\r\n }\r\n if (address.Id == addressId && address.Recipient == addressVal) {\r\n this.currentAddress.Id = address.Id;\r\n this.currentAddress.Address = lastIndex_1 > -1 ? addressStreet_1 : address.Address;\r\n this.currentAddress.City = address.City;\r\n this.currentAddress.Recipient = address.Recipient;\r\n this.currentAddress.Province = address.Province;\r\n this.currentAddress.Phone = address.Phone;\r\n this.currentAddress.ZipCode = address.ZipCode;\r\n this.currentAddress.Mobile = address.Mobile;\r\n this.currentAddress.CustomerID = this.userId;\r\n this.currentAddress.Language = this.lang;\r\n this.currentAddress.AddressNumber = lastIndex_1 > -1 ? addressNumber : \"\";\r\n break;\r\n }\r\n }\r\n //concating address street and number to one property \"Address\"\r\n var model = this.currentAddress;\r\n model.Address = this.currentAddress.Address.trim() + \" \" + this.currentAddress.AddressNumber.replace(/\\s/g, \"\");\r\n var currentStreet = model.Address;\r\n var shopCartSub = this.shoppingCartService.setAddress(model).subscribe(function (result) {\r\n if (result == null || result == undefined) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n else {\r\n _this.shoppingCartService.updateCart(result);\r\n _this.carrello = _this.shoppingCartService.getCart();\r\n }\r\n }, function (err) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n this.subManager.add(shopCartSub);\r\n //reverting address text to previous value after sending request \r\n var lastIndex = currentStreet.lastIndexOf(\" \");\r\n var addressStreet = currentStreet;\r\n if (lastIndex > -1) {\r\n addressStreet = currentStreet.slice(0, lastIndex);\r\n }\r\n model.Address = addressStreet;\r\n };\r\n ;\r\n ChildComponent.prototype.setJobName = function (rowId, jobName) {\r\n var _this = this;\r\n if (jobName != \"\") {\r\n var jobNameSub = this.shoppingCartService.setJobName(rowId, jobName).subscribe(function (result) {\r\n if (result == false) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n }, function (err) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n this.subManager.add(jobNameSub);\r\n }\r\n };\r\n ChildComponent.prototype.applyVoucher = function (coupon) {\r\n var _this = this;\r\n if (this.voucherCode != null && this.voucherCode.trim().length > 0) {\r\n this.spinnerCartCash = true;\r\n var voucherSub = this.shoppingCartService.applyVoucher(this.voucherCode).subscribe(function (result) {\r\n if (result.CartID != null) {\r\n _this.shoppingCartService.updateCart(result);\r\n _this.carrello = _this.shoppingCartService.getCart();\r\n _this.isVoucherValid = true;\r\n _this.isVoucherInvalid = false;\r\n _this.isVoucherApplied = true;\r\n _this.voucherCode = \"\";\r\n }\r\n else {\r\n _this.isVoucherValid = false;\r\n _this.isVoucherInvalid = true;\r\n }\r\n _this.spinnerCartCash = false;\r\n }, function (err) {\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.spinnerCartCash = false;\r\n });\r\n this.subManager.add(voucherSub);\r\n }\r\n };\r\n ;\r\n ChildComponent.prototype.showModal = function () {\r\n this.disableButtonCart = false;\r\n this.spinnerCartCash = false;\r\n this.showValidationLabels = true;\r\n //JobNames\r\n var validProducts = true;\r\n var count = this.carrello.Products.length;\r\n for (var i = 0; i < count; i++) {\r\n var product = this.carrello.Products[i];\r\n //If one of the jobnames are not set then the validation fails\r\n if (product.JobName != null && product.JobName.trim().length == 0) {\r\n validProducts = false;\r\n break;\r\n }\r\n }\r\n var validAddress = true;\r\n if (validProducts == false || this.cartCashAccepted == false || !validAddress) {\r\n return;\r\n }\r\n $(\"#cartCashModal\").modal(\"show\");\r\n };\r\n ChildComponent.prototype.hideModal = function () {\r\n $('#cartCashModal').modal('hide');\r\n this.disableButtonCart = false;\r\n };\r\n ChildComponent.prototype.confirmOrder = function () {\r\n var _this = this;\r\n this.disableButtonCart = true;\r\n this.spinnerCartCash = true;\r\n //Checking if all fields are valid\r\n var confirmOrderSub = this.shoppingCartService.confirmOrder().subscribe(function (result) {\r\n if (result > 0) {\r\n _this.shoppingCartService.clearCartAfterConfirmation();\r\n _this.OrderId = result;\r\n _this.hideModal();\r\n //Reading link of the page\r\n var cartOrderDetailPageUrl = _this.routesService.getRoutePath('CARRELLO ORDINE')[0];\r\n //Removing system parameter (id)\r\n cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', '');\r\n //Adding Order Id parameter\r\n cartOrderDetailPageUrl += _this.OrderId;\r\n _this.spinnerCartCash = false;\r\n //this.router.navigate([cartOrderDetailPageUrl]);\r\n window.open(cartOrderDetailPageUrl, \"_self\");\r\n }\r\n else {\r\n _this.hideModal();\r\n _this.spinnerCartCash = false;\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n }, function (err) {\r\n _this.hideModal();\r\n _this.spinnerCartCash = false;\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n this.subManager.add(confirmOrderSub);\r\n };\r\n ;\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n setTimeout(function () {\r\n var altezza = $(\"#footer\").outerHeight();\r\n var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n var altezzaHead = $(\".header-body\").outerHeight();\r\n var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n $(\"#resumeCartTotal\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#resumeCartTotal-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n }, 1);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n $('.popovers').popover();\r\n if (shoppingCartCashData.isActiveAddressVerificationModule) {\r\n var addressVerificationKey = shoppingCartCashData.AddressVerificationCode;\r\n if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n this.addAddressVerificationScripts(addressVerificationKey);\r\n $(\"#Cap\").prop('disabled', true);\r\n }\r\n }\r\n else {\r\n $(\"#Cap\").prop('disabled', false);\r\n }\r\n this.pageIsInitAfter = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n if (!this.isBrowser || this.pageIsOnDestroy) {\r\n return;\r\n }\r\n this.subManager.unsubscribe();\r\n //this method is removing all scripts and elements connected to address verification feature\r\n var addressVerificationKey = shoppingCartCashData.AddressVerificationCode;\r\n this.removeAddressVerificationScripts(addressVerificationKey);\r\n this.pageIsOnDestroy = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: shoppingCartCashData.TemplateHtml\r\n }),\r\n __param(8, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _j) || Object, (typeof (_k = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _k) || Object, (typeof (_l = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _l) || Object, (typeof (_m = typeof validation_service_1.ValidationService !== 'undefined' && validation_service_1.ValidationService) === 'function' && _m) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\r\n }());\r\n return ChildComponent;\r\n };\r\n CartCashComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(4, core_1.Inject('isBrowser')),\r\n __param(7, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _e) || Object, (typeof (_f = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _f) || Object, Object, (typeof (_g = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _g) || Object])\r\n ], CartCashComponent);\r\n return CartCashComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.CartCashComponent = CartCashComponent;\r\n\n\n/***/ }),\n\n/***/ 395:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar client_area_service_1 = __webpack_require__(74);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar core_2 = __webpack_require__(27);\r\nvar md5_1 = __webpack_require__(279);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar paypal_service_1 = __webpack_require__(261);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar CartSubmittedComponent = (function () {\r\n function CartSubmittedComponent(_compiler, componentHelper, _elementRef, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.route = route;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n CartSubmittedComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n //Depending on the type of the list, a different template is used\r\n var orderId;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n //Reading order id from url\r\n //If id is set, then the information is retrived by id, else the not found page is showed\r\n var paramsSub = this.route.params.subscribe(function (params) {\r\n var templateHtml;\r\n var id = params['id'];\r\n if (id !== undefined) {\r\n orderId = id;\r\n var cartSub = _this.cmsComponentService.getShoppingCartSubmittedData(orderId).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n var scriptId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.cartSubmittedId, orderId);\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, scriptId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n _this.subManager.add(cartSub);\r\n }\r\n });\r\n this.subManager.add(paramsSub);\r\n };\r\n CartSubmittedComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n CartSubmittedComponent.prototype.createSubComponent = function (cartSubmittedData, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(router, clientAreaService, languageService, authService, routesService, seoService, isBrowser, _elementRef, scriptService, breadcrumbsService, translateService, sanitizer, paypalService, mappings) {\r\n this.router = router;\r\n this.clientAreaService = clientAreaService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.routesService = routesService;\r\n this.seoService = seoService;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.translateService = translateService;\r\n this.sanitizer = sanitizer;\r\n this.paypalService = paypalService;\r\n this.mappings = mappings;\r\n this.footerData = cartSubmittedData.footerData;\r\n this.headerData = header;\r\n this.areaClientiName = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n this.authentication = this.authService.GetData();\r\n this.clientArea = cartSubmittedData.OrderDetail;\r\n this.seoInfo = cartSubmittedData.SeoInformation;\r\n this.pageIsInit = false;\r\n this.language = this.languageService.getShortLang();\r\n //cripted orderID with Md5\r\n this.criptedOrderID = md5_1.Md5.hashStr(this.clientArea.OrderId.toString());\r\n this.isTipologiaPagamentoBonifico = cartSubmittedData.OrderDetail.isTipologiaPagamentoBonifico ? cartSubmittedData.OrderDetail.isTipologiaPagamentoBonifico : false;\r\n this.numeroTrnInvalid = false;\r\n this.numeroCroInvalid = false;\r\n this.bonificoUploadUrl = this.sanitizer.bypassSecurityTrustResourceUrl(cartSubmittedData.BonificoUploadUrl);\r\n this.bonificoUploadedFiles = cartSubmittedData.OrderDetail.BonificoUploadedFilesNames;\r\n this.pageIsAfterViewInit = false;\r\n this.breadcrumbs = cartSubmittedData.BreadcrumbsInfo;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n //adding http before link because paypal redirection doesn't work without paypal\r\n this.paymentUrl = this.clientArea.PaymentDoneUrl + this.criptedOrderID;\r\n //url that the user will be redirected to after paying of order via paypal\r\n this.paymentCompleteUrl = this.paymentUrl.replace('{lang}', this.language);\r\n this.clientArea.CurrencyCode = \"EUR\";\r\n if (this.clientArea.OrderId == 0) {\r\n this.router.navigate(this.routesService.getRoutePath('HOME'));\r\n }\r\n };\r\n ChildComponent.prototype.confirmBonificoDetails = function () {\r\n var _this = this;\r\n // trim value before sending it to a server\r\n this.clientArea.BonificoTrn = this.clientArea.BonificoTrn.trim();\r\n //showing of loading panel after we get all data we need\r\n this.routesService.showPageLoader();\r\n this.clientAreaService.updateBonificoPaymentDetails(cartSubmittedData.OrderDetail.OrderId, this.clientArea.BonificoCro, this.clientArea.BonificoTrn)\r\n .subscribe(function (x) {\r\n //hiding of loading panel after we get all data we need\r\n _this.routesService.hidePageLoader();\r\n _this.hideBonificoModal();\r\n }, function (err) {\r\n });\r\n };\r\n // validate NumeroTrn input\r\n ChildComponent.prototype.checkNumeroTrn = function (inputText) {\r\n inputText = inputText.trim();\r\n if (inputText.length < 31) {\r\n this.numeroTrnInvalid = false;\r\n }\r\n else {\r\n this.numeroTrnInvalid = true;\r\n }\r\n };\r\n // validate NumeroCro input\r\n ChildComponent.prototype.checkNumeroCro = function (inputNumber) {\r\n if (inputNumber < 99999999999) {\r\n this.numeroCroInvalid = false;\r\n }\r\n else {\r\n this.numeroCroInvalid = true;\r\n }\r\n };\r\n // getting uploaded files for this order and showing it inside of bonifico modal\r\n ChildComponent.prototype.getBonificoUploadedFiles = function () {\r\n var _this = this;\r\n //showing of loading panel after we get all data we need\r\n this.routesService.showPageLoader();\r\n this.clientAreaService.getBonificoUploadedFiles(cartSubmittedData.OrderDetail.OrderId).subscribe(function (x) {\r\n _this.bonificoUploadedFiles = x;\r\n //hiding of loading panel after we get all data we need\r\n _this.routesService.hidePageLoader();\r\n });\r\n };\r\n ChildComponent.prototype.showBonificoModal = function () {\r\n $(\"#bonificoModal\").modal(\"show\");\r\n };\r\n ChildComponent.prototype.hideBonificoModal = function () {\r\n $(\"#bonificoModal\").modal(\"hide\");\r\n };\r\n ChildComponent.prototype.orderDetailsRedirect = function () {\r\n //Reading link of the page\r\n var cartOrderDetailPageUrl = this.routesService.getRoutePath('AREA CLIENTI - ORDINE')[0];\r\n //Removing system parameter (id)\r\n cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', '');\r\n //Adding Order Id parameter\r\n cartOrderDetailPageUrl += this.clientArea.OrderId;\r\n //this.router.navigate([cartOrderDetailPageUrl]);\r\n window.open(cartOrderDetailPageUrl, \"_self\");\r\n };\r\n ChildComponent.prototype.fileUploadRedirect = function () {\r\n //Reading link of the page\r\n var cartOrderDetailPageUrl = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n //Removing system parameter (id)\r\n cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', this.clientArea.OrderId);\r\n cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':pagefrom', 'section_upload');\r\n //this.router.navigate([cartOrderDetailPageUrl]);\r\n window.open(cartOrderDetailPageUrl, \"_self\");\r\n };\r\n ChildComponent.prototype.payWithPaypal = function () {\r\n var paypalText = \"pay_with_paypal\";\r\n var translatePaypal = this.translateService.get(paypalText)[\"value\"];\r\n var formHtml = '
' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '
';\r\n //replacing form with values from field because of security reasons - if somebody change html content\r\n var completePaypalForm = $(\"#completePaypalFormId\").html(formHtml);\r\n $('#paypalForm').submit();\r\n };\r\n ChildComponent.prototype.payWithNexi = function () {\r\n var NexiForm = $(\"#completeNexiFormId\").html();\r\n var NexiText = \"pay_with_nexi\";\r\n var translateNexi = this.translateService.get(NexiText)[\"value\"];\r\n var formHtml = '
' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '';\r\n if (this.clientArea.NexiModel.gruppo != null && this.clientArea.NexiModel.gruppo != \"\") {\r\n formHtml += '';\r\n }\r\n formHtml += '
' + NexiForm;\r\n // formHtml += ' ';\r\n //replacing form with values from field because of security reasons - if somebody change html content\r\n var completeNexiForm = $(\"#completeNexiFormId\").html(formHtml);\r\n $('#nexiForm').submit();\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsAfterViewInit) {\r\n return;\r\n }\r\n //-- If these conditions are not fulfilled, we are not gonna load paypal script, because there is no paypal payment option in the current order.\r\n if (this.clientArea.PaymentType == 'Paypal' && !this.isTipologiaPagamentoBonifico\r\n && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00' && this.clientArea.IsNewPaypalIntegration) {\r\n var userId = this.authService.GetUserId();\r\n var params = {\r\n CustomerId: userId.toString(),\r\n OrderId: this.clientArea.OrderId.toString(),\r\n Lang: this.languageService.getLongLang()\r\n };\r\n //-- Load paypal service and render a button for paypal payment\r\n this.paypalService.loadPaypalService(this.mappings.Paypal_JS_Lirary_Url, this.mappings.Web_Api_Create_Paypal_Payment, this.mappings.Web_Api_Execute_Paypal_Payment, params, this.clientArea.PaypalButtonStyle, this.clientArea.UsePaypalProduction);\r\n }\r\n this.pageIsAfterViewInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: cartSubmittedData.TemplateHtml\r\n }),\r\n __param(6, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _g) || Object, (typeof (_h = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _h) || Object, (typeof (_j = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _j) || Object, (typeof (_k = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _k) || Object, (typeof (_l = typeof platform_browser_1.DomSanitizer !== 'undefined' && platform_browser_1.DomSanitizer) === 'function' && _l) || Object, (typeof (_m = typeof paypal_service_1.PaypalService !== 'undefined' && paypal_service_1.PaypalService) === 'function' && _m) || Object, (typeof (_o = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _o) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;\r\n }());\r\n return ChildComponent;\r\n };\r\n CartSubmittedComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(5, core_1.Inject('isBrowser')),\r\n __param(8, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _d) || Object, (typeof (_e = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _g) || Object, Object, (typeof (_h = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _h) || Object])\r\n ], CartSubmittedComponent);\r\n return CartSubmittedComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n}());\r\nexports.CartSubmittedComponent = CartSubmittedComponent;\r\n\n\n/***/ }),\n\n/***/ 396:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar register_service_1 = __webpack_require__(100);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar core_2 = __webpack_require__(27);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cart_1 = __webpack_require__(98);\r\nvar cart_2 = __webpack_require__(98);\r\nvar user_login_1 = __webpack_require__(72);\r\nvar company_1 = __webpack_require__(253);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar CartComponent = (function () {\r\n function CartComponent(_compiler, componentHelper, _elementRef, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n CartComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var cartDataSub = this.cmsComponentService.getShoppingCartData().subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n var scriptId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.cartId, result.ShoppingCart.CartID);\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, scriptId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(cartDataSub);\r\n };\r\n CartComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n CartComponent.prototype.createSubComponent = function (shoppingCartData, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(router, shoppingCartService, languageService, authService, routesService, seoService, translate, bootboxService, isBrowser, _elementRef, scriptService, breadcrumbsService, registerService, canvasService, cookie) {\r\n var _this = this;\r\n this.router = router;\r\n this.shoppingCartService = shoppingCartService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.routesService = routesService;\r\n this.seoService = seoService;\r\n this.translate = translate;\r\n this.bootboxService = bootboxService;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.registerService = registerService;\r\n this.canvasService = canvasService;\r\n this.cookie = cookie;\r\n this.model = {\r\n selectedPayment: new cart_2.CartPaymentModel(),\r\n selectedShipment: new cart_1.CartShipmentModel()\r\n };\r\n this.pageIsInit = false;\r\n this.pageIsInitAfter = false;\r\n this.carrello = shoppingCartData.ShoppingCart;\r\n this.items = this.carrello.Payments;\r\n this.selectedPaymentId = 0;\r\n this.selectedShipmentId = 0;\r\n this.footerData = shoppingCartData.footerData;\r\n this.headerData = header;\r\n this.userLogin = user_login_1.UserLogin;\r\n this.lang = this.languageService.getLongLang();\r\n this.company = new company_1.Company();\r\n this.authentication = this.authService.GetData();\r\n this.userId = this.authService.GetUserId();\r\n this.cartId = 0;\r\n this.seoInfo = shoppingCartData.SeoInformation;\r\n this.disableModalCartButtons = false;\r\n this.spinnerCart = false;\r\n this.breadcrumbs = shoppingCartData.BreadcrumbsInfo;\r\n this.showProceedBtn = true;\r\n this.parentWidgetData = shoppingCartData.CanvasInfo;\r\n this.clickedProductId = 0;\r\n this.subManager = new Subscription_1.Subscription();\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n var canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(function (isModalOpened) {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(function (isDesignApproved) {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n shoppingCartService.setIfProductIsCanvasEdited(true);\r\n // get row id of edited element\r\n var productId_1 = _this.clickedProductId;\r\n // get data which we get from customer canvas and saved in a cart service\r\n var canvasData_1 = shoppingCartService.getCustomizationCanvasData();\r\n canvasData_1[\"RowIdPrev\"] = productId_1;\r\n if (canvasData_1 && productId_1 && canvasData_1.status == \"success\") {\r\n var updateCanvas = canvasService.updatePrevCanvasInfo(canvasData_1).subscribe(function (x) {\r\n var objectToUpdateStateId = _this.carrello.Products.find(function (obj) {\r\n return obj.Id === productId_1;\r\n });\r\n objectToUpdateStateId.CanvasStateId = canvasData_1.stateId;\r\n });\r\n _this.subManager.add(updateCanvas);\r\n }\r\n // reset editor view\r\n shoppingCartService.resetCanvasData();\r\n }\r\n });\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n ChildComponent.prototype.openCanvasEditor = function (product) {\r\n this.clickedProductId = product.Id;\r\n if (shoppingCartData.CanvasInfo.CanvasUrl) {\r\n // we have a state id, because product is already edited, so we kept it's state id in a database\r\n var isStateId = true;\r\n var canvasConfigData = this.setCanvasConfig(product);\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n };\r\n ChildComponent.prototype.setCanvasConfig = function (product) {\r\n var canvasConfigData = {\r\n CanvasUrl: shoppingCartData.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: shoppingCartData.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: shoppingCartData.CanvasInfo.CustomerCanvasUserName,\r\n CanvasStateId: product.CanvasStateId,\r\n Watermark: shoppingCartData.CanvasInfo.WatermarkText,\r\n CanvasApiKey: shoppingCartData.CanvasInfo.ApiKey\r\n };\r\n return canvasConfigData;\r\n };\r\n ChildComponent.prototype.toShowCanvasButton = function () {\r\n var toShow = false;\r\n var isModuleActive = false;\r\n if (shoppingCartData.CanvasInfo && shoppingCartData.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = shoppingCartData.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n toShow = isModuleActive && this.isUserAuthenticated ? true : false;\r\n return toShow;\r\n };\r\n // customers canvas state module is active and current product has canvasStateId defined, then send a request to delete a state from customers canvas server\r\n ChildComponent.prototype.removeCustomersCanvasState = function () {\r\n if (this.toShowCanvasButton() && this.selectedProduct.CanvasStateId) {\r\n var canvasConfigData = this.setCanvasConfig(this.selectedProduct);\r\n this.canvasService.deleteCustomerCanvasState(canvasConfigData)\r\n .subscribe(function (x) { return x; }, function (err) {\r\n console.log(err);\r\n });\r\n }\r\n };\r\n ChildComponent.prototype.goRegistrationPage = function () {\r\n //-- If this parameter is inside of cookie, it means that user used quick registration feature\r\n var quickRegistration = this.cookie.get(\"IsQuickRegistered\");\r\n if (quickRegistration && Boolean(quickRegistration)) {\r\n var navigationExtras = {\r\n queryParams: { 'quickRegistration': true }\r\n };\r\n var registerRoute = this.routesService.getRoutePath('REGISTRAZIONE_PAGE_FROM')[0];\r\n registerRoute = registerRoute.replace(\":pagefrom\", \"cart\");\r\n this.router.navigate([registerRoute], navigationExtras);\r\n }\r\n else {\r\n if (this.isCompletedRegistration == false) {\r\n this.registerService.setFacebookLoginData(this.userData);\r\n var registerRoute = this.routesService.getRoutePath('REGISTRAZIONE_PAGE_FROM')[0];\r\n registerRoute = registerRoute.replace(\":pagefrom\", \"cart\");\r\n this.router.navigate([registerRoute]);\r\n }\r\n else {\r\n this.router.navigate(this.routesService.getRoutePath('REGISTRAZIONE'));\r\n }\r\n }\r\n };\r\n ;\r\n ChildComponent.prototype.goLoginPage = function () {\r\n var loginRoute = this.routesService.getRoutePath('LOGIN_PAGE_FROM')[0];\r\n loginRoute = loginRoute.replace(\":pagefrom\", \"cart\");\r\n this.router.navigate([loginRoute]);\r\n };\r\n ;\r\n ChildComponent.prototype.goToConfirmPurchasePage = function () {\r\n if (this.selectedPaymentId == 0) {\r\n this.bootboxService.i18nAlert(\"selectPayment\", 'pagamento');\r\n }\r\n else if (this.selectedShipmentId == 0) {\r\n this.bootboxService.i18nAlert(\"selectPayment\", 'pagamento');\r\n }\r\n else {\r\n //this.router.navigateByUrl(this.routesService.getRoutePath('ACQUISTO - CASSA'));\r\n window.open(this.routesService.getRoutePath('ACQUISTO - CASSA'), \"_self\");\r\n }\r\n };\r\n ChildComponent.prototype.goToModifyProfile = function () {\r\n this.router.navigate(this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI'));\r\n };\r\n ChildComponent.prototype.saveCart = function () {\r\n var _this = this;\r\n var saveCartSub = this.shoppingCartService.saveCart(this.userId, this.cartId, this.selectedPaymentId, this.selectedShipmentId).subscribe(function (result) {\r\n //this.router.navigate(this.routesService.getRoutePath('ACQUISTO - CASSA'));\r\n window.open(_this.routesService.getRoutePath('ACQUISTO - CASSA'), \"_self\");\r\n });\r\n this.subManager.add(saveCartSub);\r\n };\r\n ChildComponent.prototype.selectRadioPayment = function (paymentId) {\r\n if (this.selectedPaymentId != paymentId) {\r\n this.selectedPaymentId = paymentId;\r\n this.setPayment(paymentId);\r\n }\r\n };\r\n ChildComponent.prototype.setPayment = function (paymentId) {\r\n var _this = this;\r\n this.spinnerCart = true;\r\n var paymentSub = this.shoppingCartService.setPayment(paymentId).subscribe(function (result) {\r\n _this.bootboxService.i18nAlert(\"selectedPayment\", 'pagamento');\r\n _this.shoppingCartService.updateCart(result);\r\n _this.carrello = _this.shoppingCartService.getCart();\r\n _this.spinnerCart = false;\r\n });\r\n this.subManager.add(paymentSub);\r\n };\r\n ChildComponent.prototype.selectRadioShipment = function (shipmentId) {\r\n if (this.selectedShipmentId != shipmentId) {\r\n this.selectedShipmentId = shipmentId;\r\n this.setShipment(shipmentId);\r\n }\r\n };\r\n ChildComponent.prototype.setShipment = function (shipmentId) {\r\n var _this = this;\r\n this.spinnerCart = true;\r\n var shipmentSub = this.shoppingCartService.setShipment(shipmentId).subscribe(function (result) {\r\n _this.bootboxService.i18nAlert(\"selectedShipment\", 'spedizione');\r\n _this.shoppingCartService.updateCart(result);\r\n _this.carrello = _this.shoppingCartService.getCart();\r\n _this.spinnerCart = false;\r\n });\r\n this.subManager.add(shipmentSub);\r\n };\r\n ChildComponent.prototype.removeFromCart = function () {\r\n var _this = this;\r\n this.disableModalCartButtons = true;\r\n this.spinnerCart = true;\r\n var removeCartSub = this.shoppingCartService.removeFromCart(this.idOfProduct).subscribe(function (result) {\r\n _this.shoppingCartService.updateCart(result);\r\n _this.carrello = _this.shoppingCartService.getCart();\r\n _this.spinnerCart = false;\r\n _this.disableModalCartButtons = false;\r\n _this.removeCustomersCanvasState();\r\n if (_this.carrello.Products != null && _this.carrello.Products.length == 0) {\r\n _this.router.navigate(_this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n }\r\n });\r\n this.subManager.add(removeCartSub);\r\n this.hideModal();\r\n };\r\n ChildComponent.prototype.showModal = function (product) {\r\n this.disableModalCartButtons = false;\r\n this.idOfProduct = product.Id;\r\n this.selectedProduct = product;\r\n $(\"#cartModal\").modal(\"show\");\r\n };\r\n ChildComponent.prototype.hideModal = function () {\r\n $('#cartModal').modal('hide');\r\n };\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n if (shoppingCartData.UserData != null) {\r\n this.isCompletedRegistration = shoppingCartData.UserData.IsCompletedRegistration;\r\n this.userData = shoppingCartData.UserData;\r\n }\r\n if (this.carrello.Products.length == 0) {\r\n this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n }\r\n else {\r\n this.shoppingCartService.updateCart(this.carrello);\r\n var userData = this.authService.GetData();\r\n this.isUserAuthenticated = userData.isAuthenticated;\r\n for (var _i = 0, _a = this.carrello.Payments; _i < _a.length; _i++) {\r\n var payment = _a[_i];\r\n if (payment.Selected == true) {\r\n this.selectedPaymentId = payment.Id;\r\n break;\r\n }\r\n }\r\n for (var _b = 0, _c = this.carrello.Shipments; _b < _c.length; _b++) {\r\n var shipment = _c[_b];\r\n if (shipment.Selected == true) {\r\n // console.log(\"selectedShipmentId = \"+shipment.Id)\r\n this.selectedShipmentId = shipment.Id;\r\n break;\r\n }\r\n }\r\n }\r\n if (this.userData != undefined && this.userData != null) {\r\n if (this.userData.Id_User_Group != 4) {\r\n if ((this.userData.CodiceDestinatarioSDL == \"\" || this.userData.CodiceDestinatarioSDL == \"0000000\" || this.userData.CodiceDestinatarioSDL == undefined) && (this.userData.PecEmail == \"\" || this.userData.PecEmail == undefined)) {\r\n this.showProceedBtn = false;\r\n }\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n setTimeout(function () {\r\n var altezza = $(\"#footer\").outerHeight();\r\n var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n var altezzaHead = $(\".header-body\").outerHeight();\r\n //console.log(\".header-body = \" + altezzaHead)\r\n var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n $(\"#resumeCartTotal\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#resumeCartTotal-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n }, 1);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n $('.popovers').popover();\r\n this.pageIsInitAfter = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: shoppingCartData.TemplateHtml\r\n }),\r\n __param(8, core_1.Inject('isBrowser')),\r\n __param(14, core_1.Inject('CookieService')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _g) || Object, (typeof (_h = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _j) || Object, (typeof (_k = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _k) || Object, (typeof (_l = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _l) || Object, (typeof (_m = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _m) || Object, (typeof (_o = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _o) || Object, (typeof (_p = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _p) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\r\n }());\r\n return ChildComponent;\r\n };\r\n CartComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(4, core_1.Inject('isBrowser')),\r\n __param(7, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _e) || Object, (typeof (_f = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _f) || Object, Object, (typeof (_g = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _g) || Object])\r\n ], CartComponent);\r\n return CartComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.CartComponent = CartComponent;\r\n\n\n/***/ }),\n\n/***/ 397:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar script_service_1 = __webpack_require__(16);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(74);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar messages_service_1 = __webpack_require__(132);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar client_area_1 = __webpack_require__(99);\r\nvar router_1 = __webpack_require__(13);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar ClientAreaHomeComponent = (function () {\r\n function ClientAreaHomeComponent(_compiler, componentHelper, _elementRef, clientAreaService, router, authService, cmsComponentService, isBrowser, seo, renderer, scriptService, document) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.clientAreaService = clientAreaService;\r\n this.router = router;\r\n this.authService = authService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.scriptService = scriptService;\r\n this.document = document;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ClientAreaHomeComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n //console.log(this.authService.GetData().isAuthenticated)\r\n if (!this.authService.GetData().isAuthenticated || this.authService.GetData().isAuthenticated === undefined) {\r\n this.router.navigate([\"\"]);\r\n }\r\n var userId = this.authService.GetUserId();\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var clientDetailsSub = this.clientAreaService.getDetailsClientArea(userId).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the catalog catgories information to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.userAreaId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(clientDetailsSub);\r\n };\r\n ClientAreaHomeComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ClientAreaHomeComponent.prototype.createSubComponent = function (ClientAreaHomeTemplate, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(languageService, router, authService, routesService, messagesService, isBrowser, seoService, currency, breadcrumbsService, scriptService) {\r\n this.languageService = languageService;\r\n this.router = router;\r\n this.authService = authService;\r\n this.routesService = routesService;\r\n this.messagesService = messagesService;\r\n this.isBrowser = isBrowser;\r\n this.seoService = seoService;\r\n this.currency = currency;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.scriptService = scriptService;\r\n this.footerData = ClientAreaHomeTemplate.FooterData;\r\n this.headerData = header;\r\n this.clientArea = new client_area_1.ClientAreaDetails();\r\n this.lang = this.languageService.getLongLang();\r\n this.messagesList = [];\r\n this.numberOfMessages = 0;\r\n this.bodyMod = [];\r\n this.lastOrderDetailsPage = \"\";\r\n this.userName = \"\";\r\n this.pageIsInit = false;\r\n //checking if invoices module is active\r\n this.isActiveInvoicesModule = ClientAreaHomeTemplate.isActiveInvoicesModule;\r\n this.breadcrumbs = ClientAreaHomeTemplate.BreadcrumbsInfo;\r\n //Routes for menu-tabs\r\n this.areaClientiHome = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n this.areaClientiOrdini = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n this.areaChangeProfile = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n this.areaClientiInvoices = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n this.userName = this.authService.GetData().username;\r\n this.clientArea = ClientAreaHomeTemplate.ClientAreaDetails;\r\n this.messagesList = this.clientArea.OrderNoteList;\r\n this.numberOfMessages = this.clientArea.NewNoteOrdersCount;\r\n //getting of the link for details page of latest order\r\n this.lastOrderId = String(this.clientArea[\"LastOrderId\"]);\r\n var url = this.routesService.getRoutePath(\"AREA CLIENTI - ORDINE\")[0];\r\n this.lastOrderDetailsPage = url.replace(':id', this.lastOrderId);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.showModal = function () {\r\n var userId = this.authService.GetUserId();\r\n var params = {\r\n CustomerId: userId,\r\n OrderId: \"0\",\r\n Lang: this.lang\r\n };\r\n var setMessSub = this.messagesService.setMessagesAsRead(params)\r\n .subscribe(function (result) { });\r\n this.subManager.add(setMessSub);\r\n $(\"#messagesModal\").modal(\"show\");\r\n this.bodyMod = [];\r\n };\r\n ChildComponent.prototype.hideModal = function () {\r\n $('#basic').modal('hide');\r\n this.numberOfMessages = 0;\r\n };\r\n ChildComponent.prototype.messagesDetails = function (orderId) {\r\n $(\"#messagesModal\").modal(\"hide\");\r\n var id = orderId;\r\n var orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n orderDetailsPage = orderDetailsPage.replace(':id', id.toString()).replace(':pagefrom', \"section_comunicazioni\");\r\n this.router.navigate([orderDetailsPage]);\r\n return true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: ClientAreaHomeTemplate.TemplateHtml\r\n }),\r\n __param(5, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _a) || Object, (typeof (_b = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof messages_service_1.MessagesService !== 'undefined' && messages_service_1.MessagesService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _g) || Object, (typeof (_h = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _h) || Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n }());\r\n return ChildComponent;\r\n };\r\n ClientAreaHomeComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(7, core_1.Inject('isBrowser')),\r\n __param(11, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _h) || Object, (typeof (_j = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _j) || Object, (typeof (_k = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _k) || Object, Object])\r\n ], ClientAreaHomeComponent);\r\n return ClientAreaHomeComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n}());\r\nexports.ClientAreaHomeComponent = ClientAreaHomeComponent;\r\n\n\n/***/ }),\n\n/***/ 398:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar script_service_1 = __webpack_require__(16);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(74);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar router_1 = __webpack_require__(13);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar cookie_service_1 = __webpack_require__(73);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar messages_service_1 = __webpack_require__(132);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar core_2 = __webpack_require__(27);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar ClientAreaInvoicesComponent = (function () {\r\n function ClientAreaInvoicesComponent(_compiler, componentHelper, _elementRef, authService, router, clientAreaService, cmsComponentService, isBrowser, seo, renderer, document) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.authService = authService;\r\n this.router = router;\r\n this.clientAreaService = clientAreaService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ClientAreaInvoicesComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.authService.GetData().isAuthenticated) {\r\n this.router.navigate([\"\"]);\r\n }\r\n var ClientAreaInvoicesListTemplate;\r\n var userId = this.authService.GetUserId();\r\n var showAll = \"-1\";\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var invoicesSub = this.clientAreaService.getClientAreaInvoicesList(userId, showAll, showAll, showAll).subscribe(function (result) {\r\n ClientAreaInvoicesListTemplate = result;\r\n if (ClientAreaInvoicesListTemplate.isActiveInvoicesModule) {\r\n // Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(ClientAreaInvoicesListTemplate, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n var subComponent = _this.redirectToHomepage(ClientAreaInvoicesListTemplate);\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n });\r\n this.subManager.add(invoicesSub);\r\n };\r\n ClientAreaInvoicesComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n //if invoices module is not active, then redirect to homepage\r\n ClientAreaInvoicesComponent.prototype.redirectToHomepage = function (ClientAreaInvoicesListTemplate) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(router) {\r\n this.router = router;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n this.router.navigate([\"\"]);\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: ClientAreaInvoicesListTemplate.TemplateHtml\r\n }), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a;\r\n }());\r\n return ChildComponent;\r\n };\r\n ClientAreaInvoicesComponent.prototype.createSubComponent = function (ClientAreaInvoicesListTemplate, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(cookie, clientAreaService, router, authService, routesService, apiService, messagesService, mappings, currency, languageService, translateService, isBrowser, seoService, breadcrumbsService, scriptService) {\r\n this.cookie = cookie;\r\n this.clientAreaService = clientAreaService;\r\n this.router = router;\r\n this.authService = authService;\r\n this.routesService = routesService;\r\n this.apiService = apiService;\r\n this.messagesService = messagesService;\r\n this.mappings = mappings;\r\n this.currency = currency;\r\n this.languageService = languageService;\r\n this.translateService = translateService;\r\n this.isBrowser = isBrowser;\r\n this.seoService = seoService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.scriptService = scriptService;\r\n this.pageIsInit = false;\r\n this.rows = [];\r\n this.columns = [];\r\n //filter fields\r\n this.documentTypeSelect = \"-1\";\r\n this.orderNumber = \"\";\r\n this.invoiceNumber = \"\";\r\n this.lang = this.languageService.getLongLang();\r\n this.shortLang = this.languageService.getShortLang();\r\n this.load = true;\r\n this.footerData = ClientAreaInvoicesListTemplate.footerData;\r\n this.headerData = header;\r\n //Routes for menu-tabs\r\n this.areaClientiHome = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n this.areaClientiOrdini = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n this.areaChangeProfile = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n this.areaClientiInvoices = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n this.isActiveInvoicesModule = ClientAreaInvoicesListTemplate.isActiveInvoicesModule;\r\n this.breadcrumbs = ClientAreaInvoicesListTemplate.BreadcrumbsInfo;\r\n this.italianLang = {\r\n \"sProcessing\": \"Attendere...\",\r\n \"sLengthMenu\": \"Visualizza _MENU_ record per pagina\",\r\n \"sZeroRecords\": \"Niente trovato\",\r\n \"sInfo\": \"Mostra _START_ a _END_ di _TOTAL_ record\",\r\n \"sInfoEmpty\": \"Non ci sono record\",\r\n \"sInfoFiltered\": \"(filtrato da _MAX_ record totali)\",\r\n \"sInfoPostFix\": \"\",\r\n \"sUrl\": \"\",\r\n \"oPaginate\": {\r\n \"sPrevious\": \"«\",\r\n \"sNext\": \"»\"\r\n }\r\n };\r\n this.englishLang = {\r\n \"oPaginate\": {\r\n \"sPrevious\": \"«\",\r\n \"sNext\": \"»\"\r\n }\r\n };\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n //translating of header columns titles\r\n ChildComponent.prototype.translateTableColumnTitle = function (columnTitle) {\r\n var translation = this.translateService.get(columnTitle)[\"value\"];\r\n return translation;\r\n };\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n this.columns = [\r\n { title: this.translateTableColumnTitle(\"OrderNumberInvoice\") },\r\n { title: this.translateTableColumnTitle(\"InvoiceNumberInvoice\") },\r\n { title: this.translateTableColumnTitle(\"CreationDateInvoice\") },\r\n { title: this.translateTableColumnTitle(\"TotalPriceInvoice\") },\r\n { title: this.translateTableColumnTitle(\"DocumentTypeInvoice\") },\r\n { title: this.translateTableColumnTitle(\"Download\") }\r\n ];\r\n //getting of Datatable data\r\n this.rows = ClientAreaInvoicesListTemplate.ClientAreaInvoicesList;\r\n this.load = false;\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n if (this.shortLang == 'en') {\r\n this.currentLang = this.englishLang;\r\n }\r\n else {\r\n this.currentLang = this.italianLang;\r\n }\r\n //initialization of datatable\r\n $('#datatable').DataTable({\r\n searching: false,\r\n ordering: false,\r\n sDom: 'Rlfrtlip',\r\n oLanguage: this.currentLang\r\n });\r\n //hiding of first 'per page' section, because we added it on the bottom of the table\r\n $('.dataTables_length').not(':eq(1)').hide();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.getInvoicesList = function (userId, orderNumber, invoiceNumber, documentType) {\r\n var _this = this;\r\n var showAll = \"-1\";\r\n this.load = true;\r\n var invoicesSub = this.clientAreaService.getClientAreaInvoicesList(userId, orderNumber, invoiceNumber, documentType)\r\n .subscribe(function (result) {\r\n _this.rows = result.ClientAreaInvoicesList;\r\n _this.load = false;\r\n _this.resetTable(_this.rows);\r\n });\r\n this.subManager.add(invoicesSub);\r\n };\r\n //destroying of current context of table and creating a new one with new data\r\n ChildComponent.prototype.resetTable = function (tableData) {\r\n $('#datatable').DataTable().destroy();\r\n var currentLang = this.currentLang;\r\n setTimeout(function () {\r\n $('#datatable').DataTable({\r\n data: this.rows,\r\n searching: false,\r\n ordering: false,\r\n sDom: 'Rlfrtlip',\r\n oLanguage: currentLang\r\n });\r\n }, 0);\r\n setTimeout(function () { $('.dataTables_length').not(':eq(1)').hide(); }, 0);\r\n };\r\n ChildComponent.prototype.resetFilter = function () {\r\n this.rows = ClientAreaInvoicesListTemplate.ClientAreaInvoicesList;\r\n this.orderNumber = \"\";\r\n this.invoiceNumber = \"\";\r\n this.documentTypeSelect = \"-1\";\r\n this.resetTable(this.rows);\r\n };\r\n ChildComponent.prototype.filterInvoicesList = function () {\r\n var showAll = \"-1\";\r\n var userId = this.authService.GetUserId();\r\n //checking if inputs for filtering are empty, if they are, set them to \"show all\", which is '-1' value\r\n var filterOrderNumber = this.orderNumber != \"\" ? this.orderNumber : showAll;\r\n var filterInvoiceNumber = this.invoiceNumber != \"\" ? this.invoiceNumber : showAll;\r\n //if all fields are empty, then don't send request to a server, but set rows value to start\r\n if (filterOrderNumber == showAll && filterInvoiceNumber == showAll && this.documentTypeSelect == showAll) {\r\n this.resetFilter();\r\n }\r\n else {\r\n this.getInvoicesList(userId, filterOrderNumber, filterInvoiceNumber, this.documentTypeSelect);\r\n }\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Object)\r\n ], ChildComponent.prototype, \"clientModel\", void 0);\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: ClientAreaInvoicesListTemplate.TemplateHtml\r\n }),\r\n __param(0, core_1.Inject('CookieService')),\r\n __param(11, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _a) || Object, (typeof (_b = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _b) || Object, (typeof (_c = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _f) || Object, (typeof (_g = typeof messages_service_1.MessagesService !== 'undefined' && messages_service_1.MessagesService) === 'function' && _g) || Object, (typeof (_h = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _h) || Object, (typeof (_j = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _j) || Object, (typeof (_k = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _k) || Object, (typeof (_l = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _l) || Object, Boolean, (typeof (_m = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _m) || Object, (typeof (_o = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _o) || Object, (typeof (_p = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _p) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;\r\n }());\r\n return ChildComponent;\r\n };\r\n ClientAreaInvoicesComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(7, core_1.Inject('isBrowser')),\r\n __param(10, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _e) || Object, (typeof (_f = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _h) || Object, (typeof (_j = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _j) || Object, Object])\r\n ], ClientAreaInvoicesComponent);\r\n return ClientAreaInvoicesComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.ClientAreaInvoicesComponent = ClientAreaInvoicesComponent;\r\n\n\n/***/ }),\n\n/***/ 399:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar script_service_1 = __webpack_require__(16);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(74);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar messages_service_1 = __webpack_require__(132);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar cookie_service_1 = __webpack_require__(73);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar core_2 = __webpack_require__(27);\r\n//Models\r\nvar user_login_1 = __webpack_require__(72);\r\nvar client_area_1 = __webpack_require__(99);\r\nvar client_area_2 = __webpack_require__(99);\r\nvar client_area_3 = __webpack_require__(99);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//import * as moment from 'moment'\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar md5_1 = __webpack_require__(279);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar paypal_service_1 = __webpack_require__(261);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar ClientAreaOrderDetailsComponent = (function () {\r\n function ClientAreaOrderDetailsComponent(_compiler, componentHelper, _elementRef, templateService, route, clientAreaService, cmsComponentService, authService, router, isBrowser, seo, renderer, document) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.templateService = templateService;\r\n this.route = route;\r\n this.clientAreaService = clientAreaService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.authService = authService;\r\n this.router = router;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.clientArea = new client_area_1.ClientAreaOrderDetails();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ClientAreaOrderDetailsComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.authService.GetData().isAuthenticated) {\r\n this.router.navigate([\"\"]);\r\n }\r\n var subComponentTemplateUrl;\r\n var orderId = 0;\r\n var orderRowId = 0;\r\n var paramsSub = this.route.params.subscribe(function (params) {\r\n var templateHtml;\r\n var id = params['id'];\r\n var header;\r\n var headDataSub = _this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n _this.subManager.add(headDataSub);\r\n if (id !== undefined) {\r\n orderId = id;\r\n var UserId = _this.authService.GetUserId();\r\n var orderIdSub = _this.clientAreaService.getClientAreaOrderDetails(UserId, orderId).subscribe(function (result) {\r\n templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(templateHtml, orderId, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n _this.subManager.add(orderIdSub);\r\n }\r\n else {\r\n var orderNotFoundSub = _this.templateService.getComponentTemplate(\"notfoundPageTemplate\").subscribe(function (result) {\r\n templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(templateHtml, orderId, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n _this.subManager.add(orderNotFoundSub);\r\n }\r\n });\r\n this.subManager.add(paramsSub);\r\n };\r\n ClientAreaOrderDetailsComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ClientAreaOrderDetailsComponent.prototype.createSubComponent = function (template, orderId, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(clientAreaService, languageService, authService, routesService, cookie, router, activatedRoute, sanitizer, messagesService, isBrowser, seoService, currency, translateService, breadcrumbsService, paypalService, mappings, scriptService) {\r\n this.clientAreaService = clientAreaService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.routesService = routesService;\r\n this.cookie = cookie;\r\n this.router = router;\r\n this.activatedRoute = activatedRoute;\r\n this.sanitizer = sanitizer;\r\n this.messagesService = messagesService;\r\n this.isBrowser = isBrowser;\r\n this.seoService = seoService;\r\n this.currency = currency;\r\n this.translateService = translateService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.paypalService = paypalService;\r\n this.mappings = mappings;\r\n this.scriptService = scriptService;\r\n this.areaClientiHome = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n this.areaClientiOrdini = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n this.areaChangeProfile = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n this.areaClientiInvoices = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n this.model = {\r\n ProcessOrder: \"\",\r\n processingSubject: \"\",\r\n Description: \"\"\r\n };\r\n this.footerData = template.footerData;\r\n this.headerData = header;\r\n this.clientArea = new client_area_1.ClientAreaOrderDetails();\r\n this.clientAreaList = new Array();\r\n this.userLogin = user_login_1.UserLogin;\r\n this.orderProcessMessageList = [];\r\n this.message = new client_area_3.ClientAreaProcessingOrders();\r\n this.lang = this.languageService.getLongLang();\r\n this.authentication = this.authService.GetData();\r\n this.userName = this.authentication.username;\r\n this.userId = this.authService.GetUserId();\r\n this.idord = new client_area_3.ClientAreaProcessingOrders();\r\n this.upload = \"\";\r\n this.info = \"active\";\r\n this.comunicazioni = \"\";\r\n this.noMessages = false;\r\n this.checkValues = false;\r\n this.waitingDetails = false;\r\n this.pageIsInit = false;\r\n this.pageIsAfterViewInit = false;\r\n this.showSpinnerClick = false;\r\n //checking if invoices module is active\r\n this.isActiveInvoicesModule = template.isActiveInvoicesModule;\r\n //checking if multiple shipment module is active\r\n this.multipleShipmentActive = template.isActiveMultipleShipment;\r\n this.isTipologiaPagamentoBonifico = template.ClientAreaOrderDetails.isTipologiaPagamentoBonifico ? template.ClientAreaOrderDetails.isTipologiaPagamentoBonifico : false;\r\n this.numeroTrnInvalid = false;\r\n this.numeroCroInvalid = false;\r\n this.startTrnValue = template.ClientAreaOrderDetails.BonificoTrn;\r\n this.startCroValue = template.ClientAreaOrderDetails.BonificoCro;\r\n this.bonificoUploadUrl = this.sanitizer.bypassSecurityTrustResourceUrl(template.BonificoUploadUrl);\r\n this.bonificoUploadedFiles = template.ClientAreaOrderDetails.BonificoUploadedFilesNames;\r\n this.breadcrumbs = template.BreadcrumbsInfo;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (this.breadcrumbs != null) {\r\n var len = this.breadcrumbs.length;\r\n var nameLast = this.breadcrumbs[len - 1].BreadcrumbName;\r\n var translatedName = this.translateTableColumnTitle(nameLast);\r\n this.breadcrumbs[len - 1].BreadcrumbName = translatedName;\r\n }\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n this.waitingDetails = false;\r\n //if user from the page order list clicked on email\r\n var routeParamsSub = this.activatedRoute.params.subscribe(function (params) {\r\n if (params[\"pagefrom\"] == \"section_upload\") {\r\n _this.upload = \"active\";\r\n _this.info = \"\";\r\n _this.comunicazioni = \"\";\r\n }\r\n else if (params[\"pagefrom\"] == \"section_comunicazioni\") {\r\n _this.comunicazioni = \"active\";\r\n _this.upload = \"\";\r\n _this.info = \"\";\r\n var orderId_1 = params[\"id\"];\r\n _this.setMessagesAsRead(orderId_1);\r\n }\r\n _this.waitingDetails = true;\r\n _this.clientArea = template.ClientAreaOrderDetails;\r\n _this.clientArea.CurrencyCode = \"EUR\";\r\n var language = _this.languageService.getShortLang();\r\n //cripted orderID with Md5\r\n _this.criptedOrderID = md5_1.Md5.hashStr(_this.clientArea.OrderId.toString());\r\n if (_this.clientArea.OrderNoteList.length > 0) {\r\n _this.noMessages = false;\r\n }\r\n else {\r\n _this.noMessages = true;\r\n }\r\n //url that the user will be redirected to after paying of order via paypal\r\n _this.paymentCompleteUrl = _this.clientArea.PaymentDoneUrl + _this.criptedOrderID;\r\n var paymentUrl = _this.clientArea.PaymentDoneUrl + _this.criptedOrderID;\r\n _this.paymentCompleteUrl = paymentUrl.replace('{lang}', language);\r\n if (_this.clientArea.NexiModel != null) {\r\n if (_this.clientArea.NexiModel.url_back_dettaglioOrdine != null) {\r\n _this.clientArea.NexiModel.url_back_dettaglioOrdine = _this.clientArea.NexiModel.url_back_dettaglioOrdine.replace('{lang}', language);\r\n }\r\n }\r\n //getting of link for upload files on order details page\r\n for (var _i = 0, _a = _this.clientArea.ProcessingOrderList; _i < _a.length; _i++) {\r\n var process = _a[_i];\r\n process.FileUploadSecuredUrl = _this.sanitizer.bypassSecurityTrustResourceUrl(process.FileUploadUrl);\r\n process.PreflightUploadSecuredUrl = _this.sanitizer.bypassSecurityTrustResourceUrl(process.PreflightUploadUrl);\r\n }\r\n });\r\n this.subManager.add(routeParamsSub);\r\n if (this.clientArea.TrackingUrl != '' && this.clientArea.TrackingUrl != null) {\r\n if (this.clientArea.TrackingUrl.indexOf(\"http://\") == -1 && this.clientArea.TrackingUrl.indexOf(\"https://\") == -1) {\r\n this.clientArea.TrackingUrl = \"http://\" + this.clientArea.TrackingUrl;\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //changing style of status bar(under detail order number) depending on multiple shipment module\r\n if (this.multipleShipmentActive == true) {\r\n $(\"#paymentStatusBar\").addClass('col-md-5').addClass('tabs-style').removeClass('col-md-3').removeClass('tabs-styleNoAfter');\r\n }\r\n else {\r\n $(\"#paymentStatusBar\").addClass('col-md-3').addClass('tabs-styleNoAfter').removeClass('col-md-5').removeClass('tabs-style');\r\n }\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsAfterViewInit) {\r\n return;\r\n }\r\n //-- If these conditions are not fulfilled, we are not gonna load paypal script, because there is no paypal payment option in the current order.\r\n if (this.clientArea.PaymentType == 'Paypal' && !this.isTipologiaPagamentoBonifico\r\n && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00' && this.clientArea.IsNewPaypalIntegration) {\r\n var userId = this.authService.GetUserId();\r\n var params = {\r\n CustomerId: userId.toString(),\r\n OrderId: orderId.toString(),\r\n Lang: this.lang,\r\n };\r\n //-- Load paypal service and render a button for paypal payment\r\n this.paypalService.loadPaypalService(this.mappings.Paypal_JS_Lirary_Url, this.mappings.Web_Api_Create_Paypal_Payment, this.mappings.Web_Api_Execute_Paypal_Payment, params, this.clientArea.PaypalButtonStyle, this.clientArea.UsePaypalProduction);\r\n }\r\n this.pageIsAfterViewInit = true;\r\n };\r\n ChildComponent.prototype.confirmBonificoDetails = function () {\r\n var _this = this;\r\n // trim value before sending it to a server\r\n this.clientArea.BonificoTrn = this.clientArea.BonificoTrn.trim();\r\n //showing of loading panel after we get all data we need\r\n this.routesService.showPageLoader();\r\n this.clientAreaService.updateBonificoPaymentDetails(orderId, this.clientArea.BonificoCro, this.clientArea.BonificoTrn)\r\n .subscribe(function (x) {\r\n _this.startTrnValue = _this.clientArea.BonificoTrn;\r\n _this.startCroValue = _this.clientArea.BonificoCro;\r\n //hiding of loading panel after we get all data we need\r\n _this.routesService.hidePageLoader();\r\n _this.hideBonificoModal();\r\n }, function (err) {\r\n _this.clientArea.BonificoTrn = _this.startTrnValue;\r\n _this.clientArea.BonificoCro = _this.startCroValue;\r\n });\r\n };\r\n // validate NumeroTrn input\r\n ChildComponent.prototype.checkNumeroTrn = function (inputText) {\r\n inputText = inputText.trim();\r\n if (inputText.length < 31) {\r\n this.numeroTrnInvalid = false;\r\n }\r\n else {\r\n this.numeroTrnInvalid = true;\r\n }\r\n };\r\n // validate NumeroCro input\r\n ChildComponent.prototype.checkNumeroCro = function (inputNumber) {\r\n if (inputNumber < 99999999999) {\r\n this.numeroCroInvalid = false;\r\n }\r\n else {\r\n this.numeroCroInvalid = true;\r\n }\r\n };\r\n // getting uploaded files for this order and showing it inside of bonifico modal\r\n ChildComponent.prototype.getBonificoUploadedFiles = function () {\r\n var _this = this;\r\n //showing of loading panel after we get all data we need\r\n this.routesService.showPageLoader();\r\n this.clientAreaService.getBonificoUploadedFiles(orderId).subscribe(function (x) {\r\n _this.bonificoUploadedFiles = x;\r\n //hiding of loading panel after we get all data we need\r\n _this.routesService.hidePageLoader();\r\n });\r\n };\r\n ChildComponent.prototype.showBonificoModal = function () {\r\n $(\"#bonificoModal\").modal(\"show\");\r\n };\r\n ChildComponent.prototype.hideBonificoModal = function () {\r\n $(\"#bonificoModal\").modal(\"hide\");\r\n this.clientArea.BonificoTrn = this.startTrnValue;\r\n this.clientArea.BonificoCro = this.startCroValue;\r\n };\r\n //translating of header columns titles\r\n ChildComponent.prototype.translateTableColumnTitle = function (columnTitle) {\r\n var translation = this.translateService.get(columnTitle)[\"value\"];\r\n return translation;\r\n };\r\n ChildComponent.prototype.payWithPaypal = function () {\r\n var paypalText = \"pay_with_paypal\";\r\n var translatePaypal = this.translateService.get(paypalText)[\"value\"];\r\n var formHtml = '
' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '
';\r\n //replacing form with values from field because of security reasons - if somebody change html content\r\n var completePaypalForm = $(\"#completePaypalFormId\").html(formHtml);\r\n $('#paypalForm').submit();\r\n };\r\n ChildComponent.prototype.payWithNexi = function () {\r\n var NexiForm = $(\"#completeNexiFormId\").html();\r\n var NexiText = \"pay_with_nexi\";\r\n var translateNexi = this.translateService.get(NexiText)[\"value\"];\r\n var formHtml = '
' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '';\r\n if (this.clientArea.NexiModel.gruppo != null && this.clientArea.NexiModel.gruppo != \"\") {\r\n formHtml += '';\r\n }\r\n formHtml += '
' + NexiForm;\r\n // formHtml += ' ';\r\n //replacing form with values from field because of security reasons - if somebody change html content\r\n var completeNexiForm = $(\"#completeNexiFormId\").html(formHtml);\r\n $('#nexiForm').submit();\r\n };\r\n ChildComponent.prototype.setMessagesAsRead = function (orderId) {\r\n var userId = this.authService.GetUserId();\r\n var params = {\r\n CustomerId: userId.toString(),\r\n OrderId: orderId.toString(),\r\n Lang: this.lang\r\n };\r\n this.messagesService.setMessagesAsRead(params);\r\n };\r\n ChildComponent.prototype.showModal = function () {\r\n $(\"#confirmModal\").modal(\"show\");\r\n };\r\n ChildComponent.prototype.hideModal = function () {\r\n $('#confirmModal').modal('hide');\r\n };\r\n //Canceling of orders with status in coda\r\n ChildComponent.prototype.cancelOrders = function () {\r\n var _this = this;\r\n var userId = this.userId;\r\n var cancelOrdSub = this.clientAreaService.cancelOrders(userId, orderId)\r\n .subscribe(function (response) {\r\n if (response == true) {\r\n _this.clientArea.Status = 4;\r\n }\r\n });\r\n this.subManager.add(cancelOrdSub);\r\n this.hideModal();\r\n };\r\n ChildComponent.prototype.isDisabled = function (form) {\r\n var res = false;\r\n if (form.valid && this.model.ProcessOrder !== \"\") {\r\n return true;\r\n }\r\n else {\r\n return res;\r\n }\r\n };\r\n //sending of the message from the order details order\r\n ChildComponent.prototype.processMessage = function () {\r\n var _this = this;\r\n this.showSpinnerClick = true;\r\n var postMessageSub = this.clientAreaService.postClientAreaSendProcessOrderMessageint(this.userId, orderId, parseInt(this.model.ProcessOrder), this.clientArea.OrderNumber, this.clientArea.UserCreated, this.model.processingSubject, this.model.Description, this.lang)\r\n .subscribe(function (result) {\r\n if (_this.clientArea.OrderProcessMessageList == undefined || _this.clientArea.OrderProcessMessageList == null) {\r\n _this.clientArea.OrderProcessMessageList = [];\r\n }\r\n _this.clientArea.OrderProcessMessageList.push(new client_area_2.ClientAreaOrderProcessMessages(), { \"CreatedBy\": _this.clientArea.UserCreated, \"StringDateCreated\": result, \"Description\": _this.model.Description, \"From\": 2, \"Subject\": _this.model.processingSubject });\r\n _this.noMessages = false;\r\n _this.checkValues = false;\r\n _this.model.ProcessOrder = \"\";\r\n _this.model.processingSubject = \"\";\r\n _this.model.Description = \"\";\r\n _this.showSpinnerClick = false;\r\n });\r\n this.subManager.add(postMessageSub);\r\n };\r\n ChildComponent.prototype.refreshProcessFiles = function (process) {\r\n var processFilesSub = this.clientAreaService.getProcessOrderFiles(process.Id, orderId).subscribe(function (result) {\r\n result.ListOfFiles.forEach(function (element) {\r\n if (element.Size.endsWith(\"byte\")) {\r\n element.Size = element.Size.substring(0, element.Size.length - 3);\r\n }\r\n });\r\n process.FileState = result.FileState;\r\n process.Files = result.ListOfFiles;\r\n });\r\n this.subManager.add(processFilesSub);\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: template.TemplateHtml\r\n }),\r\n __param(4, core_1.Inject('CookieService')),\r\n __param(9, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _f) || Object, (typeof (_g = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _g) || Object, (typeof (_h = typeof platform_browser_1.DomSanitizer !== 'undefined' && platform_browser_1.DomSanitizer) === 'function' && _h) || Object, (typeof (_j = typeof messages_service_1.MessagesService !== 'undefined' && messages_service_1.MessagesService) === 'function' && _j) || Object, Boolean, (typeof (_k = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _k) || Object, (typeof (_l = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _l) || Object, (typeof (_m = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _m) || Object, (typeof (_o = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _o) || Object, (typeof (_p = typeof paypal_service_1.PaypalService !== 'undefined' && paypal_service_1.PaypalService) === 'function' && _p) || Object, (typeof (_q = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _q) || Object, (typeof (_r = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _r) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;\r\n }());\r\n return ChildComponent;\r\n };\r\n ClientAreaOrderDetailsComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(9, core_1.Inject('isBrowser')),\r\n __param(12, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, (typeof (_h = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _h) || Object, (typeof (_j = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _j) || Object, Boolean, (typeof (_k = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _k) || Object, (typeof (_l = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _l) || Object, Object])\r\n ], ClientAreaOrderDetailsComponent);\r\n return ClientAreaOrderDetailsComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\r\n}());\r\nexports.ClientAreaOrderDetailsComponent = ClientAreaOrderDetailsComponent;\r\n\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(87);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar ComponentHelperService = (function () {\r\n function ComponentHelperService(cache) {\r\n this.cache = cache;\r\n }\r\n //Inject a component in the viewContainer\r\n ComponentHelperService.prototype.injectComponent = function (compiler, containterRef, componentToInject) {\r\n var _this = this;\r\n var DynamicModule = (function () {\r\n function DynamicModule() {\r\n }\r\n DynamicModule = __decorate([\r\n core_1.NgModule({\r\n imports: [shared_module_1.SharedModule],\r\n declarations: [componentToInject]\r\n }), \r\n __metadata('design:paramtypes', [])\r\n ], DynamicModule);\r\n return DynamicModule;\r\n }());\r\n compiler.compileModuleAndAllComponentsAsync(DynamicModule)\r\n .then(function (moduleWithFactories) {\r\n _this.compFactory = moduleWithFactories.componentFactories.find(function (x) { return x.componentType === componentToInject; });\r\n //from v5 - slow and brings in a lot of code. This line of code affects ram performance negatively\r\n //https://angular.io/api/core/ReflectiveInjector\r\n //const injector = ReflectiveInjector.fromResolvedProviders([], containterRef.parentInjector);\r\n //Clearing current content before injecting new one\r\n // containterRef.clear();\r\n //containterRef.createComponent(compFactory, 0, injector);\r\n _this.cmpRef = containterRef.createComponent(_this.compFactory, 0);\r\n compiler.clearCache();\r\n moduleWithFactories = null;\r\n });\r\n };\r\n ComponentHelperService.prototype.clearMemory = function () {\r\n if (this.cmpRef) {\r\n this.cmpRef.destroy();\r\n }\r\n this.compFactory = null;\r\n this.cache.clearAll();\r\n };\r\n ComponentHelperService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _a) || Object])\r\n ], ComponentHelperService);\r\n return ComponentHelperService;\r\n var _a;\r\n}());\r\nexports.ComponentHelperService = ComponentHelperService;\r\n\n\n/***/ }),\n\n/***/ 400:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar script_service_1 = __webpack_require__(16);\r\nvar validation_service_1 = __webpack_require__(133);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar client_area_service_1 = __webpack_require__(74);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(13);\r\n//Models\r\nvar client_area_1 = __webpack_require__(99);\r\nvar client_area_2 = __webpack_require__(99);\r\nvar register_1 = __webpack_require__(252);\r\nvar company_1 = __webpack_require__(253);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar ClientAreaProfileComponent = (function () {\r\n function ClientAreaProfileComponent(_compiler, componentHelper, _elementRef, clientAreaService, router, authService, cmsComponentService, isBrowser, seo, renderer, document) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.clientAreaService = clientAreaService;\r\n this.router = router;\r\n this.authService = authService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.authentication = this.authService.GetData();\r\n this.userId = this.authService.GetUserId();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ClientAreaProfileComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.authService.GetData().isAuthenticated) {\r\n this.router.navigate([\"\"]);\r\n }\r\n var templateHtmlUserProfile;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var userProfileSub = this.clientAreaService.getUserAreaProfile(this.userId).subscribe(function (result) {\r\n templateHtmlUserProfile = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(templateHtmlUserProfile, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(userProfileSub);\r\n };\r\n ClientAreaProfileComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ClientAreaProfileComponent.prototype.createSubComponent = function (userProfile, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(clientAreaService, languageService, authService, routesService, isBrowser, seoService, breadcrumbsService, validationService, scriptService) {\r\n this.clientAreaService = clientAreaService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.routesService = routesService;\r\n this.isBrowser = isBrowser;\r\n this.seoService = seoService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.validationService = validationService;\r\n this.scriptService = scriptService;\r\n this.onCreate = new core_1.EventEmitter();\r\n this.model = {\r\n UserId: 0,\r\n Address: \"\",\r\n City: \"\",\r\n Prov: \"\",\r\n Cap: \"\",\r\n CompanyName: \"\",\r\n Piva: \"\",\r\n TaxCode: \"\",\r\n Name: \"\",\r\n SubName: \"\",\r\n Telephone: \"\",\r\n Mobile: \"\",\r\n CF: \"\",\r\n PecEmail: \"\",\r\n CodiceDestinatario: \"\",\r\n CurrentPassword: \"\",\r\n Password: \"\",\r\n PasswordRepeat: \"\",\r\n AddressRadio: \"\",\r\n Language: \"\",\r\n AddressNumber: \"\",\r\n DefaultAddress: 999999\r\n };\r\n this.modelAddAndRemoveAddress = {\r\n UserId: \"\",\r\n AddressId: \"\"\r\n };\r\n this.footerData = userProfile.footerData;\r\n this.headerData = header;\r\n this.clientAreaProfile = new client_area_1.ClientAreaUserProfile();\r\n this.addresses = [];\r\n this.clientAddress = new client_area_2.ClientAreaUserAddress();\r\n this.company = new company_1.Company();\r\n this.register = new register_1.Register();\r\n this.authentication = this.authService.GetData();\r\n this.isExist = [];\r\n this.pageIsInit = false;\r\n this.userId = this.authService.GetUserId();\r\n this.decryptedUserId = this.authService.GetDecryptedUserId();\r\n this.user = userProfile.ClientAreaUserProfile;\r\n this.userGroup = this.user.UserGroup;\r\n this.showSpinnerClick = false;\r\n //checking if invoices module is active\r\n this.isActiveInvoicesModule = userProfile.isActiveInvoicesModule;\r\n this.breadcrumbs = userProfile.BreadcrumbsInfo;\r\n this.pageIsOnDestroy = false;\r\n this.areaClientiHome = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n this.areaClientiOrdini = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n this.areaChangeProfile = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n this.areaClientiInvoices = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n this.clientAreaProfile = this.user;\r\n //spliting address street and number\r\n var address = this.clientAreaProfile.Address;\r\n var lastIndex = -1;\r\n if (address) {\r\n lastIndex = address.lastIndexOf(\" \");\r\n }\r\n var addressStreet = \"\";\r\n var addressNumber = \"\";\r\n if (lastIndex > -1) {\r\n addressStreet = address.slice(0, lastIndex);\r\n addressNumber = address.slice(lastIndex, address.length).trim();\r\n }\r\n this.model.CompanyName = this.user.CompanyName;\r\n this.model.Piva = this.user.Piva;\r\n this.model.TaxCode = this.user.TaxCode;\r\n this.model.Name = this.user.ContactFirstName;\r\n this.model.SubName = this.user.ContactLastName;\r\n this.model.Address = addressStreet;\r\n this.model.AddressNumber = addressNumber;\r\n this.model.City = this.user.City;\r\n this.model.Prov = this.user.AreaCode;\r\n this.model.Cap = this.user.ZipCode;\r\n this.model.Telephone = this.user.ContactPhone;\r\n this.model.DefaultAddress = this.user.DefaultAddressId;\r\n this.model.Mobile = this.user.ContactMobile;\r\n this.model.PecEmail = this.user.PecEmail;\r\n this.model.CodiceDestinatario = this.user.CodiceDestinatario;\r\n this.id1 = this.user.DefaultAddressId;\r\n for (var key in this.clientAreaProfile.Addresses) {\r\n this.isExist[this.clientAreaProfile.Addresses[key].AddressId] = true;\r\n }\r\n // if user group is 4, pec email and cod. destinatario are not required\r\n if (this.userGroup == 4) {\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n if (userProfile.isActiveAddressVerificationModule) {\r\n var addressVerificationKey = userProfile.AddressVerificationCode;\r\n if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n this.addAddressVerificationScripts(addressVerificationKey);\r\n $(\"#Cap\").prop('disabled', true);\r\n }\r\n }\r\n else {\r\n $(\"#Cap\").prop('disabled', false);\r\n }\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.isCodDestRequired = function () {\r\n var retVal = false;\r\n if (this.userGroup != \"4\") {\r\n if (this.model.PecEmail == \"\" || this.model.PecEmail == undefined) {\r\n retVal = true;\r\n }\r\n }\r\n return retVal;\r\n };\r\n ChildComponent.prototype.isPecEmailRequired = function () {\r\n var retVal = false;\r\n if (this.userGroup != \"4\") {\r\n if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n retVal = true;\r\n }\r\n }\r\n return retVal;\r\n };\r\n //adding all scripts and elements connected to address verification feature \r\n ChildComponent.prototype.addAddressVerificationScripts = function (addressKey) {\r\n var suggest = \"\";\r\n var address = \"\";\r\n var jquery = \"\";\r\n $('body > universal-script').before(suggest);\r\n $('body > universal-script').before(jquery);\r\n $('body > universal-script').before(address);\r\n };\r\n //removing all scripts and elements connected to address verification feature \r\n ChildComponent.prototype.removeAddressVerificationScripts = function (addressKey) {\r\n $(\"#suggestId\").remove();\r\n $(\"#jqueryuicss\").remove();\r\n $(\"#jqueryuijs\").remove();\r\n $(\"#suggestcss\").remove();\r\n $(\"#initui\").remove();\r\n $(\"#inituicf\").remove();\r\n $(\"#ui-id-1\").remove();\r\n $(\"#ui-id-2\").remove();\r\n $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n $(\"#jqueryId\").remove();\r\n $(\"#addressVerificationId\").remove();\r\n };\r\n ChildComponent.prototype.checkAddressValidation = function () {\r\n this.model.Prov = $(\"#Prov\").val();\r\n this.model.Cap = $(\"#Cap\").val();\r\n this.model.City = $(\"#City\").val();\r\n };\r\n //validation of phone numbers, disable writing any characters in input except of numbers\r\n ChildComponent.prototype.validatePhone = function (event) {\r\n this.validationService.validatePhoneNumber(event);\r\n };\r\n ChildComponent.prototype.setAddressValue = function () {\r\n var streetTypeId = $(\"#streetTypeId\").val();\r\n var street = $(\"#Address\").val();\r\n if (streetTypeId != null && streetTypeId != \"\") {\r\n this.model.Address = streetTypeId + \" \" + street;\r\n }\r\n else {\r\n this.model.Address = street;\r\n }\r\n var cap = $(\"#Cap\").val();\r\n this.model.Cap = cap;\r\n };\r\n ChildComponent.prototype.changeUserProfile = function (valid, model) {\r\n var _this = this;\r\n model.UserId = this.authService.GetUserId();\r\n var street = this.model.Address;\r\n //concating of address street and number to one model field\r\n this.model.Address = this.model.Address + \" \" + this.model.AddressNumber.replace(/\\s/g, \"\");\r\n this.showSpinnerClick = true;\r\n var updateProfileSub = this.clientAreaService.updateUserProfile(model).subscribe(function (result) {\r\n if (result) {\r\n // show success message\r\n _this.updateSuccessful = true;\r\n _this.updateFailed = false;\r\n }\r\n else {\r\n // show error message\r\n _this.updateSuccessful = false;\r\n _this.updateFailed = true;\r\n }\r\n _this.model.Address = street;\r\n _this.showSpinnerClick = false;\r\n });\r\n this.subManager.add(updateProfileSub);\r\n };\r\n ;\r\n ChildComponent.prototype.showModal = function (index, item) {\r\n $(\"#editProfileModal\").modal(\"show\");\r\n this.index = index;\r\n this.item = item;\r\n };\r\n ChildComponent.prototype.hideModal = function () {\r\n $('#editProfileModal').modal('hide');\r\n };\r\n ChildComponent.prototype.addNewAddress = function () {\r\n var _this = this;\r\n this.modelAddAndRemoveAddress.UserId = this.userId;\r\n var newAddressSub = this.clientAreaService.addNewAddress(this.modelAddAndRemoveAddress).subscribe(function (result) {\r\n _this.clientAreaProfile.Addresses.push(result);\r\n var userProfileSub = _this.clientAreaService.getUserAreaProfile(_this.userId).subscribe(function (result) {\r\n _this.clientAreaProfile = result.ClientAreaUserProfile;\r\n _this.model.CompanyName = result.ClientAreaUserProfile.CompanyName;\r\n _this.model.Piva = result.ClientAreaUserProfile.Piva;\r\n _this.model.TaxCode = result.ClientAreaUserProfile.TaxCode;\r\n _this.model.Name = result.ClientAreaUserProfile.ContactFirstName;\r\n _this.model.SubName = result.ClientAreaUserProfile.ContactLastName;\r\n _this.model.Address = result.ClientAreaUserProfile.Address;\r\n _this.model.City = result.ClientAreaUserProfile.City;\r\n _this.model.Prov = result.ClientAreaUserProfile.AreaCode;\r\n _this.model.Cap = result.ClientAreaUserProfile.ZipCode;\r\n _this.model.Telephone = result.ClientAreaUserProfile.ContactPhone;\r\n _this.model.DefaultAddress = result.ClientAreaUserProfile.DefaultAddressId;\r\n _this.model.Mobile = result.ClientAreaUserProfile.ContactMobile;\r\n _this.model.PecEmail = result.ClientAreaUserProfile.PecEmail;\r\n _this.model.CodiceDestinatario = result.ClientAreaUserProfile.CodiceDestinatario;\r\n _this.id1 = result.ClientAreaUserProfile.DefaultAddressId;\r\n for (var key in _this.clientAreaProfile.Addresses) {\r\n _this.isExist[_this.clientAreaProfile.Addresses[key].AddressId] = true;\r\n }\r\n });\r\n _this.subManager.add(userProfileSub);\r\n });\r\n this.subManager.add(newAddressSub);\r\n };\r\n ChildComponent.prototype.SubmitPassword = function (model) {\r\n var _this = this;\r\n model.UserId = this.userId;\r\n this.showSpinnerClick = true;\r\n var updatePassSub = this.clientAreaService.updateUserPassword(model).subscribe(function (result) {\r\n if (result == true) {\r\n _this.changePasswordSuccessful = true;\r\n _this.changePasswordFailed = false;\r\n }\r\n else {\r\n // show error message\r\n _this.changePasswordSuccessful = false;\r\n _this.changePasswordFailed = true;\r\n }\r\n _this.showSpinnerClick = false;\r\n });\r\n this.subManager.add(updatePassSub);\r\n };\r\n ChildComponent.prototype.setDefaultAddress = function (index, item) {\r\n this.clientAreaProfile.DefaultAddressId = 0;\r\n for (var _i = 0, _a = this.clientAreaProfile.Addresses; _i < _a.length; _i++) {\r\n var address = _a[_i];\r\n if (address.AddressId === this.clientAreaProfile.Addresses[index].AddressId) {\r\n this.clientAreaProfile.DefaultAddressId = address.AddressId;\r\n }\r\n this.id1 = this.clientAreaProfile.DefaultAddressId;\r\n }\r\n };\r\n ;\r\n ChildComponent.prototype.resetAddress = function () {\r\n for (var _i = 0, _a = this.clientAreaProfile.Addresses; _i < _a.length; _i++) {\r\n var address = _a[_i];\r\n this.clientAreaProfile.DefaultAddressId = 0;\r\n this.id1 = 0;\r\n }\r\n ;\r\n };\r\n ;\r\n ChildComponent.prototype.updateUserAddresses = function (model, valid, item) {\r\n var _this = this;\r\n this.showSpinnerClick = true;\r\n var updateAddressSub = this.clientAreaService.updateAddresses(this.clientAreaProfile.Addresses, this.userId, this.clientAreaProfile.DefaultAddressId)\r\n .subscribe(function (result) {\r\n var defaultFound = false;\r\n if (result) {\r\n for (var _i = 0, _a = _this.clientAreaProfile.Addresses; _i < _a.length; _i++) {\r\n var address = _a[_i];\r\n if (_this.clientAreaProfile.DefaultAddressId > 0) {\r\n _this.clientAreaProfile.DefaultAddressId = address.AddressId;\r\n defaultFound = true;\r\n }\r\n }\r\n _this.updateAddressFailed = false;\r\n _this.updateAddressSuccessful = true;\r\n }\r\n else {\r\n _this.updateAddressFailed = true;\r\n _this.updateAddressSuccessful = false;\r\n }\r\n if (defaultFound == false) {\r\n _this.clientAreaProfile.DefaultAddressId = 0;\r\n }\r\n _this.showSpinnerClick = false;\r\n });\r\n this.subManager.add(updateAddressSub);\r\n };\r\n ;\r\n ChildComponent.prototype.removeAddress = function () {\r\n var _this = this;\r\n this.modelAddAndRemoveAddress.UserId = this.userId;\r\n this.modelAddAndRemoveAddress.AddressId = this.item.AddressId;\r\n var removeAddressSub = this.clientAreaService.removeAddress(this.modelAddAndRemoveAddress).subscribe(function (result) {\r\n _this.clientAreaProfile.Addresses.splice(_this.index, 1);\r\n try {\r\n _this.isExist[_this.item.AddressId] = false;\r\n _this.model.DefaultAddress = 0;\r\n _this.id1 = 0;\r\n _this.resetAddress();\r\n _this.hideModal();\r\n }\r\n catch (exception) { }\r\n });\r\n this.subManager.add(removeAddressSub);\r\n };\r\n ;\r\n ChildComponent.prototype.isDisabled = function (form) {\r\n var res = false;\r\n if (form.valid && this.model.Password.length >= 4 && this.model.Password.length <= 10 && this.model.Password == this.model.PasswordRepeat) {\r\n return true;\r\n }\r\n else {\r\n return res;\r\n }\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n if (!this.isBrowser || this.pageIsOnDestroy) {\r\n return;\r\n }\r\n //this method is removing all scripts and elements connected to address verification feature\r\n var addressVerificationKey = userProfile.AddressVerificationCode;\r\n this.removeAddressVerificationScripts(addressVerificationKey);\r\n this.subManager.unsubscribe();\r\n this.pageIsOnDestroy = true;\r\n };\r\n __decorate([\r\n core_1.Output(), \r\n __metadata('design:type', Object)\r\n ], ChildComponent.prototype, \"onCreate\", void 0);\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: userProfile.TemplateHtml\r\n }),\r\n __param(4, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _e) || Object, (typeof (_f = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _f) || Object, (typeof (_g = typeof validation_service_1.ValidationService !== 'undefined' && validation_service_1.ValidationService) === 'function' && _g) || Object, (typeof (_h = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _h) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n }());\r\n return ChildComponent;\r\n };\r\n ClientAreaProfileComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(7, core_1.Inject('isBrowser')),\r\n __param(10, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof client_area_service_1.ClientAreaService !== 'undefined' && client_area_service_1.ClientAreaService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _h) || Object, (typeof (_j = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _j) || Object, Object])\r\n ], ClientAreaProfileComponent);\r\n return ClientAreaProfileComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.ClientAreaProfileComponent = ClientAreaProfileComponent;\r\n\n\n/***/ }),\n\n/***/ 401:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(13);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar md5_1 = __webpack_require__(279);\r\nvar order_payment_service_1 = __webpack_require__(256);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar PaymentConfirmationComponent = (function () {\r\n function PaymentConfirmationComponent(_compiler, componentHelper, _elementRef, templateService, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.templateService = templateService;\r\n this.route = route;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.data = {};\r\n this.subManager = new Subscription_1.Subscription();\r\n this.paramsObj = {};\r\n this.isNewPaypalImplementation = false;\r\n }\r\n PaymentConfirmationComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var id = '0';\r\n var orderCheckout;\r\n var paramsSub = this.route.params.subscribe(function (params) {\r\n id = params['orderid'] || 0;\r\n });\r\n var sub = this.route\r\n .queryParams\r\n .subscribe(function (params) {\r\n if (id == '0') {\r\n id = params['orderId'] ? md5_1.Md5.hashStr(params['orderId']).toString() : '0';\r\n _this.isNewPaypalImplementation = true;\r\n }\r\n else {\r\n _this.isNewPaypalImplementation = false;\r\n }\r\n _this.paramsObj = params;\r\n });\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var thankYouSub = this.templateService.getThankYouPagePaypalInfo(\"orderCheckoutPageTemplate\", id).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n orderCheckout = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(orderCheckout, _this.paramsObj, _this.isNewPaypalImplementation, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n var typeId = '';\r\n //-- Get Payment Confirmation row id + '_' + orderId, so we can use it for getting scripts\r\n if (_this.isNewPaypalImplementation) {\r\n var OrderId = _this.paramsObj['orderId'];\r\n typeId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.ThankYouPagePaypalId, OrderId);\r\n }\r\n else {\r\n typeId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.ThankYouPagePaypalId, id);\r\n }\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, typeId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(paramsSub);\r\n this.subManager.add(sub);\r\n this.subManager.add(thankYouSub);\r\n };\r\n PaymentConfirmationComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n //Creates component to inject\r\n PaymentConfirmationComponent.prototype.createSubComponent = function (orderCheckout, urlParams, isNewPaypalImplementation, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(routesService, seoService, _elementRef, scriptService, isBrowser, activatedRoute, languageService, orderPaymentService, route) {\r\n this.routesService = routesService;\r\n this.seoService = seoService;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.isBrowser = isBrowser;\r\n this.activatedRoute = activatedRoute;\r\n this.languageService = languageService;\r\n this.orderPaymentService = orderPaymentService;\r\n this.route = route;\r\n this.success = false;\r\n this.failed = false;\r\n this.serverError = false;\r\n this.seoInfo = orderCheckout.SeoInformation;\r\n this.pageIsInit = false;\r\n this.subManager = new Subscription_1.Subscription();\r\n this.createScript = 0;\r\n this.footerData = orderCheckout.FooterData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (this.isBrowser == false) {\r\n return;\r\n }\r\n //-- If paypal payment is implemented on new way, at this point, the order is already set as paid, else we need to set it\r\n if (isNewPaypalImplementation) {\r\n this.orderId = urlParams['orderId'];\r\n if (urlParams.isError.toLowerCase() === 'true') {\r\n this.failed = true;\r\n this.success = false;\r\n this.serverError = false;\r\n this.createScript = -1;\r\n }\r\n else {\r\n this.failed = false;\r\n this.success = true;\r\n this.serverError = false;\r\n this.createScript = 1;\r\n }\r\n }\r\n else {\r\n var sub = this.route.queryParams.subscribe(function (parameters) {\r\n _this.orderId = parameters['item_number'] || 0;\r\n _this.hashedOrderId = md5_1.Md5.hashStr(_this.orderId);\r\n var paramsRouteSub = _this.activatedRoute.params.subscribe(function (params) {\r\n _this.encryptedOrder = params['orderid'] || 0;\r\n });\r\n _this.subManager.add(paramsRouteSub);\r\n //Checking of order and set it as paid\r\n if (parameters['st'] == \"Completed\" && _this.encryptedOrder == _this.hashedOrderId) {\r\n _this.setOrderAsPaid();\r\n }\r\n else {\r\n _this.failed = true;\r\n _this.success = false;\r\n }\r\n });\r\n }\r\n };\r\n ChildComponent.prototype.setOrderAsPaid = function () {\r\n var _this = this;\r\n var orderPaySub = this.orderPaymentService.setOrderAsPayed(this.orderId)\r\n .subscribe(function (result) {\r\n if (result == 1) {\r\n _this.success = true;\r\n _this.failed = false;\r\n _this.serverError = false;\r\n _this.createScript = 1;\r\n }\r\n else if (result == -1) {\r\n _this.success = false;\r\n _this.failed = true;\r\n _this.serverError = false;\r\n _this.createScript = -1;\r\n }\r\n else {\r\n _this.success = false;\r\n _this.failed = false;\r\n _this.serverError = true;\r\n _this.createScript = -1;\r\n }\r\n });\r\n this.subManager.add(orderPaySub);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: orderCheckout.TemplateHtml\r\n }),\r\n __param(4, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof order_payment_service_1.OrderPaymentService !== 'undefined' && order_payment_service_1.OrderPaymentService) === 'function' && _g) || Object, (typeof (_h = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _h) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n }());\r\n return ChildComponent;\r\n };\r\n PaymentConfirmationComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: ''\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], PaymentConfirmationComponent);\r\n return PaymentConfirmationComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PaymentConfirmationComponent = PaymentConfirmationComponent;\r\n\n\n/***/ }),\n\n/***/ 402:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n//System\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(13);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar PaymentNexiConfirmationComponent = (function () {\r\n function PaymentNexiConfirmationComponent(_compiler, componentHelper, _elementRef, templateService, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.templateService = templateService;\r\n this.route = route;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.data = {};\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n PaymentNexiConfirmationComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var id = 0;\r\n var messaggio = \"\";\r\n var data = \"\";\r\n var orario = \"\";\r\n var paramsSub = this.route.queryParams.subscribe(function (params) {\r\n id = params['orderid'];\r\n messaggio = params['messaggio'];\r\n data = params['data'];\r\n orario = params['orario'];\r\n });\r\n this.subManager.add(paramsSub);\r\n var orderCheckout;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var thankYouSub = this.templateService.getThankYouNexiInfo(\"ordernexiPageTemplate\", id, messaggio, data, orario).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n orderCheckout = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(orderCheckout, id, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n var typeId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.ThankYouNexiId, id);\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, typeId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(thankYouSub);\r\n };\r\n PaymentNexiConfirmationComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n //Creates component to inject\r\n PaymentNexiConfirmationComponent.prototype.createSubComponent = function (orderCheckout, OrderId, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(routesService, seoService, _elementRef, scriptService, isBrowser, activatedRoute, languageService, translate) {\r\n this.routesService = routesService;\r\n this.seoService = seoService;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.isBrowser = isBrowser;\r\n this.activatedRoute = activatedRoute;\r\n this.languageService = languageService;\r\n this.translate = translate;\r\n this.success = false;\r\n this.errorMessage = \"\";\r\n this.failed = false;\r\n this.serverError = false;\r\n this.orderId = OrderId;\r\n this.seoInfo = orderCheckout.SeoInformation;\r\n this.pageIsInit = false;\r\n this.createScript = 0;\r\n this.subManager = new Subscription_1.Subscription();\r\n this.footerData = orderCheckout.FooterData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n if (this.isBrowser == false) {\r\n return;\r\n }\r\n if (orderCheckout.result == false) {\r\n this.success = false;\r\n this.failed = true;\r\n this.serverError = false;\r\n this.errorMessage = this.getLabel('impossibile_pagare_ordine');\r\n this.createScript = -1;\r\n }\r\n else {\r\n this.success = true;\r\n this.failed = false;\r\n this.serverError = false;\r\n this.createScript = 1;\r\n }\r\n };\r\n ChildComponent.prototype.getLabel = function (label) {\r\n var message;\r\n this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n return message;\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n //Eventually retrieving the script to append\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: orderCheckout.TemplateHtml\r\n }),\r\n __param(4, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _g) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n }());\r\n return ChildComponent;\r\n };\r\n PaymentNexiConfirmationComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: ''\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], PaymentNexiConfirmationComponent);\r\n return PaymentNexiConfirmationComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PaymentNexiConfirmationComponent = PaymentNexiConfirmationComponent;\r\n\n\n/***/ }),\n\n/***/ 403:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n//System\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar router_1 = __webpack_require__(13);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar order_payment_service_1 = __webpack_require__(256);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar PaymentUnicreditConfirmationComponent = (function () {\r\n function PaymentUnicreditConfirmationComponent(_compiler, componentHelper, _elementRef, templateService, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.templateService = templateService;\r\n this.route = route;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.data = {};\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n PaymentUnicreditConfirmationComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var id = 0;\r\n var paramsSub = this.route.params.subscribe(function (params) {\r\n id = params['orderid'];\r\n });\r\n this.subManager.add(paramsSub);\r\n var orderCheckout;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n //console.log(\"sono qui\")\r\n var thankYouSub = this.templateService.getThankYouPagOnlineInfo(\"orderUnicreditPageTemplate\", id).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n orderCheckout = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(orderCheckout, id, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n var typeId = _this.scriptService.getSystemPageRowId_OrderId(_this.scriptService.ThankYouPagePagOnlineId, id);\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, typeId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(thankYouSub);\r\n };\r\n PaymentUnicreditConfirmationComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n //Creates component to inject\r\n PaymentUnicreditConfirmationComponent.prototype.createSubComponent = function (orderCheckout, OrderId, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(routesService, seoService, _elementRef, scriptService, isBrowser, activatedRoute, languageService, translate, orderPaymentService) {\r\n this.routesService = routesService;\r\n this.seoService = seoService;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.isBrowser = isBrowser;\r\n this.activatedRoute = activatedRoute;\r\n this.languageService = languageService;\r\n this.translate = translate;\r\n this.orderPaymentService = orderPaymentService;\r\n this.success = false;\r\n this.errorMessage = \"\";\r\n this.failed = false;\r\n this.serverError = false;\r\n this.orderId = OrderId;\r\n this.seoInfo = orderCheckout.SeoInformation;\r\n this.pageIsInit = false;\r\n this.createScript = 0;\r\n this.subManager = new Subscription_1.Subscription();\r\n this.footerData = orderCheckout.FooterData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (this.isBrowser == false) {\r\n return;\r\n }\r\n if (this.orderId == -1) {\r\n this.success = false;\r\n this.failed = true;\r\n this.serverError = false;\r\n this.errorMessage = this.getLabel('impossibile_pagare_ordine');\r\n this.createScript = -1;\r\n }\r\n else {\r\n //setting order as paid \r\n var checkPaymentSub = this.orderPaymentService.CheckIsOrderPayedUnicredit(this.orderId)\r\n .subscribe(function (result) {\r\n var res = result.split(\"|\");\r\n if (res[0] == \"1\") {\r\n _this.success = true;\r\n _this.failed = false;\r\n _this.serverError = false;\r\n _this.createScript = 1;\r\n }\r\n else if (res[0] == \"-1\") {\r\n _this.success = false;\r\n _this.failed = true;\r\n _this.serverError = false;\r\n _this.errorMessage = res[1];\r\n _this.createScript = -1;\r\n }\r\n else {\r\n _this.success = false;\r\n _this.failed = false;\r\n _this.serverError = true;\r\n _this.errorMessage = res[1];\r\n _this.createScript = -1;\r\n }\r\n });\r\n this.subManager.add(checkPaymentSub);\r\n }\r\n };\r\n ChildComponent.prototype.getLabel = function (label) {\r\n var message;\r\n this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n return message;\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n //Eventually retrieving the script to append\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: orderCheckout.TemplateHtml\r\n }),\r\n __param(4, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, (typeof (_g = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _g) || Object, (typeof (_h = typeof order_payment_service_1.OrderPaymentService !== 'undefined' && order_payment_service_1.OrderPaymentService) === 'function' && _h) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n }());\r\n return ChildComponent;\r\n };\r\n PaymentUnicreditConfirmationComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: ''\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], PaymentUnicreditConfirmationComponent);\r\n return PaymentUnicreditConfirmationComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.PaymentUnicreditConfirmationComponent = PaymentUnicreditConfirmationComponent;\r\n\n\n/***/ }),\n\n/***/ 404:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar user_login_1 = __webpack_require__(72);\r\nvar validation_service_1 = __webpack_require__(133);\r\nvar login_service_1 = __webpack_require__(178);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar check_existence_service_1 = __webpack_require__(255);\r\nvar rxjs_1 = __webpack_require__(265);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar router_1 = __webpack_require__(13);\r\nvar register_1 = __webpack_require__(252);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar configuration_service_1 = __webpack_require__(258);\r\nvar company_service_1 = __webpack_require__(131);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar header_service_1 = __webpack_require__(129);\r\nvar company_1 = __webpack_require__(253);\r\nvar QuickRegistrationComponent = (function () {\r\n function QuickRegistrationComponent(_compiler, componentHelper, _elementRef, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.isBrowser = isBrowser;\r\n }\r\n QuickRegistrationComponent.prototype.ngOnInit = function () {\r\n if (!this.isBrowser)\r\n return;\r\n if (this.parentWidgetData != null) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = this.createSubComponent(this.parentWidgetData, this.companyInfo);\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n };\r\n QuickRegistrationComponent.prototype.createSubComponent = function (quickRegistrationData, companyInfo) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(isBrowser, loginService, checkExists, router, routesService, activeRoute, languageService, companyService, configurationService, cookie, validationService, authService, headerService) {\r\n this.isBrowser = isBrowser;\r\n this.loginService = loginService;\r\n this.checkExists = checkExists;\r\n this.router = router;\r\n this.routesService = routesService;\r\n this.activeRoute = activeRoute;\r\n this.languageService = languageService;\r\n this.companyService = companyService;\r\n this.configurationService = configurationService;\r\n this.cookie = cookie;\r\n this.validationService = validationService;\r\n this.authService = authService;\r\n this.headerService = headerService;\r\n this.pageIsInit = false;\r\n //-- Email controls\r\n this.isEmailValid = false;\r\n this.emailExists = false;\r\n //-- Partita iva controls\r\n this.isPivaValid = false;\r\n this.pivaExists = false;\r\n //-- Codice Fiscale controls\r\n this.isCFValid = false;\r\n this.CFExists = false;\r\n this.pageFrom = \"\";\r\n this.load = false;\r\n this.subManager = new rxjs_1.Subscription();\r\n this.modelRegistration = new register_1.QuickRegister();\r\n this.lang = this.languageService.getLongLang();\r\n this.company = companyInfo;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var paramsSub = this.activeRoute.params.subscribe(function (params) {\r\n var paramPageFrom = params['pagefrom'];\r\n if (paramPageFrom !== undefined) {\r\n _this.pageFrom = paramPageFrom;\r\n }\r\n });\r\n this.subManager.add(paramsSub);\r\n //-- Get configuration from server\r\n this.setConfiguration();\r\n };\r\n ChildComponent.prototype.finishQuickRegistration = function () {\r\n var _this = this;\r\n this.load = true;\r\n //-- After submiting form, we are disabling a button until we get a response\r\n this.submitButton.nativeElement.disabled = true;\r\n var quickRegisterUserObj = this.setQuickRegisterObject();\r\n //-- Save quick registration user info in cookies so we can reuse it later\r\n this.cookie.putObject(\"QuickRegisterUser\", quickRegisterUserObj);\r\n var isQuickRegister = true;\r\n this.cookie.put('IsQuickRegistered', isQuickRegister.toString());\r\n var sendInfoSub = this.loginService.quickRegister(this.modelRegistration)\r\n .subscribe(function (response) {\r\n _this.load = false;\r\n _this.hideModalQuickRegistration();\r\n if (response.Id_User_Dettail > 0 && response.Active) {\r\n var name = response.Name ? response.Name : response.Email;\r\n _this.authService.Login(response.Id_User_Dettail, name);\r\n }\r\n if (response.IsCompletedRegistration == false) {\r\n if (response.Active) {\r\n var user = new user_login_1.UserLogin();\r\n user.isAuthenticated = true;\r\n user.username = response.Name ? response.Name : response.Email;\r\n //-- Call service to update header info, to set a logged in user\r\n _this.headerService.setLoggedInUser(user);\r\n //-- Hide quick registration component even after user is logged in, because we want to show an additional dialog modal\r\n _this.headerService.setToShowQuickRegistration(true);\r\n _this.showQuickRegistrationSuccessModal();\r\n }\r\n }\r\n else if (_this.pageFrom == \"cart\") {\r\n _this.router.navigate(_this.routesService.getRoutePath('CARRELLO'));\r\n }\r\n else {\r\n _this.router.navigate(_this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n }\r\n });\r\n this.subManager.add(sendInfoSub);\r\n };\r\n ChildComponent.prototype.setQuickRegisterObject = function () {\r\n var quickRegisterObj = {\r\n QuickEmailUser: this.modelRegistration.EmailRegister.trim(),\r\n QuickPartitaIva: this.modelRegistration.PartitaIva.trim(),\r\n QuickCodiceFiscale: this.modelRegistration.CodiceFiscale.trim(),\r\n QuickClientType: this.modelRegistration.CustomerGroup.trim(),\r\n QuickTelephone: this.modelRegistration.Telephone.trim(),\r\n };\r\n return quickRegisterObj;\r\n };\r\n ChildComponent.prototype.quickRegister = function () {\r\n if (this.isEmailValid) {\r\n this.hideModalQuickRegistrationEmail();\r\n this.showModalQuickRegistration();\r\n }\r\n };\r\n //-- Checking after changing of focus if the email entered in form already exists in database\r\n ChildComponent.prototype.checkEmail = function (form) {\r\n var _this = this;\r\n if (form.controls.EmailRegister.valid) {\r\n var checkEmailSub = this.checkExists.checkIfEmailExistsInDb(this.modelRegistration.EmailRegister)\r\n .subscribe(function (result) {\r\n if (result == 1) {\r\n _this.isEmailValid = true;\r\n _this.emailExists = false;\r\n }\r\n else {\r\n _this.isEmailValid = false;\r\n _this.emailExists = true;\r\n }\r\n });\r\n this.subManager.add(checkEmailSub);\r\n }\r\n else {\r\n this.isEmailValid = false;\r\n this.emailExists = false;\r\n }\r\n };\r\n //-- Checking after changing of focus if the partita iva entered in form already exists in database\r\n ChildComponent.prototype.checkPiva = function (field) {\r\n var _this = this;\r\n if (field.valid) {\r\n if (!field.value || !field.value.trim())\r\n return;\r\n this.checkExists.checkIfPartitaIvaExistsInDb(this.modelRegistration.PartitaIva)\r\n .subscribe(function (result) {\r\n if (result == 1) {\r\n _this.isPivaValid = true;\r\n _this.pivaExists = false;\r\n }\r\n else {\r\n if (_this.modelRegistration.CustomerGroup !== '7') {\r\n _this.isPivaValid = false;\r\n _this.pivaExists = true;\r\n }\r\n else {\r\n _this.isPivaValid = true;\r\n _this.pivaExists = false;\r\n }\r\n }\r\n });\r\n }\r\n else {\r\n if (this.modelRegistration.CustomerGroup !== '7') {\r\n this.isPivaValid = false;\r\n this.pivaExists = false;\r\n }\r\n else {\r\n this.isPivaValid = true;\r\n this.pivaExists = false;\r\n }\r\n }\r\n };\r\n //-- Checking after changing of focus if the codice fiscale entered in form already exists in database\r\n ChildComponent.prototype.checkCF = function (field) {\r\n var _this = this;\r\n if (!field.valid) {\r\n this.isPivaValid = false;\r\n this.pivaExists = false;\r\n }\r\n //-- Check if the CF already exists only when group is privato\r\n if (this.modelRegistration.CustomerGroup === '4') {\r\n if (field.valid) {\r\n this.checkExists.checkIfCodiceFiscaleExistsInDb(this.modelRegistration.CodiceFiscale)\r\n .subscribe(function (result) {\r\n {\r\n if (result == 1) {\r\n _this.isCFValid = true;\r\n _this.CFExists = false;\r\n }\r\n else {\r\n _this.isCFValid = false;\r\n _this.CFExists = true;\r\n }\r\n }\r\n });\r\n }\r\n }\r\n else {\r\n this.isCFValid = true;\r\n this.CFExists = false;\r\n }\r\n };\r\n //validation of phone numbers, disable writing any characters in input except of numbers\r\n ChildComponent.prototype.validatePhone = function (event) {\r\n this.validationService.validatePhoneNumber(event);\r\n };\r\n ChildComponent.prototype.setConfiguration = function () {\r\n var _this = this;\r\n this.configurationService.getConfiguration(this.lang).subscribe(function (resultConfiguration) {\r\n var companySub = _this.companyService.getCompany().subscribe(function (resultCompany) {\r\n {\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}').join(resultCompany.Name);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}').join(resultCompany.StreetAddress);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}').join(resultCompany.PostalCode);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}').join(resultCompany.City);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}').join(resultCompany.Province);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}').join(resultCompany.Phone);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}').join(resultCompany.Email);\r\n }\r\n }\r\n _this.configuration = resultConfiguration;\r\n });\r\n _this.subManager.add(companySub);\r\n });\r\n };\r\n ChildComponent.prototype.onCustomerGroupChange = function (value) {\r\n this.setValuesOnCustomerGroupChange();\r\n this.modelRegistration.CustomerGroup = value;\r\n if (this.modelRegistration.CustomerGroup == '4' || this.modelRegistration.CustomerGroup == '7') {\r\n this.isPivaValid = true;\r\n }\r\n else {\r\n this.isCFValid = true;\r\n }\r\n };\r\n ChildComponent.prototype.saveOldGroup = function () {\r\n this.oldGroup = this.modelRegistration.CustomerGroup;\r\n };\r\n ChildComponent.prototype.setValuesOnCustomerGroupChange = function () {\r\n this.modelRegistration = new register_1.QuickRegister(this.modelRegistration.EmailRegister, this.modelRegistration.EmailRepeat, this.modelRegistration.Password, this.modelRegistration.Telephone, this.modelRegistration.CustomerGroup, this.modelRegistration.CodiceFiscale, this.modelRegistration.PartitaIva, this.oldGroup);\r\n };\r\n ChildComponent.prototype.resetForm = function () {\r\n this.modelRegistration = new register_1.QuickRegister(this.modelRegistration.EmailRegister);\r\n };\r\n //-- Hiding and showing corresponding modals\r\n ChildComponent.prototype.showModalQuickRegistration = function () {\r\n this.showModal('quickRegistrationModal');\r\n };\r\n ChildComponent.prototype.hideModalQuickRegistration = function () {\r\n this.hideModal('quickRegistrationModal');\r\n this.modelRegistration.EmailRegister = '';\r\n this.resetForm();\r\n };\r\n ChildComponent.prototype.showModalQuickRegistrationEmail = function () {\r\n this.showModal('quickRegistrationEmailModal');\r\n };\r\n ChildComponent.prototype.showQuickRegistrationSuccessModal = function () {\r\n this.showModal('quickRegistrationSuccessModal');\r\n };\r\n ChildComponent.prototype.hideQuickRegistrationSuccessModal = function () {\r\n this.hideModal('quickRegistrationSuccessModal');\r\n //-- Hide quick registration component\r\n this.headerService.setToShowQuickRegistration(false);\r\n };\r\n ChildComponent.prototype.hideModalQuickRegistrationEmailAndResetEmail = function () {\r\n this.hideModalQuickRegistrationEmail();\r\n this.modelRegistration.EmailRegister = '';\r\n };\r\n ChildComponent.prototype.hideModalQuickRegistrationEmail = function () {\r\n this.hideModal('quickRegistrationEmailModal');\r\n };\r\n ChildComponent.prototype.showModal = function (modalId) {\r\n //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n document.querySelector('#header').style.zIndex = '1041';\r\n $(\"#\" + modalId).modal(\"show\");\r\n };\r\n ChildComponent.prototype.hideModal = function (modalId) {\r\n //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n document.querySelector('#header').style.zIndex = '1041';\r\n $(\"#\" + modalId).modal(\"hide\");\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n this.pageIsInit = true;\r\n };\r\n __decorate([\r\n core_1.ViewChild('submitButton'), \r\n __metadata('design:type', (typeof (_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object)\r\n ], ChildComponent.prototype, \"submitButton\", void 0);\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: quickRegistrationData.TemplateHtml\r\n }),\r\n __param(0, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject('CookieService')), \r\n __metadata('design:paramtypes', [Boolean, (typeof (_b = typeof login_service_1.LoginService !== 'undefined' && login_service_1.LoginService) === 'function' && _b) || Object, (typeof (_c = typeof check_existence_service_1.CheckIfExistService !== 'undefined' && check_existence_service_1.CheckIfExistService) === 'function' && _c) || Object, (typeof (_d = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _g) || Object, (typeof (_h = typeof company_service_1.CompanyService !== 'undefined' && company_service_1.CompanyService) === 'function' && _h) || Object, (typeof (_j = typeof configuration_service_1.ConfigurationService !== 'undefined' && configuration_service_1.ConfigurationService) === 'function' && _j) || Object, (typeof (_k = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _k) || Object, (typeof (_l = typeof validation_service_1.ValidationService !== 'undefined' && validation_service_1.ValidationService) === 'function' && _l) || Object, (typeof (_m = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _m) || Object, (typeof (_o = typeof header_service_1.HeaderService !== 'undefined' && header_service_1.HeaderService) === 'function' && _o) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Object)\r\n ], QuickRegistrationComponent.prototype, \"parentWidgetData\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', (typeof (_a = typeof company_1.Company !== 'undefined' && company_1.Company) === 'function' && _a) || Object)\r\n ], QuickRegistrationComponent.prototype, \"companyInfo\", void 0);\r\n QuickRegistrationComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-quick-register\",\r\n template: \"\"\r\n }),\r\n __param(3, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_b = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _b) || Object, (typeof (_c = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _c) || Object, (typeof (_d = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _d) || Object, Boolean])\r\n ], QuickRegistrationComponent);\r\n return QuickRegistrationComponent;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.QuickRegistrationComponent = QuickRegistrationComponent;\r\n\n\n/***/ }),\n\n/***/ 405:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar validation_service_1 = __webpack_require__(133);\r\nvar cookie_service_1 = __webpack_require__(73);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\nvar mapping_1 = __webpack_require__(9);\r\n//Services\r\nvar register_service_1 = __webpack_require__(100);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar company_service_1 = __webpack_require__(131);\r\nvar configuration_service_1 = __webpack_require__(258);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar register_1 = __webpack_require__(252);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar check_existence_service_1 = __webpack_require__(255);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar login_service_1 = __webpack_require__(178);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar RegisterComponent = (function () {\r\n function RegisterComponent(_compiler, componentHelper, _elementRef, languageService, registerService, route, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.languageService = languageService;\r\n this.registerService = registerService;\r\n this.route = route;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n RegisterComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var isQuickRegistration = this.route.snapshot.queryParams[\"quickRegistration\"] || false;\r\n var registerSub = this.registerService.getRegisterPageData(this.lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n if (!result.IsActiveQuickRegistration) {\r\n isQuickRegistration = false;\r\n }\r\n //Creating subcomponent whith the register result information to inject\r\n var subComponent = _this.createSubComponent(result, isQuickRegistration, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.userRegistrationId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(registerSub);\r\n };\r\n RegisterComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n RegisterComponent.prototype.createSubComponent = function (result, isQuickRegistrationActive, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, registerService, languageService, router, mappings, checkExists, isBrowser, _elementRef, scriptService, companyService, configurationService, routesService, breadcrumbsService, _compiler, route, validationService, cookie, authService, loginService) {\r\n this.seoService = seoService;\r\n this.registerService = registerService;\r\n this.languageService = languageService;\r\n this.router = router;\r\n this.mappings = mappings;\r\n this.checkExists = checkExists;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.companyService = companyService;\r\n this.configurationService = configurationService;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this._compiler = _compiler;\r\n this.route = route;\r\n this.validationService = validationService;\r\n this.cookie = cookie;\r\n this.authService = authService;\r\n this.loginService = loginService;\r\n this.siteKey = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n this.theme = \"light\";\r\n this.seoInfo = result.SeoInformation;\r\n this.emailError = false;\r\n this.passwordError = false;\r\n this.success = false;\r\n this.load = false;\r\n this.validEmail = \"\";\r\n this.pageIsInit = false;\r\n this.pageIsOnDestroy = false;\r\n this.showEmailInvalid = false;\r\n this.showPivaInvalid = false;\r\n this.showCFInvalid = false;\r\n this.isValidCodDest = \"\";\r\n this.isValidPecEmail = \"\";\r\n this.isRequiredPecEmail = true;\r\n this.isQuickRegistration = isQuickRegistrationActive;\r\n this.quickRegisteredUser = null;\r\n this.lang = this.languageService.getLongLang();\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n this.registerViaFbData = this.registerService.getFacebookLoginData();\r\n this.disableFbDataFields = false;\r\n this.cartRoute = this.routesService.getRoutePath('CARRELLO');\r\n this.homepageRoute = this.routesService.getRoutePath('HOME');\r\n this.pageFrom = \"\";\r\n this.subManager = new Subscription_1.Subscription();\r\n this.footerData = result.footerData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n var paramsSub = this.route.params.subscribe(function (params) {\r\n var paramPageFrom = params['pagefrom'];\r\n if (paramPageFrom !== undefined) {\r\n _this.pageFrom = paramPageFrom;\r\n }\r\n });\r\n this.subManager.add(paramsSub);\r\n this.model = new register_1.Register();\r\n this.customerTypeList = result.UserTypes;\r\n this.model.CustomerGroup = \"5\";\r\n this.model.CustomerType = \"\";\r\n this.model.PecEmail = \"\";\r\n this.model.CodiceDestinatario = \"\";\r\n //-- If the user used quick registration feature, we can get it's data from the cookies\r\n if (this.isQuickRegistration) {\r\n this.quickRegisteredUser = this.cookie.getObject(\"QuickRegisterUser\");\r\n this.setModelDataFromCookies();\r\n }\r\n this.showEmailInvalid = false;\r\n if (this.registerViaFbData) {\r\n this.model.CustomerGroup = \"4\";\r\n this.setModelDataFromFb(this.registerViaFbData);\r\n }\r\n this.isCodDestRequired();\r\n this.isPecEmailRequired();\r\n this.configurationService.getConfiguration(this.lang).subscribe(function (resultConfiguration) {\r\n var companySub = _this.companyService.getCompany().subscribe(function (resultCompany) {\r\n {\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}').join(resultCompany.Name);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}').join(resultCompany.StreetAddress);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}').join(resultCompany.PostalCode);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}').join(resultCompany.City);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}').join(resultCompany.Province);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}').join(resultCompany.Phone);\r\n }\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}').join(resultCompany.Email);\r\n }\r\n }\r\n _this.configuration = resultConfiguration;\r\n });\r\n _this.subManager.add(companySub);\r\n });\r\n };\r\n ;\r\n ChildComponent.prototype.setModelDataFromCookies = function () {\r\n if (!this.quickRegisteredUser)\r\n return;\r\n this.model.EmailRegister = this.quickRegisteredUser['QuickEmailUser'];\r\n this.model.EmailRepeat = this.quickRegisteredUser['QuickEmailUser'];\r\n this.model.CustomerGroup = this.quickRegisteredUser['QuickClientType'];\r\n this.model.Telephone = this.quickRegisteredUser['QuickTelephone'];\r\n var isQuickRegistered = this.cookie.get(\"IsQuickRegistered\") ? Boolean(this.cookie.get(\"IsQuickRegistered\")) : false;\r\n this.model.IsQuickRegistered = isQuickRegistered;\r\n //-- If customer group is privato or associazione, then CF was already set during registration, else Partita Iva was set\r\n if (this.model.CustomerGroup === '4' || this.model.CustomerGroup === '7') {\r\n this.model.CF = this.quickRegisteredUser['QuickCodiceFiscale'];\r\n }\r\n else {\r\n this.model.Piva = this.quickRegisteredUser['QuickPartitaIva'];\r\n }\r\n };\r\n ChildComponent.prototype.disableFieldsFilledFromFbData = function () {\r\n this.disableFbDataFields = true;\r\n };\r\n ChildComponent.prototype.setModelDataFromFb = function (reg) {\r\n this.model.Name = reg.Name;\r\n this.model.SubName = reg.SubName;\r\n this.model.EmailRegister = reg.Email;\r\n this.model.EmailRepeat = reg.Email;\r\n this.model.Password = reg.Password;\r\n this.model.PasswordRepeat = reg.Password;\r\n this.disableFieldsFilledFromFbData();\r\n };\r\n //adding all scripts and elements connected to address verification feature \r\n ChildComponent.prototype.addAddressVerificationScripts = function (addressKey) {\r\n var suggest = \"\";\r\n var address = \"\";\r\n var jquery = \"\";\r\n $('body > universal-script').before(suggest);\r\n $('body > universal-script').before(jquery);\r\n $('body > universal-script').before(address);\r\n };\r\n //removing all scripts and elements connected to address verification feature \r\n ChildComponent.prototype.removeAddressVerificationScripts = function (addressKey) {\r\n $(\"#suggestId\").remove();\r\n $(\"#jqueryuicss\").remove();\r\n $(\"#jqueryuijs\").remove();\r\n $(\"#suggestcss\").remove();\r\n $(\"#initui\").remove();\r\n $(\"#inituicf\").remove();\r\n $(\"#ui-id-1\").remove();\r\n $(\"#ui-id-2\").remove();\r\n $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n $(\"#jqueryId\").remove();\r\n $(\"#addressVerificationId\").remove();\r\n };\r\n ChildComponent.prototype.checkAddressValidation = function () {\r\n this.model.Prov = $(\"#Prov\").val();\r\n this.model.Cap = $(\"#Cap\").val();\r\n this.model.City = $(\"#City\").val();\r\n };\r\n ChildComponent.prototype.setAddressValue = function () {\r\n var streetTypeId = $(\"#streetTypeId\").val();\r\n var street = $(\"#Address\").val();\r\n if (streetTypeId != null && streetTypeId != \"\") {\r\n this.model.Address = streetTypeId + \" \" + street;\r\n }\r\n else {\r\n this.model.Address = street;\r\n }\r\n };\r\n ChildComponent.prototype.isDisabled = function (form) {\r\n var res = false;\r\n if (this.disableFbDataFields) {\r\n if (form.valid && this.model.EmailRegister == this.model.EmailRepeat && this.model.Password == this.model.PasswordRepeat) {\r\n res = true;\r\n }\r\n else {\r\n res = false;\r\n }\r\n }\r\n else if (this.isQuickRegistration && this.quickRegisteredUser) {\r\n if (form.valid && this.model.EmailRegister == this.model.EmailRepeat) {\r\n res = true;\r\n }\r\n else {\r\n res = false;\r\n }\r\n }\r\n else {\r\n if (form.valid && this.model.EmailRegister == this.model.EmailRepeat && this.model.Password == this.model.PasswordRepeat\r\n && this.emailValid == true && this.showCFInvalid == false) {\r\n if (this.model.CustomerGroup != '4') {\r\n if (this.showPivaInvalid == false) {\r\n res = true;\r\n }\r\n else {\r\n res = false;\r\n }\r\n }\r\n else {\r\n res = true;\r\n }\r\n }\r\n else {\r\n res = false;\r\n }\r\n }\r\n return res;\r\n };\r\n //checking after changing of focus if the email entered in form already exists in database\r\n ChildComponent.prototype.checkEmail = function (form) {\r\n var _this = this;\r\n var email = this.model.EmailRegister;\r\n if (form.controls.EmailRegister.valid) {\r\n if (this.disableFbDataFields == false) {\r\n var checkEmailSub = this.checkExists.checkIfEmailExistsInDb(email)\r\n .subscribe(function (result) {\r\n _this.showEmailInvalid = false;\r\n if (result == 1) {\r\n _this.emailValid = true;\r\n _this.validEmail = \"ng-valid\";\r\n }\r\n else {\r\n _this.emailValid = false;\r\n _this.validEmail = \"ng-invalid\";\r\n _this.showEmailInvalid = true;\r\n }\r\n });\r\n this.subManager.add(checkEmailSub);\r\n }\r\n }\r\n else {\r\n this.emailValid = false;\r\n this.validEmail = \"ng-invalid\";\r\n this.showEmailInvalid = false;\r\n }\r\n };\r\n //checking after changing of focus if the partita iva entered in form already exists in database\r\n ChildComponent.prototype.checkPiva = function (field) {\r\n var _this = this;\r\n var piva = this.model.Piva;\r\n if (field.valid) {\r\n if (!field.value || !field.value.trim())\r\n return;\r\n if (this.disableFbDataFields == false) {\r\n this.checkExists.checkIfPartitaIvaExistsInDb(piva)\r\n .subscribe(function (result) {\r\n _this.showPivaInvalid = false;\r\n if (result == 1) {\r\n _this.showPivaInvalid = false;\r\n }\r\n else {\r\n if (_this.model.CustomerGroup !== '7') {\r\n _this.showPivaInvalid = true;\r\n }\r\n }\r\n });\r\n }\r\n }\r\n else {\r\n if (this.model.CustomerGroup !== '7') {\r\n this.showPivaInvalid = true;\r\n }\r\n }\r\n };\r\n //checking after changing of focus if the codice fiscale entered in form already exists in database\r\n ChildComponent.prototype.checkCF = function (field) {\r\n var _this = this;\r\n var piva = this.model.CF;\r\n //-- Check if the CF already exists only when group is privato\r\n if (this.model.CustomerGroup === '4') {\r\n if (field.valid) {\r\n if (this.disableFbDataFields == false) {\r\n this.checkExists.checkIfCodiceFiscaleExistsInDb(piva)\r\n .subscribe(function (result) {\r\n _this.showCFInvalid = false;\r\n if (result == 1) {\r\n _this.showCFInvalid = false;\r\n }\r\n else {\r\n _this.showCFInvalid = true;\r\n }\r\n });\r\n }\r\n }\r\n else {\r\n this.showCFInvalid = true;\r\n }\r\n }\r\n else {\r\n this.showCFInvalid = false;\r\n }\r\n };\r\n ChildComponent.prototype.onSubmit = function () {\r\n var _this = this;\r\n //after submiting form, we are disabling a button until we get a response\r\n this.submitButton.nativeElement.disabled = true;\r\n this.load = true;\r\n this.model.Language = this.languageService.getLongLang();\r\n //converting CAP field to string\r\n this.model.Cap = this.model.Cap.toString();\r\n //concating of address street and number to one model field\r\n this.model.Address = this.model.Address + \" \" + this.model.AddressNumber.replace(/\\s/g, \"\");\r\n if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n this.model.IsCompletedRegistration = false;\r\n }\r\n var sendInfoSub = this.registerService.sendInfoRequest(this.model)\r\n .subscribe(function (result) {\r\n if (result[\"selected\"]) {\r\n if (_this.isQuickRegistration) {\r\n var authSub = _this.loginService.authentificateUser(_this.model.EmailRegister, _this.model.Name, _this.model.Name).subscribe(function (response) {\r\n _this.cookie.remove('QuickRegisterUser');\r\n _this.cookie.remove('IsQuickRegistered');\r\n _this.authService.Login(response.Id_User_Dettail, response.Name);\r\n _this.navigateToCorespondingPage();\r\n });\r\n }\r\n else {\r\n _this.navigateToCorespondingPage();\r\n }\r\n }\r\n else {\r\n _this.emailError = false;\r\n _this.passwordError = false;\r\n _this.isRegisterFailed = true;\r\n _this.load = false;\r\n _this.success = false;\r\n }\r\n });\r\n this.subManager.add(sendInfoSub);\r\n };\r\n ChildComponent.prototype.navigateToCorespondingPage = function () {\r\n if (this.pageFrom == \"cart\") {\r\n this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n }\r\n else {\r\n var registrationCompletePage = this.routesService.getRoutePath('REGISTRATION - COMPLETE')[0];\r\n this.router.navigate([registrationCompletePage]);\r\n this.emailError = false;\r\n this.passwordError = false;\r\n this.isRegisterFailed = false;\r\n this.load = false;\r\n this.success = true;\r\n }\r\n };\r\n ChildComponent.prototype.setVerified = function (data) {\r\n this.isCaptchaInvalid = data;\r\n };\r\n ChildComponent.prototype.onCustomerTypeChange = function (value) {\r\n this.model.CustomerType = value;\r\n };\r\n ChildComponent.prototype.onCustomerGroupChange = function (value) {\r\n this.model = new register_1.Register();\r\n this.model.CustomerGroup = value;\r\n if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n this.setModelDataFromFb(this.registerViaFbData);\r\n }\r\n if (value == '4') {\r\n this.model.CodiceDestinatario = \"0000000\";\r\n }\r\n else {\r\n this.model.CodiceDestinatario = \"\";\r\n }\r\n };\r\n ChildComponent.prototype.isCodDestRequired = function () {\r\n var retVal = false;\r\n //console.log(this.model.CodiceDestinatario)\r\n if (this.model.CustomerGroup != \"4\") {\r\n if (this.model.PecEmail == \"\" || this.model.PecEmail == undefined) {\r\n retVal = true;\r\n }\r\n if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n this.isRequiredPecEmail = true;\r\n }\r\n else {\r\n this.isRequiredPecEmail = false;\r\n }\r\n }\r\n return retVal;\r\n };\r\n ChildComponent.prototype.isPecEmailRequired = function () {\r\n var retVal = false;\r\n if (this.model.CustomerGroup != \"4\") {\r\n if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n retVal = true;\r\n }\r\n }\r\n return retVal;\r\n };\r\n //validation of phone numbers, disable writing any characters in input except of numbers\r\n ChildComponent.prototype.validatePhone = function (event) {\r\n this.validationService.validatePhoneNumber(event);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n $('.popovers').popover();\r\n if (result.isActiveAddressVerificationModule) {\r\n var addressVerificationKey = result.AddressVerificationCode;\r\n if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n this.addAddressVerificationScripts(addressVerificationKey);\r\n $(\"#Cap\").prop('disabled', true);\r\n }\r\n }\r\n else {\r\n $(\"#Cap\").prop('disabled', false);\r\n }\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n if (!this.isBrowser || this.pageIsOnDestroy) {\r\n return;\r\n }\r\n //this method is removing all scripts and elements connected to address verification feature\r\n var addressVerificationKey = result.AddressVerificationCode;\r\n this.removeAddressVerificationScripts(addressVerificationKey);\r\n this.subManager.unsubscribe();\r\n // this.registerService.setFacebookLoginData(null);\r\n this.pageIsOnDestroy = true;\r\n };\r\n __decorate([\r\n core_1.ViewChild('submitButton'), \r\n __metadata('design:type', (typeof (_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object)\r\n ], ChildComponent.prototype, \"submitButton\", void 0);\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(16, core_1.Inject('CookieService')), \r\n __metadata('design:paramtypes', [(typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, (typeof (_c = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _e) || Object, (typeof (_f = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _f) || Object, (typeof (_g = typeof check_existence_service_1.CheckIfExistService !== 'undefined' && check_existence_service_1.CheckIfExistService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _h) || Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object, (typeof (_k = typeof company_service_1.CompanyService !== 'undefined' && company_service_1.CompanyService) === 'function' && _k) || Object, (typeof (_l = typeof configuration_service_1.ConfigurationService !== 'undefined' && configuration_service_1.ConfigurationService) === 'function' && _l) || Object, (typeof (_m = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _m) || Object, (typeof (_o = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _o) || Object, (typeof (_p = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _p) || Object, (typeof (_q = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _q) || Object, (typeof (_r = typeof validation_service_1.ValidationService !== 'undefined' && validation_service_1.ValidationService) === 'function' && _r) || Object, (typeof (_s = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _s) || Object, (typeof (_t = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _t) || Object, (typeof (_u = typeof login_service_1.LoginService !== 'undefined' && login_service_1.LoginService) === 'function' && _u) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;\r\n }());\r\n return ChildComponent;\r\n };\r\n RegisterComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(7, core_1.Inject('isBrowser')),\r\n __param(10, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _f) || Object, (typeof (_g = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _h) || Object, (typeof (_j = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _j) || Object, Object, (typeof (_k = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _k) || Object])\r\n ], RegisterComponent);\r\n return RegisterComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n}());\r\nexports.RegisterComponent = RegisterComponent;\r\n\n\n/***/ }),\n\n/***/ 406:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar register_service_1 = __webpack_require__(100);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar RegistrationConfirmationPageComponent = (function () {\r\n function RegistrationConfirmationPageComponent(_compiler, componentHelper, _elementRef, languageService, registerService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.languageService = languageService;\r\n this.registerService = registerService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n RegistrationConfirmationPageComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var templateHtml;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var registrationDoneSub = this.registerService.getRegistrationCompletePageData().subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the result to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.registrationCompletePageId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(registrationDoneSub);\r\n };\r\n RegistrationConfirmationPageComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n RegistrationConfirmationPageComponent.prototype.createSubComponent = function (result, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(seoService, _elementRef, isBrowser, scriptService, routesService, breadcrumbsService, registerService) {\r\n this.seoService = seoService;\r\n this._elementRef = _elementRef;\r\n this.isBrowser = isBrowser;\r\n this.scriptService = scriptService;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.registerService = registerService;\r\n this.seoInfo = result.SeoInformation;\r\n this.pageIsInit = false;\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n //newsletter subscription\r\n this.newsletterSubmitted = false;\r\n this.privacySubmitted = false;\r\n this.alreadySubscribed = false;\r\n this.successfullySubscribed = false;\r\n this.spinnerNewslatter = false;\r\n this.pageIsOnDestroy = false;\r\n this.registerViaFbData = this.registerService.getFacebookLoginData();\r\n this.isRegisteredViaFacebook = false;\r\n this.footerData = result.footerData;\r\n this.headerData = header;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n this.isRegisteredViaFacebook = true;\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n if (!this.isBrowser || this.pageIsOnDestroy) {\r\n return;\r\n }\r\n this.registerService.setFacebookLoginData(null);\r\n this.pageIsOnDestroy = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _a) || Object, (typeof (_b = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _e) || Object, (typeof (_f = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _f) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n }());\r\n return ChildComponent;\r\n };\r\n RegistrationConfirmationPageComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object, (typeof (_e = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], RegistrationConfirmationPageComponent);\r\n return RegistrationConfirmationPageComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.RegistrationConfirmationPageComponent = RegistrationConfirmationPageComponent;\r\n\n\n/***/ }),\n\n/***/ 407:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\n//Models\r\nvar router_1 = __webpack_require__(13);\r\nvar register_service_1 = __webpack_require__(100);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar RegistrationConfirmationComponent = (function () {\r\n function RegistrationConfirmationComponent(_compiler, componentHelper, _elementRef, cmsComponentService, templateService, isBrowser, seo, renderer, document) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.cmsComponentService = cmsComponentService;\r\n this.templateService = templateService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.data = {};\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n RegistrationConfirmationComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var registrationConfirmation;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var compTemplateSub = this.templateService.getComponentTemplate(\"registrationConfirmationPageTemplate\").subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n registrationConfirmation = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(registrationConfirmation, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(compTemplateSub);\r\n };\r\n RegistrationConfirmationComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n //Creates component to inject\r\n RegistrationConfirmationComponent.prototype.createSubComponent = function (registrationConfirmation, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(routesService, isBrowser, activatedRoute, registerService) {\r\n this.routesService = routesService;\r\n this.isBrowser = isBrowser;\r\n this.activatedRoute = activatedRoute;\r\n this.registerService = registerService;\r\n this.success = false;\r\n this.failed = false;\r\n this.active = false;\r\n this.pageIsInit = false;\r\n this.headerData = header;\r\n this.footerData = registrationConfirmation.FooterData;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (this.isBrowser == false) {\r\n return;\r\n }\r\n var paramsSub = this.activatedRoute.params.subscribe(function (params) {\r\n var userId = params['userid'];\r\n _this.checkActivation(userId);\r\n });\r\n this.subManager.add(paramsSub);\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n };\r\n ChildComponent.prototype.checkActivation = function (userId) {\r\n var _this = this;\r\n var confirmRegSub = this.registerService.confirmationRegistration(userId)\r\n .subscribe(function (response) {\r\n if (response == \"1\") {\r\n _this.success = true;\r\n }\r\n else if (response == \"-1\") {\r\n _this.active = true;\r\n }\r\n else {\r\n _this.failed = true;\r\n }\r\n });\r\n this.subManager.add(confirmRegSub);\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: registrationConfirmation\r\n }),\r\n __param(1, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _b) || Object, (typeof (_c = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _c) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c;\r\n }());\r\n return ChildComponent;\r\n };\r\n RegistrationConfirmationComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: ''\r\n }),\r\n __param(5, core_1.Inject('isBrowser')),\r\n __param(8, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, (typeof (_e = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _e) || Object, Boolean, (typeof (_f = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _f) || Object, (typeof (_g = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _g) || Object, Object])\r\n ], RegistrationConfirmationComponent);\r\n return RegistrationConfirmationComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.RegistrationConfirmationComponent = RegistrationConfirmationComponent;\r\n\n\n/***/ }),\n\n/***/ 408:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar register_service_1 = __webpack_require__(100);\r\nvar cookie_service_1 = __webpack_require__(73);\r\nvar api_service_1 = __webpack_require__(10);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//System\r\nvar mapping_1 = __webpack_require__(9);\r\n//Service\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar login_service_1 = __webpack_require__(178);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar router_1 = __webpack_require__(13);\r\nvar recover_password_service_1 = __webpack_require__(257);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar angular2_meta_1 = __webpack_require__(101);\r\nvar header_service_1 = __webpack_require__(129);\r\nvar user_login_1 = __webpack_require__(72);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar UserLoginComponent = (function () {\r\n function UserLoginComponent(_compiler, componentHelper, _elementRef, cmsService, seo, document, renderer, isBrowser, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.cmsService = cmsService;\r\n this.seo = seo;\r\n this.document = document;\r\n this.renderer = renderer;\r\n this.isBrowser = isBrowser;\r\n this.scriptService = scriptService;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n UserLoginComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var loginData;\r\n var header;\r\n var headDataSub = this.cmsService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n // this.templateService.getComponentTemplate(\"userLoginPageTemplate\").subscribe(result =>\r\n var loginSub = this.cmsService.getLoginPageData().subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n loginData = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(loginData, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.loginId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(loginSub);\r\n };\r\n UserLoginComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n UserLoginComponent.prototype.createSubComponent = function (loginData, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(mappings, loginService, _elementRef, authService, scriptService, routesService, router, route, seoService, recoverPasswordService, isBrowser, breadcrumbsService, api, cookie, registerService, headerService, metaService) {\r\n this.mappings = mappings;\r\n this.loginService = loginService;\r\n this._elementRef = _elementRef;\r\n this.authService = authService;\r\n this.scriptService = scriptService;\r\n this.routesService = routesService;\r\n this.router = router;\r\n this.route = route;\r\n this.seoService = seoService;\r\n this.recoverPasswordService = recoverPasswordService;\r\n this.isBrowser = isBrowser;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.api = api;\r\n this.cookie = cookie;\r\n this.registerService = registerService;\r\n this.headerService = headerService;\r\n this.metaService = metaService;\r\n this.breadcrumbs = loginData.BreadcrumbsInfo;\r\n this.footerData = loginData.footerData;\r\n this.headerData = header;\r\n this.countFb = 0;\r\n this.showSpinnerClick = false;\r\n this.userLoginUrl = this.mappings.UserLoginImg_Url;\r\n this.pageFrom = \"\";\r\n this.emailError = false;\r\n this.passwordError = false;\r\n this.seoInfo = loginData.SeoInformation;\r\n this.emailErrorRecover = false;\r\n this.pageIsInit = false;\r\n this.constructorIsInit = false;\r\n this.isActiveFacebookModule = loginData.isActiveFacebookModule;\r\n this.model = {\r\n Email: \"\",\r\n Password: \"\"\r\n };\r\n this.modelRecover = {\r\n Email: \"\"\r\n };\r\n this.subManager = new Subscription_1.Subscription();\r\n if (!this.isBrowser || this.constructorIsInit) {\r\n return;\r\n }\r\n this.constructorIsInit = true;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n setTimeout(function (x) { return _this.breadcrumbsService.setBreadcrumbs(_this.breadcrumbs); }, 1);\r\n var paramsSub = this.route.params.subscribe(function (params) {\r\n var paramPageFrom = params['pagefrom'];\r\n if (paramPageFrom !== undefined) {\r\n _this.pageFrom = paramPageFrom;\r\n }\r\n });\r\n this.subManager.add(paramsSub);\r\n };\r\n ChildComponent.prototype.onFacebookLoginClick = function () {\r\n var _this = this;\r\n FB.login(function (result) {\r\n _this.getUserInfoFromFb();\r\n }, { scope: 'email' });\r\n this.getUserFromFb();\r\n };\r\n ChildComponent.prototype.getUserFromFb = function () {\r\n var _this = this;\r\n var email = this.cookie.get(\"emailFbUser\");\r\n var firstName = this.cookie.get(\"firstNameFbUser\");\r\n var lastName = this.cookie.get(\"lastNameFbUser\");\r\n if (email != undefined && firstName != undefined && lastName != undefined) {\r\n var authSub = this.loginService.authentificateUser(email, firstName, lastName).subscribe(function (response) {\r\n _this.cookie.remove(\"emailFbUser\");\r\n _this.cookie.remove(\"firstNameFbUser\");\r\n _this.cookie.remove(\"lastNameFbUser\");\r\n // if(response.Active)\r\n // {\r\n _this.authService.Login(response.Id_User_Dettail, response.Name);\r\n // } \r\n if (response.IsCompletedRegistration == false) {\r\n if (response.Active) {\r\n _this.registerService.setFacebookLoginData(response);\r\n //update after login the header information\r\n var user = new user_login_1.UserLogin();\r\n user.isAuthenticated = true;\r\n user.username = response.Name ? response.Name : _this.model.Email;\r\n _this.headerService.setLoggedInUser(user);\r\n _this.router.navigate(_this.routesService.getRoutePath('REGISTRAZIONE'));\r\n }\r\n else {\r\n _this.userNotActive = false;\r\n _this.userNotFound = false;\r\n }\r\n }\r\n else if (_this.pageFrom == \"cart\") {\r\n //update after login the header information\r\n var user = new user_login_1.UserLogin();\r\n user.isAuthenticated = true;\r\n user.username = response.Name ? response.Name : _this.model.Email;\r\n _this.headerService.setLoggedInUser(user);\r\n //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n window.open(_this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n }\r\n else {\r\n _this.router.navigate(_this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n }\r\n });\r\n this.subManager.add(authSub);\r\n }\r\n else {\r\n setTimeout(function (x) { return _this.getUserFromFb(); }, 200);\r\n }\r\n };\r\n ChildComponent.prototype.getUserInfoFromFb = function () {\r\n FB.api('/me?fields=first_name,last_name,email', function (result) {\r\n if (result && !result.error) {\r\n var email = result.email;\r\n var firstName = result.first_name;\r\n var lastName = result.last_name;\r\n document.cookie = \"emailFbUser=\" + email + \";\";\r\n document.cookie = \"firstNameFbUser=\" + firstName + \";\";\r\n document.cookie = \"lastNameFbUser=\" + lastName + \";\";\r\n }\r\n else {\r\n console.log(result.error);\r\n }\r\n });\r\n };\r\n ChildComponent.prototype.onSubmit = function (form) {\r\n var _this = this;\r\n if (form.valid) {\r\n this.showSpinnerClick = true;\r\n this.emailError = false;\r\n this.passwordError = false;\r\n var loginDataSub = this.loginService.sendLoginRequest(this.model.Email, this.model.Password).subscribe(function (result) {\r\n if (result.Id_User_Dettail > 0) {\r\n if (result.Active) {\r\n _this.authService.Login(result.Id_User_Dettail, result.Name);\r\n //update after login the header information\r\n var user = new user_login_1.UserLogin();\r\n user.isAuthenticated = true;\r\n user.username = result.Name ? result.Name : _this.model.Email;\r\n _this.headerService.setLoggedInUser(user);\r\n if (_this.pageFrom == \"cart\") {\r\n //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n window.open(_this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n }\r\n else {\r\n _this.router.navigate(_this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n }\r\n }\r\n else {\r\n _this.userNotActive = false;\r\n _this.userNotFound = false;\r\n }\r\n }\r\n else {\r\n _this.userNotActive = false;\r\n _this.userNotFound = true;\r\n }\r\n _this.showSpinnerClick = false;\r\n });\r\n this.subManager.add(loginDataSub);\r\n }\r\n else if (!form.valid) {\r\n if (form.form.controls.password.valid == false) {\r\n this.passwordError = true;\r\n }\r\n else if (form.form.controls.password.valid == true) {\r\n this.passwordError = false;\r\n }\r\n if (form.form.controls.email.valid == false) {\r\n this.emailError = true;\r\n }\r\n else if (form.form.controls.email.valid == true) {\r\n this.emailError = false;\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n var fbCode = loginData.FacebookAppID;\r\n this.initFacebook(fbCode);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n // Eventually retrieving the script to append\r\n // if (this.seoInfo.HasScripts == true) {\r\n // this.scriptService.appendLoginScript(this._elementRef.element.nativeElement);\r\n // }\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.initFacebook = function (fbCode) {\r\n var _this = this;\r\n try {\r\n this.countFb = this.countFb + 1;\r\n FB.init({\r\n appId: fbCode,\r\n cookie: false,\r\n xfbml: false,\r\n version: 'v2.5'\r\n });\r\n }\r\n catch (e) {\r\n if (this.countFb <= 5) {\r\n setTimeout(function (x) { return _this.initFacebook(fbCode); }, 1);\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.recoverPassword = function (form) {\r\n var _this = this;\r\n if (form.valid) {\r\n this.showSpinnerClick = true;\r\n this.emailErrorRecover = false;\r\n var recoverPassSub = this.recoverPasswordService.recoverPasswordRequest(this.modelRecover.Email).subscribe(function (result) {\r\n if (result.selected) {\r\n _this.modelRecover.Email = \"\";\r\n _this.recoverPasswordFailed = false;\r\n _this.recoverPasswordSuccess = true;\r\n }\r\n else {\r\n _this.recoverPasswordFailed = true;\r\n _this.recoverPasswordSuccess = false;\r\n }\r\n _this.showSpinnerClick = false;\r\n });\r\n this.subManager.add(recoverPassSub);\r\n }\r\n else if (!form.valid) {\r\n if (form.form.controls.email.valid == false) {\r\n this.emailErrorRecover = true;\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: loginData.TemplateHtml\r\n }),\r\n __param(10, core_1.Inject('isBrowser')),\r\n __param(13, core_1.Inject('CookieService')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _a) || Object, (typeof (_b = typeof login_service_1.LoginService !== 'undefined' && login_service_1.LoginService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _g) || Object, (typeof (_h = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _h) || Object, (typeof (_j = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _j) || Object, (typeof (_k = typeof recover_password_service_1.RecoverPasswordService !== 'undefined' && recover_password_service_1.RecoverPasswordService) === 'function' && _k) || Object, Boolean, (typeof (_l = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _l) || Object, (typeof (_m = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _m) || Object, (typeof (_o = typeof cookie_service_1.CookieService !== 'undefined' && cookie_service_1.CookieService) === 'function' && _o) || Object, (typeof (_p = typeof register_service_1.RegisterService !== 'undefined' && register_service_1.RegisterService) === 'function' && _p) || Object, (typeof (_q = typeof header_service_1.HeaderService !== 'undefined' && header_service_1.HeaderService) === 'function' && _q) || Object, (typeof (_r = typeof angular2_meta_1.Meta !== 'undefined' && angular2_meta_1.Meta) === 'function' && _r) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;\r\n }());\r\n return ChildComponent;\r\n };\r\n UserLoginComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(5, core_1.Inject(platform_browser_1.DOCUMENT)),\r\n __param(7, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, (typeof (_e = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _e) || Object, Object, (typeof (_f = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _g) || Object])\r\n ], UserLoginComponent);\r\n return UserLoginComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n}());\r\nexports.UserLoginComponent = UserLoginComponent;\r\n\n\n/***/ }),\n\n/***/ 409:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar recover_password_service_1 = __webpack_require__(257);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar UserPasswordComponent = (function () {\r\n function UserPasswordComponent(_compiler, componentHelper, _elementRef, recoverPasswordService, languageService, cmsComponentService, isBrowser, seo, renderer, document, scriptService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.recoverPasswordService = recoverPasswordService;\r\n this.languageService = languageService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.seo = seo;\r\n this.renderer = renderer;\r\n this.document = document;\r\n this.scriptService = scriptService;\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n UserPasswordComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var header;\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n header = result;\r\n var SideMenuData = _this.cmsComponentService.getSideMenuData().subscribe(function (result1) {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n }\r\n });\r\n _this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n var recoverPassSub = this.recoverPasswordService.getRecoverPasswordData(this.lang).subscribe(function (result) {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (_this.isBrowser) {\r\n //Creating subcomponent whith the result to inject\r\n var subComponent = _this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n _this.scriptService.setupExternalScripts(result, _this.scriptService.typeSystemPage, _this.scriptService.userRecoverPasswordId);\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n _this.seo.setSeoMetaData(_this.document, _this.renderer, result.SeoInformation);\r\n _this.seo.generateSeoDomServerSide(_this.document, _this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(recoverPassSub);\r\n };\r\n UserPasswordComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n UserPasswordComponent.prototype.createSubComponent = function (result, header) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(recoverPasswordService, seoService, isBrowser, _elementRef, scriptService, routesService, breadcrumbsService) {\r\n this.recoverPasswordService = recoverPasswordService;\r\n this.seoService = seoService;\r\n this.isBrowser = isBrowser;\r\n this._elementRef = _elementRef;\r\n this.scriptService = scriptService;\r\n this.routesService = routesService;\r\n this.breadcrumbsService = breadcrumbsService;\r\n this.recoverPasswordFailed = false;\r\n this.recoverPasswordSuccess = false;\r\n this.seoInfo = result.SeoInformation;\r\n this.pageIsInit = false;\r\n this.breadcrumbs = result.BreadcrumbsInfo;\r\n this.showSpinnerClick = false;\r\n this.footerData = result.footerData;\r\n this.headerData = header;\r\n this.model = {\r\n Email: \"\"\r\n };\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n //this.headerData.Categories=SideMenu.Categories;\r\n this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs);\r\n //setTimeout(x => , 1);\r\n };\r\n ChildComponent.prototype.onSubmit = function (form) {\r\n var _this = this;\r\n if (form.valid) {\r\n this.showSpinnerClick = true;\r\n var recoverPassSub = this.recoverPasswordService.recoverPasswordRequest(this.model.Email).subscribe(function (result) {\r\n if (result.selected) {\r\n _this.recoverPasswordFailed = false;\r\n _this.recoverPasswordSuccess = true;\r\n }\r\n else {\r\n _this.recoverPasswordFailed = true;\r\n _this.recoverPasswordSuccess = false;\r\n }\r\n _this.showSpinnerClick = false;\r\n });\r\n this.subManager.add(recoverPassSub);\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.TemplateHtml\r\n }),\r\n __param(2, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof recover_password_service_1.RecoverPasswordService !== 'undefined' && recover_password_service_1.RecoverPasswordService) === 'function' && _a) || Object, (typeof (_b = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _b) || Object, Boolean, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof breadcrumbs_service_1.BreadcrumbsService !== 'undefined' && breadcrumbs_service_1.BreadcrumbsService) === 'function' && _f) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n }());\r\n return ChildComponent;\r\n };\r\n UserPasswordComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')),\r\n __param(9, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof recover_password_service_1.RecoverPasswordService !== 'undefined' && recover_password_service_1.RecoverPasswordService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean, (typeof (_g = typeof seo_service_1.SeoService !== 'undefined' && seo_service_1.SeoService) === 'function' && _g) || Object, (typeof (_h = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _h) || Object, Object, (typeof (_j = typeof script_service_1.ScriptService !== 'undefined' && script_service_1.ScriptService) === 'function' && _j) || Object])\r\n ], UserPasswordComponent);\r\n return UserPasswordComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n}());\r\nexports.UserPasswordComponent = UserPasswordComponent;\r\n\n\n/***/ }),\n\n/***/ 41:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\nvar core_2 = __webpack_require__(27);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar BootboxService = (function () {\r\n function BootboxService(translate, router, routesService, activatedRoute) {\r\n this.translate = translate;\r\n this.router = router;\r\n this.routesService = routesService;\r\n this.activatedRoute = activatedRoute;\r\n }\r\n BootboxService.prototype.i18nAlert = function (key, val) {\r\n if (val === void 0) { val = ''; }\r\n var mex = this.getLabel(key);\r\n if (val == '') {\r\n var procededToBuy = this.getLabel('continua_gli_acqisti');\r\n var goToCart = this.getLabel('header_two_cart_button_go_cart');\r\n var res = void 0;\r\n var bot_1 = this;\r\n bootbox.dialog({\r\n message: mex,\r\n backdrop: true,\r\n buttons: {\r\n confirm: {\r\n label: procededToBuy\r\n },\r\n cancel: {\r\n label: goToCart,\r\n callback: function () {\r\n bot_1.navigateToCart();\r\n },\r\n className: 'btn btn-primary'\r\n }\r\n }\r\n });\r\n }\r\n else {\r\n bootbox.alert({\r\n message: mex,\r\n backdrop: true,\r\n });\r\n }\r\n };\r\n BootboxService.prototype.navigateToCart = function () {\r\n var Url = this.routesService.getRoutePath('CARRELLO')[0];\r\n //this.router.navigate([Url]);\r\n window.open(Url, \"_self\");\r\n };\r\n BootboxService.prototype.getLabel = function (label) {\r\n var message;\r\n this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n return message;\r\n };\r\n BootboxService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _a) || Object, (typeof (_b = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _b) || Object, (typeof (_c = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _c) || Object, (typeof (_d = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _d) || Object])\r\n ], BootboxService);\r\n return BootboxService;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.BootboxService = BootboxService;\r\n\n\n/***/ }),\n\n/***/ 410:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar News = (function () {\r\n function News() {\r\n }\r\n return News;\r\n}());\r\nexports.News = News;\r\nvar NewsDetails = (function () {\r\n function NewsDetails() {\r\n this.UrlRedirect = \"\";\r\n }\r\n return NewsDetails;\r\n}());\r\nexports.NewsDetails = NewsDetails;\r\nvar SliderViewModel = (function () {\r\n function SliderViewModel() {\r\n }\r\n return SliderViewModel;\r\n}());\r\nexports.SliderViewModel = SliderViewModel;\r\nvar ArticleCategory = (function () {\r\n function ArticleCategory() {\r\n }\r\n return ArticleCategory;\r\n}());\r\nexports.ArticleCategory = ArticleCategory;\r\n\n\n/***/ }),\n\n/***/ 411:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar CmsContentService = (function () {\r\n function CmsContentService(_api, _cache, authService, mappings, ShoppingCartService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.authService = authService;\r\n this.mappings = mappings;\r\n this.ShoppingCartService = ShoppingCartService;\r\n }\r\n //whatever domain/feature method name\r\n // public Web_Api_Menu_GetCmsPageById = this.Web_Api_Base_Url + \"/menu/getcmsmenu/{customerid}/{lang}/{id}/{cartid}\";\r\n CmsContentService.prototype.getCmsPageById = function (lang, pageId) {\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var url = this.mappings.Web_Api_Menu_GetCmsPageById\r\n .replace('{customerid}', customerId)\r\n .replace('{lang}', lang)\r\n .replace('{id}', pageId)\r\n .replace('{cartid}', cartId);\r\n return this._api.get(url);\r\n };\r\n // public Web_Api_Menu_GetCmsPageByUrl = this.Web_Api_Base_Url + \"/menu/getcmspagebyurl/{customerid}/{lang}/{cartid}/{url}\";\r\n CmsContentService.prototype.getCmsPageByUrl = function (lang, pageUrl) {\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var url = this.mappings.Web_Api_Menu_GetCmsPageByUrl\r\n .replace('{customerid}', customerId)\r\n .replace('{lang}', lang)\r\n .replace('{url}', pageUrl)\r\n .replace('{cartid}', cartId);\r\n return this._api.get(url);\r\n };\r\n CmsContentService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object])\r\n ], CmsContentService);\r\n return CmsContentService;\r\n var _a, _b, _c, _d, _e;\r\n}());\r\nexports.CmsContentService = CmsContentService;\r\n\n\n/***/ }),\n\n/***/ 412:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar CmsMenuListService = (function () {\r\n function CmsMenuListService(_api, _cache, mappings) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n }\r\n CmsMenuListService.prototype.setPageUrl = function (menus) {\r\n for (var index in menus) {\r\n if (menus[index].SeoUrl != undefined &&\r\n menus[index].SeoUrl != null &&\r\n menus[index].SeoUrl != \"\") {\r\n menus[index].Url = \"/\" + menus[index].SeoUrl;\r\n }\r\n else {\r\n menus[index].Url = '/cms/' + menus[index].Id;\r\n }\r\n if (menus[index].Children !== undefined && menus[index].Children.length > 0) {\r\n this.setPageUrl(menus[index].Children);\r\n }\r\n }\r\n };\r\n CmsMenuListService.prototype.LoadData = function (pageId, lang) {\r\n var url = this.mappings.Web_Api_Get_Cms_Menu_List\r\n .replace('{id}', pageId)\r\n .replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n CmsMenuListService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n ], CmsMenuListService);\r\n return CmsMenuListService;\r\n var _a, _b, _c;\r\n}());\r\nexports.CmsMenuListService = CmsMenuListService;\r\n\n\n/***/ }),\n\n/***/ 413:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar FaqListService = (function () {\r\n function FaqListService(_api, _cache, mappings, ShoppingCartService, authService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n this.ShoppingCartService = ShoppingCartService;\r\n this.authService = authService;\r\n }\r\n FaqListService.prototype.getFaqData = function (lang) {\r\n var userid = this.authService.GetUserId();\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_FaqData\r\n .replace('{lang}', lang)\r\n .replace('{userid}', userid)\r\n .replace('{cartid}', cartId);\r\n return this._api.get(url);\r\n };\r\n FaqListService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object])\r\n ], FaqListService);\r\n return FaqListService;\r\n var _a, _b, _c, _d, _e;\r\n}());\r\nexports.FaqListService = FaqListService;\r\n\n\n/***/ }),\n\n/***/ 414:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar InfoRequestService = (function () {\r\n function InfoRequestService(_api, _cache, mappings, cartService, authService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n this.cartService = cartService;\r\n this.authService = authService;\r\n }\r\n InfoRequestService.prototype.sendInfoRequest = function (parameters) {\r\n return this._api.post(this.mappings.Web_Api_Post_Send_Info_Request, parameters)\r\n .do(function (result) { return result; })\r\n .share();\r\n };\r\n InfoRequestService.prototype.getInfoRequestData = function (lang) {\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Info_Request_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);\r\n return this._api.get(url);\r\n };\r\n InfoRequestService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object])\r\n ], InfoRequestService);\r\n return InfoRequestService;\r\n var _a, _b, _c, _d, _e;\r\n}());\r\nexports.InfoRequestService = InfoRequestService;\r\n\n\n/***/ }),\n\n/***/ 415:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar SliderService = (function () {\r\n function SliderService(_api, _cache, mappings) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n }\r\n SliderService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object])\r\n ], SliderService);\r\n return SliderService;\r\n var _a, _b, _c;\r\n}());\r\nexports.SliderService = SliderService;\r\n\n\n/***/ }),\n\n/***/ 416:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar TrustpilotService = (function () {\r\n function TrustpilotService(_api, _cache, mappings, languageService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n this.languageService = languageService;\r\n }\r\n TrustpilotService.prototype.getTrustpilotData = function (type) {\r\n var lang = this.languageService.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Trustpilot_Data.replace('{type}', type).replace('{lang}', lang);\r\n return this._api.get(url);\r\n };\r\n TrustpilotService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _d) || Object])\r\n ], TrustpilotService);\r\n return TrustpilotService;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.TrustpilotService = TrustpilotService;\r\n\n\n/***/ }),\n\n/***/ 417:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar CookiePolicyService = (function () {\r\n function CookiePolicyService(_api, mappings, ShoppingCartService, authService) {\r\n this._api = _api;\r\n this.mappings = mappings;\r\n this.ShoppingCartService = ShoppingCartService;\r\n this.authService = authService;\r\n }\r\n CookiePolicyService.prototype.getCookiePolicyData = function (lang) {\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var userId = this.authService.getCurrentUserId();\r\n var url = this.mappings.Web_Api_Get_Cookie_Policy_Data\r\n .replace('{lang}', lang)\r\n .replace('{cartid}', cartId)\r\n .replace('{userid}', userId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n CookiePolicyService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object])\r\n ], CookiePolicyService);\r\n return CookiePolicyService;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.CookiePolicyService = CookiePolicyService;\r\n\n\n/***/ }),\n\n/***/ 418:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar CookieOptions = (function () {\r\n function CookieOptions(_a) {\r\n var _b = _a === void 0 ? {} : _a, path = _b.path, domain = _b.domain, expires = _b.expires, secure = _b.secure;\r\n this.path = this.isPresent(path) ? path : null;\r\n this.domain = this.isPresent(domain) ? domain : null;\r\n this.expires = this.isPresent(expires) ? expires : null;\r\n this.secure = this.isPresent(secure) ? secure : false;\r\n }\r\n CookieOptions.prototype.merge = function (options) {\r\n return new CookieOptions({\r\n path: this.isPresent(options) && this.isPresent(options.path) ? options.path : this.path,\r\n domain: this.isPresent(options) && this.isPresent(options.domain) ? options.domain : this.domain,\r\n expires: this.isPresent(options) && this.isPresent(options.expires) ? options.expires : this.expires,\r\n secure: this.isPresent(options) && this.isPresent(options.secure) ? options.secure : this.secure,\r\n });\r\n };\r\n CookieOptions.prototype.isPresent = function (obj) {\r\n return obj !== undefined && obj !== null;\r\n };\r\n return CookieOptions;\r\n}());\r\nexports.CookieOptions = CookieOptions;\r\n\n\n/***/ }),\n\n/***/ 419:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar PrivacyPolicyService = (function () {\r\n function PrivacyPolicyService(_api, mappings, cartService, authService) {\r\n this._api = _api;\r\n this.mappings = mappings;\r\n this.cartService = cartService;\r\n this.authService = authService;\r\n }\r\n PrivacyPolicyService.prototype.getPrivacyPolicyData = function (lang) {\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Privacy_Policy_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n PrivacyPolicyService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object])\r\n ], PrivacyPolicyService);\r\n return PrivacyPolicyService;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.PrivacyPolicyService = PrivacyPolicyService;\r\n\n\n/***/ }),\n\n/***/ 420:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar PurchaseConditionService = (function () {\r\n function PurchaseConditionService(_api, mappings, cartService, authService) {\r\n this._api = _api;\r\n this.mappings = mappings;\r\n this.cartService = cartService;\r\n this.authService = authService;\r\n }\r\n PurchaseConditionService.prototype.getPurchaseConditionServiceData = function (lang) {\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Purchase_Condition_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);\r\n ;\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n PurchaseConditionService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object])\r\n ], PurchaseConditionService);\r\n return PurchaseConditionService;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.PurchaseConditionService = PurchaseConditionService;\r\n\n\n/***/ }),\n\n/***/ 421:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Components\r\nvar home_component_1 = __webpack_require__(376);\r\nvar faq_component_1 = __webpack_require__(379);\r\nvar cookie_policy_component_1 = __webpack_require__(378);\r\nvar privacy_policy_component_1 = __webpack_require__(383);\r\nvar purchase_condition_component_1 = __webpack_require__(384);\r\nvar info_request_component_1 = __webpack_require__(380);\r\nvar user_login_component_1 = __webpack_require__(408);\r\nvar user_password_component_1 = __webpack_require__(409);\r\nvar register_component_1 = __webpack_require__(405);\r\nvar cms_page_component_1 = __webpack_require__(377);\r\nvar category_component_1 = __webpack_require__(389);\r\nvar product_details_component_1 = __webpack_require__(391);\r\nvar product_page_list_component_1 = __webpack_require__(392);\r\nvar promotions_component_1 = __webpack_require__(393);\r\nvar news_page_component_1 = __webpack_require__(374);\r\nvar other_product_component_1 = __webpack_require__(390);\r\nvar blog_page_component_1 = __webpack_require__(373);\r\nvar article_category_component_1 = __webpack_require__(372);\r\nvar client_area_home_component_1 = __webpack_require__(397);\r\nvar client_area_order_list_component_1 = __webpack_require__(388);\r\nvar client_area_profile_component_1 = __webpack_require__(400);\r\nvar cart_component_1 = __webpack_require__(396);\r\nvar cart_cash_component_1 = __webpack_require__(394);\r\nvar cart_submitted_component_1 = __webpack_require__(395);\r\nvar cart_empty_page_component_1 = __webpack_require__(385);\r\nvar client_area_order_details_component_1 = __webpack_require__(399);\r\nvar registration_confirmation_component_1 = __webpack_require__(407);\r\nvar offline_page_component_1 = __webpack_require__(387);\r\nvar payment_confirmation_component_1 = __webpack_require__(401);\r\nvar payment_unicredit_confirmation_component_1 = __webpack_require__(403);\r\nvar payment_nexi_confirmation_component_1 = __webpack_require__(402);\r\nvar not_found_page_component_1 = __webpack_require__(386);\r\nvar search_component_1 = __webpack_require__(375);\r\nvar client_area_invoices_component_1 = __webpack_require__(398);\r\nvar newsletter_confirmation_page_component_1 = __webpack_require__(381);\r\nvar newsletter_page_component_1 = __webpack_require__(382);\r\nvar registration_complete_component_1 = __webpack_require__(406);\r\nvar quick_registration_component_1 = __webpack_require__(404);\r\nvar SysConfig = (function () {\r\n function SysConfig() {\r\n }\r\n SysConfig.getComponentByName = function (componentName) {\r\n var component;\r\n switch (componentName) {\r\n case 'HomeComponent':\r\n component = home_component_1.HomeComponent;\r\n break;\r\n case 'FaqComponent':\r\n component = faq_component_1.FaqComponent;\r\n break;\r\n case 'ClientAreaHomeComponent':\r\n component = client_area_home_component_1.ClientAreaHomeComponent;\r\n break;\r\n case 'PrivacyPolicyComponent':\r\n component = privacy_policy_component_1.PrivacyPolicyComponent;\r\n break;\r\n case 'CookiePolicyComponent':\r\n component = cookie_policy_component_1.CookiePolicyComponent;\r\n break;\r\n case 'PurchaseConditionComponent':\r\n component = purchase_condition_component_1.PurchaseConditionComponent;\r\n break;\r\n case 'InfoRequestComponent':\r\n component = info_request_component_1.InfoRequestComponent;\r\n break;\r\n case 'UserLoginComponent':\r\n component = user_login_component_1.UserLoginComponent;\r\n break;\r\n case 'UserPasswordComponent':\r\n component = user_password_component_1.UserPasswordComponent;\r\n break;\r\n case 'RegisterComponent':\r\n component = register_component_1.RegisterComponent;\r\n break;\r\n case 'CmsPageComponent':\r\n component = cms_page_component_1.CmsPageComponent;\r\n break;\r\n case 'CategoryComponent':\r\n component = category_component_1.CategoryComponent;\r\n break;\r\n case 'ProductDetailsComponent':\r\n component = product_details_component_1.ProductDetailsComponent;\r\n break;\r\n case 'ProductPageListComponent':\r\n component = product_page_list_component_1.ProductPageListComponent;\r\n break;\r\n case 'PromotionsComponent':\r\n component = promotions_component_1.PromotionsComponent;\r\n break;\r\n case 'ArticleComponent':\r\n component = news_page_component_1.ArticleComponent;\r\n break;\r\n case 'OtherProductComponent':\r\n component = other_product_component_1.OtherProductComponent;\r\n break;\r\n case 'BlogPageComponent':\r\n component = blog_page_component_1.BlogPageComponent;\r\n break;\r\n case 'ArticleCategoryComponent':\r\n component = article_category_component_1.ArticleCategoryComponent;\r\n break;\r\n case 'ClientAreaOrderListComponent':\r\n component = client_area_order_list_component_1.ClientAreaOrderListComponent;\r\n break;\r\n case 'ClientAreaInvoicesComponent':\r\n component = client_area_invoices_component_1.ClientAreaInvoicesComponent;\r\n break;\r\n case 'ClientAreaProfileComponent':\r\n component = client_area_profile_component_1.ClientAreaProfileComponent;\r\n break;\r\n case 'CartComponent':\r\n component = cart_component_1.CartComponent;\r\n break;\r\n case 'CartCashComponent':\r\n component = cart_cash_component_1.CartCashComponent;\r\n break;\r\n case 'CartSubmittedComponent':\r\n component = cart_submitted_component_1.CartSubmittedComponent;\r\n break;\r\n case 'CartEmptyPageComponent':\r\n component = cart_empty_page_component_1.CartEmptyPageComponent;\r\n break;\r\n case 'ClientAreaOrderDetailsComponent':\r\n component = client_area_order_details_component_1.ClientAreaOrderDetailsComponent;\r\n break;\r\n case 'RegistrationConfirmationComponent':\r\n component = registration_confirmation_component_1.RegistrationConfirmationComponent;\r\n break;\r\n case 'PaymentConfirmationComponent':\r\n component = payment_confirmation_component_1.PaymentConfirmationComponent;\r\n break;\r\n case 'PaymentUnicreditConfirmationComponent':\r\n component = payment_unicredit_confirmation_component_1.PaymentUnicreditConfirmationComponent;\r\n break;\r\n case 'PaymentNexiConfirmationComponent':\r\n component = payment_nexi_confirmation_component_1.PaymentNexiConfirmationComponent;\r\n break;\r\n case 'OfflinePageComponent':\r\n component = offline_page_component_1.OfflinePageComponent;\r\n break;\r\n case \"NotFoundPageComponent\":\r\n component = not_found_page_component_1.NotFoundPageComponent;\r\n break;\r\n case \"SearchComponent\":\r\n component = search_component_1.SearchComponent;\r\n break;\r\n case \"NewsletterPageComponent\":\r\n component = newsletter_page_component_1.NewsletterPageComponent;\r\n break;\r\n case \"NewsletterConfirmationPageComponent\":\r\n component = newsletter_confirmation_page_component_1.NewsletterConfirmationPageComponent;\r\n break;\r\n case \"RegistrationConfirmationPageComponent\":\r\n component = registration_complete_component_1.RegistrationConfirmationPageComponent;\r\n break;\r\n case \"QuickRegistrationComponent\":\r\n component = quick_registration_component_1.QuickRegistrationComponent;\r\n break;\r\n default:\r\n component = null;\r\n }\r\n return component;\r\n };\r\n SysConfig.getAllComponents = function () {\r\n return [\r\n home_component_1.HomeComponent,\r\n faq_component_1.FaqComponent,\r\n client_area_home_component_1.ClientAreaHomeComponent,\r\n privacy_policy_component_1.PrivacyPolicyComponent,\r\n cookie_policy_component_1.CookiePolicyComponent,\r\n purchase_condition_component_1.PurchaseConditionComponent,\r\n info_request_component_1.InfoRequestComponent,\r\n user_login_component_1.UserLoginComponent,\r\n user_password_component_1.UserPasswordComponent,\r\n register_component_1.RegisterComponent,\r\n cms_page_component_1.CmsPageComponent,\r\n category_component_1.CategoryComponent,\r\n product_details_component_1.ProductDetailsComponent,\r\n product_page_list_component_1.ProductPageListComponent,\r\n promotions_component_1.PromotionsComponent,\r\n news_page_component_1.ArticleComponent,\r\n other_product_component_1.OtherProductComponent,\r\n blog_page_component_1.BlogPageComponent,\r\n article_category_component_1.ArticleCategoryComponent,\r\n client_area_order_list_component_1.ClientAreaOrderListComponent,\r\n client_area_invoices_component_1.ClientAreaInvoicesComponent,\r\n client_area_profile_component_1.ClientAreaProfileComponent,\r\n cart_component_1.CartComponent,\r\n cart_cash_component_1.CartCashComponent,\r\n cart_submitted_component_1.CartSubmittedComponent,\r\n cart_empty_page_component_1.CartEmptyPageComponent,\r\n client_area_order_details_component_1.ClientAreaOrderDetailsComponent,\r\n registration_confirmation_component_1.RegistrationConfirmationComponent,\r\n payment_confirmation_component_1.PaymentConfirmationComponent,\r\n payment_unicredit_confirmation_component_1.PaymentUnicreditConfirmationComponent,\r\n payment_nexi_confirmation_component_1.PaymentNexiConfirmationComponent,\r\n offline_page_component_1.OfflinePageComponent,\r\n not_found_page_component_1.NotFoundPageComponent,\r\n search_component_1.SearchComponent,\r\n newsletter_page_component_1.NewsletterPageComponent,\r\n newsletter_confirmation_page_component_1.NewsletterConfirmationPageComponent,\r\n registration_complete_component_1.RegistrationConfirmationPageComponent,\r\n quick_registration_component_1.QuickRegistrationComponent\r\n ];\r\n };\r\n SysConfig = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [])\r\n ], SysConfig);\r\n return SysConfig;\r\n}());\r\nexports.SysConfig = SysConfig;\r\n\n\n/***/ }),\n\n/***/ 44:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar crypto_service_1 = __webpack_require__(259);\r\nvar core_1 = __webpack_require__(0);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar common_1 = __webpack_require__(45);\r\nvar rxjs_1 = __webpack_require__(265);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar http_1 = __webpack_require__(96);\r\nvar CustomersCanvasService = (function () {\r\n function CustomersCanvasService(_api, location, mappings, http, cryptoService) {\r\n this._api = _api;\r\n this.location = location;\r\n this.mappings = mappings;\r\n this.http = http;\r\n this.cryptoService = cryptoService;\r\n // Observable string sources\r\n this.isCanvasModalOpenedSource = new rxjs_1.Subject();\r\n this.isCanvasProductDesignApprovedSource = new rxjs_1.Subject();\r\n // Observable string streams\r\n this.isCanvasModalOpened$ = this.isCanvasModalOpenedSource.asObservable();\r\n this.isCanvasProductDesignApproved$ = this.isCanvasProductDesignApprovedSource.asObservable();\r\n this.toShowCanvasContainer = false;\r\n //Object containing data generated by getProofImages.\r\n this.approveData = null;\r\n //Object containing data generated by finishProductDesign.\r\n this.renderData = null;\r\n //Object containing data generated by saveProduct.\r\n this.saveData = null;\r\n this.editor = null;\r\n this.loadData = null;\r\n this.currentPage = \"design\";\r\n this.workflowPages = {};\r\n this.documentLinks = [\"\"];\r\n }\r\n // Service canvas state / if it is opened or closed \r\n CustomersCanvasService.prototype.setCanvasState = function (isOpened) {\r\n this.isCanvasModalOpenedSource.next(isOpened);\r\n };\r\n // Service canvas state / if product design is approved or not\r\n CustomersCanvasService.prototype.setCanvasProductDesignState = function (isApproved) {\r\n this.isCanvasProductDesignApprovedSource.next(isApproved);\r\n };\r\n //load a script and after it is loaded, instantiate an canvas iframe\r\n CustomersCanvasService.prototype.openCanvasEditor = function (canvasInfo, isStateId) {\r\n var _this = this;\r\n var canvasUrl = this.cryptoService.decryptString(canvasInfo.CanvasUrl);\r\n if (canvasUrl != \"\") {\r\n var canvasScript = document.querySelector('script[src=\\\"' + canvasUrl + '\\\"]');\r\n // set canvas state as opened, so inside of components we know when to stick and when unstick some divs\r\n this.setCanvasState(true);\r\n // if script is already loaded, don't append it again\r\n if (canvasScript == null) {\r\n var node = document.createElement('script');\r\n node.src = canvasUrl;\r\n node.setAttribute(\"id\", \"CcIframeApiScript\");\r\n node.type = 'text/javascript';\r\n node.async = true;\r\n node.charset = 'utf-8';\r\n // to display canvas container\r\n this.toShowCanvasContainer = true;\r\n // after script is loaded, instantiate canvas iframe\r\n node.onload = function () {\r\n _this.instanciateIframe(canvasInfo, isStateId);\r\n };\r\n document.getElementsByTagName('head')[0].appendChild(node);\r\n }\r\n else {\r\n this.instanciateIframe(canvasInfo, isStateId);\r\n }\r\n }\r\n };\r\n CustomersCanvasService.prototype.instanciateIframe = function (canvasInfo, isStateId) {\r\n var _this = this;\r\n var templateImagesFolderPath = canvasInfo.TemplateImagesFolderPath;\r\n var canvasUserUsername = canvasInfo.CustomerCanvasUserName;\r\n var watermark = canvasInfo.Watermark;\r\n // defining product folder path\r\n var productDefinition;\r\n if (isStateId) {\r\n // getting design by state id\r\n productDefinition = canvasInfo.CanvasStateId;\r\n }\r\n else {\r\n productDefinition = { surfaces: templateImagesFolderPath };\r\n }\r\n // const productDefinition = { surfaces: { designFolder: productFolderPath } };\r\n var editorFrame = document.getElementById(\"editorFrame\");\r\n var configuration = {\r\n userId: canvasUserUsername,\r\n initialMode: \"Advanced\",\r\n watermark: {\r\n text: {\r\n text: watermark,\r\n opacity: 0.3\r\n }\r\n },\r\n widgets: {\r\n // To disable a download button when the project is in the production\r\n FinishButton: { mode: \"Disabled\" },\r\n GalleryDialog: {\r\n defaultTabName: \"User\",\r\n tabs: [\r\n {\r\n name: \"User\",\r\n type: \"user\",\r\n translationKey: \"GalleryDialog.TAB_USER\",\r\n canEdit: true,\r\n canUpload: true\r\n },\r\n {\r\n name: \"Public\",\r\n type: \"public\",\r\n subFolderName: \"\",\r\n translationKey: \"GalleryDialog.TAB_PUBLIC\",\r\n canEdit: false\r\n }\r\n ]\r\n }\r\n }\r\n };\r\n CustomersCanvas.IframeApi.loadEditor(editorFrame, productDefinition, configuration)\r\n .then(function (e) {\r\n _this.editor = e;\r\n })\r\n .catch(function (error) {\r\n if (error != null) {\r\n _this.loadData = _this.handleError(error, \"Load failed with exception: \");\r\n }\r\n });\r\n };\r\n CustomersCanvasService.prototype.saveCanvasProduct = function () {\r\n var _this = this;\r\n this.editor.saveProduct()\r\n .then(function (result) {\r\n //Saving the product state info.\r\n _this.saveData = result;\r\n })\r\n .catch(function (error) {\r\n _this.saveData = _this.handleError(error, \"Save failed with exception: \");\r\n });\r\n };\r\n CustomersCanvasService.prototype.getImagesLinks = function (editorPage, approvePage, finishOrderPage) {\r\n var _this = this;\r\n this.workflowPages = {\r\n \"design\": { elements: editorPage },\r\n \"approve\": { elements: approvePage },\r\n \"finish\": { elements: finishOrderPage }\r\n };\r\n this.documentLinks = [];\r\n if (this.editor) {\r\n this.editor.getProofImages()\r\n .then(function (result) {\r\n //Saving proof images info.\r\n _this.approveData = result;\r\n // add all links to images to the documentLinks, because we will use that list for element manipulation later\r\n if (_this.approveData.proofImageUrls) {\r\n _this.approveData.proofImageUrls.forEach(function (element) {\r\n if (element.length > 0) {\r\n _this.documentLinks.push(element[0]);\r\n }\r\n });\r\n }\r\n //Go to the approval page.\r\n _this.setupPage(\"approve\");\r\n _this.setBackgroundImagesUrl();\r\n })\r\n .catch(function (error) {\r\n _this.approveData = _this.handleError(error, \"Getting proof images failed with exception: \");\r\n });\r\n }\r\n };\r\n //img tags inside of slider are later changed to be divs with background image url property, so we need to manage that\r\n CustomersCanvasService.prototype.setBackgroundImagesUrl = function () {\r\n var sliderImageElements = $(\".tp-bgimg.defaultimg\");\r\n // because we can't use *ngFor to create as many elements as we need, we need to remove one li element if there is actually only one element we get from customer canvas(we have 2 elements in html)\r\n if (sliderImageElements.length > this.documentLinks.length) {\r\n var differenceItems = sliderImageElements.length - this.documentLinks.length;\r\n for (var index = 1; index <= differenceItems; index++) {\r\n var element = sliderImageElements[sliderImageElements.length - index];\r\n //remove li parent of element we found\r\n var parentLi = $(element).parents(\"li\");\r\n $(parentLi)[0].remove();\r\n }\r\n }\r\n //because we can't use angular binding with slider plugin (plugin is initialized before service), we need to set url and src attributes of each slide\r\n if (this.documentLinks && this.documentLinks.length > 0) {\r\n sliderImageElements = $(\".tp-bgimg.defaultimg\");\r\n for (var index = 0; index < this.documentLinks.length; index++) {\r\n var link = this.documentLinks[index];\r\n var foundDomElement = $(sliderImageElements)[index];\r\n if (foundDomElement) {\r\n $(foundDomElement).css('background-image', 'url(' + link + ')');\r\n $(foundDomElement).attr(\"src\", link);\r\n }\r\n }\r\n }\r\n };\r\n CustomersCanvasService.prototype.finishProductCustomization = function () {\r\n return this.editor.finishProductDesign();\r\n };\r\n CustomersCanvasService.prototype.setupPageAfterProductCustomization = function (renderData, isError) {\r\n if (!isError) {\r\n this.renderData = renderData;\r\n }\r\n else {\r\n this.renderData = this.handleError(renderData, \"Product customization completion failed with exception: \");\r\n }\r\n };\r\n CustomersCanvasService.prototype.openDocumentInNewTab = function () {\r\n var sliderElements = $(\"#approvePage ul li\");\r\n if (sliderElements.length > 0) {\r\n for (var index = 0; index < sliderElements.length; index++) {\r\n var element = sliderElements[index];\r\n //if element has this class, it means it is active inside of slider, so we want to open that element in a new tab\r\n if ($(element).hasClass(\"active-revslide\")) {\r\n window.open(this.documentLinks[index], \"_blank\");\r\n }\r\n }\r\n }\r\n };\r\n CustomersCanvasService.prototype.openNewProductInEditor = function () {\r\n if (this.editor != null) {\r\n this.editor.revertProduct();\r\n this.setupPage(\"design\");\r\n }\r\n };\r\n CustomersCanvasService.prototype.reopenProductInEditor = function () {\r\n this.setupPage(\"design\");\r\n };\r\n // set details of view we want to show and set layout properties depending on view\r\n CustomersCanvasService.prototype.setupPage = function (page) {\r\n var _this = this;\r\n var destPageData = this.workflowPages[page];\r\n if (this.workflowPages[this.currentPage]) {\r\n var elements = this.workflowPages[this.currentPage].elements;\r\n if (elements && elements.nativeElement && elements.nativeElement.id) {\r\n // getting id of element that needs to be hidden\r\n var generatedIdHide = \"#\" + elements.nativeElement.id;\r\n $(generatedIdHide).fadeOut(function () {\r\n if (destPageData && destPageData.elements && destPageData.elements.nativeElement && destPageData.elements.nativeElement.id) {\r\n // getting id of element that needs to be shown\r\n var generatedIdShow = \"#\" + destPageData.elements.nativeElement.id;\r\n $(generatedIdShow).show();\r\n _this.currentPage = page;\r\n }\r\n });\r\n }\r\n }\r\n };\r\n CustomersCanvasService.prototype.handleError = function (error, message) {\r\n console.error(message, error);\r\n return error;\r\n };\r\n ;\r\n CustomersCanvasService.prototype.updatePrevCanvasInfo = function (canvasData) {\r\n var url = this.mappings.Web_Api_Update_Prev_Canvas_Info;\r\n var params = {\r\n RowIdPrev: canvasData.RowIdPrev,\r\n CanvasStateId: canvasData.stateId,\r\n CanvasHiResOutputUrls: canvasData.hiResOutputUrls\r\n };\r\n return this._api.post(url, params);\r\n };\r\n // removing state from customers canvas\r\n CustomersCanvasService.prototype.deleteCustomerCanvasState = function (canvasInfo) {\r\n // const apiKey = '01b3ecc6-6423-4684-b469-f258afa87100';\r\n var decryptedApiKey = this.cryptoService.decryptString(canvasInfo.CanvasApiKey);\r\n var baseUrl = this.mappings.Canvas_Web_Api_Base_Url.replace('{apiKey}', decryptedApiKey);\r\n var url = baseUrl + this.mappings.Web_Api_Delete_Customers_Canvas_State;\r\n url = url.replace('{userId}', canvasInfo.CustomerCanvasUserName).replace('{stateId}', canvasInfo.CanvasStateId);\r\n var apiKeyFinal = \"ApiKey_\" + decryptedApiKey;\r\n // configure headers for creating a valid request\r\n var options = {};\r\n options.headers = new http_1.Headers();\r\n options.headers.append('X-CustomersCanvasAPIKey', apiKeyFinal);\r\n options.headers.append('Content-Type', 'application/json');\r\n return this.http.delete(url, options);\r\n };\r\n CustomersCanvasService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof common_1.PlatformLocation !== 'undefined' && common_1.PlatformLocation) === 'function' && _b) || Object, (typeof (_c = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _c) || Object, (typeof (_d = typeof http_1.Http !== 'undefined' && http_1.Http) === 'function' && _d) || Object, (typeof (_e = typeof crypto_service_1.CryptoService !== 'undefined' && crypto_service_1.CryptoService) === 'function' && _e) || Object])\r\n ], CustomersCanvasService);\r\n return CustomersCanvasService;\r\n var _a, _b, _c, _d, _e;\r\n}());\r\nexports.CustomersCanvasService = CustomersCanvasService;\r\n\n\n/***/ }),\n\n/***/ 464:\n/***/ (function(module, exports) {\n\nfunction webpackEmptyContext(req) {\n\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = 464;\n\n\n/***/ }),\n\n/***/ 467:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\r\n * THIS IS TEMPORARY TO PATCH 2.1.1+ Core bugs\r\n */\r\n\r\n/* tslint:disable */\r\nvar __compiler__ = __webpack_require__(105);\r\nvar core_1 = __webpack_require__(0);\r\nif (!core_1.__core_private__['ViewUtils']) {\r\n core_1.__core_private__['ViewUtils'] = core_1.__core_private__['view_utils'];\r\n}\r\nif (__compiler__ && __compiler__.SelectorMatcher && __compiler__.CssSelector) {\r\n (__compiler__).__compiler_private__ = {\r\n SelectorMatcher: __compiler__.SelectorMatcher,\r\n CssSelector: __compiler__.CssSelector\r\n };\r\n}\r\n\n\n/***/ }),\n\n/***/ 468:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar forms_1 = __webpack_require__(228);\r\nvar router_1 = __webpack_require__(13);\r\nvar browser_1 = __webpack_require__(280); // for AoT we need to manually split universal packages\r\nvar idle_preload_1 = __webpack_require__(583);\r\nvar http_1 = __webpack_require__(96);\r\nvar core_2 = __webpack_require__(27);\r\nvar app_module_1 = __webpack_require__(592);\r\nvar shared_module_1 = __webpack_require__(87);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar node_logger_service_1 = __webpack_require__(260);\r\n// Will be merged into @angular/platform-browser in a later release\r\n// see https://github.com/angular/angular/pull/12322\r\nvar angular2_meta_1 = __webpack_require__(101);\r\nvar default_request_options_1 = __webpack_require__(623);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar routes_browser_service_1 = __webpack_require__(626);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar application_service_1 = __webpack_require__(130);\r\nvar browser_2 = __webpack_require__(627);\r\n// import * as LRU from 'modern-lru';\r\nfunction getLRU(lru) {\r\n // use LRU for node\r\n // return lru || new LRU(10);\r\n return lru || new Map();\r\n}\r\nexports.getLRU = getLRU;\r\nfunction getRequest() {\r\n // the request object only lives on the server\r\n return { cookie: document.cookie };\r\n}\r\nexports.getRequest = getRequest;\r\nfunction getResponse() {\r\n // the response object is sent as the index.html and lives on the server\r\n return {};\r\n}\r\nexports.getResponse = getResponse;\r\nfunction TranslateStaticLoaderFactory(http, cache) {\r\n return new browser_2.TranslateStaticLoader(http, cache);\r\n}\r\nexports.TranslateStaticLoaderFactory = TranslateStaticLoaderFactory;\r\n// TODO(gdi2290): refactor into Universal\r\nexports.UNIVERSAL_KEY = 'UNIVERSAL_CACHE';\r\nvar MainModule = (function () {\r\n function MainModule(cache, nodeLogger, routes, translate) {\r\n this.cache = cache;\r\n this.nodeLogger = nodeLogger;\r\n this.routes = routes;\r\n this.translate = translate;\r\n // TODO(gdi2290): refactor into a lifecycle hook\r\n this.doRehydrate();\r\n this.translate.use(this.routes.getLang());\r\n this.routes.loadRoutes();\r\n }\r\n MainModule.prototype.doRehydrate = function () {\r\n var defaultValue = {};\r\n var serverCache = this._getCacheValue(cache_service_1.CacheService.KEY, defaultValue);\r\n this.cache.rehydrate(serverCache);\r\n };\r\n MainModule.prototype._getCacheValue = function (key, defaultValue) {\r\n // browser\r\n var win = window;\r\n if (win[exports.UNIVERSAL_KEY] && win[exports.UNIVERSAL_KEY][key]) {\r\n var serverCache = defaultValue;\r\n try {\r\n serverCache = JSON.parse(win[exports.UNIVERSAL_KEY][key]);\r\n if (typeof serverCache !== typeof defaultValue) {\r\n console.log('Angular Universal: The type of data from the server is different from the default value type');\r\n serverCache = defaultValue;\r\n }\r\n }\r\n catch (e) {\r\n console.log('Angular Universal: There was a problem parsing the server data during rehydrate');\r\n serverCache = defaultValue;\r\n }\r\n return serverCache;\r\n }\r\n else {\r\n console.log('Angular Universal: UNIVERSAL_CACHE is missing');\r\n }\r\n return defaultValue;\r\n };\r\n MainModule = __decorate([\r\n core_1.NgModule({\r\n bootstrap: [app_module_1.AppComponent],\r\n imports: [\r\n browser_1.UniversalModule,\r\n forms_1.FormsModule,\r\n core_2.TranslateModule.forRoot({\r\n loader: {\r\n provide: core_2.TranslateLoader,\r\n useFactory: (TranslateStaticLoaderFactory),\r\n deps: [api_service_1.ApiService, application_service_1.ApplicationService]\r\n }\r\n }),\r\n router_1.RouterModule.forRoot([], { useHash: false, preloadingStrategy: idle_preload_1.IdlePreload }),\r\n idle_preload_1.IdlePreloadModule.forRoot(),\r\n shared_module_1.SharedModule.forRoot(),\r\n app_module_1.AppModule\r\n ],\r\n providers: [\r\n { provide: http_1.RequestOptions, useClass: default_request_options_1.DefaultRequestOptions },\r\n { provide: 'CookieService', useClass: cookie_1.CookieBrowserService },\r\n { provide: routes_service_1.RoutesService, useClass: routes_browser_service_1.RoutesBrowserService },\r\n { provide: 'isBrowser', useValue: browser_1.isBrowser },\r\n { provide: 'isNode', useValue: browser_1.isNode },\r\n { provide: 'req', useFactory: getRequest },\r\n { provide: 'res', useFactory: getResponse },\r\n { provide: 'LRU', useFactory: getLRU, deps: [] },\r\n node_logger_service_1.NodeLoggerService,\r\n cache_service_1.CacheService,\r\n angular2_meta_1.Meta\r\n ]\r\n }), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _a) || Object, (typeof (_b = typeof node_logger_service_1.NodeLoggerService !== 'undefined' && node_logger_service_1.NodeLoggerService) === 'function' && _b) || Object, (typeof (_c = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object])\r\n ], MainModule);\r\n return MainModule;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.MainModule = MainModule;\r\n\n\n/***/ }),\n\n/***/ 49:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar HelperService = (function () {\r\n function HelperService() {\r\n }\r\n //Return the name of a file, withouth extention, from a path \r\n //Eg. \r\n //Input:http://www.wscprinter.it/business-cards.jpg\r\n //Output:business-cards\r\n HelperService.prototype.GetFileNameFromPath = function (filePath) {\r\n var fileName = \"\";\r\n if (filePath != null) {\r\n var split = filePath.split(\"/\");\r\n if (split != null) {\r\n var pop = split.pop();\r\n if (pop != null) {\r\n fileName = pop.replace(/\\.[^/.]+$/, \"\");\r\n }\r\n }\r\n return fileName;\r\n }\r\n };\r\n HelperService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [])\r\n ], HelperService);\r\n return HelperService;\r\n}());\r\nexports.HelperService = HelperService;\r\n\n\n/***/ }),\n\n/***/ 57:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar QuotingModel = (function () {\r\n function QuotingModel() {\r\n this.categorieCarteCount = 0;\r\n this.categorieCarteCopertinaCount = 0;\r\n this.carte1Count = 0;\r\n this.carte2Count = 0;\r\n this.colori1Count = 0;\r\n this.colori2Count = 0;\r\n this.grammature1Count = 0;\r\n this.grammature2Count = 0;\r\n this.plastificazioni1Count = 0;\r\n this.plastificazioni2Count = 0;\r\n this.piegatureCount = 0;\r\n this.materialiFlessibiliCount = 0;\r\n this.copieCount = 0;\r\n this.supportiRigidiCount = 0;\r\n this.elettrosaldatureCount = 0;\r\n this.tagliCount = 0;\r\n this.copertineCount = 0;\r\n this.rilegatureCount = 0;\r\n this.facciateCount = 0;\r\n this.tipologieBustaCount = 0;\r\n this.multiploFacciate = 0;\r\n this.copieIsValid = true;\r\n this.facciateIsValid = true;\r\n this.formatiIsValid = true;\r\n this.carte1IsValid = true;\r\n this.grammature1IsValid = true;\r\n this.carte2IsValid = true;\r\n this.grammature2IsValid = true;\r\n this.copertineIsValid = true;\r\n this.rilegatureIsValid = true;\r\n this.lavorazioniIsValid = true;\r\n this.taglioShowed = false;\r\n this.isTaglioVisible = false;\r\n this.copieOrder = 0;\r\n this.facciateOrder = 0;\r\n this.formatiOrder = 0;\r\n this.stampaInternoFronteOrder = 0;\r\n this.stampaInternoOrder = 0;\r\n this.carteInternoOrder = 0;\r\n this.plastificazioniInternoOrder = 0;\r\n this.copertineOrder = 0;\r\n this.stampaCopertinaFronteOrder = 0;\r\n this.stampaCopertinaOrder = 0;\r\n this.cartaCopertinaOrder = 0;\r\n this.plastificazioniCopertinaOrder = 0;\r\n this.cartoncinoOrder = 0;\r\n this.rilegatureOrder = 0;\r\n this.rifiloOrder = 0;\r\n this.lavorazioniAccessorieOrder = 0;\r\n this.piegatureIsValid = true;\r\n this.plastificazione1IsValid = true;\r\n this.plastificazione2IsValid = true;\r\n this.soggettiOrder = 0;\r\n this.soggettiIsValid = true;\r\n this.baseFormatoIsValid = true;\r\n this.baseFormatoMessage = \"\";\r\n this.altezzaFormatoIsValid = true;\r\n this.altezzaFormatoMessage = \"\";\r\n this.formatiVisual = false;\r\n this.stampaInternoVisual = false;\r\n this.carteInternoVisual = false;\r\n this.plastificazioniInternoVisual = false;\r\n this.copertineVisual = false;\r\n this.stampaCopertinaVisual = false;\r\n this.cartaCopertinaVisual = false;\r\n this.plastificazioniCopertinaVisual = false;\r\n this.rilegatureVisual = false;\r\n this.lavorazioniAccessorieVisual = false;\r\n this.piegatureVisual = false;\r\n this.taglioOrder = 0;\r\n this.taglioIsValid = true;\r\n this.bustaOrder = 0;\r\n this.bustaIsValid = true;\r\n this.materialeOrder = 0;\r\n this.materialeIsValid = true;\r\n this.supportoOrder = 0;\r\n this.supportoIsValid = true;\r\n this.idGruppo = 0;\r\n this.occhiellaturaOrder = 0;\r\n this.occhiellaturaIsValid = true;\r\n this.occhielliCount = 0;\r\n this.occhielliDisposizioneCount = 0;\r\n this.asolaOrder = 0;\r\n this.asolaIsValid = true;\r\n this.asoleCount = 0;\r\n this.asoleDisposizioniCount = 0;\r\n this.cucituraOrder = 0;\r\n this.cucituraIsValid = true;\r\n this.cucitureCount = 0;\r\n this.cucitureDisposizioniCount = 0;\r\n this.elettroOrder = 0;\r\n this.elettroIsValid = true;\r\n this.elettrosaldatureDisposizioniCount = 0;\r\n this.bifaccialeOrder = 0;\r\n this.biancoCoprenteOrder = 0;\r\n this.biancoCoprenteCount = 0;\r\n this.distanzaOcchielliIsValid = true;\r\n this.diametroAsolaIsValid = true;\r\n this.pantoniCount = 0;\r\n this.colori1IsValid = true;\r\n //Cartoncino\r\n this.cartoncinoIsValid = true;\r\n this.cartoncinoVisual = false;\r\n this.cartonciniCount = 0;\r\n this.grammatureCartoncinoIsValid = true;\r\n this.grammatureCartoncinoCount = 0;\r\n this.basePackagingIsValid = true;\r\n this.profonditaPackagingIsValid = true;\r\n this.idBasePackaging = 0;\r\n this.idProfonditaPackaging = 0;\r\n this.formatiCount = 0;\r\n this.gapLabel = 0;\r\n this.diametroInterno = 0;\r\n this.diametroMassimoEsterno = 0;\r\n this.formatiTipoLabelCount = 0;\r\n this.formatiTipoLabelIsValid = true;\r\n this.fustelleLabelCount = 0;\r\n this.fustellaLabelIsValid = true;\r\n this.avvolgimentiCount = 0;\r\n this.avvolgimentiIsValid = true;\r\n this.numEtichetteIsValid = true;\r\n this.numEtichette = \"1\";\r\n this.DiametroInternoAnimaEditabileLabel = false;\r\n this.DiametroInternoAnimaIsValid = true;\r\n this.DiametroMassimoEsternoAnimaEditabile = false;\r\n this.DiametroMassimoEsternoAnimaIsValid = true;\r\n }\r\n return QuotingModel;\r\n}());\r\nexports.QuotingModel = QuotingModel;\r\nvar FileCombinationModel = (function () {\r\n function FileCombinationModel() {\r\n }\r\n return FileCombinationModel;\r\n}());\r\nexports.FileCombinationModel = FileCombinationModel;\r\nvar Object = (function () {\r\n function Object() {\r\n this.isVisible = true;\r\n }\r\n return Object;\r\n}());\r\nexports.Object = Object;\r\nvar WizardListinoScontistica = (function () {\r\n function WizardListinoScontistica() {\r\n }\r\n return WizardListinoScontistica;\r\n}());\r\nexports.WizardListinoScontistica = WizardListinoScontistica;\r\nvar SelectObject = (function () {\r\n function SelectObject() {\r\n }\r\n return SelectObject;\r\n}());\r\nexports.SelectObject = SelectObject;\r\nvar MyVarianteMatrice = (function () {\r\n function MyVarianteMatrice() {\r\n }\r\n return MyVarianteMatrice;\r\n}());\r\nexports.MyVarianteMatrice = MyVarianteMatrice;\r\nvar MyLavorazioneAccessoria = (function () {\r\n function MyLavorazioneAccessoria() {\r\n this.isValid = false;\r\n this.isVisible = true;\r\n this.valoriCount = 0;\r\n }\r\n return MyLavorazioneAccessoria;\r\n}());\r\nexports.MyLavorazioneAccessoria = MyLavorazioneAccessoria;\r\nvar Regola = (function () {\r\n function Regola() {\r\n }\r\n return Regola;\r\n}());\r\nexports.Regola = Regola;\r\nvar MyLavorazioneAccessoriaReturn = (function () {\r\n function MyLavorazioneAccessoriaReturn() {\r\n }\r\n return MyLavorazioneAccessoriaReturn;\r\n}());\r\nexports.MyLavorazioneAccessoriaReturn = MyLavorazioneAccessoriaReturn;\r\nvar LavorazioniComponents = (function () {\r\n function LavorazioniComponents() {\r\n this.checkBox = 0;\r\n this.inputBox = 1;\r\n this.selectBox = 2;\r\n }\r\n return LavorazioniComponents;\r\n}());\r\nexports.LavorazioniComponents = LavorazioniComponents;\r\n\n\n/***/ }),\n\n/***/ 592:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(87);\r\nvar app_component_1 = __webpack_require__(371);\r\nvar home_module_1 = __webpack_require__(597);\r\nvar cms_page_module_1 = __webpack_require__(599);\r\nvar inventory_product_module_1 = __webpack_require__(614);\r\nvar inventory_category_module_1 = __webpack_require__(613);\r\nvar settings_module_1 = __webpack_require__(615);\r\nvar system_configuration_service_1 = __webpack_require__(421);\r\nvar ng2_table_1 = __webpack_require__(426);\r\n// Need for defer included components by dynamic routing\r\nvar entryComponents = system_configuration_service_1.SysConfig.getAllComponents();\r\nvar AppModule = (function () {\r\n function AppModule() {\r\n }\r\n AppModule = __decorate([\r\n core_1.NgModule({\r\n declarations: [app_component_1.AppComponent],\r\n imports: [\r\n shared_module_1.SharedModule,\r\n home_module_1.HomeModule,\r\n cms_page_module_1.CmsPageModule,\r\n inventory_product_module_1.InventoryProductModule,\r\n inventory_category_module_1.InventoryCategoryModule,\r\n settings_module_1.SettingsModule,\r\n ng2_table_1.Ng2TableModule,\r\n ],\r\n entryComponents: entryComponents.slice()\r\n }), \r\n __metadata('design:paramtypes', [])\r\n ], AppModule);\r\n return AppModule;\r\n}());\r\nexports.AppModule = AppModule;\r\nvar app_component_2 = __webpack_require__(371);\r\nexports.AppComponent = app_component_2.AppComponent;\r\n\n\n/***/ }),\n\n/***/ 593:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar article_service_1 = __webpack_require__(128);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar NewsListComponent = (function () {\r\n function NewsListComponent(_compiler, componentHelper, _elementRef, templateService, articleService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.templateService = templateService;\r\n this.articleService = articleService;\r\n this.isBrowser = isBrowser;\r\n this.columns = 4;\r\n }\r\n NewsListComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n //Depending on the type of the list, a different template is used\r\n var subComponentTemplateUrl;\r\n switch (this.newsOrientation) {\r\n case \"newsVertical\":\r\n subComponentTemplateUrl = \"newsListVerticalPageTemplate\";\r\n break;\r\n case \"newsHorizontal\":\r\n subComponentTemplateUrl = \"newsListHorizontalPageTemplate\";\r\n break;\r\n case \"newsVerticalBanner\":\r\n subComponentTemplateUrl = \"newsListVerticalBannerPageTemplate\";\r\n break;\r\n case \"newsHorizontalBanner\":\r\n subComponentTemplateUrl = \"newsListHorizontalBannerHomepageTemplate\";\r\n break;\r\n }\r\n this.articleService.getArticleList(this.category, subComponentTemplateUrl).subscribe(function (result) {\r\n var templateData = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(templateData, _this.items, _this.category, _this.newsOrientation, _this.headerTypeNews, _this.columns);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n };\r\n NewsListComponent.prototype.createSubComponent = function (response, inputItems, inputCategory, inputNewsOrientation, inputHeaderTypeNews, inputColumns) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(languageService, articleService) {\r\n this.languageService = languageService;\r\n this.articleService = articleService;\r\n this.items = inputItems;\r\n this.category = inputCategory;\r\n this.newsOrientation = inputNewsOrientation;\r\n this.headerTypeNews = inputHeaderTypeNews;\r\n this.lang = this.languageService.getLongLang();\r\n this.columns = inputColumns;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n this.items = response.ArticleList;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: response.TemplateHtml\r\n }), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _a) || Object, (typeof (_b = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _b) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Object)\r\n ], NewsListComponent.prototype, \"items\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', String)\r\n ], NewsListComponent.prototype, \"category\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', String)\r\n ], NewsListComponent.prototype, \"newsOrientation\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', String)\r\n ], NewsListComponent.prototype, \"headerTypeNews\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Number)\r\n ], NewsListComponent.prototype, \"columns\", void 0);\r\n NewsListComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-article-list\",\r\n template: \"\"\r\n }),\r\n __param(5, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof article_service_1.ArticleService !== 'undefined' && article_service_1.ArticleService) === 'function' && _e) || Object, Boolean])\r\n ], NewsListComponent);\r\n return NewsListComponent;\r\n var _a, _b, _c, _d, _e;\r\n}());\r\nexports.NewsListComponent = NewsListComponent;\r\n\n\n/***/ }),\n\n/***/ 594:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//System\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar newsletter_service_1 = __webpack_require__(85);\r\n//Models\r\nvar user_login_1 = __webpack_require__(72);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar header_service_1 = __webpack_require__(129);\r\nvar FooterComponent = (function () {\r\n function FooterComponent(_compiler, componentHelper, _elementRef, cmsComponentService, route, router, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.cmsComponentService = cmsComponentService;\r\n this.route = route;\r\n this.router = router;\r\n this.isBrowser = isBrowser;\r\n this.data = {};\r\n this.subManager = new Subscription_1.Subscription();\r\n this.router.routeReuseStrategy.shouldReuseRoute = function () { return false; };\r\n }\r\n FooterComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n if (this.parentFooterData != null) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = this.createSubComponent(this.parentFooterData);\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n var footerData_1;\r\n var footerSub = this.cmsComponentService.getFooterData().subscribe(function (result) {\r\n footerData_1 = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(footerData_1);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(footerSub);\r\n }\r\n };\r\n FooterComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n //Creates component to inject \r\n FooterComponent.prototype.createSubComponent = function (footerData) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(routesService, authService, newsletterService, headerService) {\r\n var _this = this;\r\n this.routesService = routesService;\r\n this.authService = authService;\r\n this.newsletterService = newsletterService;\r\n this.headerService = headerService;\r\n this.loggedIdUser = new user_login_1.UserLogin();\r\n this.company = footerData.Company;\r\n this.isActiveQuickRegistration = footerData.IsActiveQuickRegistration;\r\n this.faqPageName = this.routesService.getRoutePath('FAQ');\r\n this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n this.cookiePageName = this.routesService.getRoutePath('INFO COOKIE');\r\n this.purchasePageName = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n this.contactPageName = this.routesService.getRoutePath('RICHIESTA INFORMAZIONI');\r\n this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n this.passwordPageName = this.routesService.getRoutePath('RECUPERA PASSWORD');\r\n this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n this.areaClientiPageName = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n this.carrelloPageName = this.routesService.getRoutePath('CARRELLO');\r\n this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n this.isCaptchaInvalid = true;\r\n this.siteKey = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n this.theme = \"light\";\r\n this.isArrayInit = false;\r\n this.spinnerNewslatter = false;\r\n this.model = {\r\n Email: \"\"\r\n };\r\n this.subManager = new Subscription_1.Subscription();\r\n this.headerService.getLoggedInUser().subscribe(function (user) {\r\n _this.loggedIdUser = user;\r\n });\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n //setup of links, they must start with http to work properly\r\n var linkStart = \"http://\";\r\n var linkSecuredStart = \"https://\";\r\n if (this.company.Facebook != null) {\r\n if (this.company.Facebook.indexOf(linkStart) == -1 && this.company.Facebook.indexOf(linkSecuredStart) == -1) {\r\n this.company.Facebook = linkStart + this.company.Facebook;\r\n }\r\n }\r\n if (this.company.Youtube != null) {\r\n if (this.company.Youtube.indexOf(linkStart) == -1 && this.company.Youtube.indexOf(linkSecuredStart) == -1) {\r\n this.company.Youtube = linkStart + this.company.Youtube;\r\n }\r\n }\r\n if (this.company.Twitter != null) {\r\n if (this.company.Twitter.indexOf(linkStart) == -1 && this.company.Twitter.indexOf(linkSecuredStart) == -1) {\r\n this.company.Twitter = linkStart + this.company.Twitter;\r\n }\r\n }\r\n if (this.company.Website != null) {\r\n if (this.company.Website.indexOf(linkStart) == -1 && this.company.Website.indexOf(linkSecuredStart) == -1) {\r\n this.company.Website = linkStart + this.company.Website;\r\n }\r\n }\r\n if (this.company.Instagram != null) {\r\n if (this.company.Instagram.indexOf(linkStart) == -1 && this.company.Instagram.indexOf(linkSecuredStart) == -1) {\r\n this.company.Instagram = linkStart + this.company.Instagram;\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.onSubmit = function (form) {\r\n var _this = this;\r\n this.spinnerNewslatter = true;\r\n if (form) {\r\n var newsletterSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(function (result) {\r\n if (result == \"-1\") {\r\n _this.alreadySubscribed = true;\r\n _this.successfullySubscribed = false;\r\n _this.spinnerNewslatter = false;\r\n }\r\n else {\r\n _this.alreadySubscribed = false;\r\n _this.successfullySubscribed = true;\r\n _this.spinnerNewslatter = false;\r\n }\r\n });\r\n this.subManager.add(newsletterSub);\r\n }\r\n else {\r\n this.spinnerNewslatter = false;\r\n }\r\n };\r\n ChildComponent.prototype.setVerified = function (data) {\r\n this.isCaptchaInvalid = !data;\r\n };\r\n ChildComponent.prototype.showModalQuickRegistrationEmail = function () {\r\n //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n document.querySelector('#header').style.zIndex = '1041';\r\n $(\"#quickRegistrationEmailModal\").modal(\"show\");\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: footerData.TemplateHtml\r\n }), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _a) || Object, (typeof (_b = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _b) || Object, (typeof (_c = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _c) || Object, (typeof (_d = typeof header_service_1.HeaderService !== 'undefined' && header_service_1.HeaderService) === 'function' && _d) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Object)\r\n ], FooterComponent.prototype, \"parentFooterData\", void 0);\r\n FooterComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n selector: \"dy-footer\",\r\n template: ''\r\n }),\r\n __param(6, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, (typeof (_e = typeof router_1.ActivatedRoute !== 'undefined' && router_1.ActivatedRoute) === 'function' && _e) || Object, (typeof (_f = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _f) || Object, Boolean])\r\n ], FooterComponent);\r\n return FooterComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.FooterComponent = FooterComponent;\r\n\n\n/***/ }),\n\n/***/ 595:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar newsletter_service_1 = __webpack_require__(85);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar NewsletterComponent = (function () {\r\n function NewsletterComponent(_compiler, componentHelper, _elementRef, templateService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.templateService = templateService;\r\n this.isBrowser = isBrowser;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n NewsletterComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n var pageTemplateSub = this.templateService.getComponentTemplate(\"newsletterPageTemplate\").subscribe(function (result) {\r\n var templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(templateHtml);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(pageTemplateSub);\r\n };\r\n NewsletterComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n NewsletterComponent.prototype.createSubComponent = function (template) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(newsletterService, routesService) {\r\n this.newsletterService = newsletterService;\r\n this.routesService = routesService;\r\n this.isCaptchaInvalid = true;\r\n this.siteKey = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n this.theme = \"light\";\r\n this.spinnerNewslatter = false;\r\n this.model = {\r\n Email: \"\",\r\n CheckboxFooter: false\r\n };\r\n this.privacyPageNameNewsletter = this.routesService.getRoutePath('INFO PRIVACY');\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n };\r\n ChildComponent.prototype.onSubmit = function (form) {\r\n var _this = this;\r\n this.spinnerNewslatter = true;\r\n if (form) {\r\n var newsletterSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(function (result) {\r\n if (result == \"-1\") {\r\n _this.alreadySubscribed = true;\r\n _this.successfullySubscribed = false;\r\n _this.spinnerNewslatter = false;\r\n }\r\n else {\r\n _this.alreadySubscribed = false;\r\n _this.successfullySubscribed = true;\r\n _this.spinnerNewslatter = false;\r\n }\r\n });\r\n this.subManager.add(newsletterSub);\r\n }\r\n else {\r\n this.spinnerNewslatter = false;\r\n }\r\n };\r\n ChildComponent.prototype.setVerified = function (data) {\r\n this.isCaptchaInvalid = !data;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: template\r\n }), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof newsletter_service_1.NewsletterService !== 'undefined' && newsletter_service_1.NewsletterService) === 'function' && _a) || Object, (typeof (_b = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _b) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b;\r\n }());\r\n return ChildComponent;\r\n };\r\n NewsletterComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-newsletter\",\r\n template: \"\"\r\n }),\r\n __param(4, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, Boolean])\r\n ], NewsletterComponent);\r\n return NewsletterComponent;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.NewsletterComponent = NewsletterComponent;\r\n\n\n/***/ }),\n\n/***/ 596:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//System\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar user_login_1 = __webpack_require__(72);\r\nvar search_service_1 = __webpack_require__(263);\r\nvar router_1 = __webpack_require__(13);\r\nvar router_state_1 = __webpack_require__(83);\r\nvar application_service_1 = __webpack_require__(130);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar header_service_1 = __webpack_require__(129);\r\nvar HeaderComponent = (function () {\r\n function HeaderComponent(_compiler, componentHelper, _elementRef, cmsComponentService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.data = {};\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n HeaderComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n if (this.parentHeaderData != null) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = this.createSubComponent(this.parentHeaderData);\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //let templateHtml: string;\r\n var headerInfo_1;\r\n //Instead of reading only the template, also the information to show are retrieved (eg. menu list)\r\n var headDataSub = this.cmsComponentService.getHeaderData().subscribe(function (result) {\r\n headerInfo_1 = result;\r\n var startDate = new Date();\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(headerInfo_1);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n // var endDate = new Date();\r\n // this.nodeLogger.AddLogWithTime(\"injecting Header (\" + diffMs + \")\");\r\n });\r\n this.subManager.add(headDataSub);\r\n }\r\n };\r\n HeaderComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n //Creates component to inject \r\n HeaderComponent.prototype.createSubComponent = function (headerInfo) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(language, authService, cartService, isBrowser, searchService, routesService, router, appService, activatedRoute, canvasService, headerService) {\r\n var _this = this;\r\n this.language = language;\r\n this.authService = authService;\r\n this.cartService = cartService;\r\n this.isBrowser = isBrowser;\r\n this.searchService = searchService;\r\n this.routesService = routesService;\r\n this.router = router;\r\n this.appService = appService;\r\n this.activatedRoute = activatedRoute;\r\n this.canvasService = canvasService;\r\n this.headerService = headerService;\r\n this.headerIsInit = false;\r\n this.company = headerInfo.Company;\r\n this.menuItems = headerInfo.MenuList;\r\n this.megaMenuItems = headerInfo.Categories;\r\n this.isActiveQuickRegistration = headerInfo.IsActiveQuickRegistration;\r\n this.quickRegistrationData = headerInfo.QuickRegistrationData;\r\n this.isLazyLoadActive = headerInfo.isEnableLAzyLoad;\r\n this.languagesList = headerInfo.Languages;\r\n this.currentLanguage = {};\r\n this.loggedIdUser = new user_login_1.UserLogin();\r\n this.shoppingCart = headerInfo.CartInfo;\r\n this.homePageName = [];\r\n this.productsPageName = [];\r\n this.promotionsPageName = [];\r\n this.loginPageName = [];\r\n this.registerPageName = [];\r\n this.areaClientiName = [];\r\n this.carrelloPageName = [];\r\n this.blogPageName = [];\r\n this.contactPageName = [];\r\n this.disableModalButtons = false;\r\n this.spinner = false;\r\n this.subManager = new Subscription_1.Subscription();\r\n this.cartService.initCart(headerInfo.CartInfo);\r\n this.headerService.getLoggedInUser().subscribe(function (user) {\r\n _this.loggedIdUser = user;\r\n });\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var date = new Date();\r\n var lang = this.language.getShortLang();\r\n //Setting current language info\r\n for (var _i = 0, _a = this.languagesList; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n if (entry.ShortCode == lang) {\r\n this.currentLanguage = entry;\r\n break;\r\n }\r\n }\r\n this.homePageName = this.routesService.getRoutePath('HOME');\r\n this.productsPageName = this.routesService.getRoutePath('CATALOGO PRODOTTI (HOME)');\r\n this.promotionsPageName = this.routesService.getRoutePath('CATALOGO - PRODOTTI IN OFFERTA');\r\n this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n this.areaClientiName = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n this.carrelloPageName = this.routesService.getRoutePath('CARRELLO');\r\n this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n this.contactPageName = this.routesService.getRoutePath('RICHIESTA INFORMAZIONI');\r\n //setup of links, they must start with http to work properly\r\n var linkStart = \"http://\";\r\n var linkSecuredStart = \"https://\";\r\n if (this.company.Facebook != null) {\r\n if (this.company.Facebook.indexOf(linkStart) == -1 && this.company.Facebook.indexOf(linkSecuredStart) == -1) {\r\n this.company.Facebook = linkStart + this.company.Facebook;\r\n }\r\n }\r\n if (this.company.Youtube != null) {\r\n if (this.company.Youtube.indexOf(linkStart) == -1 && this.company.Youtube.indexOf(linkSecuredStart) == -1) {\r\n this.company.Youtube = linkStart + this.company.Youtube;\r\n }\r\n }\r\n if (this.company.Twitter != null) {\r\n if (this.company.Twitter.indexOf(linkStart) == -1 && this.company.Twitter.indexOf(linkSecuredStart) == -1) {\r\n this.company.Twitter = linkStart + this.company.Twitter;\r\n }\r\n }\r\n if (this.company.Website != null) {\r\n if (this.company.Website.indexOf(linkStart) == -1 && this.company.Website.indexOf(linkSecuredStart) == -1) {\r\n this.company.Website = linkStart + this.company.Website;\r\n }\r\n }\r\n if (this.company.Instagram != null) {\r\n if (this.company.Instagram.indexOf(linkStart) == -1 && this.company.Instagram.indexOf(linkSecuredStart) == -1) {\r\n this.company.Instagram = linkStart + this.company.Instagram;\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.showModal = function (product) {\r\n this.disableModalButtons = false;\r\n $(\"#headerModal\").modal(\"show\");\r\n this.productId = product.Id;\r\n this.selectedProduct = product;\r\n };\r\n ChildComponent.prototype.hideModal = function () {\r\n $('#headerModal').modal('hide');\r\n this.disableModalButtons = true;\r\n };\r\n // customers canvas state module is active and current product has canvasStateId defined, then send a request to delete a state from customers canvas server\r\n ChildComponent.prototype.removeCustomersCanvasState = function () {\r\n if (this.selectedProduct.isCanvasEdited && this.selectedProduct.CanvasStateId) {\r\n var canvasConfigData = this.setCanvasConfig(this.selectedProduct);\r\n this.canvasService.deleteCustomerCanvasState(canvasConfigData)\r\n .subscribe(function (x) { return x; }, function (err) {\r\n console.log(err);\r\n });\r\n }\r\n };\r\n ChildComponent.prototype.setCanvasConfig = function (product) {\r\n var canvasConfigData = {\r\n CanvasUrl: headerInfo.CanvasInfo.CanvasUrl,\r\n CustomerCanvasUserName: headerInfo.CanvasInfo.CustomerCanvasUserName,\r\n CanvasStateId: product.CanvasStateId,\r\n CanvasApiKey: headerInfo.CanvasInfo.ApiKey\r\n };\r\n return canvasConfigData;\r\n };\r\n //Redirect the user to the homepage for the selected language\r\n ChildComponent.prototype.setLanguage = function (lang) {\r\n window.location.href = \"/\" + lang + '/home';\r\n };\r\n ChildComponent.prototype.logout = function () {\r\n this.authService.Logout();\r\n };\r\n ChildComponent.prototype.removeFromCart = function () {\r\n var _this = this;\r\n this.spinner = true;\r\n this.disableModalButtons = true;\r\n var removeCartSub = this.cartService.removeFromCart(this.productId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.shoppingCart = _this.cartService.getCart();\r\n _this.removeCustomersCanvasState();\r\n _this.hideModal();\r\n _this.spinner = false;\r\n });\r\n this.subManager.add(removeCartSub);\r\n };\r\n //getting value of search input and redirecting to search result page\r\n ChildComponent.prototype.getSearchResults = function (inputVal) {\r\n var query = \"\";\r\n inputVal = inputVal.trim();\r\n if (inputVal == \"\") {\r\n return;\r\n }\r\n else {\r\n this.searchService.setQueryPlainTextValue(inputVal);\r\n if (inputVal != undefined) {\r\n query = inputVal;\r\n }\r\n else {\r\n var subParam = this.activatedRoute.params.subscribe(function (params) {\r\n var encodedQuery = params['query'];\r\n query = decodeURIComponent(encodedQuery);\r\n });\r\n this.subManager.add(subParam);\r\n }\r\n }\r\n query = decodeURIComponent(query);\r\n var uriString = encodeURIComponent(query);\r\n this.searchService.setQueryValue(uriString);\r\n var searchRoute = this.routesService.getRoutePath('SEARCH - RESULTS')[0];\r\n searchRoute = searchRoute.replace(\":query\", query);\r\n this.router.navigate([searchRoute]);\r\n };\r\n ChildComponent.prototype.setAutoHeightAndWeightToLogo = function () {\r\n var headerClass = $(\"div\").hasClass(\"header-logo\");\r\n if (headerClass == false) {\r\n }\r\n else {\r\n $(\".header-logo\").attr(\"style\", \"height:auto!important\");\r\n $(\".header-logo\").attr(\"style\", \"width:auto!important\");\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.headerIsInit) {\r\n return;\r\n }\r\n //setting value of search textbox to search condition value if the current page is search-result page, else, clean it's content\r\n var documentUrl = window.location.href;\r\n if (documentUrl.indexOf(\"search-results\") != -1) {\r\n var plainSearchText = this.searchService.getQueryPlainTextValue();\r\n if (plainSearchText != \"\") {\r\n $(\"#searchQuery\").val(plainSearchText);\r\n }\r\n else {\r\n this.activatedRoute.params.subscribe(function (params) {\r\n var encodedQuery = params['query'];\r\n var decodedQuery = decodeURIComponent(encodedQuery);\r\n $(\"#searchQuery\").val(decodedQuery);\r\n });\r\n }\r\n }\r\n else {\r\n $(\"#searchQuery\").val(\"\");\r\n }\r\n $(\"#searchQuery\").keyup(function (event) {\r\n if (event.keyCode === 13) {\r\n $(\"#searchQueryButton\").click();\r\n }\r\n });\r\n layoutTheme.initNavMenu();\r\n layoutTheme.initStickyHeader();\r\n if (this.isLazyLoadActive == true) {\r\n layoutTheme.initLazy();\r\n }\r\n var config = this.appService.getConfig();\r\n if (config.webStoreStatus == \"offline\") {\r\n this.setAutoHeightAndWeightToLogo();\r\n }\r\n this.headerIsInit = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: headerInfo.TemplateHtml\r\n }),\r\n __param(3, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _a) || Object, (typeof (_b = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _b) || Object, (typeof (_c = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _c) || Object, Boolean, (typeof (_d = typeof search_service_1.SearchService !== 'undefined' && search_service_1.SearchService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _f) || Object, (typeof (_g = typeof application_service_1.ApplicationService !== 'undefined' && application_service_1.ApplicationService) === 'function' && _g) || Object, (typeof (_h = typeof router_state_1.ActivatedRoute !== 'undefined' && router_state_1.ActivatedRoute) === 'function' && _h) || Object, (typeof (_j = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _j) || Object, (typeof (_k = typeof header_service_1.HeaderService !== 'undefined' && header_service_1.HeaderService) === 'function' && _k) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Object)\r\n ], HeaderComponent.prototype, \"parentHeaderData\", void 0);\r\n HeaderComponent = __decorate([\r\n core_1.Component({\r\n changeDetection: core_1.ChangeDetectionStrategy.Default,\r\n encapsulation: core_1.ViewEncapsulation.Emulated,\r\n selector: \"dy-header\",\r\n template: ''\r\n }),\r\n __param(4, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, Boolean])\r\n ], HeaderComponent);\r\n return HeaderComponent;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.HeaderComponent = HeaderComponent;\r\n\n\n/***/ }),\n\n/***/ 597:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar home_component_1 = __webpack_require__(376);\r\nvar HomeModule = (function () {\r\n function HomeModule() {\r\n }\r\n HomeModule = __decorate([\r\n core_1.NgModule({\r\n imports: [],\r\n declarations: [\r\n home_component_1.HomeComponent\r\n ]\r\n }), \r\n __metadata('design:paramtypes', [])\r\n ], HomeModule);\r\n return HomeModule;\r\n}());\r\nexports.HomeModule = HomeModule;\r\n\n\n/***/ }),\n\n/***/ 598:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar SideBarMenuComponent = (function () {\r\n function SideBarMenuComponent(_compiler, componentHelper, _elementRef, cmsComponentService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.sideType = \"sideBarMenu\";\r\n }\r\n SideBarMenuComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n if (this.parentSideMenuData != null) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = this.createSubComponent(this.parentSideMenuData, this.bredcrumpInfo);\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n var subComponentTemplateUrl = \"sideBarMenuTemplate\";\r\n this.cmsComponentService.getSideMenuData().subscribe(function (result) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, _this.bredcrumpInfo);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n }\r\n };\r\n SideBarMenuComponent.prototype.createSubComponent = function (data, breadcrumbs) {\r\n var ChildComponent = (function () {\r\n function ChildComponent() {\r\n this.megaMenuItems = data.Categories;\r\n this.breadcrumbsList = new Array();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n if (breadcrumbs != null) {\r\n this.breadcrumbsList = breadcrumbs;\r\n }\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: data.TemplateHtml\r\n }), \r\n __metadata('design:paramtypes', [])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', String)\r\n ], SideBarMenuComponent.prototype, \"sideType\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Object)\r\n ], SideBarMenuComponent.prototype, \"parentSideMenuData\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Object)\r\n ], SideBarMenuComponent.prototype, \"bredcrumpInfo\", void 0);\r\n SideBarMenuComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-side-bar\",\r\n template: \"\"\r\n }),\r\n __param(4, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _d) || Object, Boolean])\r\n ], SideBarMenuComponent);\r\n return SideBarMenuComponent;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.SideBarMenuComponent = SideBarMenuComponent;\r\n\n\n/***/ }),\n\n/***/ 599:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(87);\r\nvar cms_page_component_1 = __webpack_require__(377);\r\nvar CmsPageModule = (function () {\r\n function CmsPageModule() {\r\n }\r\n CmsPageModule = __decorate([\r\n core_1.NgModule({\r\n imports: [\r\n shared_module_1.SharedModule\r\n ],\r\n declarations: [\r\n cms_page_component_1.CmsPageComponent\r\n ]\r\n }), \r\n __metadata('design:paramtypes', [])\r\n ], CmsPageModule);\r\n return CmsPageModule;\r\n}());\r\nexports.CmsPageModule = CmsPageModule;\r\n\n\n/***/ }),\n\n/***/ 6:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\nvar common_1 = __webpack_require__(45);\r\nvar core_2 = __webpack_require__(27);\r\nvar system_configuration_service_1 = __webpack_require__(421);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar RoutesService = (function () {\r\n function RoutesService(router, translate, cookie, location, isBrowser, cache) {\r\n this.router = router;\r\n this.translate = translate;\r\n this.cookie = cookie;\r\n this.location = location;\r\n this.isBrowser = isBrowser;\r\n this.cache = cache;\r\n this.visiblePageLoader = false;\r\n }\r\n RoutesService.prototype.loadRoutes = function () {\r\n };\r\n RoutesService.prototype.getRoutesWithComponents = function (rawRoutes) {\r\n return rawRoutes.map(function (route) {\r\n if (route.component && 'string' === typeof route.component) {\r\n return Object.assign({}, route, {\r\n component: system_configuration_service_1.SysConfig.getComponentByName(route.component)\r\n });\r\n }\r\n return route;\r\n });\r\n };\r\n RoutesService.prototype.getOnlyOfflineRoutes = function (rawRoutes) {\r\n //Keeping only the offline route\r\n var offlineRawRoutes = [];\r\n for (var _i = 0, rawRoutes_1 = rawRoutes; _i < rawRoutes_1.length; _i++) {\r\n var rowRoute = rawRoutes_1[_i];\r\n if (rowRoute.name == \"OFFLINE\") {\r\n var redirectToRoute = {\r\n path: \"\",\r\n redirectTo: rowRoute.path,\r\n pathMatch: \"full\"\r\n };\r\n offlineRawRoutes.push(redirectToRoute);\r\n var offlineRoute = {\r\n path: rowRoute.path,\r\n component: rowRoute.component,\r\n name: rowRoute.name\r\n };\r\n offlineRawRoutes.push(offlineRoute);\r\n var fallBackRoute = {\r\n path: \"**\",\r\n redirectTo: rowRoute.path\r\n };\r\n offlineRawRoutes.push(fallBackRoute);\r\n break;\r\n }\r\n else {\r\n continue;\r\n }\r\n }\r\n return offlineRawRoutes;\r\n };\r\n RoutesService.prototype.getLang = function () {\r\n if (!this.locales) {\r\n this.locales = this.cache.get('Locales');\r\n }\r\n var langFromUrl = null;\r\n var langFromUrlMatch;\r\n if (langFromUrlMatch = this.location.path().match(/^\\/(\\w{2})\\//)) {\r\n langFromUrl = langFromUrlMatch[1];\r\n }\r\n var cookieLang = this.cookie.get(RoutesService.COOKIE_LANG_KEY);\r\n if (langFromUrl && this.locales.find(function (existLang) { return existLang === langFromUrl; })) {\r\n return langFromUrl;\r\n }\r\n if (cookieLang && this.locales.find(function (existLang) { return existLang === cookieLang; })) {\r\n return cookieLang;\r\n }\r\n var _loop_1 = function(existBrowserLang) {\r\n if (this_1.locales.find(function (existLang) { return existLang === existBrowserLang; })) {\r\n return { value: existBrowserLang };\r\n }\r\n };\r\n var this_1 = this;\r\n for (var _i = 0, _a = this.browserLangs; _i < _a.length; _i++) {\r\n var existBrowserLang = _a[_i];\r\n var state_1 = _loop_1(existBrowserLang);\r\n if (typeof state_1 === \"object\") return state_1.value;\r\n }\r\n return this.locales[0];\r\n };\r\n RoutesService.prototype.getRoutes = function () {\r\n };\r\n RoutesService.prototype.getRoutePath = function (routeName) {\r\n var routes = this.getRoutes();\r\n var routePath = \"\";\r\n if (routes != undefined && routes != null) {\r\n routes.filter(function (x) { return x.name == routeName; }).forEach(function (route) {\r\n routePath = \"/\" + route.path;\r\n });\r\n }\r\n //console.log(routes);\r\n //console.log(routes.filter(x => x.name == routeName));\r\n // for (let route of routes) {\r\n // //if the name of the route match the one give in input then the relative route path is returned\r\n // if (route.name == routeName) {\r\n // routePath = \"/\" + route.path;\r\n // break;\r\n // }\r\n // }\r\n if (routePath === \"\") {\r\n routePath = \"/\";\r\n }\r\n return [routePath];\r\n };\r\n RoutesService.prototype.getPage = function (routeName) {\r\n var routePath = \"/\";\r\n if (routeName != \"\" || routeName != undefined) {\r\n var routes = this.getRoutes();\r\n if (routes != undefined) {\r\n if (routes != undefined && routes != null) {\r\n routes.filter(function (x) { return x.name == routeName; }).forEach(function (route) {\r\n routePath = \"/\" + route.path;\r\n });\r\n }\r\n }\r\n }\r\n return routePath;\r\n };\r\n RoutesService.prototype.showPageLoader = function () {\r\n this.visiblePageLoader = true;\r\n };\r\n RoutesService.prototype.hidePageLoader = function () {\r\n this.visiblePageLoader = false;\r\n // window.setTimeout(() =>\r\n // this.visiblePageLoader = false, 1)\r\n };\r\n RoutesService.COOKIE_LANG_KEY = 'CURRENT_LANG';\r\n RoutesService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _b) || Object, (typeof (_c = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _c) || Object, (typeof (_d = typeof common_1.Location !== 'undefined' && common_1.Location) === 'function' && _d) || Object, Boolean, (typeof (_e = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _e) || Object])\r\n ], RoutesService);\r\n return RoutesService;\r\n var _a, _b, _c, _d, _e;\r\n}());\r\nexports.RoutesService = RoutesService;\r\n\n\n/***/ }),\n\n/***/ 600:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar CanvasWidgetComponent = (function () {\r\n function CanvasWidgetComponent(_compiler, componentHelper, _elementRef, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.isBrowser = isBrowser;\r\n }\r\n CanvasWidgetComponent.prototype.ngOnInit = function () {\r\n if (!this.isBrowser)\r\n return;\r\n if (this.parentWidgetData != null) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = this.createSubComponent(this.parentWidgetData);\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n };\r\n CanvasWidgetComponent.prototype.createSubComponent = function (canvasWidgetComponent) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(isBrowser, canvasService, shoppingCartService) {\r\n this.isBrowser = isBrowser;\r\n this.canvasService = canvasService;\r\n this.shoppingCartService = shoppingCartService;\r\n this.pageIsInit = false;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () { };\r\n // when want to finish design, to move to the second step\r\n ChildComponent.prototype.finishDesign = function () {\r\n this.canvasService.getImagesLinks(this.editorPage, this.approvePage, this.finishOrderPage);\r\n };\r\n // when close a modal with canvas editor, set state to false, so from component we can know the modal is closed\r\n ChildComponent.prototype.isCanvasModalOpened = function (isOpened) {\r\n this.canvasService.openNewProductInEditor();\r\n this.canvasService.setCanvasState(isOpened);\r\n };\r\n // when the product is successfully created and approved, and second step is done\r\n ChildComponent.prototype.finishProductCustomization = function () {\r\n var _this = this;\r\n //If the product customization has been successfully completed.\r\n this.canvasService.finishProductCustomization()\r\n .then(function (result) {\r\n // set canvas response to a property in service, so it can be available to a parent component\r\n _this.shoppingCartService.setCustomizationCanvasData(result);\r\n //Saving hi-res output info.\r\n _this.canvasService.setupPageAfterProductCustomization(result, false);\r\n /* Send notification to the service that we finished product customization, so from parent component we know it and can call method for adding to cart */\r\n _this.canvasService.setCanvasProductDesignState(true);\r\n _this.canvasService.openNewProductInEditor();\r\n })\r\n .catch(function (error) {\r\n _this.canvasService.setupPageAfterProductCustomization(error, true);\r\n });\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n layoutTheme.initSlider();\r\n this.pageIsInit = true;\r\n };\r\n __decorate([\r\n core_1.ViewChild('editorPage'), \r\n __metadata('design:type', (typeof (_a = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _a) || Object)\r\n ], ChildComponent.prototype, \"editorPage\", void 0);\r\n __decorate([\r\n core_1.ViewChild('approvePage'), \r\n __metadata('design:type', (typeof (_b = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _b) || Object)\r\n ], ChildComponent.prototype, \"approvePage\", void 0);\r\n __decorate([\r\n core_1.ViewChild('finishOrderPage'), \r\n __metadata('design:type', (typeof (_c = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _c) || Object)\r\n ], ChildComponent.prototype, \"finishOrderPage\", void 0);\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: canvasWidgetComponent.TemplateHtml\r\n }),\r\n __param(0, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [Boolean, (typeof (_d = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Object)\r\n ], CanvasWidgetComponent.prototype, \"parentWidgetData\", void 0);\r\n CanvasWidgetComponent = __decorate([\r\n core_1.Component({\r\n selector: \"customer-canvas-widget\",\r\n template: \"\"\r\n }),\r\n __param(3, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, Boolean])\r\n ], CanvasWidgetComponent);\r\n return CanvasWidgetComponent;\r\n var _a, _b, _c;\r\n}());\r\nexports.CanvasWidgetComponent = CanvasWidgetComponent;\r\n\n\n/***/ }),\n\n/***/ 601:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar slider_service_1 = __webpack_require__(415);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar SliderWidgetComponent = (function () {\r\n function SliderWidgetComponent(_compiler, componentHelper, _elementRef, templateService, cmsComponentService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.templateService = templateService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n SliderWidgetComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n if (this.parentSliderData != null) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = this.createSubComponent(this.parentSliderData);\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n var sliderData_1;\r\n var sliderDataSub = this.cmsComponentService.getSliderData(this.type, this.id).subscribe(function (result) {\r\n sliderData_1 = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(sliderData_1);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(sliderDataSub);\r\n }\r\n };\r\n SliderWidgetComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n //private createSubComponent(template:string, sliderId: string, sliderType: string) {\r\n SliderWidgetComponent.prototype.createSubComponent = function (sliderData) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(sliderService, isBrowser, elementRef, renderer) {\r\n this.sliderService = sliderService;\r\n this.isBrowser = isBrowser;\r\n this.elementRef = elementRef;\r\n this.renderer = renderer;\r\n this.slides = sliderData.Slides;\r\n this.sliderIsInit = false;\r\n this.renderer.setElementStyle(this.elementRef.nativeElement, 'display', this.isBrowser ? 'block' : 'none');\r\n }\r\n ChildComponent.prototype.ngOnInit = function () { };\r\n ChildComponent.prototype.goToUrl = function (url) {\r\n if (url != null && url.length > 0) {\r\n window.location.href = url;\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.sliderIsInit) {\r\n return;\r\n }\r\n layoutTheme.initSlider();\r\n this.sliderIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: sliderData.TemplateHtml\r\n }),\r\n __param(1, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof slider_service_1.SliderService !== 'undefined' && slider_service_1.SliderService) === 'function' && _a) || Object, Boolean, (typeof (_b = typeof core_1.ElementRef !== 'undefined' && core_1.ElementRef) === 'function' && _b) || Object, (typeof (_c = typeof core_1.Renderer !== 'undefined' && core_1.Renderer) === 'function' && _c) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', String)\r\n ], SliderWidgetComponent.prototype, \"id\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', String)\r\n ], SliderWidgetComponent.prototype, \"type\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Object)\r\n ], SliderWidgetComponent.prototype, \"parentSliderData\", void 0);\r\n SliderWidgetComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-slider\",\r\n template: \"\"\r\n }),\r\n __param(5, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, (typeof (_e = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _e) || Object, Boolean])\r\n ], SliderWidgetComponent);\r\n return SliderWidgetComponent;\r\n var _a, _b, _c, _d, _e;\r\n}());\r\nexports.SliderWidgetComponent = SliderWidgetComponent;\r\n\n\n/***/ }),\n\n/***/ 602:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar trustpilot_service_1 = __webpack_require__(416);\r\nvar TrustpilotWidgetComponent = (function () {\r\n function TrustpilotWidgetComponent(_compiler, componentHelper, _elementRef, isBrowser, trustpilotService) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.isBrowser = isBrowser;\r\n this.trustpilotService = trustpilotService;\r\n this.sub = new Subscription_1.Subscription();\r\n }\r\n TrustpilotWidgetComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.trustpilotType)\r\n this.trustpilotType = 'default';\r\n var trustpilotSub = this.trustpilotService.getTrustpilotData(this.trustpilotType).subscribe(function (result) {\r\n //-- If result is null, it means that trustpilot with given type doesn't exist, or trustpilot module is not active\r\n var subComponent = _this.createSubComponent(result);\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.sub.add(trustpilotSub);\r\n };\r\n TrustpilotWidgetComponent.prototype.ngOnDestroy = function () {\r\n this.sub.unsubscribe();\r\n };\r\n TrustpilotWidgetComponent.prototype.createSubComponent = function (trustpilotData) {\r\n //-- If trustpilot module is not active, we are going to set a template to empty string \r\n var ChildComponent = (function () {\r\n function ChildComponent(isBrowser) {\r\n this.isBrowser = isBrowser;\r\n this.pageIsInit = false;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n //-- Initializing trustbox\r\n var trustboxesRef = Array.from(document.querySelectorAll('.trustpilot-widget'));\r\n //-- Initialize all trustbox instances on the page\r\n if (trustboxesRef && trustboxesRef.length > 0)\r\n trustboxesRef.forEach(function (singleTrustboxInstance) { return Trustpilot.loadFromElement(singleTrustboxInstance); });\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: trustpilotData.TemplateHtml || \"\"\r\n }),\r\n __param(0, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [Boolean])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', String)\r\n ], TrustpilotWidgetComponent.prototype, \"trustpilotType\", void 0);\r\n TrustpilotWidgetComponent = __decorate([\r\n core_1.Component({\r\n selector: \"trustpilot-widget\",\r\n template: \"\"\r\n }),\r\n __param(3, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, Boolean, (typeof (_d = typeof trustpilot_service_1.TrustpilotService !== 'undefined' && trustpilot_service_1.TrustpilotService) === 'function' && _d) || Object])\r\n ], TrustpilotWidgetComponent);\r\n return TrustpilotWidgetComponent;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.TrustpilotWidgetComponent = TrustpilotWidgetComponent;\r\n\n\n/***/ }),\n\n/***/ 603:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar language_service_1 = __webpack_require__(3);\r\nvar product_service_1 = __webpack_require__(134);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar QuotingOrderTotalsComponent = (function () {\r\n function QuotingOrderTotalsComponent(_compiler, componentHelper, _elementRef, templateService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.templateService = templateService;\r\n this.isBrowser = isBrowser;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n QuotingOrderTotalsComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n var templateHtml;\r\n var orderTotalSub = this.templateService.getComponentTemplate(\"quotingOrderTotalsWidgetTemplate\").subscribe(function (result) {\r\n templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(templateHtml);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(orderTotalSub);\r\n };\r\n QuotingOrderTotalsComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n QuotingOrderTotalsComponent.prototype.createSubComponent = function (template) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(productService, languageService, cartService, _elementChildRef) {\r\n this.productService = productService;\r\n this.languageService = languageService;\r\n this.cartService = cartService;\r\n this._elementChildRef = _elementChildRef;\r\n }\r\n ChildComponent.prototype.ngOnInit = function () { };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: template\r\n }), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof product_service_1.ProductService !== 'undefined' && product_service_1.ProductService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _c) || Object, (typeof (_d = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _d) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d;\r\n }());\r\n return ChildComponent;\r\n };\r\n QuotingOrderTotalsComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-quoting-order-totals-widget\",\r\n template: \"\"\r\n }),\r\n __param(4, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, Boolean])\r\n ], QuotingOrderTotalsComponent);\r\n return QuotingOrderTotalsComponent;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.QuotingOrderTotalsComponent = QuotingOrderTotalsComponent;\r\n\n\n/***/ }),\n\n/***/ 604:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar routes_service_1 = __webpack_require__(6);\r\n//Models\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_constants_1 = __webpack_require__(618);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar quoting_excluding_component_1 = __webpack_require__(71);\r\nvar shared_constants_1 = __webpack_require__(619);\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar OtherProductFormComponent = (function () {\r\n function OtherProductFormComponent(_compiler, componentHelper, _elementRef, authService, languageService, cmsComponentService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.authService = authService;\r\n this.languageService = languageService;\r\n this.cmsComponentService = cmsComponentService;\r\n this.isBrowser = isBrowser;\r\n this.autentification = this.authService.GetData();\r\n this.lang = this.languageService.getLongLang();\r\n this.userId = this.authService.GetUserId();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n OtherProductFormComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser) {\r\n return;\r\n }\r\n //Instead of reading only the template, also the information to show are retrieved (eg. menu list)\r\n var otherProdSub = this.cmsComponentService.getOtherProductData(this.productId, this.userId).subscribe(function (result) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, _this.productId);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(otherProdSub);\r\n };\r\n OtherProductFormComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n OtherProductFormComponent.prototype.createSubComponent = function (formInfo, InputresourceId) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(_quotingService, authService, translate, routesService, currency, cartService, bootboxService, isBrowser) {\r\n this._quotingService = _quotingService;\r\n this.authService = authService;\r\n this.translate = translate;\r\n this.routesService = routesService;\r\n this.currency = currency;\r\n this.cartService = cartService;\r\n this.bootboxService = bootboxService;\r\n this.isBrowser = isBrowser;\r\n this.formData = formInfo.FormData;\r\n this.pageIsInit = false;\r\n this.pageIsInitAfter = false;\r\n this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n this.resourceId = InputresourceId;\r\n this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n this.resultCalculation = false;\r\n this.isDataInitialized = false;\r\n this.requestInfoSuccess = null;\r\n this.showErrorMessage = false;\r\n this.companyInformation = formInfo.CompanyInfo;\r\n this.isFormValid = true;\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n this.sumQtaMatrix = 0;\r\n this.totalQtaForMatrix = 0;\r\n this.isCalculatedProduct = false;\r\n this.isVisibleMatrixLav = false;\r\n this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n //isapplyingrules: boolean = false;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n this.typePriceResult = \"no-tax\";\r\n this.formData.gruppi.forEach(function (group) {\r\n group.varianti.forEach(function (varianti) {\r\n if (varianti.tipo == 7) {\r\n varianti.VarianteMatrix = _this.createMatriceObj(varianti);\r\n _this.isVisibleMatrixLav = true;\r\n }\r\n });\r\n });\r\n this.ExcludingRules.setMacrocategory(shared_constants_1.SharedConstants.OTHER_PRODUCTS_TYPE);\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n if (!this.isDataInitialized) {\r\n this.convertLogicalToViewQuotingModel();\r\n this.checkValidation();\r\n }\r\n };\r\n //-- Create quoting object from form data object, because we need it for applying rules(regole)\r\n ChildComponent.prototype.convertLogicalToViewQuotingModel = function () {\r\n var _this = this;\r\n this.responseModel.listaRegole = this.formData.listaRegole;\r\n this.responseModel.calculationType = this.formData.calculationType;\r\n this.responseModel.companyCondizioni = this.formData.companyCondizioni;\r\n this.responseModel.lavorazioniAccessorie = [];\r\n //-- From gruppi obect get all varianti and convert it to Lavorazioni Accessorie model\r\n this.formData.gruppi.forEach(function (group) {\r\n group.varianti.forEach(function (varianti) {\r\n var lavAcc = _this.convertLogicalToViewModelVarianti(varianti);\r\n _this.responseModel.lavorazioniAccessorie.push(lavAcc);\r\n });\r\n });\r\n };\r\n //-- Convert varianti model to lavorazioni accessorie model\r\n ChildComponent.prototype.convertLogicalToViewModelVarianti = function (varianti) {\r\n var lavAcc = new quoting_model_1.MyLavorazioneAccessoria();\r\n lavAcc.id = varianti.id;\r\n lavAcc.obbligatorio = varianti.obbligatorio;\r\n lavAcc.tipo = varianti.tipo;\r\n lavAcc.description = varianti.description;\r\n lavAcc.hasInfo = varianti.hasInfo;\r\n lavAcc.showInfo = varianti.showInfo;\r\n lavAcc.isVisible = varianti.isVisible;\r\n lavAcc.image = varianti.image;\r\n lavAcc.value = varianti.value;\r\n lavAcc.valori = varianti.valori;\r\n lavAcc.lavorazioneCheckValue = (varianti.lavorazioneCheckValue == 'true');\r\n lavAcc.isCalculated = varianti.isCalculated;\r\n lavAcc.tipoSelezione = varianti.tipoSelezione;\r\n lavAcc.idVarianteMatriceOrizzontale = varianti.idVarianteMatriceOrizzontale;\r\n lavAcc.idVarianteMatriceVerticale = varianti.idVarianteMatriceVerticale;\r\n if (varianti.tipo == 7) {\r\n //lavAcc.VarianteMatrix=this.createMatriceObj(varianti);\r\n lavAcc.VarianteMatrix = this.formData.VarianteMatrix;\r\n }\r\n //--If type is numeric or dropdown, valore is intFormValue, else it is valore\r\n if (varianti.tipo == 1 || varianti.tipo == 2) {\r\n lavAcc.valore = varianti.intFormValue;\r\n }\r\n else {\r\n lavAcc.valore = varianti.valore;\r\n }\r\n return lavAcc;\r\n };\r\n ChildComponent.prototype.createMatriceObj = function (variante) {\r\n var varianteMatrice = new quoting_model_1.MyVarianteMatrice();\r\n varianteMatrice.VarianteVerticale = new Array();\r\n varianteMatrice.VarianteOrizzontale = new Array();\r\n this.formData.gruppi.forEach(function (group) {\r\n group.varianti.forEach(function (varianti) {\r\n if (variante.idVarianteMatriceVerticale == varianti.id) {\r\n varianti.isMatrix = true;\r\n varianti.valori.forEach(function (option) {\r\n var varianteMatverticale = new quoting_model_1.MyVarianteMatrice();\r\n varianteMatverticale.id = option.chiave;\r\n varianteMatverticale.nome = option.valore;\r\n varianteMatverticale.colore = option.colorExaForMatrix;\r\n varianteMatverticale.imgPath = option.image;\r\n varianteMatverticale.mostraPerVariantiMatrice = option.mostraPerVariantiMatrice;\r\n varianteMatverticale.popup = \"\";\r\n varianteMatverticale.VarianteOrizzontale = new Array();\r\n group.varianti.forEach(function (varianti2) {\r\n if (variante.idVarianteMatriceOrizzontale == varianti2.id) {\r\n varianti.isMatrix = true;\r\n varianti2.valori.forEach(function (option2) {\r\n var varianteMat2 = new quoting_model_1.MyVarianteMatrice();\r\n varianteMat2.id = option2.chiave;\r\n varianteMat2.nome = option2.valore;\r\n varianteMat2.qta = 0;\r\n varianteMat2.colore = option2.colorExaForMatrix;\r\n varianteMat2.imgPath = option2.image;\r\n varianteMat2.mostraPerVariantiMatrice = option2.mostraPerVariantiMatrice;\r\n varianteMatverticale.VarianteOrizzontale.push(varianteMat2);\r\n });\r\n }\r\n });\r\n varianteMatrice.VarianteVerticale.push(varianteMatverticale);\r\n });\r\n }\r\n if (variante.idVarianteMatriceOrizzontale == varianti.id) {\r\n varianti.isMatrix = true;\r\n varianti.valori.forEach(function (option3) {\r\n var varianteMat3 = new quoting_model_1.MyVarianteMatrice();\r\n varianteMat3.id = option3.chiave;\r\n varianteMat3.nome = option3.valore;\r\n varianteMat3.qta = 0;\r\n varianteMat3.colore = option3.colorExaForMatrix;\r\n varianteMat3.imgPath = option3.image;\r\n varianteMat3.mostraPerVariantiMatrice = option3.mostraPerVariantiMatrice;\r\n varianteMatrice.VarianteOrizzontale.push(varianteMat3);\r\n });\r\n }\r\n });\r\n });\r\n return varianteMatrice;\r\n };\r\n ChildComponent.prototype.checkRegoleOtherProducts = function () {\r\n var _this = this;\r\n try {\r\n var lavAccArray_1 = new Array();\r\n this.formData.gruppi.forEach(function (group) {\r\n group.varianti.forEach(function (varianti) {\r\n //console.log(varianti)\r\n var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (varianti.tipo == \"2\") {\r\n lav.lavorazioneId = varianti.id;\r\n lav.valoreLavorazione = varianti.intFormValue;\r\n lavAccArray_1.push(lav);\r\n }\r\n });\r\n });\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"AP\", \"ACCESSORIA\", \"\", \"ALTRO_PRODOTTO\", null, null, this.responseModel, this.formData.gruppi);\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"AP\", \"ALTRO_PRODOTTO\", this.responseModel, this.formData.gruppi);\r\n //if the old value id different to the new one i call the method for update description and image\r\n var count_1 = 0;\r\n this.formData.gruppi.forEach(function (group) {\r\n group.varianti.forEach(function (lavorazione) {\r\n count_1 = 0;\r\n for (var _i = 0, lavAccArray_2 = lavAccArray_1; _i < lavAccArray_2.length; _i++) {\r\n var lavorazioneOld = lavAccArray_2[_i];\r\n if (count_1 > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.intFormValue != lavorazioneOld.valoreLavorazione)) {\r\n _this.dropDownChange(lavorazione, true);\r\n count_1++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n });\r\n }\r\n catch (error) {\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n };\r\n ChildComponent.prototype.checkBoxChanged = function (lavorazione) {\r\n //-- Updating lavorazioniAccessorie model\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var variante = _a[_i];\r\n if (variante.id == lavorazione.id) {\r\n variante.hasInfo = lavorazione.hasInfo;\r\n variante.lavorazioneCheckValue = (lavorazione.lavorazioneCheckValue == 'true');\r\n variante.valore = lavorazione.intFormValue;\r\n break;\r\n }\r\n }\r\n this.convertLogicalToViewQuotingModel();\r\n this.checkValidation();\r\n };\r\n ChildComponent.prototype.dropDownChange = function (lavorazione, isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n //this.isapplyingrules=true;\r\n //-- Setting option description (if there is)\r\n for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n var variante = _a[_i];\r\n if (lavorazione.intFormValue == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n //-- Updating lavorazioniAccessorie model\r\n for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n var variante = _c[_b];\r\n if (variante.id == lavorazione.id) {\r\n variante.hasInfo = lavorazione.hasInfo;\r\n variante.valore = lavorazione.intFormValue;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.checkValidation();\r\n }\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n lavorazione.intFormValue = lavorazioneId;\r\n this.dropDownChange(lavorazione);\r\n };\r\n ChildComponent.prototype.checkValidation = function () {\r\n this.isCalculatedProduct = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.checkRegoleOtherProducts();\r\n //console.log(this.isapplyingrules)\r\n //if (this.isapplyingrules == false) {\r\n this.checkForm();\r\n if (this.isFormValid) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n // }\r\n };\r\n ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n var result = false;\r\n if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.sendRequestInfo = function () {\r\n var _this = this;\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n if (result == true) {\r\n _this.requestInfoSuccess = true;\r\n }\r\n else {\r\n _this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n _this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n }\r\n };\r\n ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.checkForm = function () {\r\n var _this = this;\r\n if (this.isCalculationTypeCalcolato() || this.isCalculationTypeCalcolatoScontistica()) {\r\n this.isFormValid = true;\r\n var message = void 0;\r\n var numCopie = parseInt(this.formData.quantity);\r\n var minCopie = this.formData.minimo_quantita;\r\n var maxCopie = this.formData.maximo_quantita;\r\n if (this.formData.tipoCopie == 'libera') {\r\n //Quantity\r\n if (this.formData.quantity == null || numCopie <= 0) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.formData.isQuantityValidated = false;\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n }\r\n else if (maxCopie == 0 || this.formData.maximo_quantita == null) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.formData.isQuantityValidated = false;\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n }\r\n else {\r\n this.formData.isQuantityValidated = true;\r\n this.isFormValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.formData.isQuantityValidated = true;\r\n this.isFormValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.formData.isQuantityValidated = false;\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n }\r\n }\r\n this.copieMessage = message;\r\n }\r\n else {\r\n if (this.formData.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.formData.isQuantityValidated = false;\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n }\r\n else {\r\n this.formData.quantity = this.formData.idCopie;\r\n this.formData.isQuantityValidated = true;\r\n }\r\n if (this.formData.tipoCopie === 'fissa' && this.formData.copie != null) {\r\n this.formData.copieCount = this.formData.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n }\r\n else {\r\n if (parseInt(this.formData.quantity) <= 0) {\r\n this.formData.quantity = 1;\r\n }\r\n this.isFormValid = true;\r\n this.formData.isQuantityValidated = true;\r\n }\r\n this.sumQtaMatrix = 0;\r\n var ismatrixPresent = false;\r\n //Attributes\r\n for (var _i = 0, _a = this.formData.gruppi; _i < _a.length; _i++) {\r\n var group = _a[_i];\r\n for (var _b = 0, _c = group.varianti; _b < _c.length; _b++) {\r\n var attribute = _c[_b];\r\n //-- Count all varianti options that should be visible\r\n if (attribute.valori != null) {\r\n attribute.valoriCount = attribute.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n if (attribute.tipo == 1) {\r\n var message = \"\";\r\n var qta = parseInt(attribute.intFormValue);\r\n var minQta = attribute.minQtaInput;\r\n var maxQta = attribute.maxQtaInput;\r\n if (attribute.intFormValue == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n attribute.isValidated = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n attribute.isValidated = false;\r\n }\r\n else {\r\n attribute.isValidated = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n attribute.isValidated = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n attribute.isValidated = false;\r\n }\r\n }\r\n if (attribute.isValidated == false) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n }\r\n attribute.lavorazioneMessage = message;\r\n }\r\n else if (attribute.tipo == 2) {\r\n //The value shall be greater than zero\r\n if (attribute.intFormValue < 0) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n attribute.isValidated = false;\r\n }\r\n else {\r\n attribute.isValidated = true;\r\n }\r\n }\r\n else if (attribute.tipo == 5) {\r\n //Width validation\r\n var convertedWidth = Number(attribute.numWidthFormValue);\r\n var convertedHeight = Number(attribute.numHeightFormValue);\r\n var convertedDepth = Number(attribute.numDepthFormValue);\r\n //Checking if it is not mandatory\r\n if (attribute.obbligatorio == false) {\r\n //There is no validation if the three dimentions are not set\r\n if (convertedWidth == 0 && convertedHeight == 0 && convertedDepth == 0) {\r\n attribute.isWidthValidated = true;\r\n attribute.isHeightValidated = true;\r\n attribute.isDepthValidated = true;\r\n continue;\r\n }\r\n }\r\n //Checking if it is a valid number\r\n if (isNaN(convertedWidth)) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n attribute.isWidthValidated = false;\r\n attribute.widthErrorMex = \"Inserisci un valore valido\";\r\n }\r\n else {\r\n if (attribute.max_base == 0) {\r\n //The value shall be greater than the minimum\r\n if (convertedWidth < attribute.min_base) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n attribute.isWidthValidated = false;\r\n attribute.widthErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_base;\r\n }\r\n else {\r\n attribute.isWidthValidated = true;\r\n attribute.widthErrorMex = \"\";\r\n }\r\n }\r\n else {\r\n //3 - minbase = 0 - maxbase N - inserisci un valore compresto tra 0 e N\r\n //4 - minbase = N - maxbase M - inserisci un valore compresto tra 0 e N\r\n if (convertedWidth < attribute.min_base || convertedWidth > attribute.max_base) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n attribute.isWidthValidated = false;\r\n attribute.widthErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_base + \" e \" + attribute.max_base;\r\n }\r\n else {\r\n attribute.isWidthValidated = true;\r\n attribute.widthErrorMex = \"\";\r\n }\r\n }\r\n }\r\n //Height validation\r\n //Checking if it is a valid number\r\n if (isNaN(convertedHeight)) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n attribute.isHeightValidated = false;\r\n attribute.heightErrorMex = \"Inserisci un valore valido\";\r\n }\r\n else {\r\n if (attribute.max_altezza == 0) {\r\n //1 - min_altezza = 0 - max_altezza 0 - inserisci un valore maggiore id zero\r\n //2 - min_altezza = N - max_altezza 0 - inserisci un valore maggiore id N \r\n //The value shall be greater than the minimum\r\n if (convertedHeight < attribute.min_altezza) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n attribute.isHeightValidated = false;\r\n attribute.heightErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_altezza;\r\n }\r\n else {\r\n attribute.isHeightValidated = true;\r\n attribute.heightErrorMex = \"\";\r\n }\r\n }\r\n else {\r\n //3 - min_altezza = 0 - max_altezza N - inserisci un valore compresto tra 0 e N\r\n //4 - min_altezza = N - max_altezza M - inserisci un valore compresto tra 0 e N\r\n if (convertedHeight < attribute.min_altezza || convertedHeight > attribute.max_altezza) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n attribute.isHeightValidated = false;\r\n attribute.heightErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_altezza + \" e \" + attribute.max_altezza;\r\n }\r\n else {\r\n attribute.isHeightValidated = true;\r\n attribute.heightErrorMex = \"\";\r\n }\r\n }\r\n }\r\n //Depth\r\n if (attribute.hasDepth == true) {\r\n //Checking if it is a valid number\r\n if (isNaN(convertedDepth)) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n attribute.isDepthValidated = false;\r\n attribute.depthErrorMex = \"Inserisci un valore valido\";\r\n }\r\n else {\r\n if (attribute.max_profondita == 0) {\r\n //1 - min_profondita = 0 - max_profondita 0 - inserisci un valore maggiore id zero\r\n //2 - min_profondita = N - max_profondita 0 - inserisci un valore maggiore id N \r\n //The value shall be greater than the minimum\r\n if (convertedDepth < attribute.min_profondita) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n attribute.isDepthValidated = false;\r\n attribute.depthErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_profondita;\r\n }\r\n else {\r\n attribute.isDepthValidated = true;\r\n attribute.depthErrorMex = \"\";\r\n }\r\n }\r\n else {\r\n //3 - min_profondita = 0 - max_profondita N - inserisci un valore compresto tra 0 e N\r\n //4 - min_profondita = N - max_profondita M - inserisci un valore compresto tra 0 e N\r\n if (convertedDepth < attribute.min_profondita || convertedDepth > attribute.max_profondita) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n attribute.isDepthValidated = false;\r\n attribute.depthErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_profondita + \" e \" + attribute.max_profondita;\r\n }\r\n else {\r\n attribute.isDepthValidated = true;\r\n attribute.depthErrorMex = \"\";\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else if (attribute.tipo == 7) {\r\n ismatrixPresent = true;\r\n attribute.VarianteMatrix.VarianteVerticale.forEach(function (varianti) {\r\n varianti.VarianteOrizzontale.filter(function (x) { return x.qta > 0; }).forEach(function (varianti2) {\r\n _this.sumQtaMatrix += varianti2.qta;\r\n });\r\n });\r\n }\r\n }\r\n }\r\n if (ismatrixPresent == true) {\r\n if (this.formData.tipoCopie == 'libera') {\r\n this.totalQtaForMatrix = this.formData.quantity;\r\n }\r\n else {\r\n this.totalQtaForMatrix = this.formData.idCopie;\r\n }\r\n if (this.totalQtaForMatrix != this.sumQtaMatrix) {\r\n this.formData.isQuantityMatrixValidated = false;\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n var message = this.getLabel('matrix_message_qta');\r\n message += \" \" + this.totalQtaForMatrix;\r\n this.MatrixMessage = message;\r\n }\r\n else {\r\n this.formData.isQuantityMatrixValidated = true;\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.getLabel = function (label) {\r\n var message;\r\n this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n return message;\r\n };\r\n /// Create model for passed in input to the calculation method\r\n ChildComponent.prototype.getCalculationModel = function () {\r\n var _this = this;\r\n if (this.formData.tipoCopie != 'libera') {\r\n this.model.numCopie = this.formData.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.formData.quantity;\r\n }\r\n this.model.macrocategoryWizardId = 13;\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = parseInt(this.resourceId);\r\n this.model.lavorazioniAccessorie = new Array();\r\n for (var _i = 0, _a = this.formData.gruppi; _i < _a.length; _i++) {\r\n var gruppo = _a[_i];\r\n var _loop_1 = function(variante) {\r\n if (variante.isVisible == true) {\r\n var lavorazione_1 = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n lavorazione_1.matrixValues = new Array();\r\n //checkbox\r\n if (parseInt(variante.tipo) == 0) {\r\n lavorazione_1.lavorazioneId = variante.id;\r\n if (variante.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione_1.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione_1.valoreLavorazione = \"0\";\r\n }\r\n }\r\n else if (parseInt(variante.tipo) == 2) {\r\n if (!variante.isMatrix) {\r\n if (variante.intFormValue == \"0\") {\r\n lavorazione_1.lavorazioneId = variante.id;\r\n lavorazione_1.valoreLavorazione = \"-1\";\r\n }\r\n else {\r\n lavorazione_1.lavorazioneId = variante.id;\r\n lavorazione_1.valoreLavorazione = variante.intFormValue;\r\n }\r\n }\r\n }\r\n else if (parseInt(variante.tipo) == 1) {\r\n if (variante.intFormValue != null) {\r\n lavorazione_1.lavorazioneId = variante.id;\r\n lavorazione_1.valoreLavorazione = variante.intFormValue;\r\n }\r\n }\r\n else if (parseInt(variante.tipo) == 5) {\r\n if (variante.numWidthFormValue != null) {\r\n lavorazione_1.lavorazioneId = variante.id;\r\n lavorazione_1.tipo = variante.tipo;\r\n if (variante.hasDepth == true) {\r\n lavorazione_1.numWidthFormValue = variante.numWidthFormValue;\r\n lavorazione_1.numHeightFormValue = variante.numHeightFormValue;\r\n lavorazione_1.numDepthFormValue = variante.numDepthFormValue;\r\n }\r\n else {\r\n lavorazione_1.numWidthFormValue = variante.numWidthFormValue;\r\n lavorazione_1.numHeightFormValue = variante.numHeightFormValue;\r\n }\r\n }\r\n }\r\n else if (parseInt(variante.tipo) == 6) {\r\n lavorazione_1.lavorazioneId = variante.id;\r\n lavorazione_1.valoreLavorazione = variante.value;\r\n }\r\n else if (parseInt(variante.tipo) == 7) {\r\n variante.VarianteMatrix.VarianteVerticale.forEach(function (varianti) {\r\n varianti.VarianteOrizzontale.filter(function (x) { return x.qta > 0; }).forEach(function (varianti2) {\r\n var matrix = new quoting_submit_model_2.MatrixModelCalculation();\r\n matrix.quantita = varianti2.qta;\r\n matrix.lavorazioneOrizzontaleId = varianti2.id;\r\n matrix.lavorazioneVerticaleId = varianti.id;\r\n lavorazione_1.tipo = variante.tipo;\r\n lavorazione_1.lavorazioneId = variante.id;\r\n lavorazione_1.matrixValues.push(matrix);\r\n });\r\n });\r\n }\r\n if ((lavorazione_1.lavorazioneId != null && lavorazione_1.valoreLavorazione != \"-1\") || parseInt(variante.tipo) == 7) {\r\n this_1.model.lavorazioniAccessorie.push(lavorazione_1);\r\n }\r\n }\r\n };\r\n var this_1 = this;\r\n for (var _b = 0, _c = gruppo.varianti; _b < _c.length; _b++) {\r\n var variante = _c[_b];\r\n _loop_1(variante);\r\n }\r\n this.isDataInitialized = true;\r\n }\r\n if (this.formData.calculationType != quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO) {\r\n var calculationSub_1 = this._quotingService.getCalculatedAp(this.model).subscribe(function (result) {\r\n _this.resultPrice = result;\r\n _this.isCalculatedProduct = true;\r\n if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = _this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n var price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n _this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListino() || _this.isCalculationTypeCalcolatoListino() || _this.isCalculationTypeCalcolatoListinoFornitori()) {\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n _this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica() || _this.isCalculationTypeCalcolatoListinoScontistica() || _this.isCalculationTypeCalcolatoListinoFornitoriScontistica()) {\r\n //Selecting first element\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n var breakFlag = false;\r\n for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n var slicedPriceRow = priceRow.slice(1);\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n var price = reverse_1[_a];\r\n if (price.Price != -1) {\r\n _this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n _this.subManager.add(calculationSub_1);\r\n _this.resultCalculation = true;\r\n _this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }, function (err) {\r\n _this.isCalculatedProduct = false;\r\n _this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n });\r\n this.subManager.add(calculationSub_1);\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n this.isDataInitialized = true;\r\n };\r\n ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n return this.loggedIdUser.isAuthenticated;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n var result = false;\r\n if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n var result = false;\r\n if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n var result = false;\r\n if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_SCONTISTICA) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListino = function () {\r\n var retVal = false;\r\n if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO) {\r\n retVal = true;\r\n }\r\n return retVal;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n var retVal = false;\r\n if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO_SCONTISTICA) {\r\n retVal = true;\r\n }\r\n return retVal;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoListino = function () {\r\n var retVal = false;\r\n if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO) {\r\n retVal = true;\r\n }\r\n return retVal;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoListinoFornitori = function () {\r\n var retVal = false;\r\n if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI) {\r\n retVal = true;\r\n }\r\n return retVal;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoListinoScontistica = function () {\r\n var retVal = false;\r\n if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_SCONTISTICA) {\r\n retVal = true;\r\n }\r\n return retVal;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoListinoFornitoriScontistica = function () {\r\n var retVal = false;\r\n if (this.formData.calculationType == quoting_constants_1.QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI_SCONTISTICA) {\r\n retVal = true;\r\n }\r\n return retVal;\r\n };\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n $('#quotingFormLoader').hide();\r\n var altezza = $(\"#footer\").outerHeight();\r\n var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n var altezzaHead = $(\".header-body\").outerHeight();\r\n var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.checkEmailIsValid = function () {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n };\r\n ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n //Deselecting the current price and selected the one passed in input\r\n for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n var price_1 = _a[_i];\r\n price_1.IsSelected = false;\r\n }\r\n price.IsSelected = true;\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n this.resultPrice.DayDescriptionName = price.DayDescriptionName;\r\n this.resultPrice.DayDescriptionStatus = price.DayDescriptionStatus;\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n };\r\n ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setTypePriceResult = function (type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n };\r\n ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.addToCartApProduct = function () {\r\n var _this = this;\r\n var wizardId = parseInt(this.resourceId);\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var addToCartSub = this.cartService.addApProductToCart(wizardId, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(addToCartSub);\r\n };\r\n ChildComponent.prototype.addToCartOtherProductCalcolatoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = parseInt(this.resourceId);\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addOtherProductCalcolatoScontisticaToCart(wizardId, this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n var _this = this;\r\n var wizardId = parseInt(this.resourceId);\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addOtherProductListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = parseInt(this.resourceId);\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addOtherProductListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addOtherProductCalcolatoListinoToCart = function (quantityId) {\r\n var _this = this;\r\n var wizardId = parseInt(this.resourceId);\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addOtherProductCalcolatoListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.Varianti).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addOtherProductCalcolatoListinoScontisticaToCart = function (quantityId) {\r\n var _this = this;\r\n var wizardId = parseInt(this.resourceId);\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addOtherProductCalcolatoListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId, this.resultPrice.Varianti).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.textAreaCheck = function (event) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n $('.popovers').popover();\r\n layoutTheme.initToggle();\r\n this.setPopoverVariableForMAtrix();\r\n this.pageIsInitAfter = true;\r\n };\r\n ChildComponent.prototype.setPopoverVariableForMAtrix = function () {\r\n for (var _i = 0, _a = this.formData.gruppi; _i < _a.length; _i++) {\r\n var gruppo = _a[_i];\r\n for (var _b = 0, _c = gruppo.varianti; _b < _c.length; _b++) {\r\n var variante = _c[_b];\r\n if (parseInt(variante.tipo) == 7) {\r\n variante.VarianteMatrix.VarianteVerticale.forEach(function (varianti) {\r\n varianti.popup = $('#popover_content_wrapper_' + varianti.id).html();\r\n });\r\n }\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: formInfo.TemplateHtml\r\n }),\r\n __param(7, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _b) || Object, (typeof (_c = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', String)\r\n ], OtherProductFormComponent.prototype, \"productId\", void 0);\r\n OtherProductFormComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-other-product-quoting-form\",\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _e) || Object, (typeof (_f = typeof cms_component_service_1.CmsComponentService !== 'undefined' && cms_component_service_1.CmsComponentService) === 'function' && _f) || Object, Boolean])\r\n ], OtherProductFormComponent);\r\n return OtherProductFormComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.OtherProductFormComponent = OtherProductFormComponent;\r\n\n\n/***/ }),\n\n/***/ 605:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar QuotingMainComponent = (function () {\r\n function QuotingMainComponent(_compiler, componentHelper, _elementRef, templateService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this.templateService = templateService;\r\n this.isBrowser = isBrowser;\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n QuotingMainComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n var templateHtml;\r\n var compSub = this.templateService.getComponentTemplate(\"quotingMainTemplate\").subscribe(function (result) {\r\n templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(templateHtml, _this.QResourceId, _this.QMacroCat, _this.QType);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(compSub);\r\n };\r\n QuotingMainComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n QuotingMainComponent.prototype.createSubComponent = function (template, InputresourceId, InputMacroCatId, InputTypeId) {\r\n var ParentComponent = (function () {\r\n function ParentComponent(languageService, authService) {\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.QResourceId = InputresourceId;\r\n this.QMacroCat = InputMacroCatId;\r\n this.QType = InputTypeId;\r\n this.lang = this.languageService.getLongLang();\r\n this.autentification = this.authService.GetData();\r\n }\r\n ParentComponent.prototype.ngOnInit = function () {\r\n };\r\n ParentComponent = __decorate([\r\n core_1.Component({\r\n template: template\r\n }), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _a) || Object, (typeof (_b = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _b) || Object])\r\n ], ParentComponent);\r\n return ParentComponent;\r\n var _a, _b;\r\n }());\r\n return ParentComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Number)\r\n ], QuotingMainComponent.prototype, \"QResourceId\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Number)\r\n ], QuotingMainComponent.prototype, \"QMacroCat\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', String)\r\n ], QuotingMainComponent.prototype, \"QType\", void 0);\r\n QuotingMainComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-quoting\",\r\n template: \"\"\r\n }),\r\n __param(4, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof template_service_1.TemplateService !== 'undefined' && template_service_1.TemplateService) === 'function' && _d) || Object, Boolean])\r\n ], QuotingMainComponent);\r\n return QuotingMainComponent;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.QuotingMainComponent = QuotingMainComponent;\r\n\n\n/***/ }),\n\n/***/ 606:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(6);\r\n///Components\r\nvar quoting_excluding_component_1 = __webpack_require__(71);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar WizardAdesiviComponent = (function () {\r\n function WizardAdesiviComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this._quotingService = _quotingService;\r\n this.authService = authService;\r\n this.languageService = languageService;\r\n this.isBrowser = isBrowser;\r\n this.autentification = this.authService.GetData();\r\n this.userId = this.authService.GetUserId();\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n WizardAdesiviComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n var wizardSub = this._quotingService.getWizardAdesiviData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(wizardSub);\r\n };\r\n WizardAdesiviComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n WizardAdesiviComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(_quotingService, languageService, authService, translate, routesService, cartService, bootboxService, isBrowser, canvasService) {\r\n var _this = this;\r\n this._quotingService = _quotingService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.translate = translate;\r\n this.routesService = routesService;\r\n this.cartService = cartService;\r\n this.bootboxService = bootboxService;\r\n this.isBrowser = isBrowser;\r\n this.canvasService = canvasService;\r\n this.pageIsInit = false;\r\n this.pageIsInitAfter = false;\r\n this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n this.waiting = false;\r\n this.carteValue = -1;\r\n this.lang = this.languageService.getLongLang();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.autentification = this.authService.GetData();\r\n this.resourceId = InputresourceId;\r\n this.isDataInitialized = false;\r\n this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n this.requestInfoSuccess = null;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.blockquoting = false;\r\n this.isCalculatedWizard = false;\r\n // sending info to a child component\r\n this.parentWidgetData = result.CanvasInfo;\r\n this.subManager = new Subscription_1.Subscription();\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n var canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(function (isModalOpened) {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(function (isDesignApproved) {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n if (_this.isCalculationTypeCalcolato()) {\r\n _this.addToCartWizardCalcolato(1);\r\n }\r\n else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n _this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n _this.addToCartWizardListino(1);\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n _this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n if (this.responseModel.idGruppo == 6) {\r\n this.ExcludingRules.setMacrocategory(\"ADESIVI\");\r\n }\r\n else if (this.responseModel.idGruppo == 8) {\r\n this.ExcludingRules.setMacrocategory(\"MANIFESTI\");\r\n }\r\n else if (this.responseModel.idGruppo == 10) {\r\n this.ExcludingRules.setMacrocategory(\"PANNELLI\");\r\n }\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.openCanvasEditor = function () {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n var canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n var isStateId = false;\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n };\r\n ChildComponent.prototype.setCanvasConfig = function () {\r\n var canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n return canvasConfigData;\r\n };\r\n ChildComponent.prototype.toShowCanvasButton = function () {\r\n var toShow = false;\r\n var isModuleActive = false;\r\n var isUserLoggedIn = false;\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n return toShow;\r\n };\r\n ChildComponent.prototype.CheckRegoleAdesivi = function () {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n var oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n var oldSupporto = this.responseModel.idSupportiRigidi;\r\n var oldFormato = this.responseModel.idFormati;\r\n var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n var lavAccArray = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"ADESIVI\", null, null, this.responseModel);\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"ADESIVI\", null, null, this.responseModel);\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"ADESIVI\", idFormato, 0, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"ADESIVI\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n this.onMaterialeChange(true);\r\n }\r\n if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n this.onSuportoChange(true);\r\n }\r\n var count = 0;\r\n for (var _b = 0, lavAccArray_1 = lavAccArray; _b < lavAccArray_1.length; _b++) {\r\n var lavorazioneOld = lavAccArray_1[_b];\r\n count = 0;\r\n for (var _c = 0, _d = this.responseModel.lavorazioniAccessorie; _c < _d.length; _c++) {\r\n var lavorazione = _d[_c];\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n };\r\n ChildComponent.prototype.CheckRegoleManifesti = function () {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n var oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n var oldSupporto = this.responseModel.idSupportiRigidi;\r\n var oldFormato = this.responseModel.idFormati;\r\n var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n var lavAccArray = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"MANIFESTI\", null, null, this.responseModel);\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"MANIFESTI\", null, null, this.responseModel);\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"MANIFESTI\", idFormato, 0, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"MANIFESTI\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n this.onMaterialeChange(true);\r\n }\r\n if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n this.onSuportoChange(true);\r\n }\r\n var count = 0;\r\n for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n var lavorazione = _c[_b];\r\n count = 0;\r\n for (var _d = 0, lavAccArray_2 = lavAccArray; _d < lavAccArray_2.length; _d++) {\r\n var lavorazioneOld = lavAccArray_2[_d];\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n };\r\n ChildComponent.prototype.CheckRegolePannelli = function () {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n var oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n var oldSupporto = this.responseModel.idSupportiRigidi;\r\n var oldFormato = this.responseModel.idFormati;\r\n var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n var lavAccArray = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"PANNELLI\", null, null, this.responseModel);\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"PANNELLI\", null, null, this.responseModel);\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"PANNELLI\", idFormato, 0, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"PANNELLI\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n this.onMaterialeChange(true);\r\n }\r\n if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n this.onSuportoChange(true);\r\n }\r\n var count = 0;\r\n for (var _b = 0, lavAccArray_3 = lavAccArray; _b < lavAccArray_3.length; _b++) {\r\n var lavorazioneOld = lavAccArray_3[_b];\r\n count = 0;\r\n for (var _c = 0, _d = this.responseModel.lavorazioniAccessorie; _c < _d.length; _c++) {\r\n var lavorazione = _d[_c];\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n };\r\n ChildComponent.prototype.parameterValidation = function () {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n //apply all rules\r\n if (this.responseModel.idGruppo == 6) {\r\n this.CheckRegoleAdesivi();\r\n }\r\n else if (this.responseModel.idGruppo == 8) {\r\n this.CheckRegoleManifesti();\r\n }\r\n else if (this.responseModel.idGruppo == 10) {\r\n this.CheckRegolePannelli();\r\n }\r\n //verify validation for all parameters \r\n this.validationCopie();\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.validationFormati();\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n this.validationMateriali();\r\n this.validationSupporti();\r\n this.countPlastificazioni();\r\n this.validationLavorazioneAccessoria();\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n };\r\n ChildComponent.prototype.countPlastificazioni = function () {\r\n if (this.responseModel.plastificazioni1 != null) {\r\n this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.selectFileCombination = function () {\r\n this.listaFile = new Array();\r\n for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n var file = _a[_i];\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n if (file.FormatId == idFormato) {\r\n var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj);\r\n }\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.checkZero = function (val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n };\r\n ChildComponent.prototype.setTypePriceResult = function (type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n };\r\n ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n ChildComponent.prototype.clearSelectedIndex = function () {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n };\r\n ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n /// Create model for passed in input to the calculation method\r\n ChildComponent.prototype.getCalculationModel = function () {\r\n var _this = this;\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n this.model.idMaterialiFlessibili = this.responseModel.idMaterialiFlessibili;\r\n this.model.idSupportiRigidi = this.responseModel.idSupportiRigidi;\r\n this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n this.model.lavorazioniAccessorie = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioneAccessoria = _a[_i];\r\n var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n var calcWizSub = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n _this.resultPrice = result;\r\n _this.isCalculatedWizard = true;\r\n if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = _this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n var price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n _this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n var breakFlag = false;\r\n for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n var slicedPriceRow = priceRow.slice(1);\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n var price = reverse_1[_a];\r\n if (price.Price != -1) {\r\n _this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n _this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n _this.resultCalculation = true;\r\n _this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }, function (err) {\r\n _this.isCalculatedWizard = true;\r\n _this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n });\r\n this.subManager.add(calcWizSub);\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n this.isDataInitialized = true;\r\n };\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n var altezza = $(\"#footer\").outerHeight();\r\n var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n var altezzaHead = $(\".header-body\").outerHeight();\r\n var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.checkValidation = function () {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.materialeIsValid\r\n && this.responseModel.supportoIsValid) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n ChildComponent.prototype.validationBaseFormati = function () {\r\n var message;\r\n var base = parseFloat(this.responseModel.baseFormato);\r\n var minBase = this.responseModel.minimoBase;\r\n var maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationAltezzaFormati = function () {\r\n var message;\r\n var altezza = parseFloat(this.responseModel.altezzaFormato);\r\n var minAltezza = this.responseModel.minimoAltezza;\r\n var maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.altezzaFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationSoggetti = function () {\r\n var message;\r\n var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.responseModel.soggettiMessage = message;\r\n };\r\n ChildComponent.prototype.validationCopie = function () {\r\n var message;\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n var numCopie = parseInt(this.responseModel.numCopie);\r\n var minCopie = this.responseModel.minimoCopie;\r\n var maxCopie = this.responseModel.massimoCopie;\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.copieMessage = message;\r\n };\r\n ChildComponent.prototype.validationFormati = function () {\r\n var message;\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.formatiMessage = message;\r\n };\r\n ChildComponent.prototype.validationMateriali = function () {\r\n var message;\r\n if (this.responseModel.idMaterialiFlessibili == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.materialeIsValid = false;\r\n }\r\n else {\r\n this.responseModel.materialeIsValid = true;\r\n }\r\n if (this.responseModel.materialiFlessibili != null) {\r\n this.responseModel.materialiFlessibiliCount = this.responseModel.materialiFlessibili.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.materialeMessage = message;\r\n };\r\n ChildComponent.prototype.validationSupporti = function () {\r\n var message;\r\n if (this.responseModel.idSupportiRigidi == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.supportoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.supportoIsValid = true;\r\n }\r\n if (this.responseModel.supportiRigidi != null) {\r\n this.responseModel.supportiRigidiCount = this.responseModel.supportiRigidi.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.supportoMessage = message;\r\n };\r\n ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n var message = \"\";\r\n var valid = true;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n var qta = parseInt(lavorazione.value);\r\n var minQta = lavorazione.minQtaInput;\r\n var maxQta = lavorazione.maxQtaInput;\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.lavorazioniIsValid = valid;\r\n };\r\n ChildComponent.prototype.getLabel = function (label) {\r\n var message;\r\n var transSub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n this.subManager.add(transSub);\r\n return message;\r\n };\r\n ChildComponent.prototype.checkIsPlastificazioneInternoIsShowed = function () {\r\n var result = false;\r\n if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n var result = false;\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n var result = false;\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.textAreaCheck = function (event) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n var result = false;\r\n var isVisible = false;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioniAccessorie = _a[_i];\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n var formato = _a[_i];\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n };\r\n ChildComponent.prototype.onMaterialeChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.materialiFlessibili; _i < _a.length; _i++) {\r\n var materiale = _a[_i];\r\n if (materiale.chiave == this.responseModel.idMaterialiFlessibili) {\r\n this.responseModel.materialeDescription = materiale.descrizione;\r\n this.responseModel.materialeImage = materiale.image;\r\n this.responseModel.materialeHasInfo = materiale.hasInfo;\r\n this.responseModel.materialeShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onMaterialeVisualChange = function (materialeId) {\r\n this.responseModel.idMaterialiFlessibili = materialeId;\r\n this.onMaterialeChange();\r\n };\r\n ChildComponent.prototype.onSuportoChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.supportiRigidi; _i < _a.length; _i++) {\r\n var supporto = _a[_i];\r\n if (supporto.chiave == this.responseModel.idSupportiRigidi) {\r\n this.responseModel.supportoDescription = supporto.descrizione;\r\n this.responseModel.supportoImage = supporto.image;\r\n this.responseModel.supportoHasInfo = supporto.hasInfo;\r\n this.responseModel.supportoShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onSuportoVisualChange = function (supportoId) {\r\n this.responseModel.idSupportiRigidi = supportoId;\r\n this.onSuportoChange();\r\n };\r\n ChildComponent.prototype.onPlastificationInternoChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.plastificazioni1; _i < _a.length; _i++) {\r\n var plastification = _a[_i];\r\n if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n this.responseModel.plastificazioni1Image = plastification.image;\r\n this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onPlastificationInternoViasualChange = function (plastificationId) {\r\n this.responseModel.idPlastificazioni1 = plastificationId;\r\n this.onPlastificationInternoChange();\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n var variante = _a[_i];\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n };\r\n ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideFormatDescription = function () {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideMaterialeDescription = function () {\r\n if (this.responseModel.materialeShowInfo) {\r\n this.responseModel.materialeShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.materialeShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideSupportoDescription = function () {\r\n if (this.responseModel.supportoShowInfo) {\r\n this.responseModel.supportoShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.supportoShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePlastficationInternoDescription = function () {\r\n if (this.responseModel.plastificazioni1ShowInfo) {\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni1ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListino = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var wizCalSub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(wizCalSub);\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var wizSconSub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(wizSconSub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var wizLisSub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(wizLisSub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var wizLisSconSub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(wizLisSconSub);\r\n };\r\n ChildComponent.prototype.setPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n //Deselecting the current price and selected the one passed in input\r\n for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n var price_1 = _a[_i];\r\n price_1.IsSelected = false;\r\n }\r\n price.IsSelected = true;\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n };\r\n ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n return this.loggedIdUser.isAuthenticated;\r\n };\r\n ChildComponent.prototype.checkEmailIsValid = function () {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n };\r\n ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.sendRequestInfo = function () {\r\n var _this = this;\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n if (result == true) {\r\n _this.requestInfoSuccess = true;\r\n }\r\n else {\r\n _this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n _this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.templateHtml\r\n }),\r\n __param(7, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Number)\r\n ], WizardAdesiviComponent.prototype, \"resourceId\", void 0);\r\n WizardAdesiviComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-wizard-adesivi-widget\",\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n ], WizardAdesiviComponent);\r\n return WizardAdesiviComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardAdesiviComponent = WizardAdesiviComponent;\r\n\n\n/***/ }),\n\n/***/ 607:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(6);\r\n///Components\r\nvar quoting_excluding_component_1 = __webpack_require__(71);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar WizardBannerComponent = (function () {\r\n function WizardBannerComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this._quotingService = _quotingService;\r\n this.authService = authService;\r\n this.languageService = languageService;\r\n this.isBrowser = isBrowser;\r\n this.autentification = this.authService.GetData();\r\n this.userId = this.authService.GetUserId();\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n WizardBannerComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n var sub = this._quotingService.getWizardBannerData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(sub);\r\n };\r\n WizardBannerComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n WizardBannerComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(_quotingService, languageService, authService, translate, routesService, cartService, bootboxService, isBrowser, canvasService) {\r\n var _this = this;\r\n this._quotingService = _quotingService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.translate = translate;\r\n this.routesService = routesService;\r\n this.cartService = cartService;\r\n this.bootboxService = bootboxService;\r\n this.isBrowser = isBrowser;\r\n this.canvasService = canvasService;\r\n this.pageIsInit = false;\r\n this.pageIsInitAfter = false;\r\n this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n this.waiting = false;\r\n this.carteValue = -1;\r\n this.lang = this.languageService.getLongLang();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.autentification = this.authService.GetData();\r\n this.resourceId = InputresourceId;\r\n this.isDataInitialized = false;\r\n this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n this.requestInfoSuccess = null;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.blockquoting = false;\r\n this.isCalculatedWizard = false;\r\n // sending info to a child component\r\n this.parentWidgetData = result.CanvasInfo;\r\n this.subManager = new Subscription_1.Subscription();\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n var canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(function (isModalOpened) {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(function (isDesignApproved) {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n if (_this.isCalculationTypeCalcolato()) {\r\n _this.addToCartWizardCalcolato(1);\r\n }\r\n else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n _this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n _this.addToCartWizardListino(1);\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n _this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n if (this.responseModel.idGruppo == 7) {\r\n this.ExcludingRules.setMacrocategory(\"BANNER\");\r\n }\r\n else if (this.responseModel.idGruppo == 9) {\r\n this.ExcludingRules.setMacrocategory(\"BANDIERE\");\r\n }\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.openCanvasEditor = function () {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n var canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n var isStateId = false;\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n };\r\n ChildComponent.prototype.setCanvasConfig = function () {\r\n var canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n return canvasConfigData;\r\n };\r\n ChildComponent.prototype.toShowCanvasButton = function () {\r\n var toShow = false;\r\n var isModuleActive = false;\r\n var isUserLoggedIn = false;\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n return toShow;\r\n };\r\n ChildComponent.prototype.CheckRegoleBanner = function () {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n var oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n var oldFormato = this.responseModel.idFormati;\r\n var oldAsola = this.responseModel.idAsole;\r\n var oldElettro = this.responseModel.idElettrosaldature;\r\n var oldOcchielli = this.responseModel.idOcchielli;\r\n var lavAccArray = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANNER\", null, null, this.responseModel);\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n //Reset regole occhiellatura\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", null, null, this.responseModel);\r\n //Reset regole asola\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", null, null, this.responseModel);\r\n //Reset regole elettro\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ELETTROSALDATURA\", \"\", null, null, this.responseModel);\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"BANNER\", null, null, this.responseModel);\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANNER\", idFormato, 0, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", this.responseModel.idOcchielli, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", this.responseModel.idAsole, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ELETTROSALDATURA\", \"\", this.responseModel.idElettrosaldature, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"BANNER\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n this.onMaterialeChange(true);\r\n }\r\n if (oldOcchielli != this.responseModel.idOcchielli) {\r\n this.onOcchielliChange(true);\r\n }\r\n if (oldAsola != this.responseModel.idAsole) {\r\n this.onAsoleChange(true);\r\n }\r\n if (oldElettro != this.responseModel.idElettrosaldature) {\r\n this.onElettrosaldatureChange(true);\r\n }\r\n var count = 0;\r\n for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n var lavorazione = _c[_b];\r\n count = 0;\r\n for (var _d = 0, lavAccArray_1 = lavAccArray; _d < lavAccArray_1.length; _d++) {\r\n var lavorazioneOld = lavAccArray_1[_d];\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n };\r\n ChildComponent.prototype.checkIsAsolaIsShowed = function () {\r\n var result = false;\r\n if (this.responseModel.asole != null && this.responseModel.asole.length > 0) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsCucituraIsShowed = function () {\r\n var result = false;\r\n if (this.responseModel.cuciture != null && this.responseModel.cuciture.length > 0) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsElettroIsShowed = function () {\r\n var result = false;\r\n if (this.responseModel.elettrosaldature != null && this.responseModel.elettrosaldature.length > 0) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsOcchielliIsShowed = function () {\r\n var result = false;\r\n if (this.responseModel.occhielli != null && this.responseModel.occhielli.length > 0) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.CheckRegoleBandiere = function () {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n var oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n var oldFormato = this.responseModel.idFormati;\r\n var oldAsola = this.responseModel.idAsole;\r\n var oldCucitura = this.responseModel.idCuciture;\r\n var oldOcchielli = this.responseModel.idOcchielli;\r\n var lavAccArray = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANDIERE\", null, null, this.responseModel);\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n //Reset regole occhiellatura\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", null, null, this.responseModel);\r\n //Reset regole asola\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", null, null, this.responseModel);\r\n //Reset regole elettro\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"CUCITURA\", \"\", null, null, this.responseModel);\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"BANDIERE\", null, null, this.responseModel);\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANDIERE\", idFormato, 0, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", this.responseModel.idOcchielli, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", this.responseModel.idAsole, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"CUCITURA\", \"\", this.responseModel.idCuciture, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"BANDIERE\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n this.onMaterialeChange(true);\r\n }\r\n if (oldOcchielli != this.responseModel.idOcchielli) {\r\n this.onOcchielliChange(true);\r\n }\r\n if (oldAsola != this.responseModel.idAsole) {\r\n this.onAsoleChange(true);\r\n }\r\n if (oldCucitura != this.responseModel.idCuciture) {\r\n this.onCucitureChange(true);\r\n }\r\n var count = 0;\r\n for (var _b = 0, lavAccArray_2 = lavAccArray; _b < lavAccArray_2.length; _b++) {\r\n var lavorazioneOld = lavAccArray_2[_b];\r\n count = 0;\r\n for (var _c = 0, _d = this.responseModel.lavorazioniAccessorie; _c < _d.length; _c++) {\r\n var lavorazione = _d[_c];\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n };\r\n ChildComponent.prototype.isBannerQuotingForm = function () {\r\n result = false;\r\n if (this.responseModel.idGruppo == 7) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isBandiereQuotingForm = function () {\r\n result = false;\r\n if (this.responseModel.idGruppo == 9) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.parameterValidation = function () {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n //apply all rules\r\n if (this.responseModel.idGruppo == 7) {\r\n this.CheckRegoleBanner();\r\n if (this.responseModel.elettrosaldature != null && this.responseModel.elettrosaldature.length > 0) {\r\n this.validationElettro();\r\n }\r\n else {\r\n this.responseModel.elettroIsValid = true;\r\n }\r\n this.responseModel.cucituraIsValid = true;\r\n }\r\n else if (this.responseModel.idGruppo == 9) {\r\n this.CheckRegoleBandiere();\r\n if (this.responseModel.cuciture != null && this.responseModel.cuciture.length > 0) {\r\n this.validationCuciture();\r\n }\r\n else {\r\n this.responseModel.cucituraIsValid = true;\r\n }\r\n this.responseModel.elettroIsValid = true;\r\n }\r\n //verify validation for all parameters\r\n this.validationCopie();\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.validationFormati();\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n if (this.responseModel.asole != null && this.responseModel.asole.length > 0) {\r\n this.validationAsole();\r\n if (this.responseModel.idAsole != \"0\") {\r\n this.validationDiametroAsole();\r\n }\r\n else {\r\n this.responseModel.diametroAsolaIsValid = true;\r\n }\r\n }\r\n else {\r\n this.responseModel.diametroAsolaIsValid = true;\r\n this.responseModel.asolaIsValid = true;\r\n }\r\n if (this.responseModel.occhielli != null && this.responseModel.occhielli.length > 0) {\r\n this.validationOcchielli();\r\n if (this.responseModel.idOcchielli != \"0\") {\r\n this.validationDistanzaOcchielli();\r\n }\r\n else {\r\n this.responseModel.distanzaOcchielliIsValid = true;\r\n }\r\n }\r\n else {\r\n this.responseModel.occhiellaturaIsValid = true;\r\n this.responseModel.distanzaOcchielliIsValid = true;\r\n }\r\n this.validationMateriali();\r\n this.countOcchielliDisposizione();\r\n this.countAsoleDisposizioni();\r\n this.countTelettrosaldature();\r\n this.countTelettrosaldatureDisposizioni();\r\n this.countCucitureDisposizioni();\r\n this.validationLavorazioneAccessoria();\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n };\r\n ChildComponent.prototype.countOcchielliDisposizione = function () {\r\n if (this.responseModel.occhielliDisposizione != null) {\r\n this.responseModel.occhielliDisposizioneCount = this.responseModel.occhielliDisposizione.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.countAsoleDisposizioni = function () {\r\n if (this.responseModel.asoleDisposizioni != null) {\r\n this.responseModel.asoleDisposizioniCount = this.responseModel.asoleDisposizioni.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.countTelettrosaldature = function () {\r\n if (this.responseModel.elettrosaldature != null) {\r\n this.responseModel.elettrosaldatureCount = this.responseModel.elettrosaldature.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.countTelettrosaldatureDisposizioni = function () {\r\n if (this.responseModel.elettrosaldatureDisposizioni != null) {\r\n this.responseModel.elettrosaldatureDisposizioniCount = this.responseModel.elettrosaldatureDisposizioni.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.countCucitureDisposizioni = function () {\r\n if (this.responseModel.cucitureDisposizioni != null) {\r\n this.responseModel.cucitureDisposizioniCount = this.responseModel.cucitureDisposizioni.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.selectFileCombination = function () {\r\n this.listaFile = new Array();\r\n for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n var file = _a[_i];\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n if (file.FormatId == idFormato) {\r\n var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj);\r\n }\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.checkZero = function (val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n };\r\n ChildComponent.prototype.setTypePriceResult = function (type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n };\r\n ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n ChildComponent.prototype.clearSelectedIndex = function () {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n };\r\n ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n /// Create model for passed in input to the calculation method\r\n ChildComponent.prototype.getCalculationModel = function () {\r\n var _this = this;\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n this.model.idMaterialiFlessibili = this.responseModel.idMaterialiFlessibili;\r\n this.model.idAsole = this.responseModel.idAsole;\r\n if (this.responseModel.idAsole != \"0\") {\r\n this.model.disposizione_asola_id = this.responseModel.disposizione_asola_id;\r\n this.model.diametro_asola = this.responseModel.diametro_asola;\r\n }\r\n this.model.idCuciture = this.responseModel.idCuciture;\r\n if (this.responseModel.idCuciture != \"0\") {\r\n this.model.disposizione_cucitura_id = this.responseModel.disposizione_cucitura_id;\r\n }\r\n this.model.idElettrosaldature = this.responseModel.idElettrosaldature;\r\n if (this.responseModel.idElettrosaldature != \"0\") {\r\n this.model.disposizione_elettrosaldatura_id = this.responseModel.disposizione_elettrosaldatura_id;\r\n }\r\n this.model.idOcchielli = this.responseModel.idOcchielli;\r\n if (this.responseModel.idOcchielli != \"0\") {\r\n this.model.disposizione_occhielli_id = this.responseModel.disposizione_occhielli_id;\r\n this.model.distanza_occhielli = this.responseModel.distanza_occhielli;\r\n }\r\n this.model.lavorazioniAccessorie = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioneAccessoria = _a[_i];\r\n var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n var sub = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n _this.resultPrice = result;\r\n _this.isCalculatedWizard = true;\r\n if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = _this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n var price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n _this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n var breakFlag = false;\r\n for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n var slicedPriceRow = priceRow.slice(1);\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n var price = reverse_1[_a];\r\n if (price.Price != -1) {\r\n _this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n _this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n _this.resultCalculation = true;\r\n _this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }, function (err) {\r\n _this.isCalculatedWizard = true;\r\n _this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n });\r\n this.subManager.add(sub);\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n this.isDataInitialized = true;\r\n };\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n var altezza = $(\"#footer\").outerHeight();\r\n var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n var altezzaHead = $(\".header-body\").outerHeight();\r\n var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.checkValidation = function () {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.materialeIsValid\r\n && this.responseModel.occhiellaturaIsValid\r\n && this.responseModel.elettroIsValid\r\n && this.responseModel.asolaIsValid\r\n && this.responseModel.distanzaOcchielliIsValid\r\n && this.responseModel.diametroAsolaIsValid\r\n && this.responseModel.cucituraIsValid) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n ChildComponent.prototype.validationBaseFormati = function () {\r\n var message;\r\n var base = parseFloat(this.responseModel.baseFormato);\r\n var minBase = this.responseModel.minimoBase;\r\n var maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationAltezzaFormati = function () {\r\n var message;\r\n var altezza = parseFloat(this.responseModel.altezzaFormato);\r\n var minAltezza = this.responseModel.minimoAltezza;\r\n var maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.altezzaFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationSoggetti = function () {\r\n var message;\r\n var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.responseModel.soggettiMessage = message;\r\n };\r\n ChildComponent.prototype.validationCopie = function () {\r\n var message;\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n var numCopie = parseInt(this.responseModel.numCopie);\r\n var minCopie = this.responseModel.minimoCopie;\r\n var maxCopie = this.responseModel.massimoCopie;\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.copieMessage = message;\r\n };\r\n ChildComponent.prototype.validationFormati = function () {\r\n var message;\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.formatiMessage = message;\r\n };\r\n ChildComponent.prototype.validationMateriali = function () {\r\n var message;\r\n if (this.responseModel.idMaterialiFlessibili == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.materialeIsValid = false;\r\n }\r\n else {\r\n this.responseModel.materialeIsValid = true;\r\n }\r\n if (this.responseModel.materialiFlessibili != null) {\r\n this.responseModel.materialiFlessibiliCount = this.responseModel.materialiFlessibili.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.materialeMessage = message;\r\n };\r\n ChildComponent.prototype.validationOcchielli = function () {\r\n var message;\r\n if (this.responseModel.idOcchielli == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.occhiellaturaIsValid = false;\r\n }\r\n else {\r\n this.responseModel.occhiellaturaIsValid = true;\r\n }\r\n if (this.responseModel.occhielli != null) {\r\n this.responseModel.occhielliCount = this.responseModel.occhielli.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.occhiellaturaMessage = message;\r\n };\r\n ChildComponent.prototype.validationAsole = function () {\r\n var message;\r\n if (this.responseModel.idAsole == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.asolaIsValid = false;\r\n }\r\n else {\r\n this.responseModel.asolaIsValid = true;\r\n }\r\n if (this.responseModel.asole != null) {\r\n this.responseModel.asoleCount = this.responseModel.asole.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.asolaMessage = message;\r\n };\r\n ChildComponent.prototype.validationDiametroAsole = function () {\r\n var message;\r\n var diametro = parseInt(this.responseModel.diametro_asola);\r\n if (this.responseModel.diametro_asola == null) {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.diametroAsolaIsValid = false;\r\n }\r\n else if (diametro <= 0) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" 0\";\r\n this.responseModel.diametroAsolaIsValid = false;\r\n }\r\n else {\r\n this.responseModel.diametroAsolaIsValid = true;\r\n }\r\n this.responseModel.diametroAsolaMessage = message;\r\n };\r\n ChildComponent.prototype.validationDistanzaOcchielli = function () {\r\n var message;\r\n var distanza = parseInt(this.responseModel.distanza_occhielli);\r\n if (this.responseModel.distanza_occhielli == null) {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.distanzaOcchielliIsValid = false;\r\n }\r\n else if (distanza <= 0) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" 0\";\r\n this.responseModel.distanzaOcchielliIsValid = false;\r\n }\r\n else {\r\n this.responseModel.distanzaOcchielliIsValid = true;\r\n }\r\n this.responseModel.distanzaOcchielliMessage = message;\r\n };\r\n ChildComponent.prototype.validationElettro = function () {\r\n var message;\r\n if (this.responseModel.idElettrosaldature == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.elettroIsValid = false;\r\n }\r\n else {\r\n this.responseModel.elettroIsValid = true;\r\n }\r\n this.responseModel.elettroMessage = message;\r\n };\r\n ChildComponent.prototype.validationCuciture = function () {\r\n var message;\r\n if (this.responseModel.idCuciture == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.cucituraIsValid = false;\r\n }\r\n else {\r\n this.responseModel.cucituraIsValid = true;\r\n }\r\n if (this.responseModel.cuciture != null) {\r\n this.responseModel.cucitureCount = this.responseModel.cuciture.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.cucituraMessage = message;\r\n };\r\n ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n var message = \"\";\r\n var valid = true;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n var qta = parseInt(lavorazione.value);\r\n var minQta = lavorazione.minQtaInput;\r\n var maxQta = lavorazione.maxQtaInput;\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.lavorazioniIsValid = valid;\r\n };\r\n ChildComponent.prototype.getLabel = function (label) {\r\n var message;\r\n var sub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n this.subManager.add(sub);\r\n return message;\r\n };\r\n ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n var result = false;\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n var result = false;\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.textAreaCheck = function (event) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n var result = false;\r\n var isVisible = false;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioniAccessorie = _a[_i];\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n var formato = _a[_i];\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n };\r\n ChildComponent.prototype.onOcchielliChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.occhielli; _i < _a.length; _i++) {\r\n var occhiellatura = _a[_i];\r\n if (occhiellatura.chiave == this.responseModel.idOcchielli) {\r\n this.responseModel.occhiellaturaDescription = occhiellatura.descrizione;\r\n this.responseModel.occhiellaturaImage = occhiellatura.image;\r\n this.responseModel.occhiellaturaHasInfo = occhiellatura.hasInfo;\r\n this.responseModel.occhiellaturaShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onOcchielliVisualChange = function (occhielliId) {\r\n this.responseModel.idOcchielli = occhielliId;\r\n this.onOcchielliChange();\r\n };\r\n ChildComponent.prototype.onAsoleChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.asole; _i < _a.length; _i++) {\r\n var asola = _a[_i];\r\n if (asola.chiave == this.responseModel.idAsole) {\r\n this.responseModel.asolaDescription = asola.descrizione;\r\n this.responseModel.asolaImage = asola.image;\r\n this.responseModel.asolaHasInfo = asola.hasInfo;\r\n this.responseModel.asolaShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onAsoleVisualChange = function (asoleId) {\r\n this.responseModel.idAsole = asoleId;\r\n this.onAsoleChange();\r\n };\r\n ChildComponent.prototype.onElettrosaldatureChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.elettrosaldature; _i < _a.length; _i++) {\r\n var elettro = _a[_i];\r\n if (elettro.chiave == this.responseModel.idElettrosaldature) {\r\n this.responseModel.elettroDescription = elettro.descrizione;\r\n this.responseModel.elettroImage = elettro.image;\r\n this.responseModel.elettroHasInfo = elettro.hasInfo;\r\n this.responseModel.elettroShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onElettrosaldatureVisualChange = function (elettroId) {\r\n this.responseModel.idElettrosaldature = elettroId;\r\n this.onElettrosaldatureChange();\r\n };\r\n ChildComponent.prototype.onCucitureChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.cuciture; _i < _a.length; _i++) {\r\n var cucitura = _a[_i];\r\n if (cucitura.chiave == this.responseModel.idCuciture) {\r\n this.responseModel.cucituraDescription = cucitura.descrizione;\r\n this.responseModel.cucituraImage = cucitura.image;\r\n this.responseModel.cucituraHasInfo = cucitura.hasInfo;\r\n this.responseModel.cucituraShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onCucitureVisualChange = function (cucituraId) {\r\n this.responseModel.idCuciture = cucituraId;\r\n this.onCucitureChange();\r\n };\r\n ChildComponent.prototype.onMaterialeChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.materialiFlessibili; _i < _a.length; _i++) {\r\n var materiale = _a[_i];\r\n if (materiale.chiave == this.responseModel.idMaterialiFlessibili) {\r\n this.responseModel.materialeDescription = materiale.descrizione;\r\n this.responseModel.materialeImage = materiale.image;\r\n this.responseModel.materialeHasInfo = materiale.hasInfo;\r\n this.responseModel.materialeShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onMaterialeVisualChange = function (materialeId) {\r\n this.responseModel.idMaterialiFlessibili = materialeId;\r\n this.onMaterialeChange();\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n var variante = _a[_i];\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n };\r\n ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideFormatDescription = function () {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideOcchiellaturaDescription = function () {\r\n if (this.responseModel.occhiellaturaShowInfo) {\r\n this.responseModel.occhiellaturaShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.occhiellaturaShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideAsolaDescription = function () {\r\n if (this.responseModel.asolaShowInfo) {\r\n this.responseModel.asolaShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.asolaShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideElettrosaldatureDescription = function () {\r\n if (this.responseModel.elettroShowInfo) {\r\n this.responseModel.elettroShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.elettroShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideCucitureDescription = function () {\r\n if (this.responseModel.cucituraShowInfo) {\r\n this.responseModel.cucituraShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.cucituraShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideMaterialeDescription = function () {\r\n if (this.responseModel.materialeShowInfo) {\r\n this.responseModel.materialeShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.materialeShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideSupportoDescription = function () {\r\n if (this.responseModel.supportoShowInfo) {\r\n this.responseModel.supportoShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.supportoShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListino = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.setPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n //Deselecting the current price and selected the one passed in input\r\n for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n var price_1 = _a[_i];\r\n price_1.IsSelected = false;\r\n }\r\n price.IsSelected = true;\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n };\r\n ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n return this.loggedIdUser.isAuthenticated;\r\n };\r\n ChildComponent.prototype.checkEmailIsValid = function () {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n };\r\n ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.sendRequestInfo = function () {\r\n var _this = this;\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n if (result == true) {\r\n _this.requestInfoSuccess = true;\r\n }\r\n else {\r\n _this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n _this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.templateHtml\r\n }),\r\n __param(7, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Number)\r\n ], WizardBannerComponent.prototype, \"resourceId\", void 0);\r\n WizardBannerComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-wizard-banner-widget\",\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n ], WizardBannerComponent);\r\n return WizardBannerComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardBannerComponent = WizardBannerComponent;\r\n\n\n/***/ }),\n\n/***/ 608:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\n//System\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(6);\r\n//Components\r\nvar quoting_excluding_component_1 = __webpack_require__(71);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar WizardBusteComponent = (function () {\r\n function WizardBusteComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this._quotingService = _quotingService;\r\n this.authService = authService;\r\n this.languageService = languageService;\r\n this.isBrowser = isBrowser;\r\n this.autentification = this.authService.GetData();\r\n this.userId = this.authService.GetUserId();\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n WizardBusteComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n var sub = this._quotingService.getWizardBusteData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(sub);\r\n };\r\n WizardBusteComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n WizardBusteComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(_quotingService, languageService, authService, translate, routesService, currency, cartService, bootboxService, isBrowser, canvasService) {\r\n var _this = this;\r\n this._quotingService = _quotingService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.translate = translate;\r\n this.routesService = routesService;\r\n this.currency = currency;\r\n this.cartService = cartService;\r\n this.bootboxService = bootboxService;\r\n this.isBrowser = isBrowser;\r\n this.canvasService = canvasService;\r\n this.pageIsInit = false;\r\n this.pageIsInitAfter = false;\r\n this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n this.waiting = false;\r\n this.carteValue = -1;\r\n this.lang = this.languageService.getLongLang();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.autentification = this.authService.GetData();\r\n this.resourceId = InputresourceId;\r\n this.isDataInitialized = false;\r\n this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n this.requestInfoSuccess = null;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n //blockquoting: boolean = false;\r\n this.resultPriceQuantity = 0;\r\n this.resultPriceImponibile = 0;\r\n this.resultPriceCurrency = this.currency.getDefaultCurrency();\r\n this.isCalculatedWizard = false;\r\n // sending info to a child component\r\n this.parentWidgetData = result.CanvasInfo;\r\n this.subManager = new Subscription_1.Subscription();\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n var canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(function (isModalOpened) {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(function (isDesignApproved) {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n if (_this.isCalculationTypeCalcolato()) {\r\n _this.addToCartWizardCalcolato(1);\r\n }\r\n else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n _this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n _this.addToCartWizardListino(1);\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n _this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n this.ExcludingRules.setMacrocategory(\"BUSTE\");\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.openCanvasEditor = function () {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n var canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n var isStateId = false;\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n };\r\n ChildComponent.prototype.setCanvasConfig = function () {\r\n var canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n return canvasConfigData;\r\n };\r\n ChildComponent.prototype.toShowCanvasButton = function () {\r\n var toShow = false;\r\n var isModuleActive = false;\r\n var isUserLoggedIn = false;\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n return toShow;\r\n };\r\n ChildComponent.prototype.getTableValues = function (index) {\r\n this.resultPriceQuantity = this.resultPrice.TablePriceList[index].Quantity;\r\n this.resultPriceImponibile = this.resultPrice.TablePriceList[index].StrDiscountedPrice;\r\n this.resultPriceCurrency = this.resultPrice.TablePriceList[index].Currency;\r\n };\r\n ChildComponent.prototype.onStampaRetroChangeDocta = function () {\r\n if (this.responseModel.idColori2 == \"5\") {\r\n this.responseModel.idColori1 = \"5\";\r\n for (var _i = 0, _a = this.responseModel.colori1; _i < _a.length; _i++) {\r\n var col = _a[_i];\r\n if (col.chiave == \"5\") {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n }\r\n }\r\n else if (this.responseModel.idColori2 == \"4\") {\r\n this.responseModel.idColori1 = \"4\";\r\n for (var _b = 0, _c = this.responseModel.colori1; _b < _c.length; _b++) {\r\n var col = _c[_b];\r\n if (col.chiave == \"4\") {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n }\r\n }\r\n else if ((this.responseModel.idColori2 == \"0\" || this.responseModel.idColori2 == \"1\") && (this.responseModel.idColori1 == \"5\" || this.responseModel.idColori1 == \"4\")) {\r\n this.responseModel.idColori1 = this.responseModel.idColori2;\r\n for (var _d = 0, _e = this.responseModel.colori1; _d < _e.length; _d++) {\r\n var col = _e[_d];\r\n if (col.chiave == this.responseModel.idColori2) {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onStampaFronteChangeDocta = function () {\r\n if (this.responseModel.idColori1 == \"5\" && (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"1\")) {\r\n this.responseModel.idColori2 = \"5\";\r\n for (var _i = 0, _a = this.responseModel.colori2; _i < _a.length; _i++) {\r\n var col = _a[_i];\r\n if (col.chiave == \"5\") {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n }\r\n }\r\n else if (this.responseModel.idColori1 == \"4\" && (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"1\")) {\r\n this.responseModel.idColori2 = \"4\";\r\n for (var _b = 0, _c = this.responseModel.colori2; _b < _c.length; _b++) {\r\n var col = _c[_b];\r\n if (col.chiave == \"4\") {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n }\r\n }\r\n else if ((this.responseModel.idColori1 == \"0\" || this.responseModel.idColori1 == \"1\") && (this.responseModel.idColori2 == \"5\" || this.responseModel.idColori2 == \"4\")) {\r\n this.responseModel.idColori2 = this.responseModel.idColori1;\r\n for (var _d = 0, _e = this.responseModel.colori2; _d < _e.length; _d++) {\r\n var col = _e[_d];\r\n if (col.chiave == this.responseModel.idColori1) {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.parameterValidation = function () {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n //verify validation for all parameters \r\n this.validationCopie();\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.validationBusta();\r\n this.validationColori();\r\n this.countPantoni();\r\n this.validationLavorazioneAccessoria();\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n //$('#quotingForm').hide();\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n };\r\n ChildComponent.prototype.countPantoni = function () {\r\n if (this.responseModel.pantoni != null) {\r\n this.responseModel.pantoniCount = this.responseModel.pantoni.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.selectFileCombination = function () {\r\n this.listaFile = new Array();\r\n for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n var file = _a[_i];\r\n if (this.responseModel.idBusta != null) {\r\n var data = this.responseModel.idBusta.split(\"_\");\r\n var idBusta = data[0];\r\n if (file.FormatId == idBusta) {\r\n var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj);\r\n }\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.checkZero = function (val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n };\r\n ChildComponent.prototype.setTypePriceResult = function (type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n };\r\n ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n ChildComponent.prototype.clearSelectedIndex = function () {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n };\r\n ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n /// Create model for passed in input to the calculation method\r\n ChildComponent.prototype.getCalculationModel = function () {\r\n var _this = this;\r\n this.model.macrocategoryWizardId = 15;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n if (this.responseModel.idBusta != \"-1\") {\r\n this.model.idBusta = this.responseModel.idBusta;\r\n }\r\n this.model.idColori1 = this.responseModel.idColori1;\r\n this.model.idPantoneFronte1 = \"\";\r\n this.model.idPantoneFronte2 = \"\";\r\n this.model.idPantoneRetro1 = \"\";\r\n this.model.idPantoneRetro2 = \"\";\r\n if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\" && this.model.idColori1 != \"4\" && this.model.idColori1 != \"5\") {\r\n this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n }\r\n else if (this.model.idColori1 == \"4\") {\r\n this.model.idPantoneFronte1 = this.responseModel.idPantoneFronte1;\r\n }\r\n else if (this.model.idColori1 == \"5\") {\r\n this.model.idPantoneFronte1 = this.responseModel.idPantoneFronte1;\r\n this.model.idPantoneFronte2 = this.responseModel.idPantoneFronte2;\r\n }\r\n this.model.idColori2 = this.responseModel.idColori2;\r\n if (this.model.idColori2 == \"4\") {\r\n this.model.idPantoneRetro1 = this.responseModel.idPantoneRetro1;\r\n }\r\n else if (this.model.idColori2 == \"5\") {\r\n this.model.idPantoneRetro1 = this.responseModel.idPantoneRetro1;\r\n this.model.idPantoneRetro2 = this.responseModel.idPantoneRetro2;\r\n }\r\n this.model.lavorazioniAccessorie = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioneAccessoria = _a[_i];\r\n var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n var sub_1 = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n _this.resultPrice = result;\r\n _this.isCalculatedWizard = true;\r\n if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = _this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n _this.setPriceResult(scontisticaTable[0]);\r\n }\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n var breakFlag = false;\r\n for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n var slicedPriceRow = priceRow.slice(1);\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n var price = reverse_1[_a];\r\n if (price.Price != -1) {\r\n _this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n _this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n _this.subManager.add(sub_1);\r\n _this.resultCalculation = true;\r\n _this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }, function (err) {\r\n _this.isCalculatedWizard = true;\r\n _this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n });\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n this.isDataInitialized = true;\r\n };\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n var altezza = $(\"#footer\").outerHeight();\r\n var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n var altezzaHead = $(\".header-body\").outerHeight();\r\n var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.checkValidation = function () {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.bustaIsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.colori1IsValid) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n ChildComponent.prototype.validationColori = function () {\r\n var message;\r\n if (this.responseModel.idColori1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.colori1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.colori1IsValid = true;\r\n }\r\n if (this.responseModel.colori1 != null) {\r\n this.responseModel.colori1Count = this.responseModel.colori1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n if (this.responseModel.colori2 != null) {\r\n this.responseModel.colori2Count = this.responseModel.colori2.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.colori1Message = message;\r\n };\r\n ChildComponent.prototype.validationSoggetti = function () {\r\n var message;\r\n var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.responseModel.soggettiMessage = message;\r\n };\r\n ChildComponent.prototype.validationCopie = function () {\r\n var message;\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n var numCopie = parseInt(this.responseModel.numCopie);\r\n var minCopie = this.responseModel.minimoCopie;\r\n var maxCopie = this.responseModel.massimoCopie;\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.copieMessage = message;\r\n };\r\n ChildComponent.prototype.validationBusta = function () {\r\n var message;\r\n if (this.responseModel.idBusta == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.bustaIsValid = false;\r\n }\r\n else {\r\n this.responseModel.bustaIsValid = true;\r\n }\r\n if (this.responseModel.tipologieBusta != null) {\r\n this.responseModel.tipologieBustaCount = this.responseModel.tipologieBusta.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.bustaMessage = message;\r\n };\r\n ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n var message = \"\";\r\n var valid = true;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n var qta = parseInt(lavorazione.value);\r\n var minQta = lavorazione.minQtaInput;\r\n var maxQta = lavorazione.maxQtaInput;\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.lavorazioniIsValid = valid;\r\n };\r\n ChildComponent.prototype.getLabel = function (label) {\r\n var message;\r\n var sub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n this.subManager.add(sub);\r\n return message;\r\n };\r\n ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n var result = false;\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n var result = false;\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.textAreaCheck = function (event) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n var result = false;\r\n var isVisible = false;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioniAccessorie = _a[_i];\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.onBustaChange = function () {\r\n for (var _i = 0, _a = this.responseModel.tipologieBusta; _i < _a.length; _i++) {\r\n var busta = _a[_i];\r\n if (busta.chiave == this.responseModel.idBusta) {\r\n this.responseModel.bustaDescription = busta.descrizione;\r\n this.responseModel.bustaImage = busta.image;\r\n this.responseModel.bustaHasInfo = busta.hasInfo;\r\n this.responseModel.bustaShowInfo = false;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onBustaVisualChange = function (bustaId) {\r\n this.responseModel.idBusta = bustaId;\r\n this.onBustaChange();\r\n };\r\n ChildComponent.prototype.onPantoneFronte1VisualChange = function (pantoneValue) {\r\n this.responseModel.idPantoneFronte1 = pantoneValue;\r\n this.onPantoneFronte1Change();\r\n };\r\n ChildComponent.prototype.onPantoneFronte1Change = function () {\r\n for (var _i = 0, _a = this.responseModel.pantoni; _i < _a.length; _i++) {\r\n var pantone = _a[_i];\r\n if (pantone.chiave == this.responseModel.idPantoneFronte1) {\r\n this.responseModel.pantoneFronte1Description = pantone.descrizione;\r\n this.responseModel.pantoneFronte1Image = pantone.image;\r\n this.responseModel.pantoneFronte1HasInfo = pantone.hasInfo;\r\n this.responseModel.pantoneFronte1ShowInfo = false;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onPantoneFronte2VisualChange = function (pantoneValue) {\r\n this.responseModel.idPantoneFronte2 = pantoneValue;\r\n this.onPantoneFronte2Change();\r\n };\r\n ChildComponent.prototype.onPantoneFronte2Change = function () {\r\n for (var _i = 0, _a = this.responseModel.pantoni; _i < _a.length; _i++) {\r\n var pantone = _a[_i];\r\n if (pantone.chiave == this.responseModel.idPantoneFronte2) {\r\n this.responseModel.pantoneFronte2Description = pantone.descrizione;\r\n this.responseModel.pantoneFronte2Image = pantone.image;\r\n this.responseModel.pantoneFronte2HasInfo = pantone.hasInfo;\r\n this.responseModel.pantoneFronte2ShowInfo = false;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onPantoneRetro1VisualChange = function (pantoneValue) {\r\n this.responseModel.idPantoneRetro1 = pantoneValue;\r\n this.onPantoneRetro1Change();\r\n };\r\n ChildComponent.prototype.onPantoneRetro1Change = function () {\r\n for (var _i = 0, _a = this.responseModel.pantoni; _i < _a.length; _i++) {\r\n var pantone = _a[_i];\r\n if (pantone.chiave == this.responseModel.idPantoneRetro1) {\r\n this.responseModel.pantoneRetro1Description = pantone.descrizione;\r\n this.responseModel.pantoneRetro1Image = pantone.image;\r\n this.responseModel.pantoneRetro1HasInfo = pantone.hasInfo;\r\n this.responseModel.pantoneRetro1ShowInfo = false;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onPantoneRetro2VisualChange = function (pantoneValue) {\r\n this.responseModel.idPantoneRetro2 = pantoneValue;\r\n this.onPantoneRetro2Change();\r\n };\r\n ChildComponent.prototype.onPantoneRetro2Change = function () {\r\n for (var _i = 0, _a = this.responseModel.pantoni; _i < _a.length; _i++) {\r\n var pantone = _a[_i];\r\n if (pantone.chiave == this.responseModel.idPantoneRetro2) {\r\n this.responseModel.pantoneRetro2Description = pantone.descrizione;\r\n this.responseModel.pantoneRetro2Image = pantone.image;\r\n this.responseModel.pantoneRetro2HasInfo = pantone.hasInfo;\r\n this.responseModel.pantoneRetro2ShowInfo = false;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onStampaInternoVisualChange = function (stampaInternoValue) {\r\n this.responseModel.idColori1 = stampaInternoValue;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onStampaRetroVisualChange = function (stampaCopertinaValue) {\r\n this.responseModel.idColori2 = stampaCopertinaValue;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione) {\r\n for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n var variante = _a[_i];\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n };\r\n ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideBusteDescription = function () {\r\n if (this.responseModel.bustaShowInfo) {\r\n this.responseModel.bustaShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.bustaShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePantoneFronte1Description = function () {\r\n if (this.responseModel.pantoneFronte1ShowInfo) {\r\n this.responseModel.pantoneFronte1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.pantoneFronte1ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePantoneFronte2Description = function () {\r\n if (this.responseModel.pantoneFronte2ShowInfo) {\r\n this.responseModel.pantoneFronte2ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.pantoneFronte2ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePantoneRetro1Description = function () {\r\n if (this.responseModel.pantoneRetro1ShowInfo) {\r\n this.responseModel.pantoneRetro1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.pantoneRetro1ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePantoneRetro2Description = function () {\r\n if (this.responseModel.pantoneRetro2ShowInfo) {\r\n this.responseModel.pantoneRetro2ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.pantoneRetro2ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.isPantoneFronte1Showed = function () {\r\n var result = false;\r\n if (this.responseModel.idColori1 == \"4\" || this.responseModel.idColori1 == \"5\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isPantoneFronte2Showed = function () {\r\n var result = false;\r\n if (this.responseModel.idColori1 == \"5\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isPantoneRetro1Showed = function () {\r\n var result = false;\r\n if (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"5\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isPantoneRetro2Showed = function () {\r\n var result = false;\r\n if (this.responseModel.idColori2 == \"5\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListino = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.resetCanvasData();\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.resetCanvasData();\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoBusteToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.model.idPantoneFronte1, this.model.idPantoneFronte2, this.model.idPantoneRetro1, this.model.idPantoneRetro2).subscribe(function (result) {\r\n _this.cartService.resetCanvasData();\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoScontisticaBusteToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, this.model.idPantoneFronte1, this.model.idPantoneFronte2, this.model.idPantoneRetro1, this.model.idPantoneRetro2).subscribe(function (result) {\r\n _this.cartService.resetCanvasData();\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.setPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n //Deselecting the current price and selected the one passed in input\r\n for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n var price_1 = _a[_i];\r\n price_1.IsSelected = false;\r\n }\r\n price.IsSelected = true;\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n };\r\n ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n return this.loggedIdUser.isAuthenticated;\r\n };\r\n ChildComponent.prototype.checkEmailIsValid = function () {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n };\r\n ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.sendRequestInfo = function () {\r\n var _this = this;\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n if (result == true) {\r\n _this.requestInfoSuccess = true;\r\n }\r\n else {\r\n _this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n _this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n // set variable for check if product is canvas edited to a initial state, because of other products\r\n this.cartService.setIfProductIsCanvasEdited(false);\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.templateHtml\r\n }),\r\n __param(8, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _f) || Object, (typeof (_g = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _g) || Object, (typeof (_h = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _h) || Object, Boolean, (typeof (_j = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _j) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Number)\r\n ], WizardBusteComponent.prototype, \"resourceId\", void 0);\r\n WizardBusteComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-wizard-buste-widget\",\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n ], WizardBusteComponent);\r\n return WizardBusteComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardBusteComponent = WizardBusteComponent;\r\n\n\n/***/ }),\n\n/***/ 609:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(6);\r\n//Components\r\nvar quoting_excluding_component_1 = __webpack_require__(71);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar WizardCommercialeComponent = (function () {\r\n function WizardCommercialeComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this._quotingService = _quotingService;\r\n this.authService = authService;\r\n this.languageService = languageService;\r\n this.isBrowser = isBrowser;\r\n this.autentification = this.authService.GetData();\r\n this.userId = this.authService.GetUserId();\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n WizardCommercialeComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n var sub = this._quotingService.getWizardCommercialeData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(sub);\r\n };\r\n WizardCommercialeComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n WizardCommercialeComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(_quotingService, languageService, authService, translate, cartService, routesService, bootboxService, isBrowser, canvasService) {\r\n var _this = this;\r\n this._quotingService = _quotingService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.translate = translate;\r\n this.cartService = cartService;\r\n this.routesService = routesService;\r\n this.bootboxService = bootboxService;\r\n this.isBrowser = isBrowser;\r\n this.canvasService = canvasService;\r\n this.pageIsInit = false;\r\n this.pageIsInitAfter = false;\r\n this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n this.waiting = false;\r\n this.carteValue = -1;\r\n this.lang = this.languageService.getLongLang();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.autentification = this.authService.GetData();\r\n this.resourceId = InputresourceId;\r\n this.isDataInitialized = false;\r\n this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n this.model = new quoting_submit_model_4.wizardFormEditoriaModel();\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n this.requestInfoSuccess = null;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.blockquoting = false;\r\n this.listaProfonditaPackaging = new Array();\r\n this.listaFormatiFull = new Array();\r\n this.isCalculatedWizard = false;\r\n // sending info to a child component\r\n this.parentWidgetData = result.CanvasInfo;\r\n this.subManager = new Subscription_1.Subscription();\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n var canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(function (isModalOpened) {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(function (isDesignApproved) {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n if (_this.isCalculationTypeCalcolato()) {\r\n _this.addToCartWizardCalcolato(1);\r\n }\r\n else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n _this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n _this.addToCartWizardListino(1);\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n _this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n this.ExcludingRules.setMacrocategory(\"COMMERCIALE\");\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n this.listaFormatiFull = this.responseModel.formati;\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation();\r\n }\r\n if (this.responseModel.IsPackagingWizard == true) {\r\n this.onBasePackagingChange();\r\n }\r\n };\r\n ChildComponent.prototype.openCanvasEditor = function () {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n var canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n var isStateId = false;\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n };\r\n ChildComponent.prototype.setCanvasConfig = function () {\r\n var canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n return canvasConfigData;\r\n };\r\n ChildComponent.prototype.toShowCanvasButton = function () {\r\n var toShow = false;\r\n var isModuleActive = false;\r\n var isUserLoggedIn = false;\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n return toShow;\r\n };\r\n ChildComponent.prototype.CheckRegoleCommerciale = function () {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n var oldCarta = this.responseModel.idCarte1;\r\n var oldFormato = this.responseModel.idFormati;\r\n var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n var oldPiegature = this.responseModel.idPiegature;\r\n var lavAccArray = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"COMMERCIALE\", null, null, this.responseModel);\r\n //Reset regole carta e grammature\r\n this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PIEGATURA\", \"\", null, null, this.responseModel);\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"COMMERCIALE\", null, null, this.responseModel);\r\n //Reset regole taglio\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", null, null, this.responseModel);\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"COMMERCIALE\", null, null, this.responseModel);\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"COMMERCIALE\", this.responseModel.idFormati, 0, this.responseModel);\r\n if (this.responseModel.idCarte1 != null) {\r\n var data = this.responseModel.idCarte1.split(\"_\");\r\n var idCarta = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"COMMERCIALE\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PIEGATURA\", \"\", this.responseModel.idPiegature, 0, this.responseModel);\r\n if (!this.isTaglioCalculated()) {\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", 1, 0, this.responseModel);\r\n }\r\n else {\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", 2, 0, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"COMMERCIALE\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldCarta != this.responseModel.idCarte1) {\r\n this.onCartaInternoFieldChanged(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldPiegature != this.responseModel.idPiegature) {\r\n this.onPiegaturaChange(true);\r\n }\r\n var count = 0;\r\n for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n var lavorazione = _c[_b];\r\n count = 0;\r\n for (var _d = 0, lavAccArray_1 = lavAccArray; _d < lavAccArray_1.length; _d++) {\r\n var lavorazioneOld = lavAccArray_1[_d];\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n };\r\n ChildComponent.prototype.parameterValidation = function () {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n //apply all rules\r\n this.CheckRegoleCommerciale();\r\n //verify validation for all parameters \r\n this.validationCopie();\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n if (this.responseModel.IsPackagingWizard == true) {\r\n this.validationBasePackaging();\r\n this.validationProfonditaPackaging();\r\n }\r\n else {\r\n this.responseModel.basePackagingIsValid = true;\r\n this.responseModel.profonditaPackagingIsValid = true;\r\n }\r\n this.validationFormati();\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n this.validationColori();\r\n this.validationCarteInterno();\r\n this.validationGrammatureCarteInterno();\r\n this.validationPiegatura();\r\n this.validationPlastificazione();\r\n this.validationLavorazioneAccessoria();\r\n this.countCartaCategories();\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n };\r\n ChildComponent.prototype.countCartaCategories = function () {\r\n if (this.responseModel.categorieCarte != null) {\r\n this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.checkZero = function (val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n };\r\n ChildComponent.prototype.setTypePriceResult = function (type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n };\r\n ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n ChildComponent.prototype.clearSelectedIndex = function () {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n };\r\n ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n /// Create model for passed in input to the calculation method\r\n ChildComponent.prototype.getCalculationModel = function () {\r\n var _this = this;\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n this.model.idCarte1 = this.responseModel.idCarte1;\r\n for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n var carta = _a[_i];\r\n if (this.model.idCarte1 == carta.chiave) {\r\n this.model.nomeCarte1 = carta.valore;\r\n }\r\n }\r\n this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n for (var _b = 0, _c = this.responseModel.grammature1; _b < _c.length; _b++) {\r\n var grammatureInterno = _c[_b];\r\n if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n this.model.nomeGrammature1 = grammatureInterno.valore;\r\n }\r\n }\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n this.model.idColori1 = this.responseModel.idColori1;\r\n if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n }\r\n this.model.idColori2 = this.responseModel.idColori2;\r\n this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n this.model.taglio = this.isTaglioCalculated();\r\n if (this.responseModel.idPiegature != \"-1\") {\r\n this.model.idPiegature = this.responseModel.idPiegature;\r\n }\r\n this.model.lavorazioniAccessorie = new Array();\r\n for (var _d = 0, _e = this.responseModel.lavorazioniAccessorie; _d < _e.length; _d++) {\r\n var lavorazioneAccessoria = _e[_d];\r\n var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n var sub_1 = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n _this.resultPrice = result;\r\n _this.isCalculatedWizard = true;\r\n if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = _this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n var price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n _this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n var breakFlag = false;\r\n for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n var slicedPriceRow = priceRow.slice(1);\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n var price = reverse_1[_a];\r\n if (price.Price != -1) {\r\n _this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n _this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n _this.subManager.add(sub_1);\r\n _this.resultCalculation = true;\r\n _this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }, function (err) {\r\n _this.showErrorMessage = true;\r\n _this.isCalculatedWizard = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n });\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n this.isDataInitialized = true;\r\n };\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n var altezza = $(\"#footer\").outerHeight();\r\n var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n var altezzaHead = $(\".header-body\").outerHeight();\r\n var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.checkValidation = function () {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.carte1IsValid\r\n && this.responseModel.grammature1IsValid\r\n && this.responseModel.piegatureIsValid\r\n && this.responseModel.plastificazione1IsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.colori1IsValid\r\n && this.responseModel.basePackagingIsValid\r\n && this.responseModel.profonditaPackagingIsValid) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n ChildComponent.prototype.validationColori = function () {\r\n var message;\r\n if (this.responseModel.idColori1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.colori1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.colori1IsValid = true;\r\n }\r\n if (this.responseModel.colori1 != null) {\r\n this.responseModel.colori1Count = this.responseModel.colori1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n if (this.responseModel.colori2 != null) {\r\n this.responseModel.colori2Count = this.responseModel.colori2.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.colori1Message = message;\r\n };\r\n ChildComponent.prototype.validationBaseFormati = function () {\r\n var message;\r\n var base = parseFloat(this.responseModel.baseFormato);\r\n var minBase = this.responseModel.minimoBase;\r\n var maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationAltezzaFormati = function () {\r\n var message;\r\n var altezza = parseFloat(this.responseModel.altezzaFormato);\r\n var minAltezza = this.responseModel.minimoAltezza;\r\n var maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.altezzaFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationSoggetti = function () {\r\n var message;\r\n var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.responseModel.soggettiMessage = message;\r\n };\r\n ChildComponent.prototype.validationCopie = function () {\r\n var message;\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n var numCopie = parseInt(this.responseModel.numCopie);\r\n var minCopie = this.responseModel.minimoCopie;\r\n var maxCopie = this.responseModel.massimoCopie;\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.copieMessage = message;\r\n };\r\n ChildComponent.prototype.validationBasePackaging = function () {\r\n var message;\r\n if (this.responseModel.idBasePackaging == 0 || this.responseModel.idBasePackaging == null) {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.basePackagingIsValid = false;\r\n }\r\n else {\r\n this.responseModel.basePackagingIsValid = true;\r\n }\r\n this.responseModel.basePackagingMessage = message;\r\n };\r\n ChildComponent.prototype.validationProfonditaPackaging = function () {\r\n var message;\r\n if (this.responseModel.idProfonditaPackaging == 0 || this.responseModel.idProfonditaPackaging == null) {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.profonditaPackagingIsValid = false;\r\n }\r\n else {\r\n this.responseModel.profonditaPackagingIsValid = true;\r\n }\r\n this.responseModel.profonditaPackagingMessage = message;\r\n };\r\n ChildComponent.prototype.validationFormati = function () {\r\n var message;\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n this.responseModel.formatiMessage = message;\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.validationCarteInterno = function () {\r\n var message;\r\n if (this.responseModel.idCarte1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.carte1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.carte1IsValid = true;\r\n }\r\n if (this.responseModel.carte1 != null) {\r\n this.responseModel.carte1Count = this.responseModel.carte1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.carte1Message = message;\r\n };\r\n ChildComponent.prototype.validationGrammatureCarteInterno = function () {\r\n var message;\r\n if (this.responseModel.idGrammature1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.grammature1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.grammature1IsValid = true;\r\n }\r\n if (this.responseModel.grammature1 != null) {\r\n this.responseModel.grammature1Count = this.responseModel.grammature1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.grammature1Message = message;\r\n };\r\n ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n var message = \"\";\r\n var valid = true;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n var qta = parseInt(lavorazione.value);\r\n var minQta = lavorazione.minQtaInput;\r\n var maxQta = lavorazione.maxQtaInput;\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.lavorazioniIsValid = valid;\r\n };\r\n ChildComponent.prototype.validationPiegatura = function () {\r\n var message;\r\n if (this.responseModel.idPiegature == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.piegatureIsValid = false;\r\n }\r\n else {\r\n this.responseModel.piegatureIsValid = true;\r\n }\r\n if (this.responseModel.piegature != null) {\r\n this.responseModel.piegatureCount = this.responseModel.piegature.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.piegatureMessage = message;\r\n };\r\n ChildComponent.prototype.validationPlastificazione = function () {\r\n var message;\r\n if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.plastificazione1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.plastificazione1IsValid = true;\r\n }\r\n if (this.responseModel.plastificazioni1 != null) {\r\n this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.plastificazione1Message = message;\r\n };\r\n ChildComponent.prototype.getLabel = function (label) {\r\n var message;\r\n this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n return message;\r\n };\r\n ChildComponent.prototype.isTaglioCalculated = function () {\r\n var result = false;\r\n if (this.responseModel.isTaglioVisible == false) {\r\n if (this.responseModel.tipoCalcoloTaglio == \"si\" && !this.responseModel.taglioShowed) {\r\n result = true;\r\n }\r\n else if (this.responseModel.tipoCalcoloTaglio == \"no\" && !this.responseModel.taglioShowed) {\r\n result = false;\r\n }\r\n else if (this.responseModel.taglioShowed) {\r\n result = this.responseModel.tipoTaglio;\r\n }\r\n }\r\n else {\r\n result = false;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsPlastificazioneInternoIsShowed = function () {\r\n var result = false;\r\n if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n var result = false;\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n var result = false;\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.textAreaCheck = function (event) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n var result = false;\r\n var isVisible = false;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioniAccessorie = _a[_i];\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsTaglioShowed = function () {\r\n var result = false;\r\n if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.onCategoriaCartaInternoFieldChanged = function () {\r\n var selectedPaper = false;\r\n for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n var carte = _a[_i];\r\n if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n carte.isVisible = true;\r\n }\r\n else {\r\n carte.isVisible = false;\r\n }\r\n }\r\n else {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n carte.isVisible = true;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onCartaInternoFieldChanged = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n var grammature = _a[_i];\r\n if (grammature.chiave == this.responseModel.idCarte1) {\r\n this.responseModel.carte1Description = grammature.descrizione;\r\n this.responseModel.carte1Image = grammature.image;\r\n this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = grammature.subElements;\r\n this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n this.model.idGrammature1 = grammature.wrap_valore;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onCartaInternoVisualFieldChanged = function (paperId) {\r\n this.responseModel.idCarte1 = paperId;\r\n this.onCartaInternoFieldChanged();\r\n };\r\n ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n if (this.responseModel.idFormati == \"-1\") {\r\n this.responseModel.formatoDescription = \"\";\r\n this.responseModel.formatoImage = \"\";\r\n this.responseModel.formatiHasInfo = false;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n var formato = _a[_i];\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onBasePackagingChange = function () {\r\n if (this.responseModel.listaPackagingParameter.length > 0 && this.responseModel.listaPackagingParameter != null) {\r\n for (var _i = 0, _a = this.responseModel.listaPackagingParameter; _i < _a.length; _i++) {\r\n var base = _a[_i];\r\n if (base.IdBase == this.responseModel.idBasePackaging) {\r\n this.listaProfonditaPackaging = base.listPackagingRelProfondita;\r\n if (this.listaProfonditaPackaging != null && this.listaProfonditaPackaging.length > 0) {\r\n this.responseModel.idProfonditaPackaging = this.listaProfonditaPackaging[0].IdProfondita;\r\n this.onProfonditaPackagingChange();\r\n }\r\n else {\r\n this.responseModel.formati = new Array();\r\n this.responseModel.idProfonditaPackaging = 0;\r\n this.onFormatiVisualChange(\"-1\");\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n this.responseModel.idBasePackaging = 0;\r\n this.responseModel.idProfonditaPackaging = 0;\r\n this.onFormatiVisualChange(\"-1\");\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onProfonditaPackagingChange = function () {\r\n if (this.listaProfonditaPackaging.length > 0 && this.listaProfonditaPackaging != null) {\r\n var firstFormato = 0;\r\n for (var _i = 0, _a = this.listaProfonditaPackaging; _i < _a.length; _i++) {\r\n var profondita = _a[_i];\r\n if (profondita.IdProfondita == this.responseModel.idProfonditaPackaging && profondita.IdBase == this.responseModel.idBasePackaging) {\r\n this.responseModel.formati = new Array();\r\n if (profondita.listPackagingRelFormato.length > 0 && profondita.listPackagingRelFormato != null) {\r\n for (var _b = 0, _c = this.listaFormatiFull; _b < _c.length; _b++) {\r\n var formato = _c[_b];\r\n for (var _d = 0, _e = profondita.listPackagingRelFormato; _d < _e.length; _d++) {\r\n var formatiRel = _e[_d];\r\n if (formato.chiave == formatiRel.IdFormato.toString()) {\r\n formato.isVisible = true;\r\n this.responseModel.formati.push(formato);\r\n if (firstFormato == 0) {\r\n firstFormato++;\r\n this.onFormatiVisualChange(formato.chiave);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n this.responseModel.formati = new Array();\r\n this.onFormatiVisualChange(\"-1\");\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n this.responseModel.formati = new Array();\r\n this.onFormatiVisualChange(\"-1\");\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n };\r\n ChildComponent.prototype.onStampaInternoVisualChange = function (stampaInternoValue) {\r\n this.responseModel.idColori1 = stampaInternoValue;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onStampaRetroVisualChange = function (stampaCopertinaValue) {\r\n this.responseModel.idColori2 = stampaCopertinaValue;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onGrammatureInternoVisualFieldChanged = function (grammatureId) {\r\n this.responseModel.idGrammature1 = grammatureId;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onPlastificationInternoChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.plastificazioni1; _i < _a.length; _i++) {\r\n var plastification = _a[_i];\r\n if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n this.responseModel.plastificazioni1Image = plastification.image;\r\n this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onPlastificationInternoViasualChange = function (plastificationId) {\r\n this.responseModel.idPlastificazioni1 = plastificationId;\r\n this.onPlastificationInternoChange();\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n var variante = _a[_i];\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n };\r\n ChildComponent.prototype.onPiegaturaChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.piegature; _i < _a.length; _i++) {\r\n var piegatura = _a[_i];\r\n if (piegatura.chiave == this.responseModel.idPiegature) {\r\n this.responseModel.piegatureDescription = piegatura.descrizione;\r\n this.responseModel.piegatureImage = piegatura.image;\r\n this.responseModel.piegatureHasInfo = piegatura.hasInfo;\r\n this.responseModel.piegatureShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onPiegaturaVisualChange = function (piegaturaId) {\r\n this.responseModel.idPiegature = piegaturaId;\r\n this.onPiegaturaChange();\r\n };\r\n ChildComponent.prototype.showHidePiegatureDescription = function () {\r\n if (this.responseModel.piegatureShowInfo) {\r\n this.responseModel.piegatureShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.piegatureShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideFormatDescription = function () {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePaperInternoDescription = function () {\r\n if (this.responseModel.carte1ShowInfo) {\r\n this.responseModel.carte1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.carte1ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePlastficationInternoDescription = function () {\r\n if (this.responseModel.plastificazioni1ShowInfo) {\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni1ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListino = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.setActive = function (id) {\r\n $(\".calendar-list\").removeClass(\"hoverActive\");\r\n $($(\".calendar-list\")[id]).addClass(\"hoverActive\");\r\n };\r\n ChildComponent.prototype.selectFileCombination = function () {\r\n this.listaFile = new Array();\r\n for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n var file = _a[_i];\r\n if (file.FormatId == this.responseModel.idFormati) {\r\n if (this.responseModel.piegature != null) {\r\n if (file.PiegaId == this.responseModel.idPiegature) {\r\n var fileObj = new quoting_submit_model_3.FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj);\r\n }\r\n }\r\n else {\r\n var fileObj = new quoting_submit_model_3.FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n this.listaFile.push(fileObj);\r\n }\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.setPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n //Deselecting the current price and selected the one passed in input\r\n for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n var price_1 = _a[_i];\r\n price_1.IsSelected = false;\r\n }\r\n price.IsSelected = true;\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n };\r\n ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n return this.loggedIdUser.isAuthenticated;\r\n };\r\n ChildComponent.prototype.checkEmailIsValid = function () {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n };\r\n ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.sendRequestInfo = function () {\r\n var _this = this;\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n if (result == true) {\r\n _this.requestInfoSuccess = true;\r\n }\r\n else {\r\n _this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n _this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.templateHtml\r\n }),\r\n __param(7, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Number)\r\n ], WizardCommercialeComponent.prototype, \"resourceId\", void 0);\r\n WizardCommercialeComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-wizard-commerciale-widget\",\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n ], WizardCommercialeComponent);\r\n return WizardCommercialeComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardCommercialeComponent = WizardCommercialeComponent;\r\n\n\n/***/ }),\n\n/***/ 61:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar QuotingService = (function () {\r\n function QuotingService(_api, language, currency, _cache, mappings, authService) {\r\n this._api = _api;\r\n this.language = language;\r\n this.currency = currency;\r\n this._cache = _cache;\r\n this.mappings = mappings;\r\n this.authService = authService;\r\n }\r\n QuotingService.prototype.getWizardStampaData = function (modelType, resourceId, userId, lang) {\r\n var url = this.mappings.Web_Api_Get_Wizard_Stampa_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n QuotingService.prototype.getWizardBannerData = function (modelType, resourceId, userId, lang) {\r\n var url = this.mappings.Web_Api_Get_Wizard_Banner_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n QuotingService.prototype.getWizardAdesiviData = function (modelType, resourceId, userId, lang) {\r\n var url = this.mappings.Web_Api_Get_Wizard_Adesivi_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n QuotingService.prototype.getWizardBusteData = function (modelType, resourceId, userId, lang) {\r\n var url = this.mappings.Web_Api_Get_Wizard_Buste_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n QuotingService.prototype.getWizardEtichetteData = function (modelType, resourceId, userId, lang) {\r\n var url = this.mappings.Web_Api_Get_Wizard_Etichette_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n QuotingService.prototype.getWizardCommercialeData = function (modelType, resourceId, userId, lang) {\r\n var url = this.mappings.Web_Api_Get_Wizard_Commerciale_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n QuotingService.prototype.getWizardEditoriaData = function (modelType, resourceId, userId, lang) {\r\n var url = this.mappings.Web_Api_Get_Wizard_Editoria_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n QuotingService.prototype.getWizardDataRequest = function (modelType, resourceId, lang) {\r\n var userId = this.authService.GetUserId();\r\n var url = this.mappings.Web_Api_Get_Wizard_Data_Address.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n QuotingService.prototype.getCalculatedWizard = function (data) {\r\n data.language = this.language.getLongLang();\r\n data.currency = this.currency.getCurrency();\r\n return this._api.post(this.mappings.Web_Api_Post_Get_Wizard_Price_Estimation, data)\r\n .do(function (result) { return result; })\r\n .share();\r\n };\r\n QuotingService.prototype.getCalculatedAp = function (data) {\r\n data.language = this.language.getLongLang();\r\n data.currency = this.currency.getCurrency();\r\n return this._api.post(this.mappings.Web_Api_Post_Get_Ap_Price_Estimation, data)\r\n .do(function (result) { return result; })\r\n .share();\r\n };\r\n QuotingService.prototype.sendRequestInfo = function (data) {\r\n data.language = this.language.getLongLang();\r\n return this._api.post(this.mappings.Web_Api_Post_Send_Request_Info_Wizard, data)\r\n .do(function (result) { return result; })\r\n .share();\r\n };\r\n QuotingService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _c) || Object, (typeof (_d = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _d) || Object, (typeof (_e = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _e) || Object, (typeof (_f = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _f) || Object])\r\n ], QuotingService);\r\n return QuotingService;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.QuotingService = QuotingService;\r\n\n\n/***/ }),\n\n/***/ 610:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\nvar quoting_model_1 = __webpack_require__(57);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar routes_service_1 = __webpack_require__(6);\r\n//Components\r\nvar quoting_excluding_component_1 = __webpack_require__(71);\r\n//Models\r\nvar quoting_model_2 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar WizardEditoriaComponent = (function () {\r\n function WizardEditoriaComponent(_compiler, componentHelper, authService, _elementRef, _quotingService, languageService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this.authService = authService;\r\n this._elementRef = _elementRef;\r\n this._quotingService = _quotingService;\r\n this.languageService = languageService;\r\n this.isBrowser = isBrowser;\r\n this.autentification = this.authService.GetData();\r\n this.userId = this.authService.GetUserId();\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n WizardEditoriaComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n var sub = this._quotingService.getWizardEditoriaData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, _this.resourceId, _this.resourceType);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(sub);\r\n };\r\n WizardEditoriaComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n WizardEditoriaComponent.prototype.createSubComponent = function (result, InputresourceId, InputresourceType) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(_quotingService, languageService, authService, cartService, routesService, bootboxService, translate, isBrowser, canvasService) {\r\n var _this = this;\r\n this._quotingService = _quotingService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.cartService = cartService;\r\n this.routesService = routesService;\r\n this.bootboxService = bootboxService;\r\n this.translate = translate;\r\n this.isBrowser = isBrowser;\r\n this.canvasService = canvasService;\r\n this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n this.model = new quoting_submit_model_2.wizardFormEditoriaModel();\r\n this.components = new quoting_model_1.LavorazioniComponents();\r\n this.isDataInitialized = false;\r\n this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n this.pageIsInit = false;\r\n this.pageIsInitAfter = false;\r\n this.lang = this.languageService.getLongLang();\r\n this.responseModel = new quoting_model_2.QuotingModel();\r\n this.resourceId = InputresourceId;\r\n this.resourceType = InputresourceType;\r\n this.EditioriaCopertinaSelect = \"-1\";\r\n this.isValidated = false;\r\n this.resultPrice = new quoting_submit_model_3.PriceEstimationModel();\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n this.requestInfoSuccess = null;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.blockquoting = false;\r\n this.isCalculatedWizard = false;\r\n // sending info to a child component\r\n this.parentWidgetData = result.CanvasInfo;\r\n this.subManager = new Subscription_1.Subscription();\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n var canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(function (isModalOpened) {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(function (isDesignApproved) {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n if (_this.isCalculationTypeCalcolato()) {\r\n _this.addToCartWizardCalcolato(1);\r\n }\r\n else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n _this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n _this.addToCartWizardListino(1);\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n _this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n this.ExcludingRules.setMacrocategory(\"EDITORIA\");\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new quoting_model_2.QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.stampa1_colori_fronte = \"1\";\r\n this.responseModel.stampa1_colori_retro = \"1\";\r\n this.responseModel.stampa2_colori_fronte = \"1\";\r\n this.responseModel.stampa2_colori_retro = \"1\";\r\n this.EditioriaCopertinaSelect = this.responseModel.idCopertine;\r\n if (this.responseModel.idCopertine == null) {\r\n this.responseModel.idCopertine = \"-1\";\r\n }\r\n this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n var altezza = $(\"#footer\").outerHeight();\r\n var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n var altezzaHead = $(\".header-body\").outerHeight();\r\n var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.openCanvasEditor = function () {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n var canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n var isStateId = false;\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n };\r\n ChildComponent.prototype.setCanvasConfig = function () {\r\n var canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n return canvasConfigData;\r\n };\r\n ChildComponent.prototype.toShowCanvasButton = function () {\r\n var toShow = false;\r\n var isModuleActive = false;\r\n var isUserLoggedIn = false;\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n return toShow;\r\n };\r\n ChildComponent.prototype.checkZero = function (val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n };\r\n ChildComponent.prototype.setTypePriceResult = function (type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n };\r\n ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n ChildComponent.prototype.clearSelectedIndex = function () {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n };\r\n ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n return this.loggedIdUser.isAuthenticated;\r\n };\r\n /// Create model for passed in input to the calculation method\r\n ChildComponent.prototype.getCalculationModel = function () {\r\n var _this = this;\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n this.model.tipoFacciate = this.responseModel.tipoFacciate;\r\n if (this.responseModel.tipoFacciate != 'libera') {\r\n this.model.idFacciate = this.responseModel.idFacciate;\r\n }\r\n else {\r\n this.model.numFacciate = this.responseModel.numFacciate;\r\n }\r\n this.model.tipoStampaInternoSoloFronte = this.responseModel.valueStampaInternoSoloFronte;\r\n this.model.tipoStampaCopertinaSoloFronte = this.responseModel.valueStampaCopertinaSoloFronte;\r\n this.model.idCarte1 = this.responseModel.idCarte1;\r\n for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n var carta = _a[_i];\r\n if (this.model.idCarte1 == carta.chiave) {\r\n this.model.nomeCarte1 = carta.valore;\r\n }\r\n }\r\n this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n for (var _b = 0, _c = this.responseModel.grammature1; _b < _c.length; _b++) {\r\n var grammatureInterno = _c[_b];\r\n if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n this.model.nomeGrammature1 = grammatureInterno.valore;\r\n }\r\n }\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n this.model.idColori1 = this.responseModel.idColori1;\r\n if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n }\r\n this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n if (this.EditioriaCopertinaSelect != \"0\" && this.EditioriaCopertinaSelect != \"-1\") {\r\n this.model.idCarte2 = this.responseModel.idCarte2;\r\n for (var _d = 0, _e = this.responseModel.carte2; _d < _e.length; _d++) {\r\n var cartaCopertina = _e[_d];\r\n if (this.model.idCarte2 == cartaCopertina.chiave) {\r\n this.model.nomeCarte2 = cartaCopertina.valore;\r\n }\r\n }\r\n this.model.idGrammature2 = this.responseModel.idGrammature2;\r\n for (var _f = 0, _g = this.responseModel.grammature2; _f < _g.length; _f++) {\r\n var grammatureCopertina = _g[_f];\r\n if (this.model.idGrammature2 == grammatureCopertina.chiave) {\r\n this.model.nomeGrammature2 = grammatureCopertina.valore;\r\n }\r\n }\r\n this.model.idCopertine = this.responseModel.idCopertine;\r\n this.model.idPlastificazioni2 = this.responseModel.idPlastificazioni2;\r\n this.model.idColori2 = this.responseModel.idColori2;\r\n }\r\n else {\r\n this.model.idGrammature2 = \"0\";\r\n this.model.idCarte2 = \"\";\r\n this.model.nomeCarte2 = \"\";\r\n this.model.nomeGrammature2 = \"0\";\r\n this.model.idCopertine = \"\";\r\n this.model.idPlastificazioni2 = \"\";\r\n this.model.idColori2 = \"\";\r\n }\r\n if (this.responseModel.cartoncini != null && this.responseModel.cartoncini.length > 0) {\r\n this.model.idCartoncino = this.responseModel.idCartoncino;\r\n for (var _h = 0, _j = this.responseModel.cartoncini; _h < _j.length; _h++) {\r\n var cartaCartoncino = _j[_h];\r\n if (this.model.idCartoncino == cartaCartoncino.chiave) {\r\n this.model.nomeCartoncino = cartaCartoncino.valore;\r\n }\r\n }\r\n this.model.idGrammatureCartoncino = this.responseModel.idGrammatureCartoncino;\r\n for (var _k = 0, _l = this.responseModel.grammatureCartoncino; _k < _l.length; _k++) {\r\n var grammatureCartoncino = _l[_k];\r\n if (this.model.idGrammatureCartoncino == grammatureCartoncino.chiave) {\r\n this.model.nomeGrammatureCartoncino = grammatureCartoncino.valore;\r\n }\r\n }\r\n }\r\n else {\r\n this.model.idGrammatureCartoncino = \"0\";\r\n this.model.idCartoncino = \"0\";\r\n this.model.nomeCartoncino = \"0\";\r\n this.model.nomeGrammatureCartoncino = \"0\";\r\n }\r\n this.model.taglio = this.isTaglioCalculated();\r\n if (this.responseModel.idRilegature != \"-1\") {\r\n this.model.idRilegature = this.responseModel.idRilegature;\r\n }\r\n this.model.lavorazioniAccessorie = new Array();\r\n for (var _m = 0, _o = this.responseModel.lavorazioniAccessorie; _m < _o.length; _m++) {\r\n var lavorazioneAccessoria = _o[_m];\r\n var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n _this.resultPrice = result;\r\n _this.isCalculatedWizard = true;\r\n var dorsoString = parseFloat(_this.resultPrice.AltezzaDorso.toString());\r\n var dorso = parseFloat(dorsoString.toFixed(2));\r\n _this.resultPrice.AltezzaDorso = dorso;\r\n if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = _this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n var price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n _this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n var breakFlag = false;\r\n for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n var slicedPriceRow = priceRow.slice(1);\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n var price = reverse_1[_a];\r\n if (price.Price != -1) {\r\n _this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n _this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n _this.resultCalculation = true;\r\n _this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }, function (err) {\r\n _this.isCalculatedWizard = true;\r\n _this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n });\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n this.isDataInitialized = true;\r\n };\r\n ChildComponent.prototype.isTaglioCalculated = function () {\r\n var result = false;\r\n if (this.responseModel.isTaglioVisible == false) {\r\n if (this.responseModel.tipoCalcoloTaglio == \"si\" && !this.responseModel.taglioShowed) {\r\n result = true;\r\n }\r\n else if (this.responseModel.tipoCalcoloTaglio == \"no\" && !this.responseModel.taglioShowed) {\r\n result = false;\r\n }\r\n else if (this.responseModel.taglioShowed) {\r\n result = this.responseModel.tipoTaglio;\r\n }\r\n }\r\n else {\r\n result = false;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsCopertinaShowed = function () {\r\n var result = false;\r\n if (this.EditioriaCopertinaSelect != '0' && this.EditioriaCopertinaSelect != '-1') {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsCartoncinoShowed = function () {\r\n var result = false;\r\n if (this.responseModel.cartoncini != null && this.responseModel.cartoncini.length > 0) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsPlastificazioneInternoIsShowed = function () {\r\n var result = false;\r\n if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n var result = false;\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsPlastificazioneCopertinaIsShowed = function () {\r\n var result = false;\r\n if (this.responseModel.plastificazioni2 != null && this.responseModel.plastificazioni2.length > 0 && this.checkIsCopertinaShowed()) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n var result = false;\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.textAreaCheck = function (event) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId, lavIsVisible) {\r\n var result = false;\r\n var isVisible = false;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioniAccessorie = _a[_i];\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsTaglioShowed = function () {\r\n var result = false;\r\n if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.onCategoriaCartaInternoFieldChanged = function () {\r\n var selectedPaper = false;\r\n for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n var carte = _a[_i];\r\n if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n carte.isVisible = true;\r\n }\r\n else {\r\n carte.isVisible = false;\r\n }\r\n }\r\n else {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n carte.isVisible = true;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onCartaInternoFieldChanged = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n var grammature = _a[_i];\r\n if (grammature.chiave == this.responseModel.idCarte1) {\r\n this.responseModel.carte1Description = grammature.descrizione;\r\n this.responseModel.carte1Image = grammature.image;\r\n this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = grammature.subElements;\r\n this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n this.model.idGrammature1 = grammature.wrap_valore;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onCartoncinoFieldChanged = function () {\r\n for (var _i = 0, _a = this.responseModel.cartoncini; _i < _a.length; _i++) {\r\n var grammature = _a[_i];\r\n if (grammature.chiave == this.responseModel.idCartoncino) {\r\n this.responseModel.cartoncinoDescription = grammature.descrizione;\r\n this.responseModel.cartoncinoImage = grammature.image;\r\n this.responseModel.cartoncinoHasInfo = grammature.hasInfo;\r\n this.responseModel.cartoncinoShowInfo = false;\r\n this.responseModel.grammatureCartoncino = grammature.subElements;\r\n this.responseModel.idGrammatureCartoncino = grammature.wrap_valore;\r\n this.model.idGrammatureCartoncino = grammature.wrap_valore;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onCartaInternoVisualFieldChanged = function (paperId) {\r\n this.responseModel.idCarte1 = paperId;\r\n this.onCartaInternoFieldChanged();\r\n };\r\n ChildComponent.prototype.onCartoncinoVisualFieldChanged = function (paperId) {\r\n this.responseModel.idCartoncino = paperId;\r\n this.onCartoncinoFieldChanged();\r\n };\r\n ChildComponent.prototype.onCategoriaCartaCopertinaFieldChanged = function () {\r\n var selectedPaper = false;\r\n for (var _i = 0, _a = this.responseModel.carte2; _i < _a.length; _i++) {\r\n var carteCopertina = _a[_i];\r\n if (this.responseModel.idCategorieCarte2 != \"-1\") {\r\n if (carteCopertina.parentId == this.responseModel.idCategorieCarte2) {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte2 = carteCopertina.chiave;\r\n this.model.idCarte2 = carteCopertina.chiave;\r\n this.responseModel.carte2Description = carteCopertina.descrizione;\r\n this.responseModel.carte2Image = carteCopertina.image;\r\n this.responseModel.carte2HasInfo = carteCopertina.hasInfo;\r\n this.responseModel.carte2ShowInfo = false;\r\n this.responseModel.grammature2 = carteCopertina.subElements;\r\n this.responseModel.idGrammature2 = carteCopertina.wrap_valore;\r\n this.model.idGrammature2 = carteCopertina.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n carteCopertina.isVisible = true;\r\n }\r\n else {\r\n carteCopertina.isVisible = false;\r\n }\r\n }\r\n else {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte2 = carteCopertina.chiave;\r\n this.model.idCarte2 = carteCopertina.chiave;\r\n this.responseModel.carte2Description = carteCopertina.descrizione;\r\n this.responseModel.carte2Image = carteCopertina.image;\r\n this.responseModel.carte2HasInfo = carteCopertina.hasInfo;\r\n this.responseModel.carte2ShowInfo = false;\r\n this.responseModel.grammature2 = carteCopertina.subElements;\r\n this.responseModel.idGrammature2 = carteCopertina.wrap_valore;\r\n this.model.idGrammature2 = carteCopertina.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n carteCopertina.isVisible = true;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onCartaCopertinaFieldChanged = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.carte2; _i < _a.length; _i++) {\r\n var grammatureCartaCopertina = _a[_i];\r\n if (grammatureCartaCopertina.chiave == this.responseModel.idCarte2) {\r\n this.responseModel.carte2Description = grammatureCartaCopertina.descrizione;\r\n this.responseModel.carte2Image = grammatureCartaCopertina.image;\r\n this.responseModel.carte2HasInfo = grammatureCartaCopertina.hasInfo;\r\n this.responseModel.carte2ShowInfo = false;\r\n this.responseModel.grammature2 = grammatureCartaCopertina.subElements;\r\n this.responseModel.idGrammature2 = grammatureCartaCopertina.wrap_valore;\r\n this.model.idGrammature2 = grammatureCartaCopertina.wrap_valore;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onCopertineFieldChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n this.EditioriaCopertinaSelect = this.responseModel.idCopertine;\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onCopertineFieldVisualChange = function (copertinaId) {\r\n this.responseModel.idCopertine = copertinaId;\r\n this.onCopertineFieldChange();\r\n };\r\n ChildComponent.prototype.onCartaCopertinaVisualFieldChanged = function (paperId) {\r\n this.responseModel.idCarte2 = paperId;\r\n this.onCartaCopertinaFieldChanged();\r\n };\r\n ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n var formato = _a[_i];\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n };\r\n ChildComponent.prototype.onStampaInternoVisualChange = function (stampaInternoValue) {\r\n this.responseModel.idColori1 = stampaInternoValue;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onStampaCopertinaVisualChange = function (stampaCopertinaValue) {\r\n this.responseModel.idColori2 = stampaCopertinaValue;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onPlastificationInternoChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.plastificazioni1; _i < _a.length; _i++) {\r\n var plastification = _a[_i];\r\n if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n this.responseModel.plastificazioni1Image = plastification.image;\r\n this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onPlastificationInternoViasualChange = function (plastificationId) {\r\n this.responseModel.idPlastificazioni1 = plastificationId;\r\n this.onPlastificationInternoChange();\r\n };\r\n ChildComponent.prototype.onGrammatureInternoVisualFieldChanged = function (grammatureId) {\r\n this.responseModel.idGrammature1 = grammatureId;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onGrammatureCartoncinoVisualFieldChanged = function (grammatureId) {\r\n this.responseModel.idGrammatureCartoncino = grammatureId;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onGrammatureCopertinaVisualFieldChanged = function (grammatureId) {\r\n this.responseModel.idGrammature2 = grammatureId;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onPlastificationCopertinaChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.plastificazioni2; _i < _a.length; _i++) {\r\n var plastification = _a[_i];\r\n if (plastification.chiave == this.responseModel.idPlastificazioni2) {\r\n this.responseModel.plastificazioni2Description = plastification.descrizione;\r\n this.responseModel.plastificazioni2Image = plastification.image;\r\n this.responseModel.plastificazioni2HasInfo = plastification.hasInfo;\r\n this.responseModel.plastificazioni2ShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onPlastificationCopertinaVisualChange = function (plastificationId) {\r\n this.responseModel.plastificazioni2 = plastificationId;\r\n this.onPlastificationCopertinaChange();\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n var variante = _a[_i];\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n };\r\n ChildComponent.prototype.onRilegaturaChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.rilegature; _i < _a.length; _i++) {\r\n var rilegature = _a[_i];\r\n if (rilegature.chiave == this.responseModel.idRilegature) {\r\n this.responseModel.rilegatureDescription = rilegature.descrizione;\r\n this.responseModel.rilegatureImage = rilegature.image;\r\n this.responseModel.rilegatureHasInfo = rilegature.hasInfo;\r\n this.responseModel.rilegatureShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onRilegaturaVisualChange = function (rilegaturaId) {\r\n this.responseModel.idRilegature = rilegaturaId;\r\n this.onRilegaturaChange();\r\n };\r\n ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideFormatDescription = function () {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePaperInternoDescription = function () {\r\n if (this.responseModel.carte1ShowInfo) {\r\n this.responseModel.carte1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.carte1ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePaperCartoncinoDescription = function () {\r\n if (this.responseModel.cartoncinoShowInfo) {\r\n this.responseModel.cartoncinoShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.cartoncinoShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePaperCopertinaDescription = function () {\r\n if (this.responseModel.carte2ShowInfo) {\r\n this.responseModel.carte2ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.carte2ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePlastficationInternoDescription = function () {\r\n if (this.responseModel.plastificazioni1ShowInfo) {\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni1ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePlastficationCopertinaDescription = function () {\r\n if (this.responseModel.plastificazioni2ShowInfo) {\r\n this.responseModel.plastificazioni2ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni2ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideRilegatureDescription = function () {\r\n if (this.responseModel.rilegatureShowInfo) {\r\n this.responseModel.rilegatureShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.rilegatureShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.checkValidation = function () {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.facciateIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.carte1IsValid\r\n && this.responseModel.grammature1IsValid\r\n && this.responseModel.plastificazione1IsValid\r\n && this.responseModel.carte2IsValid\r\n && this.responseModel.grammature2IsValid\r\n && this.responseModel.plastificazione2IsValid\r\n && this.responseModel.copertineIsValid\r\n && this.responseModel.cartoncinoIsValid\r\n && this.responseModel.rilegatureIsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.colori1IsValid) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n ChildComponent.prototype.checkEmailIsValid = function () {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n };\r\n ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.sendRequestInfo = function () {\r\n var _this = this;\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n if (result == true) {\r\n _this.requestInfoSuccess = true;\r\n }\r\n else {\r\n _this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n _this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n }\r\n };\r\n ChildComponent.prototype.CheckRegoleEditoria = function () {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n var oldCarta = this.responseModel.idCarte1;\r\n var oldCartaCopertina = this.responseModel.idCarte2;\r\n var oldFormato = this.responseModel.idFormati;\r\n var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n var oldPlastificazioneCopertina = this.responseModel.idPlastificazioni2;\r\n var oldCopertina = this.responseModel.idCopertine;\r\n var oldRilegatura = this.responseModel.idRilegature;\r\n var lavAccArray = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"EDITORIA\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"EDITORIA\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE_COPERTINA\", \"\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"RILEGATURA\", \"\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"EDITORIA\", null, null, this.responseModel);\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"EDITORIA\", this.responseModel.idFormati, 0, this.responseModel);\r\n if (this.responseModel.idCarte1 != null) {\r\n var data = this.responseModel.idCarte1.split(\"_\");\r\n var idCarta = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"EDITORIA\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n if (this.responseModel.idCarte2 != null) {\r\n var data = this.responseModel.idCarte2.split(\"_\");\r\n var idCarta = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", idCarta, this.responseModel.idGrammature2, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE_COPERTINA\", \"EDITORIA\", this.responseModel.idPlastificazioni2, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"COPERTINA\", \"\", this.responseModel.idCopertine, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"RILEGATURA\", \"\", this.responseModel.idRilegature, 0, this.responseModel);\r\n if (!this.isTaglioCalculated()) {\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", 1, 0, this.responseModel);\r\n }\r\n else {\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", 2, 0, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"EDITORIA\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldCarta != this.responseModel.idCarte1) {\r\n this.onCartaInternoFieldChanged(true);\r\n }\r\n if (oldCartaCopertina != this.responseModel.idCarte2) {\r\n this.onCartaCopertinaFieldChanged(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldPlastificazioneCopertina != this.responseModel.idPlastificazioni2) {\r\n this.onPlastificationCopertinaChange(true);\r\n }\r\n if (oldCopertina != this.responseModel.idCopertine) {\r\n this.onCopertineFieldChange(true);\r\n }\r\n if (oldRilegatura != this.responseModel.idRilegature) {\r\n this.onRilegaturaChange(true);\r\n }\r\n var count = 0;\r\n for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n var lavorazione = _c[_b];\r\n count = 0;\r\n for (var _d = 0, lavAccArray_1 = lavAccArray; _d < lavAccArray_1.length; _d++) {\r\n var lavorazioneOld = lavAccArray_1[_d];\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n };\r\n /// Check if all the value is validated\r\n ChildComponent.prototype.parameterValidation = function () {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n //apply all rules\r\n this.CheckRegoleEditoria();\r\n if (this.pageIsInit) {\r\n this.pageIsInit = false;\r\n }\r\n this.validationCopie();\r\n this.validationFacciate();\r\n this.validationFormati();\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n this.validationColori();\r\n this.validationCarteInterno();\r\n this.validationGrammatureCarteInterno();\r\n this.validationPlastificazioneInterno();\r\n this.validationCopertina();\r\n if (this.checkIsCopertinaShowed()) {\r\n this.validationCarteCopertina();\r\n this.validationGrammatureCarteCopertina();\r\n this.validationPlastificazioneCopertina();\r\n }\r\n else {\r\n this.responseModel.carte2IsValid = true;\r\n this.responseModel.grammature2IsValid = true;\r\n this.responseModel.plastificazione2IsValid = true;\r\n }\r\n if (this.checkIsCartoncinoShowed()) {\r\n this.validationCartoncino();\r\n this.validationGrammatureCartoncino();\r\n }\r\n else {\r\n this.responseModel.cartoncinoIsValid = true;\r\n this.responseModel.grammatureCartoncinoIsValid = true;\r\n }\r\n this.validationRilegatura();\r\n this.validationLavorazioneAccessoria();\r\n this.countCartaCategories();\r\n this.countCategorieCarteCopertina();\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n };\r\n ChildComponent.prototype.countCartaCategories = function () {\r\n if (this.responseModel.categorieCarte != null) {\r\n this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.countCategorieCarteCopertina = function () {\r\n if (this.responseModel.categorieCarteCopertina != null) {\r\n this.responseModel.categorieCarteCopertinaCount = this.responseModel.categorieCarteCopertina.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.selectFileCombination = function () {\r\n this.listaFile = new Array();\r\n for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n var file = _a[_i];\r\n if (file.FormatId == this.responseModel.idFormati) {\r\n var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj);\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.validationCopie = function () {\r\n var message;\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n var numCopie = parseInt(this.responseModel.numCopie);\r\n var minCopie = this.responseModel.minimoCopie;\r\n var maxCopie = this.responseModel.massimoCopie;\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.copieMessage = message;\r\n };\r\n ChildComponent.prototype.validationFacciate = function () {\r\n var message;\r\n if (this.responseModel.tipoFacciate == 'libera') {\r\n var numFacciate = parseInt(this.responseModel.numFacciate);\r\n var minFacciate = this.responseModel.minimoFacciate;\r\n var maxFacciate = this.responseModel.massimoFacciate;\r\n var multiploFacciate = this.responseModel.multiploFacciate;\r\n //If the weight for the inside currently selected is in the ones defined in the validation rules, then the max and min are read directly from the ones of the rule.\r\n //Else the ones on the wizard are used\r\n //Note: The max and min facciate defined on weight wins over the ones defined on the wizard\r\n var objGrammaturaFacciateValidation = this.checkValidationRulesGrammatureFacciate();\r\n if (objGrammaturaFacciateValidation != null) {\r\n minFacciate = objGrammaturaFacciateValidation.Facciate != null ? objGrammaturaFacciateValidation.Facciate : 0;\r\n maxFacciate = objGrammaturaFacciateValidation.MassimoFacciate != null ? objGrammaturaFacciateValidation.MassimoFacciate : 0;\r\n }\r\n if (this.responseModel.numFacciate == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.facciateIsValid = false;\r\n }\r\n else if ((maxFacciate == 0 && (numFacciate == 0 || numFacciate < minFacciate)) || (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0))) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minFacciate;\r\n if (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0)) {\r\n message += \", \" + this.getLabel('inserisci_valore_multiplo_di');\r\n message += \" \" + multiploFacciate;\r\n }\r\n this.responseModel.facciateIsValid = false;\r\n }\r\n else if ((maxFacciate > 0 && (numFacciate == 0 || numFacciate < minFacciate || numFacciate > maxFacciate)) || (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0))) {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minFacciate;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxFacciate;\r\n if (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0)) {\r\n message += \", \" + this.getLabel('inserisci_valore_multiplo_di');\r\n message += \" \" + multiploFacciate;\r\n }\r\n this.responseModel.facciateIsValid = false;\r\n }\r\n else {\r\n this.responseModel.facciateIsValid = true;\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idFacciate == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.facciateIsValid = false;\r\n }\r\n else {\r\n this.responseModel.facciateIsValid = true;\r\n }\r\n if (this.responseModel.tipoFacciate === 'fissa' && this.responseModel.facciate != null) {\r\n this.responseModel.facciateCount = this.responseModel.facciate.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.facciateMessage = message;\r\n };\r\n ChildComponent.prototype.validationColori = function () {\r\n var message;\r\n if (this.responseModel.idColori1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.colori1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.colori1IsValid = true;\r\n }\r\n if (this.responseModel.colori1 != null) {\r\n this.responseModel.colori1Count = this.responseModel.colori1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n if (this.responseModel.colori2 != null) {\r\n this.responseModel.colori2Count = this.responseModel.colori2.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.colori1Message = message;\r\n };\r\n ChildComponent.prototype.validationBaseFormati = function () {\r\n var message;\r\n var base = parseFloat(this.responseModel.baseFormato);\r\n var minBase = this.responseModel.minimoBase;\r\n var maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationAltezzaFormati = function () {\r\n var message;\r\n var altezza = parseFloat(this.responseModel.altezzaFormato);\r\n var minAltezza = this.responseModel.minimoAltezza;\r\n var maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.altezzaFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationFormati = function () {\r\n var message;\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.formatiMessage = message;\r\n };\r\n ChildComponent.prototype.validationCarteInterno = function () {\r\n var message;\r\n if (this.responseModel.idCarte1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.carte1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.carte1IsValid = true;\r\n }\r\n if (this.responseModel.carte1 != null) {\r\n this.responseModel.carte1Count = this.responseModel.carte1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.carte1Message = message;\r\n };\r\n ChildComponent.prototype.validationGrammatureCarteInterno = function () {\r\n var message;\r\n if (this.responseModel.idGrammature1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.grammature1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.grammature1IsValid = true;\r\n }\r\n if (this.responseModel.grammature1 != null) {\r\n this.responseModel.grammature1Count = this.responseModel.grammature1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.grammature1Message = message;\r\n };\r\n ChildComponent.prototype.validationCartoncino = function () {\r\n var message;\r\n if (this.responseModel.idCartoncino == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.cartoncinoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.cartoncinoIsValid = true;\r\n }\r\n if (this.responseModel.cartoncini != null) {\r\n this.responseModel.cartonciniCount = this.responseModel.cartoncini.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.cartoncinoMessage = message;\r\n };\r\n ChildComponent.prototype.validationGrammatureCartoncino = function () {\r\n var message;\r\n if (this.responseModel.idGrammatureCartoncino == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.grammatureCartoncinoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.grammatureCartoncinoIsValid = true;\r\n }\r\n if (this.responseModel.grammatureCartoncino != null) {\r\n this.responseModel.grammatureCartoncinoCount = this.responseModel.grammatureCartoncino.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.grammatureCartoncinoMessage = message;\r\n };\r\n ChildComponent.prototype.validationPlastificazioneInterno = function () {\r\n var message;\r\n if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.plastificazione1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.plastificazione1IsValid = true;\r\n }\r\n if (this.responseModel.plastificazioni1 != null) {\r\n this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.plastificazione1Message = message;\r\n };\r\n ChildComponent.prototype.validationPlastificazioneCopertina = function () {\r\n var message;\r\n if (this.responseModel.idPlastificazioni2 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.plastificazione2IsValid = false;\r\n }\r\n else {\r\n this.responseModel.plastificazione2IsValid = true;\r\n }\r\n if (this.responseModel.plastificazioni2 != null) {\r\n this.responseModel.plastificazioni2Count = this.responseModel.plastificazioni2.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.plastificazione2Message = message;\r\n };\r\n ChildComponent.prototype.validationCarteCopertina = function () {\r\n var message;\r\n if (this.responseModel.idCarte2 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.carte2IsValid = false;\r\n }\r\n else {\r\n this.responseModel.carte2IsValid = true;\r\n }\r\n if (this.responseModel.carte2 != null) {\r\n this.responseModel.carte2Count = this.responseModel.carte2.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.carte2Message = message;\r\n };\r\n ChildComponent.prototype.validationGrammatureCarteCopertina = function () {\r\n var message;\r\n if (this.responseModel.idGrammature2 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.grammature2IsValid = false;\r\n }\r\n else {\r\n this.responseModel.grammature2IsValid = true;\r\n }\r\n if (this.responseModel.grammature2 != null) {\r\n this.responseModel.grammature2Count = this.responseModel.grammature2.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.grammature2Message = message;\r\n };\r\n ChildComponent.prototype.validationCopertina = function () {\r\n var message;\r\n if (this.responseModel.idCopertine == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copertineIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copertineIsValid = true;\r\n }\r\n if (this.responseModel.copertine != null) {\r\n this.responseModel.copertineCount = this.responseModel.copertine.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.copertineMessage = message;\r\n };\r\n ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n var message = \"\";\r\n var valid = true;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n var qta = parseInt(lavorazione.value);\r\n var minQta = lavorazione.minQtaInput;\r\n var maxQta = lavorazione.maxQtaInput;\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.lavorazioniIsValid = valid;\r\n };\r\n ChildComponent.prototype.validationRilegatura = function () {\r\n var message;\r\n if (this.responseModel.idRilegature == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.rilegatureIsValid = false;\r\n }\r\n else {\r\n this.responseModel.rilegatureIsValid = true;\r\n }\r\n if (this.responseModel.rilegature != null) {\r\n this.responseModel.rilegatureCount = this.responseModel.rilegature.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.rilegatureMessage = message;\r\n };\r\n ChildComponent.prototype.getLabel = function (label) {\r\n var message;\r\n var sub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n this.subManager.add(sub);\r\n return message;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListino = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.setActive = function (id) {\r\n $(\".calendar-list\").removeClass(\"hoverActive\");\r\n $($(\".calendar-list\")[id]).addClass(\"hoverActive\");\r\n };\r\n ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.setPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n //Deselecting the current price and selected the one passed in input\r\n for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n var price_1 = _a[_i];\r\n price_1.IsSelected = false;\r\n }\r\n price.IsSelected = true;\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n };\r\n ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n //Check if the selected paper weight for the inside is in the ones defined in the validation rules for the facciate\r\n ChildComponent.prototype.checkValidationRulesGrammatureFacciate = function () {\r\n var output = null;\r\n //Reading current paper weight\r\n var idGrammatura = this.responseModel.idGrammature1;\r\n for (var i = 0; i < this.responseModel.listaRegoleGrammaturaFacciate.length; i++) {\r\n var item = this.responseModel.listaRegoleGrammaturaFacciate[i];\r\n if (item.IdGrammatura == idGrammatura) {\r\n output = item;\r\n break;\r\n }\r\n }\r\n return output;\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.templateHtml\r\n }),\r\n __param(7, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _d) || Object, (typeof (_e = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _e) || Object, (typeof (_f = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _f) || Object, (typeof (_g = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Number)\r\n ], WizardEditoriaComponent.prototype, \"resourceId\", void 0);\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', String)\r\n ], WizardEditoriaComponent.prototype, \"resourceType\", void 0);\r\n WizardEditoriaComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-wizard-editoria-widget\",\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _d) || Object, (typeof (_e = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n ], WizardEditoriaComponent);\r\n return WizardEditoriaComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardEditoriaComponent = WizardEditoriaComponent;\r\n\n\n/***/ }),\n\n/***/ 611:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Subscription_1 = __webpack_require__(2);\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(6);\r\n//Components\r\nvar quoting_excluding_component_1 = __webpack_require__(71);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar WizardEtichetteComponent = (function () {\r\n function WizardEtichetteComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this._quotingService = _quotingService;\r\n this.authService = authService;\r\n this.languageService = languageService;\r\n this.isBrowser = isBrowser;\r\n this.autentification = this.authService.GetData();\r\n this.userId = this.authService.GetUserId();\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n WizardEtichetteComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n var sub = this._quotingService.getWizardEtichetteData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(sub);\r\n };\r\n WizardEtichetteComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n WizardEtichetteComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(_quotingService, languageService, authService, routesService, translate, cartService, bootboxService, isBrowser, canvasService) {\r\n var _this = this;\r\n this._quotingService = _quotingService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.routesService = routesService;\r\n this.translate = translate;\r\n this.cartService = cartService;\r\n this.bootboxService = bootboxService;\r\n this.isBrowser = isBrowser;\r\n this.canvasService = canvasService;\r\n this.pageIsInit = false;\r\n this.pageIsInitAfter = false;\r\n this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n this.waiting = false;\r\n this.carteValue = -1;\r\n this.lang = this.languageService.getLongLang();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.autentification = this.authService.GetData();\r\n this.resourceId = InputresourceId;\r\n this.isDataInitialized = false;\r\n this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n this.requestInfoSuccess = null;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.blockquoting = false;\r\n this.enableAltezzaLabel = true;\r\n this.isCalculatedWizard = false;\r\n // sending info to a child component\r\n this.parentWidgetData = result.CanvasInfo;\r\n this.subManager = new Subscription_1.Subscription();\r\n var canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(function (isModalOpened) {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(function (isDesignApproved) {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n if (_this.isCalculationTypeCalcolato()) {\r\n _this.addToCartWizardCalcolato(1);\r\n }\r\n else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n _this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n _this.addToCartWizardListino(1);\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n _this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n this.ExcludingRules.setMacrocategory(\"ETICHETTE\");\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.openCanvasEditor = function () {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n var canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n var isStateId = false;\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n };\r\n ChildComponent.prototype.setCanvasConfig = function () {\r\n var canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n return canvasConfigData;\r\n };\r\n ChildComponent.prototype.toShowCanvasButton = function () {\r\n var toShow = false;\r\n var isModuleActive = false;\r\n var isUserLoggedIn = false;\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n return toShow;\r\n };\r\n ChildComponent.prototype.CheckRegoleEtichette = function () {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n var oldCarta = this.responseModel.idCarte1;\r\n var oldFormato = this.responseModel.idFormati;\r\n var oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n var oldTaglio = this.responseModel.idTagli;\r\n var lavAccArray = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"ETICHETTE\", null, null, this.responseModel);\r\n //Reset regole carta e grammature\r\n this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n //Reset regole taglio\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FUSTELLATURA\", \"\", null, null, this.responseModel);\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"ETICHETTE\", null, null, this.responseModel);\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"ETICHETTE\", null, null, this.responseModel);\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"ETICHETTE\", idFormato, 0, this.responseModel);\r\n }\r\n if (this.responseModel.idCarte1 != null) {\r\n var data = this.responseModel.idCarte1.split(\"_\");\r\n var idCarta = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"ETICHETTE\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FUSTELLATURA\", \"\", this.responseModel.idTagli, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"COMMERCIALE\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldCarta != this.responseModel.idCarte1) {\r\n this.onCartaInternoFieldChanged(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldTaglio != this.responseModel.idTagli) {\r\n this.onTaglioChange(true);\r\n }\r\n //if the old value id different to the new one i call the method for update description and image\r\n var count = 0;\r\n for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n var lavorazione = _c[_b];\r\n count = 0;\r\n for (var _d = 0, lavAccArray_1 = lavAccArray; _d < lavAccArray_1.length; _d++) {\r\n var lavorazioneOld = lavAccArray_1[_d];\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n };\r\n ChildComponent.prototype.parameterValidation = function () {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n //apply all rules\r\n this.CheckRegoleEtichette();\r\n //verify validation for all parameters \r\n this.validationCopie();\r\n if (this.isLabelField()) {\r\n this.validationSoggetti();\r\n this.validationNumEtichetteLabel();\r\n this.validationDiametroInternoAnimaLabel();\r\n this.validationDiametroMassimoEsternoAnimaLabel();\r\n }\r\n else {\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n }\r\n this.validationFormati();\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.enableOrDisableAltezzaLabelByTipoFormato(this.responseModel.idFormatoTipo);\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n this.validationColori();\r\n this.validationCarteInterno();\r\n this.validationGrammatureCarteInterno();\r\n this.validationPlastificazione();\r\n this.validationLavorazioneAccessoria();\r\n this.countCartaCategories();\r\n this.countTagli();\r\n this.countFustelle();\r\n this.countFormatiTipoLabel();\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n };\r\n ChildComponent.prototype.countCartaCategories = function () {\r\n if (this.responseModel.categorieCarte != null) {\r\n this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.countTagli = function () {\r\n if (this.responseModel.tagli != null) {\r\n this.responseModel.tagliCount = this.responseModel.tagli.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.countFustelle = function () {\r\n if (this.responseModel.ListafustelleLabel != null) {\r\n this.responseModel.fustelleLabelCount = this.responseModel.ListafustelleLabel.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.countFormatiTipoLabel = function () {\r\n if (this.responseModel.TipologiaFormatiLabel != null) {\r\n this.responseModel.formatiTipoLabelCount = this.responseModel.TipologiaFormatiLabel.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.selectFileCombination = function () {\r\n this.listaFile = new Array();\r\n for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n var file = _a[_i];\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n if (file.FormatId == idFormato) {\r\n var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj);\r\n }\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.checkZero = function (val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n };\r\n ChildComponent.prototype.setTypePriceResult = function (type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n };\r\n ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n ChildComponent.prototype.clearSelectedIndex = function () {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n };\r\n ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n /// Create model for passed in input to the calculation method\r\n ChildComponent.prototype.getCalculationModel = function () {\r\n var _this = this;\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n this.model.idCarte1 = this.responseModel.idCarte1;\r\n for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n var carta = _a[_i];\r\n if (this.model.idCarte1 == carta.chiave) {\r\n this.model.nomeCarte1 = carta.valore;\r\n }\r\n }\r\n this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n for (var _b = 0, _c = this.responseModel.grammature1; _b < _c.length; _b++) {\r\n var grammatureInterno = _c[_b];\r\n if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n this.model.nomeGrammature1 = grammatureInterno.valore;\r\n }\r\n }\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n this.model.idColori1 = this.responseModel.idColori1;\r\n if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n }\r\n this.model.idColori2 = this.responseModel.idColori2;\r\n this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n if (this.responseModel.idTagli != \"-1\") {\r\n this.model.idTagli = this.responseModel.idTagli;\r\n }\r\n if (this.responseModel.idFustella != \"-1\") {\r\n this.model.idFustella = this.responseModel.idFustella;\r\n }\r\n if (this.responseModel.idAvvolgimento != \"-1\") {\r\n this.model.idAvvolgimento = this.responseModel.idAvvolgimento;\r\n }\r\n if (this.responseModel.idTipoLavoroLabel != \"-1\") {\r\n this.model.idTipoLavoroLabel = this.responseModel.idTipoLavoroLabel;\r\n }\r\n if (this.responseModel.idFormatoTipo != \"-1\") {\r\n this.model.idFormatoTipo = this.responseModel.idFormatoTipo;\r\n }\r\n this.model.numDiametroInternoAnimaLabel = this.responseModel.numDiametroInternoAnimaLabel;\r\n this.model.numDiametroMassimoEsternoAnimaLabel = this.responseModel.numDiametroMassimoEsternoAnimaLabel;\r\n this.model.numEtichette = this.responseModel.numEtichette;\r\n this.model.subSection = this.responseModel.subSection;\r\n this.model.lavorazioniAccessorie = new Array();\r\n for (var _d = 0, _e = this.responseModel.lavorazioniAccessorie; _d < _e.length; _d++) {\r\n var lavorazioneAccessoria = _e[_d];\r\n var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n var sub = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n _this.resultPrice = result;\r\n _this.isCalculatedWizard = false;\r\n if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = _this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n var price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n _this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n var breakFlag = false;\r\n for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n var slicedPriceRow = priceRow.slice(1);\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n var price = reverse_1[_a];\r\n if (price.Price != -1) {\r\n _this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n _this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n _this.resultCalculation = true;\r\n _this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }, function (err) {\r\n _this.isCalculatedWizard = false;\r\n _this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n });\r\n this.subManager.add(sub);\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n this.isDataInitialized = true;\r\n };\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n var altezza = $(\"#footer\").outerHeight();\r\n var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n var altezzaHead = $(\".header-body\").outerHeight();\r\n var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.checkValidation = function () {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.carte1IsValid\r\n && this.responseModel.grammature1IsValid\r\n && this.responseModel.plastificazione1IsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.colori1IsValid) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n ChildComponent.prototype.validationBaseFormati = function () {\r\n var message;\r\n var base = parseFloat(this.responseModel.baseFormato);\r\n var minBase = this.responseModel.minimoBase;\r\n var maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationAltezzaFormati = function () {\r\n var message;\r\n var altezza = parseFloat(this.responseModel.altezzaFormato);\r\n var minAltezza = this.responseModel.minimoAltezza;\r\n var maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.altezzaFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationSoggetti = function () {\r\n var message;\r\n var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n if (this.isLabelField()) {\r\n var minDistEtichette = this.responseModel.minimaDistanzaEtichetteLabel;\r\n var maxDistEtichette = this.responseModel.massimaDistanzaEtichetteLabel;\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n if (maxDistEtichette == 0) {\r\n if (numSoggetti < minDistEtichette) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minDistEtichette;\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numSoggetti >= minDistEtichette) && (numSoggetti <= maxDistEtichette)) {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minDistEtichette;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxDistEtichette;\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n }\r\n this.responseModel.soggettiMessage = message;\r\n };\r\n ChildComponent.prototype.validationNumEtichetteLabel = function () {\r\n var message;\r\n var numEtichette = parseInt(this.responseModel.numEtichette);\r\n if (this.responseModel.numEtichette == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.numEtichetteIsValid = false;\r\n }\r\n else if (numEtichette == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.numEtichetteIsValid = false;\r\n }\r\n else {\r\n this.responseModel.numEtichetteIsValid = true;\r\n }\r\n this.responseModel.numEtichetteMessage = message;\r\n };\r\n ChildComponent.prototype.validationDiametroInternoAnimaLabel = function () {\r\n var message;\r\n var numDiametroInternoAnimaCustomer = this.responseModel.numDiametroInternoAnimaLabel;\r\n var numDiametroInternoAnima = this.responseModel.numDiametroInternoAnimaEditabileLabel;\r\n if (this.responseModel.numDiametroInternoAnimaLabel == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.DiametroInternoAnimaIsValid = false;\r\n }\r\n else if (numDiametroInternoAnimaCustomer == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.DiametroInternoAnimaIsValid = false;\r\n }\r\n else {\r\n if (numDiametroInternoAnimaCustomer >= numDiametroInternoAnima) {\r\n this.responseModel.DiametroInternoAnimaIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore_uguale');\r\n message += \" \" + numDiametroInternoAnima;\r\n this.responseModel.DiametroInternoAnimaIsValid = false;\r\n }\r\n }\r\n this.responseModel.DiametroInternoAnimaMessage = message;\r\n };\r\n ChildComponent.prototype.validationDiametroMassimoEsternoAnimaLabel = function () {\r\n var message;\r\n var numDiametroMassimoEsternoCustomer = this.responseModel.numDiametroMassimoEsternoAnimaLabel;\r\n var numDiametroMassimoEsterno = this.responseModel.numDiametroMassimoEsternoAnimaEditabile;\r\n if (this.responseModel.numDiametroMassimoEsternoAnimaLabel == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n }\r\n else if (numDiametroMassimoEsternoCustomer == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n }\r\n else {\r\n if (numDiametroMassimoEsternoCustomer >= numDiametroMassimoEsterno) {\r\n this.responseModel.DiametroMassimoEsternoAnimaIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore_uguale');\r\n message += \" \" + numDiametroMassimoEsterno;\r\n this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n }\r\n }\r\n this.responseModel.DiametroMassimoEsternoAnimaMessage = message;\r\n };\r\n ChildComponent.prototype.validationCopie = function () {\r\n var message;\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n var numCopie = parseInt(this.responseModel.numCopie);\r\n var minCopie = this.responseModel.minimoCopie;\r\n var maxCopie = this.responseModel.massimoCopie;\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.copieMessage = message;\r\n };\r\n ChildComponent.prototype.validationColori = function () {\r\n var message;\r\n if (this.responseModel.idColori1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.colori1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.colori1IsValid = true;\r\n }\r\n if (this.responseModel.colori1 != null) {\r\n this.responseModel.colori1Count = this.responseModel.colori1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n if (this.responseModel.colori2 != null) {\r\n this.responseModel.colori2Count = this.responseModel.colori2.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.colori1Message = message;\r\n };\r\n ChildComponent.prototype.validationFormati = function () {\r\n var message;\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.formatiMessage = message;\r\n };\r\n ChildComponent.prototype.validationCarteInterno = function () {\r\n var message;\r\n if (this.responseModel.idCarte1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.carte1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.carte1IsValid = true;\r\n }\r\n if (this.responseModel.carte1 != null) {\r\n this.responseModel.carte1Count = this.responseModel.carte1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.carte1Message = message;\r\n };\r\n ChildComponent.prototype.validationGrammatureCarteInterno = function () {\r\n var message;\r\n if (this.isLabelField()) {\r\n this.responseModel.grammature1IsValid = true;\r\n }\r\n else {\r\n if (this.responseModel.idGrammature1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.grammature1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.grammature1IsValid = true;\r\n }\r\n if (this.responseModel.grammature1 != null) {\r\n this.responseModel.grammature1Count = this.responseModel.grammature1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.grammature1Message = message;\r\n };\r\n ChildComponent.prototype.validationPlastificazione = function () {\r\n var message;\r\n if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.plastificazione1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.plastificazione1IsValid = true;\r\n }\r\n if (this.responseModel.plastificazioni1 != null) {\r\n this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.plastificazione1Message = message;\r\n };\r\n ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n var message = \"\";\r\n var valid = true;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n var qta = parseInt(lavorazione.value);\r\n var minQta = lavorazione.minQtaInput;\r\n var maxQta = lavorazione.maxQtaInput;\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.lavorazioniIsValid = valid;\r\n };\r\n ChildComponent.prototype.isLabelField = function () {\r\n var result = false;\r\n if (this.responseModel.subSection == \"Label\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.getLabel = function (label) {\r\n var message;\r\n var sub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n this.subManager.add(sub);\r\n return message;\r\n };\r\n ChildComponent.prototype.checkIsPlastificazioneInternoIsShowed = function () {\r\n var result = false;\r\n if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsTaglioIsShowed = function () {\r\n var result = false;\r\n if (this.responseModel.tagli != null && this.responseModel.tagli.length > 0) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n var result = false;\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n var result = false;\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.textAreaCheck = function (event) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n var result = false;\r\n var isVisible = false;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioniAccessorie = _a[_i];\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsTaglioShowed = function () {\r\n var result = false;\r\n if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.onCategoriaCartaInternoFieldChanged = function () {\r\n var selectedPaper = false;\r\n for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n var carte = _a[_i];\r\n if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n carte.isVisible = true;\r\n }\r\n else {\r\n carte.isVisible = false;\r\n }\r\n }\r\n else {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n carte.isVisible = true;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onCartaInternoFieldChanged = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.carte1; _i < _a.length; _i++) {\r\n var grammature = _a[_i];\r\n if (grammature.chiave == this.responseModel.idCarte1) {\r\n this.responseModel.carte1Description = grammature.descrizione;\r\n this.responseModel.carte1Image = grammature.image;\r\n this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = grammature.subElements;\r\n this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n this.model.idGrammature1 = grammature.wrap_valore;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onCartaInternoVisualFieldChanged = function (paperId) {\r\n this.responseModel.idCarte1 = paperId;\r\n this.onCartaInternoFieldChanged();\r\n };\r\n ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n var formato = _a[_i];\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n };\r\n ChildComponent.prototype.onStampaInternoVisualChange = function (stampaInternoValue) {\r\n this.responseModel.idColori1 = stampaInternoValue;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onStampaRetroVisualChange = function (stampaCopertinaValue) {\r\n this.responseModel.idColori2 = stampaCopertinaValue;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onGrammatureInternoVisualFieldChanged = function (grammatureId) {\r\n this.responseModel.idGrammature1 = grammatureId;\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onPlastificationInternoChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.plastificazioni1; _i < _a.length; _i++) {\r\n var plastification = _a[_i];\r\n if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n this.responseModel.plastificazioni1Image = plastification.image;\r\n this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onPlastificationInternoViasualChange = function (plastificationId) {\r\n this.responseModel.idPlastificazioni1 = plastificationId;\r\n this.onPlastificationInternoChange();\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n var variante = _a[_i];\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n };\r\n ChildComponent.prototype.onTaglioChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.tagli; _i < _a.length; _i++) {\r\n var taglio = _a[_i];\r\n if (taglio.chiave == this.responseModel.idTagli) {\r\n this.responseModel.taglioDescription = taglio.descrizione;\r\n this.responseModel.taglioImage = taglio.image;\r\n this.responseModel.taglioHasInfo = taglio.hasInfo;\r\n this.responseModel.taglioShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onTaglioVisualChange = function (taglioId) {\r\n this.responseModel.idTagli = taglioId;\r\n this.onTaglioChange();\r\n };\r\n ChildComponent.prototype.onFormatiTipoLabelChange = function () {\r\n for (var _i = 0, _a = this.responseModel.TipologiaFormatiLabel; _i < _a.length; _i++) {\r\n var formatoTipo = _a[_i];\r\n if (formatoTipo.chiave == this.responseModel.idFormatoTipo) {\r\n this.responseModel.formatiTipoImage = formatoTipo.image;\r\n this.responseModel.formatiTipoHasInfo = formatoTipo.hasInfo;\r\n this.responseModel.formatiTipoLabelShowInfo = false;\r\n this.enableOrDisableAltezzaLabelByTipoFormato(formatoTipo.chiave);\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.enableOrDisableAltezzaLabelByTipoFormato = function (tipoFormato) {\r\n //checking tipo formato for anable or disable height\r\n if (this.responseModel.idFormati == \"0\") {\r\n switch (tipoFormato) {\r\n case \"1\":\r\n this.enableAltezzaLabel = true;\r\n break;\r\n case \"2\":\r\n this.enableAltezzaLabel = false;\r\n this.responseModel.altezzaFormato = this.responseModel.baseFormato;\r\n break;\r\n case \"3\":\r\n this.enableAltezzaLabel = false;\r\n this.responseModel.altezzaFormato = this.responseModel.baseFormato;\r\n break;\r\n case \"4\":\r\n this.enableAltezzaLabel = true;\r\n break;\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.onFormatiTipoLabelVisualChange = function (fotmatoTipoId) {\r\n this.responseModel.idFormatoTipo = fotmatoTipoId;\r\n this.onFormatiTipoLabelChange();\r\n };\r\n ChildComponent.prototype.onAvvolgimentiChange = function () {\r\n for (var _i = 0, _a = this.responseModel.avvolgimentiLabel; _i < _a.length; _i++) {\r\n var avvolgimento = _a[_i];\r\n if (avvolgimento.chiave == this.responseModel.idAvvolgimento) {\r\n this.responseModel.avvolgimentiImage = avvolgimento.image;\r\n this.responseModel.avvolgimentiHasInfo = avvolgimento.hasInfo;\r\n this.responseModel.avvolgimentiShowInfo = false;\r\n }\r\n }\r\n this.parameterValidation();\r\n };\r\n ChildComponent.prototype.onAvvolgimentiVisualChange = function (avvolgimentoId) {\r\n this.responseModel.idAvvolgimento = avvolgimentoId;\r\n this.onAvvolgimentiChange();\r\n };\r\n ChildComponent.prototype.showHideTaglioDescription = function () {\r\n if (this.responseModel.taglioShowInfo) {\r\n this.responseModel.taglioShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.taglioShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideFormatDescription = function () {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideFormatiTipoLabelDescription = function () {\r\n if (this.responseModel.formatiTipoLabelShowInfo) {\r\n this.responseModel.formatiTipoLabelShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiTipoLabelShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideAvvolgimentiDescription = function () {\r\n if (this.responseModel.avvolgimentiShowInfo) {\r\n this.responseModel.avvolgimentiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.avvolgimentiShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePaperInternoDescription = function () {\r\n if (this.responseModel.carte1ShowInfo) {\r\n this.responseModel.carte1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.carte1ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePlastficationInternoDescription = function () {\r\n if (this.responseModel.plastificazioni1ShowInfo) {\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni1ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListino = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.setPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n //Deselecting the current price and selected the one passed in input\r\n for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n var price_1 = _a[_i];\r\n price_1.IsSelected = false;\r\n }\r\n price.IsSelected = true;\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n };\r\n ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n return this.loggedIdUser.isAuthenticated;\r\n };\r\n ChildComponent.prototype.checkEmailIsValid = function () {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n };\r\n ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.sendRequestInfo = function () {\r\n var _this = this;\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n if (result == true) {\r\n _this.requestInfoSuccess = true;\r\n }\r\n else {\r\n _this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n _this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.templateHtml\r\n }),\r\n __param(7, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _d) || Object, (typeof (_e = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Number)\r\n ], WizardEtichetteComponent.prototype, \"resourceId\", void 0);\r\n WizardEtichetteComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-wizard-etichette-widget\",\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n ], WizardEtichetteComponent);\r\n return WizardEtichetteComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardEtichetteComponent = WizardEtichetteComponent;\r\n\n\n/***/ }),\n\n/***/ 612:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar core_2 = __webpack_require__(27);\r\n//Services\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar routes_service_1 = __webpack_require__(6);\r\n///Components\r\nvar quoting_excluding_component_1 = __webpack_require__(71);\r\n//Models\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar quoting_submit_model_1 = __webpack_require__(21);\r\nvar quoting_submit_model_2 = __webpack_require__(21);\r\nvar quoting_submit_model_3 = __webpack_require__(21);\r\nvar quoting_submit_model_4 = __webpack_require__(21);\r\nvar Subscription_1 = __webpack_require__(2);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar WizardStampaComponent = (function () {\r\n function WizardStampaComponent(_compiler, componentHelper, _elementRef, _quotingService, authService, languageService, isBrowser) {\r\n this._compiler = _compiler;\r\n this.componentHelper = componentHelper;\r\n this._elementRef = _elementRef;\r\n this._quotingService = _quotingService;\r\n this.authService = authService;\r\n this.languageService = languageService;\r\n this.isBrowser = isBrowser;\r\n this.autentification = this.authService.GetData();\r\n this.userId = this.authService.GetUserId();\r\n this.lang = this.languageService.getLongLang();\r\n this.subManager = new Subscription_1.Subscription();\r\n }\r\n WizardStampaComponent.prototype.ngOnInit = function () {\r\n var _this = this;\r\n if (!this.isBrowser)\r\n return;\r\n var sub = this._quotingService.getWizardStampaData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(function (result) {\r\n //Creating subcomponent whith the selected template to inject\r\n var subComponent = _this.createSubComponent(result, _this.resourceId);\r\n //injecting created component (OK)\r\n _this.componentHelper.injectComponent(_this._compiler, _this._elementRef, subComponent);\r\n });\r\n this.subManager.add(sub);\r\n };\r\n WizardStampaComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n WizardStampaComponent.prototype.createSubComponent = function (result, InputresourceId) {\r\n var ChildComponent = (function () {\r\n function ChildComponent(_quotingService, languageService, authService, translate, cartService, routesService, bootboxService, isBrowser, canvasService) {\r\n var _this = this;\r\n this._quotingService = _quotingService;\r\n this.languageService = languageService;\r\n this.authService = authService;\r\n this.translate = translate;\r\n this.cartService = cartService;\r\n this.routesService = routesService;\r\n this.bootboxService = bootboxService;\r\n this.isBrowser = isBrowser;\r\n this.canvasService = canvasService;\r\n this.pageIsInit = false;\r\n this.pageIsInitAfter = false;\r\n this.privacyPageName = this.routesService.getRoutePath('INFO PRIVACY');\r\n this.waiting = false;\r\n this.carteValue = -1;\r\n this.lang = this.languageService.getLongLang();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.autentification = this.authService.GetData();\r\n this.resourceId = InputresourceId;\r\n this.isDataInitialized = false;\r\n this.resultPrice = new quoting_submit_model_2.PriceEstimationModel();\r\n this.ExcludingRules = new quoting_excluding_component_1.ExcludingComponent();\r\n this.model = new quoting_submit_model_3.wizardFormEditoriaModel();\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n this.requestInfoSuccess = null;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.blockquoting = false;\r\n this.isCalculatedWizard = false;\r\n // sending info to a child component\r\n this.parentWidgetData = result.CanvasInfo;\r\n this.subManager = new Subscription_1.Subscription();\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n var canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(function (isModalOpened) {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n var canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(function (isDesignApproved) {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n if (_this.isCalculationTypeCalcolato()) {\r\n _this.addToCartWizardCalcolato(1);\r\n }\r\n else if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n _this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n _this.addToCartWizardListino(1);\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n _this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n ChildComponent.prototype.ngOnInit = function () {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new quoting_model_1.QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n this.ExcludingRules.setMacrocategory(\"STAMPA_DIRETTA\");\r\n this.responseModel.isStampaBifaccialeNoHide = false;\r\n this.responseModel.isStampaBifaccialeSiHide = false;\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.openCanvasEditor = function () {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n var canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n var isStateId = false;\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n };\r\n ChildComponent.prototype.setCanvasConfig = function () {\r\n var canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n return canvasConfigData;\r\n };\r\n ChildComponent.prototype.toShowCanvasButton = function () {\r\n var toShow = false;\r\n var isModuleActive = false;\r\n var isUserLoggedIn = false;\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n return toShow;\r\n };\r\n ChildComponent.prototype.CheckRegoleStampa = function () {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n var oldFormato = this.responseModel.idFormati;\r\n var oldSupporto = this.responseModel.idSupportiRigidi;\r\n var oldTaglio = this.responseModel.idTagli;\r\n var lavAccArray = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n var lav = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"STAMPA_DIRETTA\", null, null, this.responseModel);\r\n //Reset regole supporto rigido\r\n this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n //Reset regole stampa bifacciale\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", null, null, this.responseModel);\r\n //Reset regole stampa bianco coprente\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", null, null, this.responseModel);\r\n //Reset regole taglio\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FUSTELLATURA\", \"\", null, null, this.responseModel);\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"STAMPA_DIRETTA\", null, null, this.responseModel);\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"STAMPA_DIRETTA\", idFormato, 0, this.responseModel);\r\n }\r\n if (this.responseModel.tipoBifacciale == \"0\") {\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", \"1\", 0, this.responseModel);\r\n }\r\n else if (this.responseModel.tipoBifacciale == \"1\") {\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", \"2\", 0, this.responseModel);\r\n }\r\n if (this.responseModel.idBiancoCoprente == \"0\") {\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"1\", 0, this.responseModel);\r\n }\r\n else if (this.responseModel.idBiancoCoprente == \"1\") {\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"2\", 0, this.responseModel);\r\n }\r\n else if (this.responseModel.idBiancoCoprente == \"2\") {\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"3\", 0, this.responseModel);\r\n }\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FUSTELLATURA\", \"\", this.responseModel.idTagli, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"STAMPA_DIRETTA\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n this.onSuportoChange(true);\r\n }\r\n if (oldTaglio != this.responseModel.idTagli) {\r\n this.onTaglioChange(true);\r\n }\r\n var count = 0;\r\n for (var _b = 0, _c = this.responseModel.lavorazioniAccessorie; _b < _c.length; _b++) {\r\n var lavorazione = _c[_b];\r\n count = 0;\r\n for (var _d = 0, lavAccArray_1 = lavAccArray; _d < lavAccArray_1.length; _d++) {\r\n var lavorazioneOld = lavAccArray_1[_d];\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n };\r\n ChildComponent.prototype.parameterValidation = function () {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n //apply all rules\r\n this.CheckRegoleStampa();\r\n //verify validation for all parameters \r\n this.validationCopie();\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.validationFormati();\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n this.countTagli();\r\n this.countBiancoCoprente();\r\n this.validationSupporti();\r\n this.validationLavorazioneAccessoria();\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n };\r\n ChildComponent.prototype.countTagli = function () {\r\n if (this.responseModel.tagli != null) {\r\n this.responseModel.tagliCount = this.responseModel.tagli.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.countBiancoCoprente = function () {\r\n if (this.responseModel.biancoCoprente != null) {\r\n this.responseModel.biancoCoprenteCount = this.responseModel.biancoCoprente.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n };\r\n ChildComponent.prototype.selectFileCombination = function () {\r\n this.listaFile = new Array();\r\n for (var _i = 0, _a = this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni; _i < _a.length; _i++) {\r\n var file = _a[_i];\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n if (file.FormatId == idFormato) {\r\n var fileObj = new quoting_submit_model_4.FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj);\r\n }\r\n }\r\n }\r\n };\r\n ChildComponent.prototype.checkZero = function (val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n };\r\n ChildComponent.prototype.setTypePriceResult = function (type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n };\r\n ChildComponent.prototype.setListinoScontisticaPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.setListinoPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n };\r\n ChildComponent.prototype.isRowSelected = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelected = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelected = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndex = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n ChildComponent.prototype.clearSelectedIndex = function () {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n };\r\n ChildComponent.prototype.isRowSelectedListino = function (rowIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCellSelectedListino = function (rowIndex, columnIndex) {\r\n var result = false;\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isColumnSelectedListino = function (columnIndex) {\r\n var result = false;\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.setSelectedIndexListino = function (rowIndex, columnIndex) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n };\r\n // Create model for passed in input to the calculation method\r\n ChildComponent.prototype.getCalculationModel = function () {\r\n var _this = this;\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n this.model.idSupportiRigidi = this.responseModel.idSupportiRigidi;\r\n if (this.responseModel.stampaBifacciale == 1) {\r\n this.model.tipoBifacciale = this.responseModel.tipoBifacciale;\r\n }\r\n else {\r\n this.model.tipoBifacciale = \"0\";\r\n }\r\n if (this.responseModel.biancoCoprente != null && this.responseModel.biancoCoprente.length > 0) {\r\n this.model.idBiancoCoprente = this.responseModel.idBiancoCoprente;\r\n }\r\n else {\r\n this.model.idBiancoCoprente = \"0\";\r\n }\r\n if (this.responseModel.idTagli != \"-1\") {\r\n this.model.idTagli = this.responseModel.idTagli;\r\n }\r\n this.model.lavorazioniAccessorie = new Array();\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioneAccessoria = _a[_i];\r\n var lavorazione = new quoting_submit_model_1.LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n this.model.lavorazioniAccessorie.sort(function (a, b) { return 0 - (a > b ? -1 : 1); });\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n var sub = this._quotingService.getCalculatedWizard(this.model).subscribe(function (result) {\r\n _this.resultPrice = result;\r\n _this.isCalculatedWizard = true;\r\n if (_this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = _this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n for (var i = scontisticaTable.length - 1; i >= 0; i--) {\r\n var price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n _this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TableScontisticaPriceList.slice(1);\r\n var breakFlag = false;\r\n for (var _i = 0, tableScontisticaPriceListSliced_1 = tableScontisticaPriceListSliced; _i < tableScontisticaPriceListSliced_1.length; _i++) {\r\n var priceRow = tableScontisticaPriceListSliced_1[_i];\r\n var slicedPriceRow = priceRow.slice(1);\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (var _a = 0, reverse_1 = reverse; _a < reverse_1.length; _a++) {\r\n var price = reverse_1[_a];\r\n if (price.Price != -1) {\r\n _this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (_this.isCalculationTypeListino()) {\r\n var tableScontisticaPriceListSliced = _this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n var slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n _this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n _this.resultCalculation = true;\r\n _this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }, function (err) {\r\n _this.isCalculatedWizard = true;\r\n _this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n });\r\n this.subManager.add(sub);\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n this.isDataInitialized = true;\r\n };\r\n ChildComponent.prototype.ngAfterViewInit = function () {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n var altezza = $(\"#footer\").outerHeight();\r\n var margintop = parseInt($(\"#footer\").css('margin-top'));\r\n var paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n var altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n var margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n var paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n var altezzaHead = $(\".header-body\").outerHeight();\r\n var margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n var paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n };\r\n ChildComponent.prototype.checkValidation = function () {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.supportoIsValid) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n ChildComponent.prototype.validationBaseFormati = function () {\r\n var message;\r\n var base = parseFloat(this.responseModel.baseFormato);\r\n var minBase = this.responseModel.minimoBase;\r\n var maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationAltezzaFormati = function () {\r\n var message;\r\n var altezza = parseFloat(this.responseModel.altezzaFormato);\r\n var minAltezza = this.responseModel.minimoAltezza;\r\n var maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.altezzaFormatoMessage = message;\r\n };\r\n ChildComponent.prototype.validationSoggetti = function () {\r\n var message;\r\n var numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.responseModel.soggettiMessage = message;\r\n };\r\n ChildComponent.prototype.validationCopie = function () {\r\n var message;\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n var numCopie = parseInt(this.responseModel.numCopie);\r\n var minCopie = this.responseModel.minimoCopie;\r\n var maxCopie = this.responseModel.massimoCopie;\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.copieMessage = message;\r\n };\r\n ChildComponent.prototype.validationFormati = function () {\r\n var message;\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.formatiMessage = message;\r\n };\r\n ChildComponent.prototype.validationSupporti = function () {\r\n var message;\r\n if (this.responseModel.idSupportiRigidi == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.supportoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.supportoIsValid = true;\r\n }\r\n if (this.responseModel.supportiRigidi != null) {\r\n this.responseModel.supportiRigidiCount = this.responseModel.supportiRigidi.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n this.responseModel.supportoMessage = message;\r\n };\r\n ChildComponent.prototype.validationLavorazioneAccessoria = function () {\r\n var message = \"\";\r\n var valid = true;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazione = _a[_i];\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n var qta = parseInt(lavorazione.value);\r\n var minQta = lavorazione.minQtaInput;\r\n var maxQta = lavorazione.maxQtaInput;\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(function (x) { return x.isVisible == true; }).length;\r\n }\r\n }\r\n this.responseModel.lavorazioniIsValid = valid;\r\n };\r\n ChildComponent.prototype.getLabel = function (label) {\r\n var message;\r\n var sub = this.translate.get(label, this.translate).subscribe(function (res) {\r\n message = res;\r\n });\r\n this.subManager.add(sub);\r\n return message;\r\n };\r\n ChildComponent.prototype.isAttributeFixed = function (tipoLavorazione) {\r\n var result = false;\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaCheckShowed = function (tipo, tipoSelezione, isVisible) {\r\n var result = false;\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaNumericShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaTextAreaShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.textAreaCheck = function (event) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaComboShowed = function (tipo, selectedValue, lavId) {\r\n var result = false;\r\n var isVisible = false;\r\n for (var _i = 0, _a = this.responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioniAccessorie = _a[_i];\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.checkIsLavorazioneAccessoriaDescrittivoShowed = function (tipo, isVisible) {\r\n var result = false;\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.onFormatiChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.formati; _i < _a.length; _i++) {\r\n var formato = _a[_i];\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onFormatiVisualChange = function (formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n };\r\n ChildComponent.prototype.onSuportoChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.supportiRigidi; _i < _a.length; _i++) {\r\n var supporto = _a[_i];\r\n if (supporto.chiave == this.responseModel.idSupportiRigidi) {\r\n this.responseModel.supportoDescription = supporto.descrizione;\r\n this.responseModel.supportoImage = supporto.image;\r\n this.responseModel.supportoHasInfo = supporto.hasInfo;\r\n this.responseModel.supportoShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onSuportoVisualChange = function (supportoId) {\r\n this.responseModel.idSupportiRigidi = supportoId;\r\n this.onSuportoChange();\r\n };\r\n ChildComponent.prototype.onTaglioChange = function (isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = this.responseModel.tagli; _i < _a.length; _i++) {\r\n var taglio = _a[_i];\r\n if (taglio.chiave == this.responseModel.idTagli) {\r\n this.responseModel.taglioDescription = taglio.descrizione;\r\n this.responseModel.taglioImage = taglio.image;\r\n this.responseModel.taglioHasInfo = taglio.hasInfo;\r\n this.responseModel.taglioShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.onTaglioVisualChange = function (taglioId) {\r\n this.responseModel.idTagli = taglioId;\r\n this.onTaglioChange();\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboChange = function (lavorazione, isrules) {\r\n if (isrules === void 0) { isrules = false; }\r\n for (var _i = 0, _a = lavorazione.valori; _i < _a.length; _i++) {\r\n var variante = _a[_i];\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n };\r\n ChildComponent.prototype.lavorazioniAccessorieComboVisualChange = function (lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n };\r\n ChildComponent.prototype.checkIsBifaccialeShowed = function () {\r\n var result = false;\r\n if (this.responseModel.stampaBifacciale == 1 &&\r\n (this.responseModel.isStampaBifaccialeNoHide == false || this.responseModel.isStampaBifaccialeSiHide == false)) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.showHideLavDescription = function (lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideFormatDescription = function () {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHideSupportoDescription = function () {\r\n if (this.responseModel.supportoShowInfo) {\r\n this.responseModel.supportoShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.supportoShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.showHidePlastficationInternoDescription = function () {\r\n if (this.responseModel.plastificazioni1ShowInfo) {\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni1ShowInfo = true;\r\n }\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolato = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeCalcolatoQuotigPrev = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListino = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.isCalculationTypeListinoScontistica = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolato = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardCalcolatoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n _this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListino = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.addToCartWizardListinoScontistica = function (quantityId) {\r\n var _this = this;\r\n var wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(function (result) {\r\n _this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.bootboxService.i18nAlert(\"errorMex\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n };\r\n ChildComponent.prototype.setPriceResult = function (price) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n //Deselecting the current price and selected the one passed in input\r\n for (var _i = 0, _a = this.resultPrice.TablePriceList; _i < _a.length; _i++) {\r\n var price_1 = _a[_i];\r\n price_1.IsSelected = false;\r\n }\r\n price.IsSelected = true;\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n };\r\n ChildComponent.prototype.isCustomerLoggedIn = function () {\r\n return this.loggedIdUser.isAuthenticated;\r\n };\r\n ChildComponent.prototype.checkEmailIsValid = function () {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n };\r\n ChildComponent.prototype.checkFormRichiestaPrevIsValid = function () {\r\n var result = false;\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n return result;\r\n };\r\n ChildComponent.prototype.sendRequestInfo = function () {\r\n var _this = this;\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n var sub = this._quotingService.sendRequestInfo(this.model).subscribe(function (result) {\r\n if (result == true) {\r\n _this.requestInfoSuccess = true;\r\n }\r\n else {\r\n _this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n }, function (err) {\r\n _this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n _this.resultCalculation = true;\r\n });\r\n this.subManager.add(sub);\r\n }\r\n };\r\n ChildComponent.prototype.ngAfterViewChecked = function () {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n };\r\n ChildComponent.prototype.ngOnDestroy = function () {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n };\r\n ChildComponent = __decorate([\r\n core_1.Component({\r\n template: result.templateHtml\r\n }),\r\n __param(7, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _a) || Object, (typeof (_b = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _b) || Object, (typeof (_c = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _c) || Object, (typeof (_d = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object, (typeof (_f = typeof routes_service_1.RoutesService !== 'undefined' && routes_service_1.RoutesService) === 'function' && _f) || Object, (typeof (_g = typeof bootbox_service_1.BootboxService !== 'undefined' && bootbox_service_1.BootboxService) === 'function' && _g) || Object, Boolean, (typeof (_h = typeof customerscanvas_service_1.CustomersCanvasService !== 'undefined' && customerscanvas_service_1.CustomersCanvasService) === 'function' && _h) || Object])\r\n ], ChildComponent);\r\n return ChildComponent;\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n }());\r\n return ChildComponent;\r\n };\r\n __decorate([\r\n core_1.Input(), \r\n __metadata('design:type', Number)\r\n ], WizardStampaComponent.prototype, \"resourceId\", void 0);\r\n WizardStampaComponent = __decorate([\r\n core_1.Component({\r\n selector: \"dy-wizard-stampa-widget\",\r\n template: \"\"\r\n }),\r\n __param(6, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof core_1.Compiler !== 'undefined' && core_1.Compiler) === 'function' && _a) || Object, (typeof (_b = typeof component_helper_service_1.ComponentHelperService !== 'undefined' && component_helper_service_1.ComponentHelperService) === 'function' && _b) || Object, (typeof (_c = typeof core_1.ViewContainerRef !== 'undefined' && core_1.ViewContainerRef) === 'function' && _c) || Object, (typeof (_d = typeof quoting_service_1.QuotingService !== 'undefined' && quoting_service_1.QuotingService) === 'function' && _d) || Object, (typeof (_e = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _e) || Object, (typeof (_f = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _f) || Object, Boolean])\r\n ], WizardStampaComponent);\r\n return WizardStampaComponent;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.WizardStampaComponent = WizardStampaComponent;\r\n\n\n/***/ }),\n\n/***/ 613:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(87);\r\nvar category_component_1 = __webpack_require__(389);\r\nvar InventoryCategoryModule = (function () {\r\n function InventoryCategoryModule() {\r\n }\r\n InventoryCategoryModule = __decorate([\r\n core_1.NgModule({\r\n imports: [\r\n shared_module_1.SharedModule\r\n ],\r\n declarations: [\r\n category_component_1.CategoryComponent\r\n ]\r\n }), \r\n __metadata('design:paramtypes', [])\r\n ], InventoryCategoryModule);\r\n return InventoryCategoryModule;\r\n}());\r\nexports.InventoryCategoryModule = InventoryCategoryModule;\r\n\n\n/***/ }),\n\n/***/ 614:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(87);\r\nvar other_product_component_1 = __webpack_require__(390);\r\nvar product_page_list_component_1 = __webpack_require__(392);\r\nvar promotions_component_1 = __webpack_require__(393);\r\nvar product_details_component_1 = __webpack_require__(391);\r\nvar InventoryProductModule = (function () {\r\n function InventoryProductModule() {\r\n }\r\n InventoryProductModule = __decorate([\r\n core_1.NgModule({\r\n imports: [\r\n shared_module_1.SharedModule\r\n ],\r\n declarations: [\r\n other_product_component_1.OtherProductComponent,\r\n product_page_list_component_1.ProductPageListComponent,\r\n promotions_component_1.PromotionsComponent,\r\n product_details_component_1.ProductDetailsComponent\r\n ]\r\n }), \r\n __metadata('design:paramtypes', [])\r\n ], InventoryProductModule);\r\n return InventoryProductModule;\r\n}());\r\nexports.InventoryProductModule = InventoryProductModule;\r\n\n\n/***/ }),\n\n/***/ 615:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar shared_module_1 = __webpack_require__(87);\r\nvar register_component_1 = __webpack_require__(405);\r\nvar SettingsModule = (function () {\r\n function SettingsModule() {\r\n }\r\n SettingsModule = __decorate([\r\n core_1.NgModule({\r\n imports: [\r\n shared_module_1.SharedModule\r\n ],\r\n declarations: [\r\n register_component_1.RegisterComponent\r\n ]\r\n }), \r\n __metadata('design:paramtypes', [])\r\n ], SettingsModule);\r\n return SettingsModule;\r\n}());\r\nexports.SettingsModule = SettingsModule;\r\n\n\n/***/ }),\n\n/***/ 616:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar Breadcrumbs = (function () {\r\n function Breadcrumbs() {\r\n }\r\n return Breadcrumbs;\r\n}());\r\nexports.Breadcrumbs = Breadcrumbs;\r\n\n\n/***/ }),\n\n/***/ 617:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar InfoRequest = (function () {\r\n function InfoRequest() {\r\n }\r\n return InfoRequest;\r\n}());\r\nexports.InfoRequest = InfoRequest;\r\n\n\n/***/ }),\n\n/***/ 618:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar QuotingConstants = (function () {\r\n function QuotingConstants() {\r\n }\r\n ;\r\n QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO = \"calcolato\";\r\n QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_SCONTISTICA = \"calcolato_scontistica\";\r\n QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO = \"listino\";\r\n QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO_SCONTISTICA = \"listino_scontistica\";\r\n QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO = \"calcolato_richiesta_preventivo\";\r\n QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO = \"calcolato_listino_standard\";\r\n QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_SCONTISTICA = \"calcolato_listino_scontistica\";\r\n QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI = \"calcolato_listino_fornitori\";\r\n QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI_SCONTISTICA = \"calcolato_listino_fornitori_scontistica\";\r\n return QuotingConstants;\r\n}());\r\nexports.QuotingConstants = QuotingConstants;\r\n\n\n/***/ }),\n\n/***/ 619:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar SharedConstants = (function () {\r\n function SharedConstants() {\r\n }\r\n SharedConstants.OTHER_PRODUCTS_TYPE = \"ALTRO_PRODOTTO\";\r\n return SharedConstants;\r\n}());\r\nexports.SharedConstants = SharedConstants;\r\n\n\n/***/ }),\n\n/***/ 620:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar platform_browser_1 = __webpack_require__(7);\r\nvar cookie_options_1 = __webpack_require__(418);\r\nvar CookieBrowserService = (function () {\r\n function CookieBrowserService(document) {\r\n this.document = document;\r\n }\r\n CookieBrowserService.prototype.setOptions = function (options) {\r\n this.defaultOptions = new cookie_options_1.CookieOptions(options);\r\n };\r\n CookieBrowserService.prototype.get = function (key) {\r\n return this.cookieReader()[key];\r\n };\r\n CookieBrowserService.prototype.getObject = function (key) {\r\n var value = this.get(key);\r\n return value ? JSON.parse(value) : value;\r\n };\r\n CookieBrowserService.prototype.getAll = function () {\r\n return this.cookieReader();\r\n };\r\n CookieBrowserService.prototype.put = function (key, value, options) {\r\n this.cookieWriter()(key, value, options);\r\n };\r\n CookieBrowserService.prototype.putObject = function (key, value, options) {\r\n this.put(key, JSON.stringify(value), options);\r\n };\r\n CookieBrowserService.prototype.remove = function (key, options) {\r\n this.cookieWriter()(key, undefined, options);\r\n };\r\n CookieBrowserService.prototype.removeAll = function () {\r\n var _this = this;\r\n var cookies = this.getAll();\r\n Object.keys(cookies).forEach(function (key) {\r\n _this.remove(key);\r\n });\r\n };\r\n CookieBrowserService.prototype.cookieReader = function () {\r\n var rawDocument = this.document;\r\n var lastCookies = {};\r\n var lastCookieString = '';\r\n var that = this;\r\n var cookieArray, cookie, i, index, name;\r\n var currentCookieString = rawDocument.cookie || '';\r\n if (currentCookieString !== lastCookieString) {\r\n lastCookieString = currentCookieString;\r\n cookieArray = lastCookieString.split('; ');\r\n lastCookies = {};\r\n for (i = 0; i < cookieArray.length; i++) {\r\n cookie = cookieArray[i];\r\n index = cookie.indexOf('=');\r\n if (index > 0) {\r\n name = that.safeDecodeURIComponent(cookie.substring(0, index));\r\n if (this.isBlank(lastCookies[name])) {\r\n lastCookies[name] = that.safeDecodeURIComponent(cookie.substring(index + 1));\r\n }\r\n }\r\n }\r\n }\r\n return lastCookies;\r\n };\r\n CookieBrowserService.prototype.cookieWriter = function () {\r\n var that = this;\r\n var rawDocument = this.document;\r\n return function (name, value, options) {\r\n rawDocument.cookie = that.buildCookieString(name, value, options);\r\n };\r\n };\r\n CookieBrowserService.prototype.safeDecodeURIComponent = function (str) {\r\n try {\r\n return decodeURIComponent(str);\r\n }\r\n catch (e) {\r\n return str;\r\n }\r\n };\r\n CookieBrowserService.prototype.buildCookieString = function (name, value, options) {\r\n var cookiePath = '/';\r\n var path, expires;\r\n var defaultOpts = this.defaultOptions || new cookie_options_1.CookieOptions({ path: cookiePath });\r\n var opts = this.mergeOptions(defaultOpts, options);\r\n expires = opts.expires;\r\n if (this.isBlank(value)) {\r\n expires = 'Thu, 01 Jan 1970 00:00:00 GMT';\r\n value = '';\r\n }\r\n if (this.isString(expires)) {\r\n expires = new Date(expires);\r\n }\r\n var str = encodeURIComponent(name) + '=' + encodeURIComponent(value);\r\n str += opts.path ? ';path=' + opts.path : '';\r\n str += opts.domain ? ';domain=' + opts.domain : '';\r\n str += expires ? ';expires=' + expires.toUTCString() : '';\r\n str += opts.secure ? ';secure' : '';\r\n var cookieLength = str.length + 1;\r\n if (cookieLength > 4096) {\r\n console.log(\"Cookie '\" + name + \"' possibly not set or overflowed because it was too \\n large (\" + cookieLength + \" > 4096 bytes)!\");\r\n }\r\n return str;\r\n };\r\n CookieBrowserService.prototype.mergeOptions = function (defaultOpts, providedOpts) {\r\n var newOpts = defaultOpts;\r\n if (this.isPresent(providedOpts)) {\r\n return newOpts.merge(new cookie_options_1.CookieOptions(providedOpts));\r\n }\r\n return newOpts;\r\n };\r\n CookieBrowserService.prototype.isBlank = function (obj) {\r\n return obj === undefined || obj === null;\r\n };\r\n CookieBrowserService.prototype.isPresent = function (obj) {\r\n return obj !== undefined && obj !== null;\r\n };\r\n CookieBrowserService.prototype.isString = function (obj) {\r\n return typeof obj === 'string';\r\n };\r\n CookieBrowserService = __decorate([\r\n core_1.Injectable(),\r\n __param(0, core_1.Inject(platform_browser_1.DOCUMENT)), \r\n __metadata('design:paramtypes', [Object])\r\n ], CookieBrowserService);\r\n return CookieBrowserService;\r\n}());\r\nexports.CookieBrowserService = CookieBrowserService;\r\n\n\n/***/ }),\n\n/***/ 621:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar CookieNodeService = (function () {\r\n function CookieNodeService(req, res) {\r\n this.req = req;\r\n this.res = res;\r\n }\r\n Object.defineProperty(CookieNodeService.prototype, \"cookies\", {\r\n get: function () {\r\n return this.req.cookies;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n CookieNodeService.prototype.setOptions = function (options) {\r\n this.defaultOptions = Object.assign(options);\r\n };\r\n CookieNodeService.prototype.get = function (key) {\r\n return this.cookies[key];\r\n };\r\n CookieNodeService.prototype.getObject = function (key) {\r\n var value = this.get(key);\r\n var obj = value ? JSON.parse(value) : value;\r\n return obj;\r\n };\r\n CookieNodeService.prototype.getAll = function () {\r\n return this.cookies;\r\n };\r\n CookieNodeService.prototype.put = function (key, value, options) {\r\n options = this.generateOptions();\r\n this.res.cookie(key, value, options);\r\n };\r\n CookieNodeService.prototype.putObject = function (key, value, options) {\r\n this.put(key, JSON.stringify(value), options);\r\n };\r\n CookieNodeService.prototype.remove = function (key, options) {\r\n options = this.generateOptions();\r\n this.res.clearCookie(key, options);\r\n };\r\n CookieNodeService.prototype.removeAll = function () {\r\n this.res.clearCookie();\r\n };\r\n CookieNodeService.prototype.generateOptions = function (options) {\r\n return Object.assign({}, options, { path: '/' }, this.defaultOptions);\r\n };\r\n CookieNodeService = __decorate([\r\n core_1.Injectable(),\r\n __param(0, core_1.Inject('req')),\r\n __param(1, core_1.Inject('res')), \r\n __metadata('design:paramtypes', [Object, Object])\r\n ], CookieNodeService);\r\n return CookieNodeService;\r\n}());\r\nexports.CookieNodeService = CookieNodeService;\r\n\n\n/***/ }),\n\n/***/ 622:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n\n\n/***/ }),\n\n/***/ 623:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar http_1 = __webpack_require__(96);\r\nvar DefaultRequestOptions = (function (_super) {\r\n __extends(DefaultRequestOptions, _super);\r\n function DefaultRequestOptions() {\r\n _super.apply(this, arguments);\r\n this.headers = new http_1.Headers({\r\n 'Content-Type': 'application/json; charset=utf-8'\r\n });\r\n }\r\n DefaultRequestOptions = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [])\r\n ], DefaultRequestOptions);\r\n return DefaultRequestOptions;\r\n}(http_1.BaseRequestOptions));\r\nexports.DefaultRequestOptions = DefaultRequestOptions;\r\n\n\n/***/ }),\n\n/***/ 624:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar LoadingOverlayService = (function () {\r\n function LoadingOverlayService(isBrowser) {\r\n this.isBrowser = isBrowser;\r\n }\r\n LoadingOverlayService.prototype.showPageLoadingOverlay = function () {\r\n if (this.isBrowser) {\r\n jQuery('body').addClass('loading-overlay-showing');\r\n }\r\n };\r\n LoadingOverlayService.prototype.hidePageLoadingOverlay = function () {\r\n if (this.isBrowser) {\r\n jQuery('body').removeClass('loading-overlay-showing');\r\n }\r\n };\r\n LoadingOverlayService = __decorate([\r\n core_1.Injectable(),\r\n __param(0, core_1.Inject('isBrowser')), \r\n __metadata('design:paramtypes', [Boolean])\r\n ], LoadingOverlayService);\r\n return LoadingOverlayService;\r\n}());\r\nexports.LoadingOverlayService = LoadingOverlayService;\r\n\n\n/***/ }),\n\n/***/ 625:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar user_login_1 = __webpack_require__(72);\r\nvar LocalStorageService = (function () {\r\n function LocalStorageService() {\r\n }\r\n LocalStorageService.prototype.Write = function (key, value) {\r\n if (value) {\r\n value = JSON.stringify(value);\r\n }\r\n localStorage.setItem(key, value);\r\n };\r\n LocalStorageService.prototype.Read = function (key) {\r\n var value = localStorage.getItem(key);\r\n if (value && value != \"undefined\" && value != \"null\") {\r\n var userLoginParsed = Helper.toInstance(new user_login_1.UserLogin(), JSON.parse(value));\r\n return userLoginParsed;\r\n }\r\n return null;\r\n };\r\n LocalStorageService.prototype.Remove = function (key) {\r\n localStorage.removeItem(key);\r\n };\r\n LocalStorageService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [])\r\n ], LocalStorageService);\r\n return LocalStorageService;\r\n}());\r\nexports.LocalStorageService = LocalStorageService;\r\nvar Helper = (function () {\r\n function Helper() {\r\n }\r\n Helper.toInstance = function (obj, json) {\r\n var jsonObj = JSON.parse(json);\r\n if (typeof obj[\"fromJSON\"] === \"function\") {\r\n obj[\"fromJSON\"](jsonObj);\r\n }\r\n else {\r\n for (var propName in jsonObj) {\r\n obj[propName] = jsonObj[propName];\r\n }\r\n }\r\n return obj;\r\n };\r\n return Helper;\r\n}());\r\n\n\n/***/ }),\n\n/***/ 626:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar router_1 = __webpack_require__(13);\r\nvar common_1 = __webpack_require__(45);\r\nvar core_2 = __webpack_require__(27);\r\nvar routes_service_1 = __webpack_require__(6);\r\nvar cookie_1 = __webpack_require__(86);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar RoutesBrowserService = (function (_super) {\r\n __extends(RoutesBrowserService, _super);\r\n function RoutesBrowserService(router, translate, cookie, location, cache) {\r\n _super.call(this, router, translate, cookie, location, true, cache);\r\n this.router = router;\r\n this.translate = translate;\r\n this.cookie = cookie;\r\n this.location = location;\r\n this.cache = cache;\r\n this.browserLangs = RoutesBrowserService.getBrowserLangs();\r\n }\r\n RoutesBrowserService.prototype.loadRoutes = function () {\r\n var lang = this.getLang();\r\n var requestUrl = \"/assets/i18n-routes/\" + lang + \".json\";\r\n var rawRoutes = this.cache.get(requestUrl);\r\n var routes = this.getRoutesWithComponents(rawRoutes);\r\n this.router.resetConfig(routes);\r\n this.cache.set(requestUrl, rawRoutes);\r\n this.cookie.put(routes_service_1.RoutesService.COOKIE_LANG_KEY, lang);\r\n };\r\n RoutesBrowserService.getBrowserLangs = function () {\r\n var browserLangs = window.navigator['languages'] || null;\r\n browserLangs = browserLangs ||\r\n (window.navigator.language && [window.navigator.language]) ||\r\n (window.navigator['browserLanguage'] && [window.navigator['browserLanguage']]) ||\r\n (window.navigator['userLanguage'] && [window.navigator['userLanguage']]);\r\n return browserLangs.map(function (lang) {\r\n if (lang.indexOf('-') !== -1) {\r\n return lang.split('-')[0];\r\n }\r\n if (lang.indexOf('_') !== -1) {\r\n return lang.split('_')[0];\r\n }\r\n return lang;\r\n });\r\n };\r\n RoutesBrowserService.prototype.getRoutes = function () {\r\n var lang = this.getLang();\r\n var requestUrl = \"/assets/i18n-routes/\" + lang + \".json\";\r\n var rawRoutes = this.cache.get(requestUrl);\r\n return rawRoutes;\r\n };\r\n RoutesBrowserService = __decorate([\r\n core_1.Injectable(),\r\n __param(2, core_1.Inject('CookieService')), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof router_1.Router !== 'undefined' && router_1.Router) === 'function' && _a) || Object, (typeof (_b = typeof core_2.TranslateService !== 'undefined' && core_2.TranslateService) === 'function' && _b) || Object, (typeof (_c = typeof cookie_1.CookieService !== 'undefined' && cookie_1.CookieService) === 'function' && _c) || Object, (typeof (_d = typeof common_1.Location !== 'undefined' && common_1.Location) === 'function' && _d) || Object, (typeof (_e = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _e) || Object])\r\n ], RoutesBrowserService);\r\n return RoutesBrowserService;\r\n var _a, _b, _c, _d, _e;\r\n}(routes_service_1.RoutesService));\r\nexports.RoutesBrowserService = RoutesBrowserService;\r\n\n\n/***/ }),\n\n/***/ 627:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nfunction __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n__export(__webpack_require__(628));\r\n\n\n/***/ }),\n\n/***/ 628:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n__webpack_require__(434);\r\nvar TranslateStaticLoader = (function () {\r\n function TranslateStaticLoader(http, application) {\r\n this.http = http;\r\n this.application = application;\r\n }\r\n TranslateStaticLoader.prototype.getTranslation = function (lang) {\r\n var _this = this;\r\n if (!this.observable$) {\r\n var appConfig = this.application.getConfig();\r\n var templateName = appConfig.template;\r\n this.observable$ = this.http\r\n .get(\"/template/b2c/\" + templateName + \"/translations/\" + lang + \".json\")\r\n .finally(function () { return _this.observable$ = null; });\r\n }\r\n return this.observable$;\r\n };\r\n return TranslateStaticLoader;\r\n}());\r\nexports.TranslateStaticLoader = TranslateStaticLoader;\r\n\n\n/***/ }),\n\n/***/ 629:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\nvar Observable_1 = __webpack_require__(1);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nfunction hashCodeString(str) {\r\n var hash = 0;\r\n if (str.length === 0) {\r\n return hash + '';\r\n }\r\n for (var i = 0; i < str.length; i++) {\r\n var char = str.charCodeAt(i);\r\n hash = ((hash << 5) - hash) + char;\r\n hash = hash & hash; // Convert to 32bit integer\r\n }\r\n return hash + '';\r\n}\r\nexports.hashCodeString = hashCodeString;\r\n// domain/feature service\r\nvar ModelService = (function () {\r\n // This is only one example of one Model depending on your domain\r\n function ModelService(_api, _cache) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n }\r\n /**\r\n * whatever domain/feature method name\r\n */\r\n ModelService.prototype.get = function (url) {\r\n var _this = this;\r\n // you want to return the cache if there is a response in it.\r\n // This would cache the first response so if your API isn't idempotent\r\n // you probably want to remove the item from the cache after you use it. LRU of 10\r\n // you can use also hashCodeString here\r\n var key = url;\r\n if (this._cache.has(key)) {\r\n return Observable_1.Observable.of(this._cache.get(key));\r\n }\r\n // you probably shouldn't .share() and you should write the correct logic\r\n return this._api.get(url)\r\n .do(function (json) {\r\n _this._cache.set(key, json);\r\n })\r\n .share();\r\n };\r\n // don't cache here since we're creating\r\n ModelService.prototype.create = function () {\r\n // TODO\r\n };\r\n ModelService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object])\r\n ], ModelService);\r\n return ModelService;\r\n var _a, _b;\r\n}());\r\nexports.ModelService = ModelService;\r\n\n\n/***/ }),\n\n/***/ 638:\n/***/ (function(module, exports) {\n\nmodule.exports = \"
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\"\n\n/***/ }),\n\n/***/ 71:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar quoting_model_1 = __webpack_require__(57);\r\nvar ExcludingComponent = (function () {\r\n function ExcludingComponent() {\r\n this.components = new quoting_model_1.LavorazioniComponents();\r\n }\r\n ExcludingComponent.prototype.getMacrocategory = function () {\r\n return this.Macrocategory;\r\n };\r\n ExcludingComponent.prototype.setMacrocategory = function (macrocategory) {\r\n this.Macrocategory = macrocategory;\r\n };\r\n ExcludingComponent.prototype.getModelItemName = function (sezione) {\r\n switch (sezione) {\r\n case \"formato\":\r\n {\r\n return \"formato\";\r\n }\r\n case \"copertina\":\r\n {\r\n return \"\";\r\n }\r\n case \"fustellatura\":\r\n {\r\n return \"\";\r\n }\r\n case \"plastificazione\":\r\n {\r\n return \"plastificazioni1\";\r\n }\r\n case \"plastificazione_copertina\":\r\n {\r\n return \"plastificazioni2\";\r\n }\r\n case \"rilegatura\":\r\n {\r\n return \"rilegature\";\r\n }\r\n case \"taglio\":\r\n {\r\n return \"tagli\";\r\n }\r\n default:\r\n {\r\n return \"\";\r\n }\r\n }\r\n };\r\n //remove all excluding rules from model\r\n ExcludingComponent.prototype.removeSelectRules = function (model) {\r\n for (var key in model) {\r\n if (model[key] != null) {\r\n if (this.getLowerCase(key) == \"lavorazioniaccessorie\") {\r\n for (var lavorazioneKey in model[key]) {\r\n model[key][lavorazioneKey].isVisible = true;\r\n for (var subKey in model[key][lavorazioneKey].valori) {\r\n try {\r\n model[key][lavorazioneKey].valori[subKey].isVisible = true;\r\n }\r\n catch (Exception) { }\r\n }\r\n }\r\n }\r\n else {\r\n for (var subKey in model[key]) {\r\n try {\r\n if (Array.isArray(model[key])) {\r\n model[key][subKey].isVisible = true;\r\n }\r\n model.tipoTaglio = true;\r\n }\r\n catch (Exception) { }\r\n }\r\n }\r\n }\r\n }\r\n return model;\r\n };\r\n // remove excluding rules from one component\r\n // if is lavorazione we need to remove rull from model.lavorazione not from model\r\n ExcludingComponent.prototype.removeRuleFromComponent = function (model, component, lavorazione) {\r\n if (lavorazione === void 0) { lavorazione = false; }\r\n if (model != null && model != undefined) {\r\n if (!lavorazione) {\r\n for (var key in model[component]) {\r\n try {\r\n model[component][key].isVisible = true;\r\n }\r\n catch (Exception) { }\r\n }\r\n }\r\n else {\r\n for (var subKey in model.lavorazioniAccessorie) {\r\n for (var valoriSubKey in model.lavorazioniAccessorie[subKey].valori) {\r\n try {\r\n model.lavorazioniAccessorie[subKey].valori[valoriSubKey].isVisible = true;\r\n }\r\n catch (Exception) { }\r\n }\r\n }\r\n }\r\n }\r\n return model;\r\n };\r\n // remove excluding rules list\r\n ExcludingComponent.prototype.removeSelectRuleFromList = function (model, regoles) {\r\n for (var regoleKey in regoles) {\r\n switch (this.getLowerCase(regoles[regoleKey].Categoria_2)) {\r\n case \"accessoria\":\r\n {\r\n var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Id_Elemento_2));\r\n model = this.removeRuleFromComponent(model, component, true);\r\n break;\r\n }\r\n case \"finitura\":\r\n {\r\n var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Sezione_2));\r\n model = this.removeRuleFromComponent(model, component);\r\n break;\r\n }\r\n case \"carte\":\r\n {\r\n var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Categoria_2));\r\n model = this.removeRuleFromComponent(model, component);\r\n break;\r\n }\r\n case \"carte_copertina\":\r\n {\r\n var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Categoria_2));\r\n model = this.removeRuleFromComponent(model, component);\r\n break;\r\n }\r\n default: { }\r\n }\r\n }\r\n return model;\r\n };\r\n // return rules list for certain category\r\n ExcludingComponent.prototype.filter = function (list, field, value) {\r\n var returnList = new Array();\r\n for (var key in list) {\r\n var text = \"\";\r\n try {\r\n text = this.getLowerCase(list[key][field]);\r\n }\r\n catch (exception) { }\r\n if (text == this.getLowerCase(value)) {\r\n returnList.push(list[key]);\r\n }\r\n }\r\n return returnList;\r\n };\r\n // return excluding rules for custom categoria and sezione\r\n ExcludingComponent.prototype.getRegole = function (regolesList, categoria, sezione) {\r\n var allRegoles = regolesList;\r\n var regoles = null;\r\n if (allRegoles != null && allRegoles != undefined && allRegoles.length > 0) {\r\n var categoryRegoles = this.filter(allRegoles, \"Categoria_1\", categoria); //get regoles for certain cattegory\r\n if (categoryRegoles != null && categoryRegoles != undefined && categoryRegoles.length > 0) {\r\n var regoles = null;\r\n //get regoles for certain cattegory\r\n switch (this.getLowerCase(categoria)) {\r\n case \"finiture\":\r\n {\r\n regoles = this.filter(categoryRegoles, \"Sezione_1\", sezione);\r\n for (var regolesKey in regoles) {\r\n var sezioneInput = this.getModelItemName(this.getLowerCase(regoles[regolesKey].Sezione_2)); //return name for current rules \r\n }\r\n break;\r\n }\r\n case \"accessoria\":\r\n {\r\n regoles = this.filter(categoryRegoles, \"Id_Elemento_1\", sezione);\r\n for (var regolesKey in regoles) {\r\n var sezioneInput = this.getModelItemName(this.getLowerCase(regoles[regolesKey].Sezione_2));\r\n }\r\n break;\r\n }\r\n default:\r\n {\r\n regoles = categoryRegoles;\r\n }\r\n }\r\n if (sezione == \"\") {\r\n regoles = categoryRegoles;\r\n }\r\n else { }\r\n }\r\n }\r\n return regoles;\r\n };\r\n ExcludingComponent.prototype.getLavorazioneValue = function (lavorazione, tipo, id) {\r\n try {\r\n var tipoNum = parseInt(tipo);\r\n switch (tipoNum) {\r\n case this.components.checkBox:\r\n {\r\n if (lavorazione.value == null || lavorazione.value == undefined) {\r\n switch (lavorazione.tipoSelezione) {\r\n case \"non_selezionato\":\r\n {\r\n lavorazione.value = false;\r\n return lavorazione.value;\r\n }\r\n case \"selezionato\":\r\n {\r\n lavorazione.value = true;\r\n return lavorazione.value;\r\n }\r\n case \"fisso\":\r\n {\r\n lavorazione.value = true;\r\n return lavorazione.value;\r\n }\r\n case \"nascosto\":\r\n {\r\n lavorazione.value = true;\r\n return lavorazione.value;\r\n }\r\n default:\r\n {\r\n lavorazione.value = false;\r\n return lavorazione.value;\r\n }\r\n }\r\n }\r\n else {\r\n return !lavorazione.value;\r\n }\r\n }\r\n ;\r\n case this.components.selectBox:\r\n { }\r\n ;\r\n case this.components.inputBox:\r\n { }\r\n default:\r\n {\r\n return null;\r\n }\r\n }\r\n }\r\n catch (exception) { }\r\n };\r\n // hidding field for finiture category\r\n //regole - because we need element to hide.\r\n ExcludingComponent.prototype.hideFinituraValue = function (model, component, regole, macro) {\r\n switch (this.getLowerCase(macro)) {\r\n case \"editoria\":\r\n {\r\n for (var key in model[component]) {\r\n if (model[component][key].chiave == regole.Id_Elemento_2) {\r\n model[component][key].isVisible = false;\r\n }\r\n }\r\n if (component == \"taglio\") {\r\n model[component] = false;\r\n model.tipoTaglio = false;\r\n }\r\n }\r\n }\r\n return model;\r\n };\r\n //not finished, method that hode lavorazine\r\n ExcludingComponent.prototype.hideLavorazioneValue = function (model, component, regole, macro) {\r\n switch (this.getLowerCase(macro)) {\r\n case \"editoria\":\r\n {\r\n for (var key in model.lavorazioniAccessorie) {\r\n try {\r\n if (model.lavorazioniAccessorie[key] != null) {\r\n if (model.lavorazioniAccessorie[key].id == component) {\r\n if (parseInt(model.lavorazioniAccessorie[key].tipo) == this.components.selectBox) {\r\n for (var subKey in model.lavorazioniAccessorie[key].valori) {\r\n if (model.lavorazioniAccessorie[key].valori[subKey].chiave == regole.Id_Elemento_Sottochiave_2) {\r\n model.lavorazioniAccessorie[key].valori[subKey].isVisible = false;\r\n model.lavorazioniAccessorie[key].valori[subKey].chiave = 0;\r\n }\r\n }\r\n }\r\n else if (model.lavorazioniAccessorie[key].tipo == this.components.checkBox) {\r\n model.lavorazioniAccessorie[key].value = false;\r\n model.lavorazioniAccessorie[key].isVisible = false;\r\n }\r\n else if (model.lavorazioniAccessorie[key].tipo == this.components.inputBox) {\r\n model.lavorazioniAccessorie[key].value = \"\";\r\n model.lavorazioniAccessorie[key].isVisible = false;\r\n ;\r\n }\r\n }\r\n }\r\n }\r\n catch (Exception) { }\r\n }\r\n }\r\n }\r\n return model;\r\n };\r\n /// hidding option from regole id_element2\r\n ExcludingComponent.prototype.hideSelectValue = function (model, regole, macro, elemento) {\r\n switch (this.getLowerCase(regole.Categoria_2)) {\r\n case \"carta\":\r\n case \"carta copertina\": { }\r\n case \"finitura\":\r\n {\r\n var sezioneInput = this.getModelItemName(this.getLowerCase(regole.Sezione_2));\r\n model = this.hideFinituraValue(model, sezioneInput, regole, macro);\r\n }\r\n case \"accessoria\":\r\n {\r\n if (this.getLowerCase(regole.Categoria_1) == \"accessoria\") {\r\n for (var key in model.lavorazioniAccessorie) {\r\n if (model.lavorazioniAccessorie[key].tipo == this.components.checkBox && model.lavorazioniAccessorie[key].id == regole.Id_Elemento_1) {\r\n if ((model.lavorazioniAccessorie[key].value == false && regole.Id_Elemento_Sottochiave_1 == 2) || (model.lavorazioniAccessorie[key].value == true && regole.Id_Elemento_Sottochiave_1 == 1) || regole.Id_Elemento_Sottochiave_1 == 0) {\r\n model = this.hideLavorazioneValue(model, this.getLowerCase(regole.Id_Elemento_2), regole, macro);\r\n }\r\n }\r\n else if (model.lavorazioniAccessorie[key].tipo != this.components.checkBox) { }\r\n }\r\n }\r\n else {\r\n model = this.hideLavorazioneValue(model, this.getLowerCase(regole.Id_Elemento_2), regole, macro);\r\n }\r\n }\r\n case \"busta\": { }\r\n default: { }\r\n }\r\n return model;\r\n };\r\n //method to get lower case in implement method we get error for null etc\r\n ExcludingComponent.prototype.getLowerCase = function (inputString) {\r\n var outString = \"\";\r\n try {\r\n outString = inputString.toLowerCase();\r\n }\r\n catch (Exception) {\r\n outString = inputString;\r\n }\r\n return outString;\r\n };\r\n // Get excluding rules for certain component, and from category_1 choise witch\r\n ExcludingComponent.prototype.setSelectRules = function (model, rulesList, categoria, sezione, elemento, sotoelemento, macro) {\r\n var regoleList = this.getRegole(rulesList, categoria, sezione);\r\n if (regoleList) {\r\n var regole = null;\r\n if (this.getLowerCase(categoria) == \"accessoria\") {\r\n if (elemento == true) {\r\n elemento = 1;\r\n }\r\n else {\r\n elemento = 0;\r\n }\r\n regole = regoleList;\r\n if (!regole) {\r\n regole = this.filter(regoleList, \"Id_Elemento_Sottochiave_1\", \"\");\r\n }\r\n }\r\n else {\r\n regole = this.filter(regoleList, \"Id_Elemento_1\", elemento);\r\n if (!regole) {\r\n regole = this.filter(regoleList, \"Id_Elemento_1\", \"\");\r\n }\r\n }\r\n if (regole) {\r\n for (var regoleKey in regole) {\r\n model = this.hideSelectValue(model, regole[regoleKey], macro, elemento);\r\n }\r\n }\r\n else { }\r\n }\r\n else { }\r\n return model;\r\n };\r\n /// \"PF\" \r\n /// \"FINITURA\"\r\n /// \"FORMATO\"\r\n /// \"EDITORIA\"\r\n /// null \r\n /// null\r\n ExcludingComponent.prototype.ResetRegole = function (tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct) {\r\n if (responseModelOtherProduct === void 0) { responseModelOtherProduct = []; }\r\n var regoleToReset = this.FindRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel);\r\n var flagReset;\r\n for (var _i = 0, regoleToReset_1 = regoleToReset; _i < regoleToReset_1.length; _i++) {\r\n var regola = regoleToReset_1[_i];\r\n if (this.CheckMacroCategoria(regola, this.Macrocategory)) {\r\n flagReset = true;\r\n this.ApplicaRegola(regola, flagReset, responseModel, responseModelOtherProduct);\r\n }\r\n }\r\n };\r\n ExcludingComponent.prototype.ApplicaRegole = function (tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct) {\r\n if (responseModelOtherProduct === void 0) { responseModelOtherProduct = []; }\r\n //console.log(\"ApplicaRegole\");\r\n var regoleToApply = this.FindRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel);\r\n var flagReset;\r\n for (var _i = 0, regoleToApply_1 = regoleToApply; _i < regoleToApply_1.length; _i++) {\r\n var regola = regoleToApply_1[_i];\r\n //console.log(regola)\r\n if (this.CheckMacroCategoria(regola, this.Macrocategory)) {\r\n flagReset = false;\r\n this.ApplicaRegola(regola, flagReset, responseModel, responseModelOtherProduct);\r\n }\r\n }\r\n };\r\n ExcludingComponent.prototype.ApplicaRegola = function (regola, flagReset, responseModel, responseModelOtherProduct) {\r\n if (responseModelOtherProduct === void 0) { responseModelOtherProduct = []; }\r\n var hideOrShow;\r\n if (flagReset == false) {\r\n hideOrShow = \"hide\";\r\n }\r\n else {\r\n hideOrShow = \"show\";\r\n }\r\n if (regola.Tipo_Regola == \"ESCLUDE\") {\r\n if (regola.Categoria_2 == \"CARTA\") {\r\n //In questo caso è stata esclusa una carta e/o grammatura\r\n var idElemento = regola.Id_Elemento_2;\r\n var idSottoElemento = regola.Id_Elemento_Sottochiave_2;\r\n //Se la sottochiave non è valorizzata bisogna escludere l'intera carta, \r\n //altrimenti una singola grammatura (solo per la relativa carta)\r\n if (idSottoElemento == null || idSottoElemento == 0) {\r\n var attributo = regola.Categoria_2;\r\n this.hideOrShowComboItem(\"CARTA\", idElemento, hideOrShow, responseModel);\r\n }\r\n else {\r\n if (responseModel.idCarte1 != null) {\r\n var data = responseModel.idCarte1.split(\"_\");\r\n var idCarta = data[0];\r\n //Se la carta scelta è quella della regola, allora viene nascosta la grammatura\r\n if (idCarta == idElemento) {\r\n this.hideOrShowComboItem(\"GRAMMATURA_CARTA\", idSottoElemento, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n }\r\n else if (regola.Categoria_2 == \"CARTA_COPERTINA\") {\r\n //In questo caso è stata esclusa una carta e/o grammatura\r\n var idElemento = regola.Id_Elemento_2;\r\n var idSottoElemento = regola.Id_Elemento_Sottochiave_2;\r\n //Se la sottochiave non è valorizzata bisogna escludere l'intera carta, \r\n //altrimenti una singola grammatura (solo per la relativa carta)\r\n if (idSottoElemento == null || idSottoElemento == 0) {\r\n var attributo = regola.Categoria_2;\r\n this.hideOrShowComboItem(\"CARTA_COPERTINA\", idElemento, hideOrShow, responseModel);\r\n }\r\n else {\r\n if (responseModel.idCarte2 != null) {\r\n var data = responseModel.idCarte2.split(\"_\");\r\n var idCarta = data[0];\r\n //Se la carta scelta è quella della regola, allora viene nascosta la grammatura\r\n if (idCarta == idElemento) {\r\n this.hideOrShowComboItem(\"GRAMMATURA_CARTA_COPERTINA\", idSottoElemento, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n }\r\n else if (regola.Categoria_2 == \"FINITURA\") {\r\n var sezione = regola.Sezione_2;\r\n var idElemento_1 = regola.Id_Elemento_2;\r\n if (sezione == \"TAGLIO\") {\r\n this.hideOrShowAttribute(\"TAGLIO\", hideOrShow, responseModel);\r\n }\r\n else if (sezione == \"STAMPA_BIFACCIALE\") {\r\n this.hideOrShowComboItem(sezione, idElemento_1, hideOrShow, responseModel);\r\n }\r\n else if (sezione == \"BIANCO_COPRENTE\") {\r\n if (idElemento_1 == \"1\") {\r\n this.hideOrShowComboItem(sezione, \"0\", hideOrShow, responseModel);\r\n }\r\n else if (idElemento_1 == \"2\") {\r\n this.hideOrShowComboItem(sezione, \"1\", hideOrShow, responseModel);\r\n }\r\n else if (idElemento_1 == \"3\") {\r\n this.hideOrShowComboItem(sezione, \"2\", hideOrShow, responseModel);\r\n }\r\n }\r\n else {\r\n this.hideOrShowComboItem(sezione, idElemento_1, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (regola.Categoria_2 == \"SUPPORTO_RIGIDO\") {\r\n //In questo caso è stato escluso un supporto rigido\r\n var idElemento = regola.Id_Elemento_2;\r\n this.hideOrShowComboItem(\"SUPPORTO_RIGIDO\", idElemento, hideOrShow, responseModel);\r\n }\r\n else if (regola.Categoria_2 == \"MATERIALE_FLESSIBILE\") {\r\n //In questo caso è stato escluso un supporto rigido\r\n var idElemento = regola.Id_Elemento_2;\r\n this.hideOrShowComboItem(\"MATERIALE_FLESSIBILE\", idElemento, hideOrShow, responseModel);\r\n }\r\n else if (regola.Categoria_2 == \"ACCESSORIA\") {\r\n var idLavorazione = regola.Id_Elemento_2;\r\n var idVariante = regola.Id_Elemento_Sottochiave_2;\r\n this.hideOrShowLavorazioneAccessoria(idLavorazione, idVariante, hideOrShow, responseModel, responseModelOtherProduct);\r\n }\r\n }\r\n };\r\n ExcludingComponent.prototype.hideOrShowAttribute = function (attributo, hideOrShow, responseModel) {\r\n if (attributo == \"TAGLIO\") {\r\n if (hideOrShow == \"hide\") {\r\n responseModel.isTaglioVisible = true;\r\n }\r\n else if (hideOrShow == \"show\") {\r\n responseModel.isTaglioVisible = false;\r\n }\r\n }\r\n };\r\n ExcludingComponent.prototype.hideOrShowComboItem = function (attributo, id, hideOrShow, responseModel) {\r\n //console.log(\"hideOrShowComboItem\")\r\n //console.log(this.Macrocategory)\r\n //console.log(id)\r\n //console.log(hideOrShow)\r\n //console.log(attributo)\r\n //console.log(\"finehideOrShowComboItem\")\r\n if (this.Macrocategory == \"EDITORIA\") {\r\n if (attributo == \"CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"CARTA_COPERTINA\") {\r\n this.hideOrShowRadComboItem(responseModel.carte2, \"CARTA_COPERTINA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"GRAMMATURA_CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n this.hideOrShowRadComboItem(responseModel.grammature2, \"GRAMMATURA_CARTA_COPERTINA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"PLASTIFICAZIONE\") {\r\n //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.plastificazioni2, \"PLASTIFICAZIONE_COPERTINA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.plastificazioni2, \"PLASTIFICAZIONE_COPERTINA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"FORMATO\") {\r\n this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"COPERTINA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.copertine, \"COPERTINA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.copertine, \"COPERTINA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"RILEGATURA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.rilegature, \"RILEGATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.rilegature, \"RILEGATURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n else if (this.Macrocategory == \"COMMERCIALE\") {\r\n if (attributo == \"CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"GRAMMATURA_CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"PLASTIFICAZIONE\") {\r\n //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"FORMATO\") {\r\n this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"PIEGATURA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.piegature, \"PIEGATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.piegature, \"PIEGATURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n else if (this.Macrocategory == \"ETICHETTE\") {\r\n if (attributo == \"CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"GRAMMATURA_CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"PLASTIFICAZIONE\") {\r\n //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"FORMATO\") {\r\n this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"FUSTELLATURA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.tagli, \"FUSTELLATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.tagli, \"FUSTELLATURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n else if (this.Macrocategory == \"ADESIVI\" || this.Macrocategory == \"MANIFESTI\" || this.Macrocategory == \"PANNELLI\" || this.Macrocategory == \"STAMPA_DIRETTA\") {\r\n if (attributo == \"PLASTIFICAZIONE\") {\r\n //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"FORMATO\") {\r\n this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"SUPPORTO_RIGIDO\") {\r\n this.hideOrShowRadComboItem(responseModel.supportiRigidi, \"SUPPORTO_RIGIDO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"MATERIALE_FLESSIBILE\") {\r\n this.hideOrShowRadComboItem(responseModel.materialiFlessibili, \"MATERIALE_FLESSIBILE\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"BIANCO_COPRENTE\") {\r\n //Se l'id dell'elemento non è settato vengono nascoste tutto il bianco coprente\r\n this.hideOrShowRadComboItem(responseModel.biancoCoprente, \"BIANCO_COPRENTE\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"STAMPA_BIFACCIALE\") {\r\n if (hideOrShow == \"hide\") {\r\n if (id == \"1\") {\r\n responseModel.isStampaBifaccialeNoHide = true;\r\n responseModel.tipoBifacciale = \"1\";\r\n }\r\n else {\r\n responseModel.isStampaBifaccialeSiHide = true;\r\n responseModel.tipoBifacciale = \"0\";\r\n }\r\n }\r\n else {\r\n responseModel.isStampaBifaccialeNoHide = false;\r\n responseModel.isStampaBifaccialeSiHide = false;\r\n }\r\n }\r\n else if (attributo == \"FUSTELLATURA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.tagli, \"FUSTELLATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.tagli, \"FUSTELLATURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n else if (this.Macrocategory == \"BANDIERE\" || this.Macrocategory == \"BANNER\") {\r\n if (attributo == \"FORMATO\") {\r\n this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"OCCHIELLATURA\") {\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.occhielli, \"OCCHIELLATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.occhielli, \"OCCHIELLATURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"ASOLA\") {\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.asole, \"ASOLA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.asole, \"ASOLA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"CUCITURA\") {\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.cuciture, \"CUCITURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.cuciture, \"CUCITURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"ELETTROSALDATURA\") {\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.elettrosaldature, \"ELETTROSALDATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.elettrosaldature, \"ELETTROSALDATURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"MATERIALE_FLESSIBILE\") {\r\n this.hideOrShowRadComboItem(responseModel.materialiFlessibili, \"MATERIALE_FLESSIBILE\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n };\r\n ExcludingComponent.prototype.hideOrShowAllRadComboItems = function (parameterList, tipo, hideOrShow, responseModel) {\r\n var emptyValue;\r\n if (tipo == \"COPERTINA\") {\r\n emptyValue = \"0\";\r\n }\r\n else {\r\n emptyValue = \"-1\";\r\n }\r\n var selected = false;\r\n for (var _i = 0, parameterList_1 = parameterList; _i < parameterList_1.length; _i++) {\r\n var parameter = parameterList_1[_i];\r\n if (hideOrShow == \"show\") {\r\n parameter.isVisible = true;\r\n if (selected == false) {\r\n if (tipo == \"RILEGATURA\") {\r\n if (responseModel.idRilegature == \"-1\") {\r\n responseModel.idRilegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n if (responseModel.idPiegature == \"-1\") {\r\n responseModel.idPiegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n if (responseModel.idOcchielli == \"-1\") {\r\n responseModel.idOcchielli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n if (responseModel.idCuciture == \"-1\") {\r\n responseModel.idCuciture = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n if (responseModel.idElettrosaldature == \"-1\") {\r\n responseModel.idElettrosaldature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n if (responseModel.idAsole == \"-1\") {\r\n responseModel.idAsole = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n if (responseModel.idTagli == \"-1\") {\r\n responseModel.idTagli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n if (responseModel.idPlastificazioni1 == \"-1\") {\r\n responseModel.idPlastificazioni1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n if (responseModel.idPlastificazioni2 == \"-1\") {\r\n responseModel.idPlastificazioni2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (responseModel.idCopertine == \"-1\") {\r\n responseModel.idCopertine = parameter.chiave;\r\n }\r\n }\r\n selected = true;\r\n }\r\n }\r\n else if (hideOrShow == \"hide\") {\r\n if (parameter.chiave != emptyValue) {\r\n parameter.isVisible = false;\r\n }\r\n else {\r\n if (selected == false && parameter.isVisible == true) {\r\n if (tipo == \"RILEGATURA\") {\r\n if (responseModel.idRilegature == emptyValue) {\r\n responseModel.idRilegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n if (responseModel.idPiegature == emptyValue) {\r\n responseModel.idPiegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n if (responseModel.idOcchielli == emptyValue) {\r\n responseModel.idOcchielli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n if (responseModel.idCuciture == emptyValue) {\r\n responseModel.idCuciture = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n if (responseModel.idElettrosaldature == emptyValue) {\r\n responseModel.idElettrosaldature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n if (responseModel.idAsole == emptyValue) {\r\n responseModel.idAsole = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n if (responseModel.idTagli == emptyValue) {\r\n responseModel.idTagli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n if (responseModel.idPlastificazioni1 == emptyValue) {\r\n responseModel.idPlastificazioni1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n if (responseModel.idPlastificazioni2 == emptyValue) {\r\n responseModel.idPlastificazioni2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (responseModel.idCopertine == emptyValue) {\r\n responseModel.idCopertine = parameter.chiave;\r\n }\r\n }\r\n selected = true;\r\n }\r\n }\r\n }\r\n if (selected == false) {\r\n if (tipo == \"RILEGATURA\") {\r\n responseModel.idRilegature = \"-1\";\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n responseModel.idPiegature = \"-1\";\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n responseModel.idTagli = \"-1\";\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n responseModel.idOcchielli = \"-1\";\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n responseModel.idCuciture = \"-1\";\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n responseModel.idElettrosaldature = \"-1\";\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n responseModel.idAsole = \"-1\";\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n responseModel.idPlastificazioni1 = \"-1\";\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n responseModel.idPlastificazioni2 = \"-1\";\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n responseModel.idCopertine = \"-1\";\r\n }\r\n }\r\n }\r\n };\r\n ExcludingComponent.prototype.hideOrShowRadComboItem = function (parameterList, tipo, id, hideOrShow, responseModel) {\r\n //Recupero delle info sulla combo\r\n var selected = false;\r\n for (var _i = 0, parameterList_2 = parameterList; _i < parameterList_2.length; _i++) {\r\n var parameter = parameterList_2[_i];\r\n //Se l'elemento non è il valore 'Scegli' (-1) o vuoto, non bisogna considerarlo\r\n //Tranne per la copertina, dove -1 corrisponde all'autocopertinato, che può essere escluso\r\n if (tipo != \"COPERTINA\" && (parameter.chiave == \"-1\" || parameter.chiave == null)) {\r\n continue;\r\n }\r\n else {\r\n var idElemento;\r\n if (tipo == \"CARTA\"\r\n || tipo == \"CARTA_COPERTINA\"\r\n || (this.Macrocategory == \"ETICHETTE\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"STAMPA_DIRETTA\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"PANNELLI\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"BANDIERE\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"MANIFESTI\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"BANNER\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"ADESIVI\" && tipo == \"FORMATO\")) {\r\n var data = parameter.chiave.split(\"_\");\r\n idElemento = data[0];\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (parameter.chiave == \"0\") {\r\n //Il value dell'option della combo per l'autocopertina è il valore vuoto,\r\n //inveCe per le regole il valore dell'autocopertinato è -1, quindi occorre una conversione\r\n idElemento = \"-1\";\r\n }\r\n else {\r\n idElemento = parameter.chiave;\r\n }\r\n }\r\n else {\r\n idElemento = parameter.chiave;\r\n }\r\n if (hideOrShow == \"show\") {\r\n if (idElemento == id) {\r\n parameter.isVisible = true;\r\n if (selected == false) {\r\n if (tipo == \"RILEGATURA\") {\r\n if (responseModel.idRilegature == \"-1\") {\r\n responseModel.idRilegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n if (responseModel.idMaterialiFlessibili == \"-1\") {\r\n responseModel.idMaterialiFlessibili = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n if (responseModel.idSupportiRigidi == \"-1\") {\r\n responseModel.idSupportiRigidi = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n if (responseModel.idOcchielli == \"-1\") {\r\n responseModel.idOcchielli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n if (responseModel.idCuciture == \"-1\") {\r\n responseModel.idCuciture = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n if (responseModel.idElettrosaldature == \"-1\") {\r\n responseModel.idElettrosaldature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n if (responseModel.idAsole == \"-1\") {\r\n responseModel.idAsole = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n if (responseModel.idPiegature == \"-1\") {\r\n responseModel.idPiegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n if (responseModel.idTagli == \"-1\") {\r\n responseModel.idTagli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA\") {\r\n var data = responseModel.idCarte1.split(\"_\");\r\n var idCarta = data[0];\r\n if (idCarta == \"-1\") {\r\n responseModel.idCarte1 = parameter.chiave;\r\n responseModel.grammature1 = parameter.subElements;\r\n responseModel.idGrammature1 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA\") {\r\n if (responseModel.idGrammature1 == \"-1\") {\r\n responseModel.idGrammature1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA_COPERTINA\") {\r\n var data = responseModel.idCarte2.split(\"_\");\r\n var idCarta = data[0];\r\n if (idCarta == \"-1\") {\r\n responseModel.idCarte2 = parameter.chiave;\r\n responseModel.grammature2 = parameter.subElements;\r\n responseModel.idGrammature2 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n if (responseModel.idGrammature2 == \"-1\") {\r\n responseModel.idGrammature2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FORMATO\") {\r\n if (responseModel.idFormati == \"-1\") {\r\n responseModel.idFormati = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n if (responseModel.idPlastificazioni1 == \"-1\") {\r\n responseModel.idPlastificazioni1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n if (responseModel.idPlastificazioni2 == \"-1\") {\r\n responseModel.idPlastificazioni2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (responseModel.idCopertine == \"-1\") {\r\n responseModel.idCopertine = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"BIANCO_COPRENTE\") {\r\n if (responseModel.idBiancoCoprente == \"-1\") {\r\n responseModel.idBiancoCoprente = parameter.chiave;\r\n }\r\n }\r\n selected = true;\r\n }\r\n }\r\n else {\r\n if (selected == false) {\r\n if (tipo == \"RILEGATURA\") {\r\n if (responseModel.idRilegature == \"-1\") {\r\n responseModel.idRilegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n if (responseModel.idMaterialiFlessibili == \"-1\") {\r\n responseModel.idMaterialiFlessibili = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n if (responseModel.idSupportiRigidi == \"-1\") {\r\n responseModel.idSupportiRigidi = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n if (responseModel.idOcchielli == \"-1\") {\r\n responseModel.idOcchielli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n if (responseModel.idCuciture == \"-1\") {\r\n responseModel.idCuciture = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n if (responseModel.idElettrosaldature == \"-1\") {\r\n responseModel.idElettrosaldature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n if (responseModel.idAsole == \"-1\") {\r\n responseModel.idAsole = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n if (responseModel.idPiegature == \"-1\") {\r\n responseModel.idPiegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n if (responseModel.idTagli == \"-1\") {\r\n responseModel.idTagli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA\") {\r\n var data = responseModel.idCarte1.split(\"_\");\r\n var idCarta = data[0];\r\n if (idCarta == \"-1\") {\r\n responseModel.idCarte1 = parameter.chiave;\r\n responseModel.grammature1 = parameter.subElements;\r\n responseModel.idGrammature1 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA\") {\r\n if (responseModel.idGrammature1 == \"-1\") {\r\n responseModel.idGrammature1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA_COPERTINA\") {\r\n var data = responseModel.idCarte2.split(\"_\");\r\n var idCarta = data[0];\r\n if (idCarta == \"-1\") {\r\n responseModel.idCarte2 = parameter.chiave;\r\n responseModel.grammature2 = parameter.subElements;\r\n responseModel.idGrammature2 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n if (responseModel.idGrammature2 == \"-1\") {\r\n responseModel.idGrammature2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FORMATO\") {\r\n if (responseModel.idFormati == \"-1\") {\r\n responseModel.idFormati = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n if (responseModel.idPlastificazioni1 == \"-1\") {\r\n responseModel.idPlastificazioni1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n if (responseModel.idPlastificazioni2 == \"-1\") {\r\n responseModel.idPlastificazioni2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (responseModel.idCopertine == \"-1\") {\r\n responseModel.idCopertine = parameter.chiave;\r\n }\r\n }\r\n selected = true;\r\n }\r\n }\r\n }\r\n else if (hideOrShow == \"hide\") {\r\n if (idElemento == id) {\r\n parameter.isVisible = false;\r\n }\r\n else {\r\n if (selected == false && parameter.isVisible == true) {\r\n if (tipo == \"RILEGATURA\") {\r\n if (responseModel.idRilegature == id) {\r\n responseModel.idRilegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n if (responseModel.idMaterialiFlessibili == id) {\r\n responseModel.idMaterialiFlessibili = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n if (responseModel.idSupportiRigidi == id) {\r\n responseModel.idSupportiRigidi = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n if (responseModel.idOcchielli == id) {\r\n responseModel.idOcchielli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n if (responseModel.idCuciture == id) {\r\n responseModel.idCuciture = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n if (responseModel.idElettrosaldature == id) {\r\n responseModel.idElettrosaldature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n if (responseModel.idAsole == id) {\r\n responseModel.idAsole = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n if (responseModel.idPiegature == id) {\r\n responseModel.idPiegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n if (responseModel.idTagli == id) {\r\n responseModel.idTagli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA\") {\r\n var data = responseModel.idCarte1.split(\"_\");\r\n var idCarta = data[0];\r\n if (idCarta == id) {\r\n responseModel.idCarte1 = parameter.chiave;\r\n responseModel.grammature1 = parameter.subElements;\r\n responseModel.idGrammature1 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA\") {\r\n if (responseModel.idGrammature1 == id) {\r\n responseModel.idGrammature1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA_COPERTINA\") {\r\n var data = responseModel.idCarte2.split(\"_\");\r\n var idCarta = data[0];\r\n if (idCarta == id) {\r\n responseModel.idCarte2 = parameter.chiave;\r\n responseModel.grammature2 = parameter.subElements;\r\n responseModel.idGrammature2 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n if (responseModel.idGrammature2 == id) {\r\n responseModel.idGrammature2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FORMATO\") {\r\n if (this.Macrocategory == \"ETICHETTE\"\r\n || this.Macrocategory == \"ADESIVI\"\r\n || this.Macrocategory == \"PANNELLI\"\r\n || this.Macrocategory == \"MANIFESTI\"\r\n || this.Macrocategory == \"STAMPA_DIRETTA\"\r\n || this.Macrocategory == \"BANDIERE\"\r\n || this.Macrocategory == \"BANNER\") {\r\n var data = responseModel.idFormati.split(\"_\");\r\n var idFormato = data[0];\r\n if (idFormato == id) {\r\n responseModel.idFormati = parameter.chiave;\r\n }\r\n }\r\n else {\r\n if (responseModel.idFormati == id) {\r\n responseModel.idFormati = parameter.chiave;\r\n }\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n if (responseModel.idPlastificazioni1 == id) {\r\n responseModel.idPlastificazioni1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n if (responseModel.idPlastificazioni2 == id) {\r\n responseModel.idPlastificazioni2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (responseModel.idCopertine == id) {\r\n responseModel.idCopertine = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"BIANCO_COPRENTE\") {\r\n if (responseModel.idBiancoCoprente == id) {\r\n responseModel.idBiancoCoprente = parameter.chiave;\r\n }\r\n }\r\n selected = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (selected == false) {\r\n if (tipo == \"RILEGATURA\") {\r\n responseModel.idRilegature = \"-1\";\r\n }\r\n else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n responseModel.idMaterialiFlessibili = \"-1\";\r\n }\r\n else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n responseModel.idSupportiRigidi = \"-1\";\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n responseModel.idOcchielli = \"-1\";\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n responseModel.idCuciture = \"-1\";\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n responseModel.idElettrosaldature = \"-1\";\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n responseModel.idAsole = \"-1\";\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n responseModel.idPiegature = \"-1\";\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n responseModel.idTagli = \"-1\";\r\n }\r\n else if (tipo == \"CARTA\") {\r\n responseModel.idCarte1 = \"-1\";\r\n responseModel.grammature1 = new Array();\r\n responseModel.idGrammature1 = \"-1\";\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA\") {\r\n responseModel.idGrammature1 = \"-1\";\r\n }\r\n else if (tipo == \"CARTA_COPERTINA\") {\r\n responseModel.idCarte2 = \"-1\";\r\n responseModel.grammature2 = new Array();\r\n responseModel.idGrammature2 = \"-1\";\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n responseModel.idGrammature2 = \"-1\";\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n responseModel.idPlastificazioni1 = \"-1\";\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n responseModel.idPlastificazioni2 = \"-1\";\r\n }\r\n else if (tipo == \"FORMATO\") {\r\n responseModel.idFormati = \"-1\";\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n responseModel.idCopertine = \"-1\";\r\n }\r\n else if (tipo == \"BIANCO_COPRENTE\") {\r\n responseModel.idBiancoCoprente = \"0\";\r\n }\r\n }\r\n };\r\n /// \"PF\" \r\n /// \"FINITURA\"\r\n /// \"FORMATO\"\r\n /// \"EDITORIA\"\r\n /// null \r\n /// null\r\n ExcludingComponent.prototype.FindRegole = function (tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel) {\r\n var regole = new Array();\r\n for (var _i = 0, _a = responseModel.listaRegole; _i < _a.length; _i++) {\r\n var regola = _a[_i];\r\n //console.log(\"FindRegole(\" + tipo + \",\" + categoria + \",\" + sezione + \",\" + macroCategoria + \",\" + elemento + \",\" + sottoElemento + \")\");\r\n if (regola.Tipo == tipo\r\n && regola.Categoria_1 == categoria && regola.Sezione_1 == sezione\r\n && regola.Macro_Categoria_1 == macroCategoria) {\r\n //console.log(\"regola (\" + regola.Tipo + \",\" + regola.Categoria_1 + \",\" + regola.Sezione_1 + \",\" + regola.Macro_Categoria_1 + \",\" + regola.Id_Elemento_1 + \",\" + regola.Id_Elemento_Sottochiave_1 + \")\");\r\n if (elemento != null && regola.Id_Elemento_1 == elemento) {\r\n if (sottoElemento != null && regola.Id_Elemento_Sottochiave_1 == sottoElemento) {\r\n regole.push(regola);\r\n }\r\n else if (sottoElemento == null || regola.Id_Elemento_Sottochiave_1 == 0) {\r\n regole.push(regola);\r\n }\r\n }\r\n else if (elemento == null) {\r\n regole.push(regola);\r\n }\r\n }\r\n }\r\n //console.log(regole.length);\r\n return regole;\r\n };\r\n ExcludingComponent.prototype.CheckMacroCategoria = function (regola, macroCategoria) {\r\n var result = false;\r\n if (regola.Macro_Categoria_2 == null || regola.Macro_Categoria_2 == \"\") {\r\n result = true;\r\n }\r\n else if (regola.Macro_Categoria_2 != null && regola.Macro_Categoria_2.toUpperCase() == macroCategoria.toUpperCase()) {\r\n result = true;\r\n }\r\n return result;\r\n };\r\n ExcludingComponent.prototype.ApplicaRegoleLavorazioniAccessorie = function (tipo, macroCategoria, responseModel, responseModelOtherProduct) {\r\n if (responseModelOtherProduct === void 0) { responseModelOtherProduct = []; }\r\n var categoria = \"ACCESSORIA\";\r\n var sezione = \"\";\r\n var elemento;\r\n var sottoElemento;\r\n //Lettura della lista delle lavorazioni accessorie\r\n //Vengono applicate le regole per ogni lavorazione accessoria\r\n for (var _i = 0, _a = responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioneAccessoria = _a[_i];\r\n elemento = lavorazioneAccessoria.id;\r\n var tipoLavorazioneAccessoria = void 0;\r\n if (lavorazioneAccessoria.tipo == \"0\") {\r\n tipoLavorazioneAccessoria = \"check\";\r\n }\r\n else if (lavorazioneAccessoria.tipo == \"2\") {\r\n tipoLavorazioneAccessoria = \"select\";\r\n }\r\n else if (lavorazioneAccessoria.tipo == \"6\") {\r\n tipoLavorazioneAccessoria = \"textarea\";\r\n }\r\n //Per le lavorazioni di tipo combo bisogna leggere il valore della select\r\n //Invece se si tratta di una check bisogna vedere se è checkata o meno.\r\n if (tipoLavorazioneAccessoria == \"check\") {\r\n sottoElemento = null;\r\n //se la lavorazione è stata checkata allora vengono applicate le eventuali regole associate\r\n if (lavorazioneAccessoria.lavorazioneCheckValue == false || lavorazioneAccessoria.lavorazioneCheckValue == \"false\" || lavorazioneAccessoria.tipoSelezione == 'nascosto') {\r\n sottoElemento = \"1\"; //Corrispone a No nella regola\r\n }\r\n else if (lavorazioneAccessoria.lavorazioneCheckValue) {\r\n sottoElemento = \"2\"; //Corrispone a Si nella regola\r\n }\r\n this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n }\r\n else if (tipoLavorazioneAccessoria == \"select\") {\r\n sottoElemento = this.getComboValue(\"ACCESSORIA\", lavorazioneAccessoria.valore, lavorazioneAccessoria);\r\n this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n }\r\n else if (tipoLavorazioneAccessoria = \"textarea\") {\r\n sottoElemento = '0';\r\n this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n }\r\n }\r\n };\r\n ExcludingComponent.prototype.getComboValue = function (attributo, id, lavorazioneAccessoria) {\r\n var value = \"\";\r\n //Controllo prima se si tratta di una lavorazione accessoria, dato che la loro gestione è uguale per tutte le macrocategorie\r\n if (attributo == \"ACCESSORIA\") {\r\n //Lettura di tutta la lista delle lavorazioni accessorie\r\n for (var _i = 0, _a = lavorazioneAccessoria.valori; _i < _a.length; _i++) {\r\n var varianti = _a[_i];\r\n //console.log(varianti)\r\n var item = varianti;\r\n var display = varianti.isVisible;\r\n //Lettura dell'id della lavorazione corrente\r\n var idLav = item.chiave;\r\n var tipoLavorazione = lavorazioneAccessoria.tipo;\r\n var idLavAcc = lavorazioneAccessoria.valore;\r\n if (id == idLav) {\r\n //Se la riga non è mostrata viene considerata come non selezionata\r\n if (display == false) {\r\n value = \"-1\";\r\n }\r\n else {\r\n //Lettura del valore selezionato nella select\r\n value = idLav;\r\n break;\r\n }\r\n }\r\n }\r\n return value;\r\n }\r\n };\r\n ExcludingComponent.prototype.hideOrShowLavorazioneAccessoria = function (idLavorazione, idVariante, hideOrShow, responseModel, responseModelOtherProduct) {\r\n if (responseModelOtherProduct === void 0) { responseModelOtherProduct = []; }\r\n for (var _i = 0, _a = responseModel.lavorazioniAccessorie; _i < _a.length; _i++) {\r\n var lavorazioneAccessoria = _a[_i];\r\n var tipoLavorazione = lavorazioneAccessoria.tipo;\r\n var idLavAcc = lavorazioneAccessoria.id;\r\n if (idLavAcc == idLavorazione) {\r\n if (tipoLavorazione == \"2\") {\r\n var comboItemNumber = -1;\r\n if (idVariante == null || idVariante == 0) {\r\n if (hideOrShow == \"hide\") {\r\n lavorazioneAccessoria.isVisible = false;\r\n }\r\n else if (hideOrShow == \"show\") {\r\n lavorazioneAccessoria.isVisible = true;\r\n }\r\n }\r\n else {\r\n var selected = false;\r\n for (var _b = 0, _c = lavorazioneAccessoria.valori; _b < _c.length; _b++) {\r\n var variante = _c[_b];\r\n if (hideOrShow == \"hide\") {\r\n if (variante.chiave == idVariante) {\r\n variante.isVisible = false;\r\n //-- If type is combobox and we want to hide just one combo option, we will send it's id\r\n comboItemNumber = idVariante;\r\n }\r\n }\r\n else if (hideOrShow == \"show\") {\r\n variante.isVisible = true;\r\n if (selected == false) {\r\n if (lavorazioneAccessoria.valore == \"-1\") {\r\n lavorazioneAccessoria.valore = variante.chiave;\r\n }\r\n selected = true;\r\n }\r\n }\r\n }\r\n var firstVariableVisible = 0;\r\n for (var _d = 0, _e = lavorazioneAccessoria.valori; _d < _e.length; _d++) {\r\n var variante = _e[_d];\r\n if (firstVariableVisible == 0) {\r\n if (variante.isVisible == true) {\r\n firstVariableVisible = variante.chiave;\r\n }\r\n }\r\n if (lavorazioneAccessoria.valore == variante.chiave) {\r\n if (variante.isVisible == true) {\r\n selected = true;\r\n }\r\n }\r\n }\r\n if (selected == false && firstVariableVisible == 0) {\r\n lavorazioneAccessoria.valore = \"-1\";\r\n }\r\n else if (selected == false) {\r\n lavorazioneAccessoria.valore = firstVariableVisible;\r\n }\r\n }\r\n this.reflectChangesOnOtherProducts(responseModelOtherProduct, hideOrShow, lavorazioneAccessoria, comboItemNumber);\r\n }\r\n else {\r\n if (hideOrShow == \"hide\") {\r\n lavorazioneAccessoria.isVisible = false;\r\n }\r\n else if (hideOrShow == \"show\") {\r\n lavorazioneAccessoria.isVisible = true;\r\n }\r\n this.reflectChangesOnOtherProducts(responseModelOtherProduct, hideOrShow, lavorazioneAccessoria);\r\n }\r\n }\r\n }\r\n };\r\n /*-- In other products we don't use lavorazzioniAccessorie object but gruppi,\r\n so for every change on one object we need to reflect it on the another one */\r\n ExcludingComponent.prototype.reflectChangesOnOtherProducts = function (responseModelOtherProduct, hideOrShow, lavorazioneAccessoria, comboItemNumber) {\r\n if (comboItemNumber === void 0) { comboItemNumber = -1; }\r\n if (responseModelOtherProduct === undefined || responseModelOtherProduct.length == 0)\r\n return;\r\n var idLavorazione = lavorazioneAccessoria.id;\r\n var isFoundElement = false;\r\n //-- From gruppi obect get all varianti and convert it to Lavorazioni Accessorie model\r\n for (var _i = 0, responseModelOtherProduct_1 = responseModelOtherProduct; _i < responseModelOtherProduct_1.length; _i++) {\r\n var group = responseModelOtherProduct_1[_i];\r\n for (var _a = 0, _b = group.varianti; _a < _b.length; _a++) {\r\n var variante = _b[_a];\r\n if (variante.id == idLavorazione) {\r\n if (variante.tipo != '2' || comboItemNumber == -1) {\r\n variante.isVisible = hideOrShow == \"hide\" ? false : true;\r\n //-- If item from select we want to hide was selected before rule is applied on it, we are changing it's value\r\n if (!variante.isVisible && (lavorazioneAccessoria.valore || lavorazioneAccessoria.valore == 0)) {\r\n variante.intFormValue = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n else {\r\n if (variante.valori) {\r\n var comboOption = variante.valori.filter(function (x) { return x.chiave == comboItemNumber; });\r\n if (comboOption) {\r\n comboOption.isVisible = hideOrShow == \"hide\" ? false : true;\r\n //-- If selected element need to be hidden because of regola, we are selecting first visible element\r\n if (!comboOption.isVisible) {\r\n // let value = lavorazioneAccessoria.valori.filter(x => x.isVisible == true)[0].chiave;\r\n // if(variante.intFormValue)\r\n variante.intFormValue = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n }\r\n isFoundElement = true;\r\n break;\r\n }\r\n }\r\n //-- If variante is found, break both loops, because we don't need to look for any other variante\r\n if (isFoundElement)\r\n break;\r\n }\r\n };\r\n return ExcludingComponent;\r\n}());\r\nexports.ExcludingComponent = ExcludingComponent;\r\n\n\n/***/ }),\n\n/***/ 72:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar UserLogin = (function () {\r\n function UserLogin() {\r\n // this.id = 0;\r\n this.username = \"\";\r\n this.isAuthenticated = false;\r\n }\r\n return UserLogin;\r\n}());\r\nexports.UserLogin = UserLogin;\r\n\n\n/***/ }),\n\n/***/ 73:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n\n\n/***/ }),\n\n/***/ 74:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar ClientAreaService = (function () {\r\n function ClientAreaService(_api, _cache, languageService, currencyService, mappings, ShoppingCartService) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.languageService = languageService;\r\n this.currencyService = currencyService;\r\n this.mappings = mappings;\r\n this.ShoppingCartService = ShoppingCartService;\r\n }\r\n ClientAreaService.prototype.getDetailsClientArea = function (id) {\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var lang = this.languageService.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Client_Area_Details.replace('{id}', id.toString()).replace('{lang}', lang).replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.getUniversalCached(url);\r\n };\r\n ClientAreaService.prototype.getUserAreaProfile = function (userId) {\r\n var lang = this.languageService.getLongLang();\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Client_Area_User_Profile.replace('{userId}', userId).replace('{lang}', lang).replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ClientAreaService.prototype.updateUserPassword = function (param) {\r\n param.Language = this.languageService.getLongLang();\r\n return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Password, param)\r\n .do(function (result) { return result; })\r\n .share();\r\n };\r\n ClientAreaService.prototype.updateUserProfile = function (collection) {\r\n return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Profile, collection)\r\n .do(function (result) { return result; })\r\n .share();\r\n };\r\n ClientAreaService.prototype.addNewAddress = function (param) {\r\n return this._api.post(this.mappings.Web_Api_Post_Client_Area_Add_New_Address, param)\r\n .do(function (result) { return result; })\r\n .share();\r\n };\r\n ClientAreaService.prototype.updateAddresses = function (addresses, userId, defaultAddress) {\r\n var param = {\r\n Addresses: addresses,\r\n UserId: userId,\r\n DefaultAddress: defaultAddress\r\n };\r\n return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Address, param)\r\n .do(function (result) { return result; })\r\n .share();\r\n };\r\n ClientAreaService.prototype.removeAddress = function (param) {\r\n return this._api.post(this.mappings.Web_Api_Post_Client_Area_Remove_Address, param)\r\n .do(function (result) { return result; })\r\n .share();\r\n };\r\n ClientAreaService.prototype.getClientAreaOrderDetails = function (userId, orderId) {\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var lang = this.languageService.getLongLang();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Get_Client_Area_Order_Details.replace('{userId}', userId).replace('{orderId}', orderId.toString()).replace('{lang}', lang).replace('{currency}', curr).replace(\"{cartid}\", cartId);\r\n var key = url;\r\n return this._api.getUniversalCached(url);\r\n };\r\n ClientAreaService.prototype.getClientAreaOrdersList = function (userId, dateFrom, dateTo, orderNumber, orderStatus) {\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Get_Client_Area_Order_List.replace('{userId}', userId.toString()).replace('{dateFrom}', dateFrom.toTimeString()).replace('{dateTo}', dateTo.toTimeString()).replace('{orderNumber}', orderNumber).replace('{orderStatus}', orderStatus).replace('{currency}', curr);\r\n var key = url;\r\n return this._api.get(url);\r\n };\r\n ClientAreaService.prototype.getClientAreaOrdersList1 = function (userId, dateFrom, dateTo, orderNumber, orderStatus) {\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var curr = this.currencyService.getCurrency();\r\n var lang = this.languageService.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Client_Area_Order_List.replace('{userId}', userId).replace('{dateFrom}', dateFrom).replace('{dateTo}', dateTo).replace('{orderNumber}', orderNumber).replace('{orderStatus}', orderStatus).replace('{lang}', lang).replace('{currency}', curr).replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.getUniversalCached(url);\r\n };\r\n ClientAreaService.prototype.getClientAreaInvoicesList = function (userId, orderNumber, invoiceNumber, documentType) {\r\n var curr = this.currencyService.getCurrency();\r\n var lang = this.languageService.getLongLang();\r\n var cartId = this.ShoppingCartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Client_Area_Invoices.replace('{userId}', userId).replace('{orderNumber}', orderNumber).replace('{invoiceNumber}', invoiceNumber).replace('{documentType}', documentType).replace('{lang}', lang).replace('{currency}', curr).replace('{cartid}', cartId);\r\n var key = url;\r\n return this._api.getUniversalCached(url);\r\n };\r\n ClientAreaService.prototype.postClientAreaSendProcessOrderMessageint = function (userId, orderId, orderRowId, orderNumber, sendTo, messageObject, message, lang) {\r\n var url = this.mappings.Web_Api_Get_Client_Area_Order_Send_Message;\r\n var params = {\r\n UserId: userId,\r\n OrderId: orderId,\r\n OrderRowId: orderRowId,\r\n OrderNumber: orderNumber,\r\n SendTo: sendTo,\r\n MessageObject: messageObject,\r\n Message: message,\r\n Lang: lang\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ClientAreaService.prototype.getProcessOrderFiles = function (processId, orderId) {\r\n var url = this.mappings.Web_Api_Get_Client_Area_Proccess_Order_File;\r\n var params = {\r\n ProcessId: processId,\r\n OrderId: orderId\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ClientAreaService.prototype.cancelOrders = function (userId, orderId) {\r\n var url = this.mappings.Web_Api_Post_Cancel_Order.replace('{userId}', userId).replace('{orderId}', orderId.toString());\r\n return this._api.post(url);\r\n };\r\n ClientAreaService.prototype.updateBonificoPaymentDetails = function (orderId, numeroCro, numeroTrn) {\r\n var url = this.mappings.Web_Api_Get_Client_Area_Update_Bonifico_Payment;\r\n var params = {\r\n IdOrder: orderId,\r\n numeroCro: numeroCro,\r\n numeroTrn: numeroTrn\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ClientAreaService.prototype.getBonificoUploadedFiles = function (orderId) {\r\n var url = this.mappings.Web_Api_Post_Get_Bonifico_Uploaded_Files;\r\n var params = {\r\n OrderId: orderId\r\n };\r\n return this._api.post(url, params);\r\n };\r\n ClientAreaService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _d) || Object, (typeof (_e = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _e) || Object, (typeof (_f = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _f) || Object])\r\n ], ClientAreaService);\r\n return ClientAreaService;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.ClientAreaService = ClientAreaService;\r\n\n\n/***/ }),\n\n/***/ 8:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar CmsComponentService = (function () {\r\n function CmsComponentService(_api, mappings, language, authService, cartService, currencyService) {\r\n this._api = _api;\r\n this.mappings = mappings;\r\n this.language = language;\r\n this.authService = authService;\r\n this.cartService = cartService;\r\n this.currencyService = currencyService;\r\n }\r\n CmsComponentService.prototype.getHeaderData = function () {\r\n //reading language\r\n var longLang = this.language.getLongLang();\r\n //reading userId\r\n var userId = this.authService.getCurrentUserId();\r\n var curr = this.currencyService.getCurrency();\r\n //reading cartId\r\n var cartId = this.cartService.getCartId();\r\n cartId = encodeURIComponent(cartId);\r\n var url = this.mappings.Web_Api_Get_Header_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', userId)\r\n .replace('{cartid}', cartId)\r\n .replace('{currency}', curr);\r\n return this._api.get(url);\r\n };\r\n CmsComponentService.prototype.getSideMenuData = function () {\r\n //Reading language\r\n var longLang = this.language.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Side_Menu_Data\r\n .replace('{lang}', longLang);\r\n //Sending request to the server\r\n return this._api.get(url);\r\n };\r\n CmsComponentService.prototype.getHomePageDataOptimized = function () {\r\n //Reading language\r\n var longLang = this.language.getLongLang();\r\n //reading userId\r\n var userId = this.authService.getCurrentUserId();\r\n //reading cartId\r\n var cartId = this.cartService.getCartId();\r\n //reading currency\r\n var curr = this.currencyService.getCurrency();\r\n cartId = encodeURIComponent(cartId);\r\n var url = this.mappings.Web_Api_Get_Home_Page_Data_Optimized\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', userId)\r\n .replace('{cartid}', cartId)\r\n .replace('{currency}', curr);\r\n //Sending request to the server\r\n return this._api.get(url);\r\n };\r\n CmsComponentService.prototype.getproductHilightpromo = function () {\r\n //Reading language\r\n var longLang = this.language.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Home_HilightPromoProduct\r\n .replace('{lang}', longLang);\r\n //Sending request to the server\r\n return this._api.get(url);\r\n };\r\n CmsComponentService.prototype.getSeoData = function () {\r\n //Reading language\r\n var longLang = this.language.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Seo_Data.replace('{lang}', longLang);\r\n //Sending request to the server\r\n return this._api.get(url);\r\n };\r\n CmsComponentService.prototype.getSliderData = function (type, id) {\r\n //Reading language\r\n var longLang = this.language.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Slider_Data\r\n .replace('{lang}', longLang)\r\n .replace('{id}', id)\r\n .replace('{type}', type);\r\n //Sending request to the server\r\n return this._api.get(url);\r\n };\r\n CmsComponentService.prototype.getFooterData = function () {\r\n //reading language\r\n var longLang = this.language.getLongLang();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Get_Footer_Data\r\n .replace('{lang}', longLang)\r\n .replace('{currency}', curr);\r\n return this._api.get(url);\r\n };\r\n CmsComponentService.prototype.getShoppingCartData = function () {\r\n //reading language\r\n var longLang = this.language.getLongLang();\r\n //reading userId\r\n var userInfo = this.authService.GetData();\r\n var userId;\r\n if (userInfo != null) {\r\n userId = this.authService.GetUserId();\r\n }\r\n //reading cartId\r\n var cartId = this.cartService.getCartId();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Get_Shopping_Cart_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', userId.toString())\r\n .replace('{cartid}', cartId)\r\n .replace('{currency}', curr);\r\n return this._api.getUniversalCached(url);\r\n };\r\n CmsComponentService.prototype.getShoppingCartCashData = function () {\r\n //reading language\r\n var longLang = this.language.getLongLang();\r\n //reading userId\r\n var userInfo = this.authService.GetData();\r\n var userId;\r\n if (userInfo != null) {\r\n userId = this.authService.GetUserId();\r\n }\r\n //reading cartId\r\n var cartId = this.cartService.getCartId();\r\n var curr = this.currencyService.getCurrency();\r\n var url = this.mappings.Web_Api_Get_Shopping_Cart_Cash_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', userId.toString())\r\n .replace('{cartid}', cartId.toString())\r\n .replace('{currency}', curr);\r\n return this._api.getUniversalCached(url);\r\n };\r\n CmsComponentService.prototype.getShoppingCartSubmittedData = function (orderId) {\r\n //reading language\r\n var longLang = this.language.getLongLang();\r\n //reading userId\r\n var userInfo = this.authService.GetData();\r\n var userId;\r\n if (userInfo != null) {\r\n userId = this.authService.GetUserId();\r\n }\r\n var curr = this.currencyService.getCurrency();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Shopping_Cart_Submitted_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', userId.toString())\r\n .replace('{orderid}', orderId.toString())\r\n .replace('{currency}', curr)\r\n .replace(\"{cartid}\", cartId);\r\n return this._api.getUniversalCached(url);\r\n };\r\n CmsComponentService.prototype.getOtherProductData = function (productId, userId) {\r\n //reading language\r\n var longLang = this.language.getLongLang();\r\n var url = this.mappings.Web_Api_Get_Other_Product_Form_Data\r\n .replace('{lang}', longLang)\r\n .replace('{productid}', productId)\r\n .replace('{userId}', userId);\r\n return this._api.get(url);\r\n };\r\n CmsComponentService.prototype.getOfflinePageData = function () {\r\n //Reading language\r\n var longLang = this.language.getLongLang();\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Offline_Page_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);\r\n //Sending request to the server\r\n return this._api.get(url);\r\n };\r\n CmsComponentService.prototype.getLoginPageData = function () {\r\n //Reading language\r\n var longLang = this.language.getLongLang();\r\n var customerId = this.authService.GetUserId();\r\n var cartId = this.cartService.getCartId();\r\n var url = this.mappings.Web_Api_Get_Login_Page_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);\r\n //Sending request to the server\r\n return this._api.get(url);\r\n };\r\n CmsComponentService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof auth_service_1.AuthService !== 'undefined' && auth_service_1.AuthService) === 'function' && _d) || Object, (typeof (_e = typeof shopping_cart_service_1.ShoppingCartService !== 'undefined' && shopping_cart_service_1.ShoppingCartService) === 'function' && _e) || Object, (typeof (_f = typeof currency_service_1.CurrencyService !== 'undefined' && currency_service_1.CurrencyService) === 'function' && _f) || Object])\r\n ], CmsComponentService);\r\n return CmsComponentService;\r\n var _a, _b, _c, _d, _e, _f;\r\n}());\r\nexports.CmsComponentService = CmsComponentService;\r\n\n\n/***/ }),\n\n/***/ 85:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar core_1 = __webpack_require__(0);\r\n__webpack_require__(23);\r\n__webpack_require__(25);\r\n__webpack_require__(24);\r\nvar cache_service_1 = __webpack_require__(19);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar NewsletterService = (function () {\r\n function NewsletterService(_api, _cache, languageService, mappings) {\r\n this._api = _api;\r\n this._cache = _cache;\r\n this.languageService = languageService;\r\n this.mappings = mappings;\r\n //getting language\r\n this.lang = this.languageService.getLongLang();\r\n }\r\n NewsletterService.prototype.newsletterSubscribe = function (email) {\r\n var url = this.mappings.Web_Api_Post_Newsletter_Subscribe.replace('{email}', email).replace('{lang}', this.lang);\r\n return this._api.get(url);\r\n };\r\n NewsletterService.prototype.getNewsletterPageData = function () {\r\n var url = this.mappings.Web_Api_Get_Newsletter_Page_Data.replace('{lang}', this.lang);\r\n return this._api.get(url);\r\n };\r\n NewsletterService.prototype.getNewsletterConfirmationPageData = function () {\r\n var url = this.mappings.Web_Api_Get_Newsletter_Confirmation_Page_Data.replace('{lang}', this.lang);\r\n return this._api.get(url);\r\n };\r\n NewsletterService = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof api_service_1.ApiService !== 'undefined' && api_service_1.ApiService) === 'function' && _a) || Object, (typeof (_b = typeof cache_service_1.CacheService !== 'undefined' && cache_service_1.CacheService) === 'function' && _b) || Object, (typeof (_c = typeof language_service_1.LanguageService !== 'undefined' && language_service_1.LanguageService) === 'function' && _c) || Object, (typeof (_d = typeof mapping_1.Mappings !== 'undefined' && mapping_1.Mappings) === 'function' && _d) || Object])\r\n ], NewsletterService);\r\n return NewsletterService;\r\n var _a, _b, _c, _d;\r\n}());\r\nexports.NewsletterService = NewsletterService;\r\n\n\n/***/ }),\n\n/***/ 86:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nfunction __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n__export(__webpack_require__(73));\r\n__export(__webpack_require__(620));\r\n__export(__webpack_require__(621));\r\n__export(__webpack_require__(418));\r\n__export(__webpack_require__(622));\r\n\n\n/***/ }),\n\n/***/ 87:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar trustpilot_service_1 = __webpack_require__(416);\r\nvar core_1 = __webpack_require__(0);\r\nvar common_1 = __webpack_require__(45);\r\nvar router_1 = __webpack_require__(13);\r\nvar forms_1 = __webpack_require__(228);\r\nvar core_2 = __webpack_require__(27);\r\nvar api_service_1 = __webpack_require__(10);\r\nvar model_service_1 = __webpack_require__(629);\r\nvar component_helper_service_1 = __webpack_require__(4);\r\nvar template_service_1 = __webpack_require__(38);\r\nvar cms_content_service_1 = __webpack_require__(411);\r\nvar company_service_1 = __webpack_require__(131);\r\nvar article_service_1 = __webpack_require__(128);\r\nvar cms_menu_list_service_1 = __webpack_require__(412);\r\nvar faq_service_1 = __webpack_require__(413);\r\nvar newsletter_service_1 = __webpack_require__(85);\r\nvar slider_service_1 = __webpack_require__(415);\r\nvar info_request_service_1 = __webpack_require__(414);\r\nvar login_service_1 = __webpack_require__(178);\r\nvar recover_password_service_1 = __webpack_require__(257);\r\nvar register_service_1 = __webpack_require__(100);\r\nvar local_storage_1 = __webpack_require__(625);\r\nvar quoting_service_1 = __webpack_require__(61);\r\nvar category_service_1 = __webpack_require__(262);\r\nvar product_service_1 = __webpack_require__(134);\r\nvar shopping_cart_service_1 = __webpack_require__(20);\r\nvar client_area_service_1 = __webpack_require__(74);\r\nvar auth_service_1 = __webpack_require__(11);\r\nvar language_service_1 = __webpack_require__(3);\r\nvar configuration_service_1 = __webpack_require__(258);\r\nvar cms_component_service_1 = __webpack_require__(8);\r\nvar seo_service_1 = __webpack_require__(12);\r\nvar privacy_policy_service_1 = __webpack_require__(419);\r\nvar cookie_policy_service_1 = __webpack_require__(417);\r\nvar purchase_condition_service_1 = __webpack_require__(420);\r\nvar bootbox_service_1 = __webpack_require__(41);\r\nvar loading_overlay_service_1 = __webpack_require__(624);\r\nvar script_service_1 = __webpack_require__(16);\r\nvar helper_service_1 = __webpack_require__(49);\r\nvar order_payment_service_1 = __webpack_require__(256);\r\nvar currency_service_1 = __webpack_require__(32);\r\nvar messages_service_1 = __webpack_require__(132);\r\nvar application_service_1 = __webpack_require__(130);\r\nvar search_service_1 = __webpack_require__(263);\r\nvar breadcrumbs_service_1 = __webpack_require__(22);\r\nvar validation_service_1 = __webpack_require__(133);\r\nvar check_existence_service_1 = __webpack_require__(255);\r\n//Components \r\nvar header_component_1 = __webpack_require__(596);\r\nvar footer_component_1 = __webpack_require__(594);\r\nvar article_category_component_1 = __webpack_require__(372);\r\nvar blog_page_component_1 = __webpack_require__(373);\r\nvar news_page_component_1 = __webpack_require__(374);\r\nvar news_list_component_1 = __webpack_require__(593);\r\nvar side_bar_menu_component_1 = __webpack_require__(598);\r\nvar newsletter_component_1 = __webpack_require__(595);\r\nvar quoting_main_component_1 = __webpack_require__(605);\r\nvar wizard_form_commerciale_component_1 = __webpack_require__(609);\r\nvar wizard_form_editoria_component_1 = __webpack_require__(610);\r\nvar wizard_form_adesivi_component_1 = __webpack_require__(606);\r\nvar wizard_form_banner_component_1 = __webpack_require__(607);\r\nvar wizard_form_buste_component_1 = __webpack_require__(608);\r\nvar wizard_form_etichette_component_1 = __webpack_require__(611);\r\nvar wizard_form_stampa_component_1 = __webpack_require__(612);\r\nvar other_product_form_component_1 = __webpack_require__(604);\r\nvar quoting_order_totals_component_1 = __webpack_require__(603);\r\nvar cookie_policy_component_1 = __webpack_require__(378);\r\nvar faq_component_1 = __webpack_require__(379);\r\nvar info_request_component_1 = __webpack_require__(380);\r\nvar privacy_policy_component_1 = __webpack_require__(383);\r\nvar purchase_condition_component_1 = __webpack_require__(384);\r\nvar cart_empty_page_component_1 = __webpack_require__(385);\r\nvar client_area_order_list_component_1 = __webpack_require__(388);\r\nvar user_login_component_1 = __webpack_require__(408);\r\nvar user_password_component_1 = __webpack_require__(409);\r\nvar cart_component_1 = __webpack_require__(396);\r\nvar client_area_home_component_1 = __webpack_require__(397);\r\nvar client_area_profile_component_1 = __webpack_require__(400);\r\nvar cart_cash_component_1 = __webpack_require__(394);\r\nvar cart_submitted_component_1 = __webpack_require__(395);\r\nvar slider_widget_component_1 = __webpack_require__(601);\r\nvar client_area_order_details_component_1 = __webpack_require__(399);\r\nvar offline_page_component_1 = __webpack_require__(387);\r\nvar not_found_page_component_1 = __webpack_require__(386);\r\nvar registration_confirmation_component_1 = __webpack_require__(407);\r\nvar payment_confirmation_component_1 = __webpack_require__(401);\r\nvar payment_unicredit_confirmation_component_1 = __webpack_require__(403);\r\nvar payment_nexi_confirmation_component_1 = __webpack_require__(402);\r\nvar ng2_table_1 = __webpack_require__(426);\r\nvar mapping_1 = __webpack_require__(9);\r\nvar angular2_material_datepicker_1 = __webpack_require__(589);\r\nvar ng2_bs3_modal_1 = __webpack_require__(634);\r\nvar crypto_service_1 = __webpack_require__(259);\r\nvar search_component_1 = __webpack_require__(375);\r\nvar client_area_invoices_component_1 = __webpack_require__(398);\r\nvar newsletter_page_component_1 = __webpack_require__(382);\r\nvar newsletter_confirmation_page_component_1 = __webpack_require__(381);\r\nvar registration_complete_component_1 = __webpack_require__(406);\r\nvar customerscanvas_service_1 = __webpack_require__(44);\r\nvar canvas_widget_components_1 = __webpack_require__(600);\r\nvar paypal_service_1 = __webpack_require__(261);\r\nvar quick_registration_component_1 = __webpack_require__(404);\r\nvar trustpilot_widget_component_1 = __webpack_require__(602);\r\nvar header_service_1 = __webpack_require__(129);\r\nvar MODULES = [\r\n // Do NOT include UniversalModule, HttpModule, or JsonpModule here\r\n common_1.CommonModule,\r\n router_1.RouterModule,\r\n forms_1.FormsModule,\r\n forms_1.ReactiveFormsModule,\r\n core_2.TranslateModule,\r\n ng2_table_1.Ng2TableModule,\r\n angular2_material_datepicker_1.DatepickerModule,\r\n ng2_bs3_modal_1.Ng2Bs3ModalModule,\r\n];\r\nvar PIPES = [];\r\nvar COMPONENTS = [\r\n // put shared components here\r\n header_component_1.HeaderComponent,\r\n footer_component_1.FooterComponent,\r\n article_category_component_1.ArticleCategoryComponent,\r\n blog_page_component_1.BlogPageComponent,\r\n news_page_component_1.ArticleComponent,\r\n news_list_component_1.NewsListComponent,\r\n side_bar_menu_component_1.SideBarMenuComponent,\r\n newsletter_component_1.NewsletterComponent,\r\n quoting_main_component_1.QuotingMainComponent,\r\n wizard_form_commerciale_component_1.WizardCommercialeComponent,\r\n wizard_form_editoria_component_1.WizardEditoriaComponent,\r\n wizard_form_adesivi_component_1.WizardAdesiviComponent,\r\n wizard_form_banner_component_1.WizardBannerComponent,\r\n wizard_form_buste_component_1.WizardBusteComponent,\r\n wizard_form_etichette_component_1.WizardEtichetteComponent,\r\n wizard_form_stampa_component_1.WizardStampaComponent,\r\n other_product_form_component_1.OtherProductFormComponent,\r\n quoting_order_totals_component_1.QuotingOrderTotalsComponent,\r\n cookie_policy_component_1.CookiePolicyComponent,\r\n faq_component_1.FaqComponent,\r\n info_request_component_1.InfoRequestComponent,\r\n privacy_policy_component_1.PrivacyPolicyComponent,\r\n purchase_condition_component_1.PurchaseConditionComponent,\r\n cart_empty_page_component_1.CartEmptyPageComponent,\r\n client_area_order_list_component_1.ClientAreaOrderListComponent,\r\n client_area_invoices_component_1.ClientAreaInvoicesComponent,\r\n user_login_component_1.UserLoginComponent,\r\n user_password_component_1.UserPasswordComponent,\r\n cart_component_1.CartComponent,\r\n client_area_home_component_1.ClientAreaHomeComponent,\r\n client_area_profile_component_1.ClientAreaProfileComponent,\r\n cart_cash_component_1.CartCashComponent,\r\n cart_submitted_component_1.CartSubmittedComponent,\r\n slider_widget_component_1.SliderWidgetComponent,\r\n client_area_order_details_component_1.ClientAreaOrderDetailsComponent,\r\n registration_confirmation_component_1.RegistrationConfirmationComponent,\r\n payment_confirmation_component_1.PaymentConfirmationComponent,\r\n payment_unicredit_confirmation_component_1.PaymentUnicreditConfirmationComponent,\r\n payment_nexi_confirmation_component_1.PaymentNexiConfirmationComponent,\r\n offline_page_component_1.OfflinePageComponent,\r\n not_found_page_component_1.NotFoundPageComponent,\r\n search_component_1.SearchComponent,\r\n newsletter_page_component_1.NewsletterPageComponent,\r\n newsletter_confirmation_page_component_1.NewsletterConfirmationPageComponent,\r\n registration_complete_component_1.RegistrationConfirmationPageComponent,\r\n canvas_widget_components_1.CanvasWidgetComponent,\r\n quick_registration_component_1.QuickRegistrationComponent,\r\n trustpilot_widget_component_1.TrustpilotWidgetComponent\r\n];\r\nvar PROVIDERS = [\r\n model_service_1.ModelService,\r\n api_service_1.ApiService,\r\n component_helper_service_1.ComponentHelperService,\r\n template_service_1.TemplateService,\r\n cms_content_service_1.CmsContentService,\r\n company_service_1.CompanyService,\r\n article_service_1.ArticleService,\r\n cms_menu_list_service_1.CmsMenuListService,\r\n faq_service_1.FaqListService,\r\n newsletter_service_1.NewsletterService,\r\n slider_service_1.SliderService,\r\n info_request_service_1.InfoRequestService,\r\n login_service_1.LoginService,\r\n recover_password_service_1.RecoverPasswordService,\r\n register_service_1.RegisterService,\r\n local_storage_1.LocalStorageService,\r\n quoting_service_1.QuotingService,\r\n category_service_1.CategoryService,\r\n product_service_1.ProductService,\r\n shopping_cart_service_1.ShoppingCartService,\r\n client_area_service_1.ClientAreaService,\r\n auth_service_1.AuthService,\r\n language_service_1.LanguageService,\r\n configuration_service_1.ConfigurationService,\r\n application_service_1.ApplicationService,\r\n mapping_1.Mappings,\r\n cms_component_service_1.CmsComponentService,\r\n seo_service_1.SeoService,\r\n privacy_policy_service_1.PrivacyPolicyService,\r\n cookie_policy_service_1.CookiePolicyService,\r\n purchase_condition_service_1.PurchaseConditionService,\r\n bootbox_service_1.BootboxService,\r\n loading_overlay_service_1.LoadingOverlayService,\r\n messages_service_1.MessagesService,\r\n check_existence_service_1.CheckIfExistService,\r\n order_payment_service_1.OrderPaymentService,\r\n script_service_1.ScriptService,\r\n helper_service_1.HelperService,\r\n currency_service_1.CurrencyService,\r\n crypto_service_1.CryptoService,\r\n search_service_1.SearchService,\r\n breadcrumbs_service_1.BreadcrumbsService,\r\n validation_service_1.ValidationService,\r\n customerscanvas_service_1.CustomersCanvasService,\r\n paypal_service_1.PaypalService,\r\n trustpilot_service_1.TrustpilotService,\r\n header_service_1.HeaderService\r\n];\r\nvar SharedModule = (function () {\r\n function SharedModule() {\r\n }\r\n SharedModule.forRoot = function () {\r\n return {\r\n ngModule: SharedModule,\r\n providers: PROVIDERS.slice()\r\n };\r\n };\r\n SharedModule = __decorate([\r\n core_1.NgModule({\r\n imports: MODULES.slice(),\r\n declarations: PIPES.concat(COMPONENTS),\r\n exports: MODULES.concat(PIPES, COMPONENTS)\r\n }), \r\n __metadata('design:paramtypes', [])\r\n ], SharedModule);\r\n return SharedModule;\r\n}());\r\nexports.SharedModule = SharedModule;\r\n\n\n/***/ }),\n\n/***/ 895:\n/***/ (function(module, exports) {\n\n/* (ignored) */\n\n/***/ }),\n\n/***/ 896:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n// the polyfills must be the first thing imported\r\n__webpack_require__(466);\r\n__webpack_require__(469);\r\n__webpack_require__(467); // temporary until 2.1.1 things are patched in Core\r\n// Angular 2\r\nvar core_1 = __webpack_require__(0);\r\nvar browser_1 = __webpack_require__(280);\r\nvar bootloader_1 = __webpack_require__(465);\r\nvar webfontloader_1 = __webpack_require__(470);\r\n// enable prod for faster renders\r\ncore_1.enableProdMode();\r\nvar browser_module_1 = __webpack_require__(468);\r\nexports.platformRef = browser_1.platformUniversalDynamic();\r\n// on document ready bootstrap Angular 2\r\nfunction main() {\r\n // Load fonts async\r\n // https://github.com/typekit/webfontloader#configuration\r\n webfontloader_1.load({\r\n google: {\r\n families: ['Droid Sans']\r\n }\r\n });\r\n return exports.platformRef.bootstrapModule(browser_module_1.MainModule);\r\n}\r\nexports.main = main;\r\n// support async tag or hmr\r\nbootloader_1.bootloader(main);\r\n\n\n/***/ }),\n\n/***/ 9:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\n//Angular\r\nvar core_1 = __webpack_require__(0);\r\nvar application_service_1 = __webpack_require__(130);\r\nvar Mappings = (function () {\r\n function Mappings(application) {\r\n this.application = application;\r\n /* base urls */\r\n this.Web_Api_Base_Url = this.application.config.apiUrl;\r\n /* Google key for map */\r\n this.Google_Maps_Key = \"AIzaSyBXymPQfgG39aceYOuzkdVynFoFRf3lMKc\";\r\n this.Web_Api_Get_Token_Url = this.Web_Api_Base_Url + \"/token\";\r\n this.Web_Api_Menu_GetCmsPageByUrl = this.Web_Api_Base_Url + \"/menu/getcmspagebyurl/{customerid}/{lang}/{cartid}/{url}\";\r\n this.Web_Api_Menu_GetCmsPageById = this.Web_Api_Base_Url + \"/menu/getcmsmenu/{customerid}/{lang}/{id}/{cartid}\";\r\n this.Web_Api_Get_Template_Url = this.Web_Api_Base_Url + \"/template/getTemplateHtml/{type}/{lang}\";\r\n this.Web_Api_Get_Default_Company = this.Web_Api_Base_Url + \"/company/getdefault\";\r\n this.Web_Api_Get_Article_List = this.Web_Api_Base_Url + \"/article/getarticlelist/{category}/{listtype}/{lang}\";\r\n this.Web_Api_Get_News_Details = this.Web_Api_Base_Url + \"/article/getarticledetailsbyid/{lang}/{id}/{userid}/{cartid}\";\r\n this.Web_Api_Get_Article_By_Url = this.Web_Api_Base_Url + \"/article/getarticledetailsbyseourl/{lang}/{userid}/{cartid}/{seoUrl}\";\r\n this.Web_Api_Get_Article_Category_By_Id = this.Web_Api_Base_Url + \"/article/getcategorybyid/{categoryId}/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid}\";\r\n this.Web_Api_Get_Article_Category_By_Url = this.Web_Api_Base_Url + \"/article/getcategorybyurl/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid/{categoryUrl}}\";\r\n this.Web_Api_Get_Article_List_Category = this.Web_Api_Base_Url + \"/article/getarticlelistcategory/{lang}\";\r\n this.Web_Api_Get_Article_By_Category_Id = this.Web_Api_Base_Url + \"/article/getarticledetailsbycategoryid/{categoryId}/{lang}/{startRowIndex}/{maxRows}\";\r\n this.Web_Api_Get_Blog_Data = this.Web_Api_Base_Url + \"/article/getblogdata/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid}\";\r\n this.Web_Api_Get_Cms_Menu_List = this.Web_Api_Base_Url + \"/menu/getcmsmenus/{id}/{lang}\";\r\n this.Web_Api_Get_FaqData = this.Web_Api_Base_Url + \"/article/getfaqdata/{lang}/{userid}/{cartid}\";\r\n this.Web_Api_Post_Newsletter_Subscribe = this.Web_Api_Base_Url + \"/newsletter/subscribe/{email}/{lang}\";\r\n this.Web_Api_Get_Newsletter_Page_Data = this.Web_Api_Base_Url + \"/newsletter/pagedata/{lang}\";\r\n this.Web_Api_Get_Newsletter_Confirmation_Page_Data = this.Web_Api_Base_Url + \"/newsletter/confirmationpage/{lang}\";\r\n this.Web_Api_Get_Wizard_Data_Address = this.Web_Api_Base_Url + \"/quoting/getwizarddata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n this.Web_Api_Get_Category_Details = this.Web_Api_Base_Url + \"/inventory/getcategory/{categoryId}/{lang}/{customerid}/{currency}/{cartid}\";\r\n this.Web_Api_Get_Catalog_Categories_Data = this.Web_Api_Base_Url + \"/inventory/getcatalogcategoriesdata/{lang}/{currency}/{userid}/{cartid}\";\r\n this.Web_Api_Get_Catalog_Categories_Price_Data = this.Web_Api_Base_Url + \"/inventory/getcategorypricedata/{categoryId}/{customerid}/{lang}/{currency}\";\r\n this.Web_Api_Get_Category_By_Url = this.Web_Api_Base_Url + \"/inventory/getcategorybyseourl/{lang}/{customerid}/{currency}/{cartid}/{seoUrl}\";\r\n this.Web_Api_Post_Send_Category_Info_Request = this.Web_Api_Base_Url + \"/inventory/getcategoryinfo\";\r\n this.Web_Api_Get_Product_Details = this.Web_Api_Base_Url + \"/inventory/getproduct/{productType}/{productId}/{lang}/{customerid}/{currency}/{cartid}\";\r\n this.Web_Api_Get_Price_Data = this.Web_Api_Base_Url + \"/inventory/getproductpricedata/{productId}/{lang}/{customerid}/{currency}\";\r\n this.Web_Api_Get_Products_In_Promotion_Data = this.Web_Api_Base_Url + \"/inventory/getproductsinpromotiondata/{lang}/{currency}/{userid}/{cartid}\";\r\n this.Web_Api_Get_Product_By_Url = this.Web_Api_Base_Url + \"/inventory/getproductbyseourl/{lang}/{customerid}/{currency}/{cartid}/{seoUrl}\";\r\n this.Web_Api_Post_Send_Info_Request = this.Web_Api_Base_Url + \"/info/contactrequest\";\r\n this.Web_Api_Post_Send_Login_Request = this.Web_Api_Base_Url + \"/account/login\";\r\n this.Web_Api_Post_User_Authentification = this.Web_Api_Base_Url + \"/account/authentificateuser\";\r\n this.Web_Api_Recover_Password = this.Web_Api_Base_Url + \"/account/passwordrequest\";\r\n this.Web_Api_Get_Recover_Password_Data = this.Web_Api_Base_Url + \"/account/getrecoverpassworddata/{lang}/{userid}/{cartid}\";\r\n this.Web_Api_Post_Register = this.Web_Api_Base_Url + \"/account/register\";\r\n this.Web_Api_Get_Register_Data = this.Web_Api_Base_Url + \"/account/registerdata/{lang}/{userid}/{cartid}\";\r\n this.Web_Api_Get_Registration_Complete_Page_Data = this.Web_Api_Base_Url + \"/registration/confirmationpage/{lang}/{userid}/{cartid}\";\r\n this.Web_Api_Post_Confirm_Registration = this.Web_Api_Base_Url + \"/account/activate/{id}\";\r\n this.Web_Api_Get_Save_Cart = this.Web_Api_Base_Url + \"/cart/postsavecartinfo/{userId}/{cartId}/{paymentId}/{shipmentId}\";\r\n this.Web_Api_Set_Cart_Voucher = this.Web_Api_Base_Url + \"/cart/setvoucher\";\r\n this.Web_Api_Set_Job_Name = this.Web_Api_Base_Url + \"/cart/setcartjobname\";\r\n this.Web_Api_Set_Cart_Address = this.Web_Api_Base_Url + \"/cart/setcartaddress\";\r\n this.Web_Api_Post_Cart_Confirm_Order = this.Web_Api_Base_Url + \"/cart/confirmorder\";\r\n this.Web_Api_Get_Cart_Payment_Shipment = this.Web_Api_Base_Url + \"/cart/getcartpaymentshipment/{userId}/{cartId}/{lang}/{currency}\";\r\n this.Web_Api_Get_Client_Area_Details = this.Web_Api_Base_Url + \"/clientarea/getdetails/{id}/{lang}/{cartid}\";\r\n this.Web_Api_Get_Client_Area_User_Profile = this.Web_Api_Base_Url + \"/clientarea/getuserprofile/{userId}/{lang}/{cartid}\";\r\n this.Web_Api_Post_Client_Area_Add_New_Address = this.Web_Api_Base_Url + \"/clientarea/adduseraddress\";\r\n this.Web_Api_Post_Client_Area_Update_User_Password = this.Web_Api_Base_Url + \"/clientarea/updateuserpassword\";\r\n this.Web_Api_Post_Client_Area_Update_User_Profile = this.Web_Api_Base_Url + \"/clientarea/updateuserprofile\";\r\n this.Web_Api_Post_Client_Area_Update_User_Address = this.Web_Api_Base_Url + \"/clientarea/updateuseraddresses\";\r\n this.Web_Api_Post_Client_Area_Remove_Address = this.Web_Api_Base_Url + \"/clientarea/removeuseraddress\";\r\n this.Web_Api_Get_Client_Area_Order_Details = this.Web_Api_Base_Url + \"/clientarea/getorderdetails/{userId}/{orderId}/{lang}/{currency}/{cartid}\";\r\n this.Web_Api_Get_Client_Area_Order_List = this.Web_Api_Base_Url + \"/clientarea/getorderlist/{userId}/{dateFrom}/{dateTo}/{orderNumber}/{orderStatus}/{lang}/{currency}/{cartid}\";\r\n this.Web_Api_Get_Client_Area_Invoices = this.Web_Api_Base_Url + \"/clientarea/getinvoiceslist/{userId}/{orderNumber}/{invoiceNumber}/{documentType}/{lang}/{currency}/{cartid}\";\r\n this.Web_Api_Get_Client_Area_Order_Send_Message = this.Web_Api_Base_Url + \"/clientarea/postsendprocessordermessage\";\r\n this.Web_Api_Get_Client_Area_Proccess_Order_File = this.Web_Api_Base_Url + \"/clientarea/getorderprocessfiles\";\r\n this.Web_Api_Get_Client_Area_Update_Bonifico_Payment = this.Web_Api_Base_Url + \"/clientarea/updatebonificopaymentdetails\";\r\n this.Web_Api_Get_Configuration = this.Web_Api_Base_Url + \"/config/getconfiguration/{lang}\";\r\n this.Web_Api_Get_Routes = this.Web_Api_Base_Url + \"/config/getroutes/{lang}\";\r\n this.Web_Api_Get_Header_Data = this.Web_Api_Base_Url + \"/cms/getheaderdata/{lang}/{userid}/{cartid}/{currency}\";\r\n this.Web_Api_Get_Footer_Data = this.Web_Api_Base_Url + \"/cms/getfooterdata/{lang}/{currency}\";\r\n this.Web_Api_Get_Side_Menu_Data = this.Web_Api_Base_Url + \"/cms/getsidemenudata/{lang}\";\r\n this.Web_Api_Get_Home_Page_Data = this.Web_Api_Base_Url + \"/cms/gethomepagedata/{lang}\";\r\n this.Web_Api_Get_Home_Page_Data_Optimized = this.Web_Api_Base_Url + \"/cms/gethomepagedataoptimized/{lang}/{userid}/{cartid}/{currency}\";\r\n this.Web_Api_Get_Home_HilightPromoProduct = this.Web_Api_Base_Url + \"/cms/getproducthilightpromo/{lang}\";\r\n this.Web_Api_Get_Info_Request_Data = this.Web_Api_Base_Url + \"/cms/getinforequestdata/{lang}/{userid}/{cartid}\";\r\n this.Web_Api_Get_Privacy_Policy_Data = this.Web_Api_Base_Url + \"/privacypolicy/getprivacypolicydata/{lang}/{userid}/{cartid}\";\r\n this.Web_Api_Get_Cookie_Policy_Data = this.Web_Api_Base_Url + \"/cookiepolicy/getcookiepolicydata/{lang}/{cartid}/{userid}\";\r\n this.Web_Api_Get_Purchase_Condition_Data = this.Web_Api_Base_Url + \"/puchasecondition/puchaseconditiondata/{lang}/{userid}/{cartid}\";\r\n this.Web_Api_Get_Slider_Data = this.Web_Api_Base_Url + \"/slider/getsliderdata/{lang}/{id}/{type}\";\r\n this.Web_Api_Get_Seo_Data = this.Web_Api_Base_Url + \"/cms/gethomepageseodata/{lang}\";\r\n this.Web_Api_Get_Shopping_Cart_Data = this.Web_Api_Base_Url + \"/cms/getcartdata/{userid}/{cartid}/{lang}/{currency}\";\r\n this.Web_Api_Get_Shopping_Cart_Cash_Data = this.Web_Api_Base_Url + \"/cms/getcartcashdata/{userid}/{cartid}/{lang}/{currency}\";\r\n this.Web_Api_Get_Shopping_Cart_Submitted_Data = this.Web_Api_Base_Url + \"/cms/getcartsubmitteddata/{userid}/{orderid}/{lang}/{currency}/{cartid}\";\r\n this.Web_Api_Get_Client_Area_Messages = this.Web_Api_Base_Url + \"/clientarea/setmessagesasread\";\r\n this.Web_Api_Add_Static_Product_To_Cart = this.Web_Api_Base_Url + \"/cart/addstaticproducttocart\";\r\n this.Web_Api_Add_Static_Product_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addstaticproductscontisticatocart\";\r\n this.Web_Api_Add_Matrix_Product_To_Cart = this.Web_Api_Base_Url + \"/cart/addmatrixproducttocart\";\r\n this.Web_Api_Get_Offline_Page_Data = this.Web_Api_Base_Url + \"/cms/getofflinepagedata/{lang}/{userid}/{cartid}\";\r\n this.Web_Api_Get_Login_Page_Data = this.Web_Api_Base_Url + \"/cms/loginpage/{lang}/{userid}/{cartid}\";\r\n this.Web_Api_Set_Cart_Payment = this.Web_Api_Base_Url + \"/cart/setcartpayment\";\r\n this.Web_Api_Empty_Cart_Page = this.Web_Api_Base_Url + \"/cart/emptycartpage/{lang}/{userid}/{cartid}\";\r\n this.Web_Api_Set_Cart_Shipment = this.Web_Api_Base_Url + \"/cart/setcartshipping\";\r\n this.Web_Api_Remove_From_Cart = this.Web_Api_Base_Url + \"/cart/removefromcart\";\r\n this.Web_Api_Post_Cancel_Order = this.Web_Api_Base_Url + \"/clientarea/postcancelorder/{userId}/{orderId}\";\r\n this.Web_Api_Post_Get_Bonifico_Uploaded_Files = this.Web_Api_Base_Url + \"/clientarea/getorderbonificofiles\";\r\n this.Web_Api_Add_Wizard_Calcolato_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardcalcolatoproducttocart\";\r\n this.Web_Api_Add_Wizard_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardcalcolatoscontisticaproducttocart\";\r\n this.Web_Api_Add_Wizard_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinostandardproducttocart\";\r\n this.Web_Api_Add_Wizard_Listino_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinoscontisticaproducttocart\";\r\n this.Web_Api_Update_Prev_Canvas_Info = this.Web_Api_Base_Url + \"/cart/updateprevcanvasinfo\";\r\n this.Web_Api_Add_Other_Product_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinotocart\";\r\n this.Web_Api_Add_Other_Product_Listino_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinoscontisticatocart\";\r\n this.Web_Api_Add_Other_Product_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductcalcolatoscontisticatocart\";\r\n this.Web_Api_Add_Other_Product_Listino_Calcolato_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinocalcolatotocart\";\r\n this.Web_Api_Add_Other_Product_Listino_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinocalcolatoscontisticatocart\";\r\n this.Web_Api_Get_Other_Product_Form_Data = this.Web_Api_Base_Url + \"/quoting/getotherproductformdata/{lang}/{productid}/{userId}\";\r\n this.Web_Api_Get_Script = this.Web_Api_Base_Url + \"/cms/getscript/{rowid}/{type}/{lang}\";\r\n this.Web_Api_Get_Wizard_Editoria_Data = this.Web_Api_Base_Url + \"/quoting/getwizardeditoriadata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n this.Web_Api_Get_Wizard_Commerciale_Data = this.Web_Api_Base_Url + \"/quoting/getwizardcommercialedata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n this.Web_Api_Check_If_Param_Exists_In_Db = this.Web_Api_Base_Url + \"/account/checkifexists/{type}/{value}\";\r\n this.Web_Api_Set_Order_As_Payed = this.Web_Api_Base_Url + \"/clientarea/setorderaspaid\";\r\n this.Web_Api_Get_Head_Foot_Data = this.Web_Api_Base_Url + \"/template/getheadfootdata/{lang}\";\r\n this.Web_Api_Get_Wizard_Etichette_Data = this.Web_Api_Base_Url + \"/quoting/getwizardetichettedata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n this.Web_Api_Post_Get_Wizard_Price_Estimation = this.Web_Api_Base_Url + \"/quoting/getwizardpriceestimation\";\r\n this.Web_Api_Post_Send_Request_Info_Wizard = this.Web_Api_Base_Url + \"/quoting/sendrequestinfo\";\r\n this.Web_Api_Get_Wizard_Buste_Data = this.Web_Api_Base_Url + \"/quoting/getwizardbustedata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n this.Web_Api_Get_Wizard_Adesivi_Data = this.Web_Api_Base_Url + \"/quoting/getwizardadesividata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n this.Web_Api_Get_Wizard_Banner_Data = this.Web_Api_Base_Url + \"/quoting/getwizardbannerdata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n this.Web_Api_Get_Wizard_Stampa_Data = this.Web_Api_Base_Url + \"/quoting/getwizardstampadata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n this.Web_Api_Post_Get_Ap_Price_Estimation = this.Web_Api_Base_Url + \"/quoting/getappriceestimation\";\r\n this.Web_Api_Add_Wizard_Buste_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinobustetocart\";\r\n this.Web_Api_Add_Wizard_Buste_Listino_Buste_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinoscontisticabustetocart\";\r\n this.Web_Api_Check_Is_Order_Payed_Unicredit = this.Web_Api_Base_Url + \"/pagonline/verifyunicreditpayment/{orderId}\";\r\n this.Web_Api_Get_Product_And_Categories = this.Web_Api_Base_Url + \"/article/getsearchresults/{startRowIndex}/{maxRows}/{lang}/{query}\";\r\n this.Web_Api_Get_Script_Head = this.Web_Api_Base_Url + \"/cms/getscripthead/{rowid}/{type}/{lang}\";\r\n this.Web_Api_Get_Information_ThankYouPage_Paypal_Url = this.Web_Api_Base_Url + \"/template/getthankyoupagepaypalinfo/{type}/{orderid}/{lang}/{cartid}/{userid}\";\r\n this.Web_Api_Get_Information_ThankYouPage_PagOnline_Url = this.Web_Api_Base_Url + \"/pagonline/getthankyoupagepagonlineinfo/{type}/{orderid}/{lang}/{cartid}/{userid}\";\r\n this.Web_Api_Get_Information_ThankYouPage_Nexi_Url = this.Web_Api_Base_Url + \"/nexi/getthankyoupagenexiinfo/{type}/{orderid}/{messaggio}/{data}/{orario}/{lang}/{cartid}/{userid}\";\r\n this.Web_Api_Get_Template_Url_Page_Not_Found = this.Web_Api_Base_Url + \"/template/getcomponenttemplatepagenotfound/{type}/{lang}/{userid}/{cartid}\";\r\n this.Web_Api_Delete_Customers_Canvas_State = \"/api/users/{userId}/states/{stateId}\";\r\n this.Web_Api_Create_Paypal_Payment = this.Web_Api_Base_Url + \"/paypal/createpaypalpayment\";\r\n this.Web_Api_Execute_Paypal_Payment = this.Web_Api_Base_Url + \"/paypal/executepaypalpayment\";\r\n this.Web_Api_Get_Trustpilot_Data = this.Web_Api_Base_Url + \"/gettrustpilotdata/{type}/{lang}\";\r\n this.Web_Api_Get_DefaultCurrency = this.Web_Api_Base_Url + \"/config/getdefaultcurrency\";\r\n this.Canvas_Web_Api_Base_Url = \"https://h.customerscanvas.com/Users/{apiKey}/SimplePolygraphy\";\r\n this.Paypal_JS_Lirary_Url = \"https://www.paypalobjects.com/api/checkout.js\";\r\n /* constants */\r\n this.Auth_User_Cookie = \"Auth_User\";\r\n this.WscPrinter_Lang = \"WscPrinter_Lang\";\r\n this.Default_Lang = \"it\";\r\n /* images */\r\n this.Offers_Image_Url = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/OFFERTE.jpg\";\r\n this.Products_Image_Url = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/prodotti.jpg\";\r\n this.WizardCheck_Image_Url = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/Wizard_Check-icon.png\";\r\n this.WizardAlert_Image_Url = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/Wizard_Alert-icon.png\";\r\n this.UserLoginImg_Url = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/customer.jpg\";\r\n }\r\n /* web api urls */\r\n Mappings.Web_Api_Get_Token_Url = \"/token\";\r\n Mappings = __decorate([\r\n core_1.Injectable(), \r\n __metadata('design:paramtypes', [(typeof (_a = typeof application_service_1.ApplicationService !== 'undefined' && application_service_1.ApplicationService) === 'function' && _a) || Object])\r\n ], Mappings);\r\n return Mappings;\r\n var _a;\r\n}());\r\nexports.Mappings = Mappings;\r\n\n\n/***/ }),\n\n/***/ 98:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar CartInfo = (function () {\r\n function CartInfo() {\r\n }\r\n return CartInfo;\r\n}());\r\nexports.CartInfo = CartInfo;\r\nvar CartProductModel = (function () {\r\n function CartProductModel() {\r\n }\r\n return CartProductModel;\r\n}());\r\nexports.CartProductModel = CartProductModel;\r\nvar CartAddressModel = (function () {\r\n function CartAddressModel() {\r\n }\r\n return CartAddressModel;\r\n}());\r\nexports.CartAddressModel = CartAddressModel;\r\nvar CartPaymentModel = (function () {\r\n function CartPaymentModel() {\r\n }\r\n return CartPaymentModel;\r\n}());\r\nexports.CartPaymentModel = CartPaymentModel;\r\nvar CartShipmentModel = (function () {\r\n function CartShipmentModel() {\r\n }\r\n return CartShipmentModel;\r\n}());\r\nexports.CartShipmentModel = CartShipmentModel;\r\n\n\n/***/ }),\n\n/***/ 99:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar ClientAreaDetails = (function () {\r\n function ClientAreaDetails() {\r\n }\r\n return ClientAreaDetails;\r\n}());\r\nexports.ClientAreaDetails = ClientAreaDetails;\r\nvar ClientAreaOrderNote = (function () {\r\n function ClientAreaOrderNote() {\r\n }\r\n return ClientAreaOrderNote;\r\n}());\r\nexports.ClientAreaOrderNote = ClientAreaOrderNote;\r\nvar ClientAreaUserProfile = (function () {\r\n function ClientAreaUserProfile() {\r\n }\r\n return ClientAreaUserProfile;\r\n}());\r\nexports.ClientAreaUserProfile = ClientAreaUserProfile;\r\nvar ClientAreaUserAddress = (function () {\r\n function ClientAreaUserAddress() {\r\n }\r\n return ClientAreaUserAddress;\r\n}());\r\nexports.ClientAreaUserAddress = ClientAreaUserAddress;\r\nvar ClientAreaOrderDetails = (function () {\r\n function ClientAreaOrderDetails() {\r\n }\r\n return ClientAreaOrderDetails;\r\n}());\r\nexports.ClientAreaOrderDetails = ClientAreaOrderDetails;\r\nvar PaypalButtonStyleModel = (function () {\r\n function PaypalButtonStyleModel() {\r\n }\r\n return PaypalButtonStyleModel;\r\n}());\r\nexports.PaypalButtonStyleModel = PaypalButtonStyleModel;\r\nvar ClientAreaProcessingOrders = (function () {\r\n function ClientAreaProcessingOrders() {\r\n }\r\n return ClientAreaProcessingOrders;\r\n}());\r\nexports.ClientAreaProcessingOrders = ClientAreaProcessingOrders;\r\nvar ClientAreaOrderProcessMessages = (function () {\r\n function ClientAreaOrderProcessMessages() {\r\n }\r\n return ClientAreaOrderProcessMessages;\r\n}());\r\nexports.ClientAreaOrderProcessMessages = ClientAreaOrderProcessMessages;\r\nvar ClientAreaOrderProcessFile = (function () {\r\n function ClientAreaOrderProcessFile() {\r\n }\r\n return ClientAreaOrderProcessFile;\r\n}());\r\nexports.ClientAreaOrderProcessFile = ClientAreaOrderProcessFile;\r\n\n\n/***/ })\n\n},[896]);\n\n\n// WEBPACK FOOTER //\n// main.bundle.js","import { Injectable, Inject } from '@angular/core';\r\nimport { Http, Headers, RequestOptionsArgs, Response } from '@angular/http';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/throw';\r\nimport 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/catch';\r\nimport 'rxjs/add/observable/empty';\r\n\r\nimport { CacheService } from './cache.service';\r\nimport { NodeLoggerService } from './node-logger.service';\r\nimport { CookieService } from './cookie';\r\n\r\nconst responseStatuses = {\r\n noContent: 204,\r\n authRequired: 401\r\n};\r\n\r\n@Injectable()\r\nexport class ApiService {\r\n\r\n clientSideCaching:boolean = true;\r\n\r\n constructor(private http: Http,\r\n private cache: CacheService,\r\n private nodeLogger: NodeLoggerService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n @Inject('CookieService') private cookie: CookieService) {\r\n }\r\n\r\n /**\r\n * whatever domain/feature method name\r\n */\r\n get(url: string, options?: RequestOptionsArgs): Observable {\r\n \r\n if(this.clientSideCaching == false)\r\n {\r\n if (this.isBrowser && this.cache.has(url)) {\r\n let obs = Observable.of(this.cache.get(url));\r\n this.cache.clear(url);\r\n return obs;\r\n }\r\n options = this.createAuthorizationHeader(options);\r\n return this.http\r\n .get(url, options)\r\n .map(ApiService.extractData)\r\n .do(json => {\r\n if (!this.isBrowser) {\r\n this.cache.set(url, json);\r\n }\r\n })\r\n .catch((err: any) => this.handleError(err));\r\n }\r\n else\r\n {\r\n\r\n if (this.cache.has(url)) {\r\n let obs = Observable.of(this.cache.get(url));\r\n return obs;\r\n }\r\n options = this.createAuthorizationHeader(options);\r\n\r\n\r\n var startDate = new Date();\r\n this.nodeLogger.AddLogWithTime(\"START REQUEST \"+url);\r\n\r\n return this.http\r\n .get(url, options)\r\n .map(ApiService.extractData)\r\n .do(json => {\r\n\r\n var endDate = new Date();\r\n\r\n var timeDiff = Math.abs(endDate.getTime() - startDate.getTime());\r\n var diffMs = Math.ceil(timeDiff); \r\n\r\n this.nodeLogger.AddLogWithTime(\"END REQUEST \"+url+\"(\"+diffMs+\")\");\r\n \r\n this.cache.set(url, json);\r\n })\r\n .catch((err: any) => this.handleError(err));\r\n }\r\n\r\n }\r\n\r\n /**\r\n * whatever domain/feature method name\r\n */\r\n getUniversalCached(url: string, options?: RequestOptionsArgs): Observable {\r\n if (this.isBrowser && this.cache.has(url)) {\r\n \r\n let obs = Observable.of(this.cache.get(url));\r\n this.cache.clear(url);\r\n return obs;\r\n }\r\n\r\n options = this.createAuthorizationHeader(options);\r\n return this.http\r\n .get(url, options)\r\n .map(ApiService.extractData)\r\n .do(json => {\r\n if (!this.isBrowser) {\r\n this.cache.set(url, json);\r\n }\r\n })\r\n .catch((err: any) => this.handleError(err));\r\n }\r\n\r\n post(url, body?: any, options?: RequestOptionsArgs): Observable {\r\n options = this.createAuthorizationHeader(options);\r\n return this.http\r\n .post(url, body, options)\r\n .map(ApiService.extractData)\r\n .catch((err: any) => this.handleError(err));\r\n }\r\n\r\n private createAuthorizationHeader(options: RequestOptionsArgs = {}) {\r\n\r\n //Token is read from cache and not cookie. \r\n //Note: Before it was read form cookie and it was not containing the last token.\r\n //Because the set cookie is done on the response and the get cookie is done on the request.\r\n let token = this.cache.get('__ACCESS_TOKEN__');\r\n\r\n if (token) {\r\n if (!options.headers) {\r\n options.headers = new Headers();\r\n }\r\n\r\n options.headers.append('Authorization', `Bearer ${token}`);\r\n }\r\n\r\n return options;\r\n }\r\n\r\n\r\n private static extractData(res: Response): {[key: string]: any} {\r\n if (res.status === responseStatuses.noContent) {\r\n return {};\r\n }\r\n\r\n let body = res.json();\r\n return body || {};\r\n }\r\n\r\n private handleError(err): Observable {\r\n\r\n this.nodeLogger.AddLogWithTime(\"Error: \"+err);\r\n\r\n let cookieToken = this.cookie.get('accessToken');\r\n let cacheToken = this.cache.get('__ACCESS_TOKEN__');\r\n\r\n if (!this.isBrowser) {\r\n return Observable.empty();\r\n }\r\n \r\n switch (err.status) {\r\n case 401:\r\n this.handleUnauthorized();\r\n break;\r\n default:\r\n break;\r\n }\r\n return Observable.throw(err);\r\n }\r\n\r\n private handleUnauthorized() {\r\n //If the token expires while using the application, the user is redirected to home page to get a new token and start navigation from there.\r\n if (this.isBrowser)\r\n {\r\n window.location.href = \"/\";\r\n }\r\n }\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/api.service.ts","import { ShoppingCartService } from './../inventory/shopping-cart.service';\r\nimport { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { Register } from \"./../../models/cms/register\";\r\nimport { LanguageService } from './language.service';\r\nimport { AuthService } from '../core/auth.service';\r\n\r\n@Injectable()\r\nexport class RegisterService {\r\n constructor\r\n (\r\n public _api: ApiService,\r\n public _cache: CacheService,\r\n private mappings: Mappings,\r\n private cartService: ShoppingCartService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n ) { }\r\n\r\n private facebookLoginData: any;\r\n\r\n sendInfoRequest(parameters: Register) {\r\n let cartId = this.cartService.getCartId();\r\n parameters.CartId = cartId;\r\n \r\n parameters.EmailRegister = parameters.EmailRegister ? parameters.EmailRegister.toLowerCase() : \"\";\r\n parameters.EmailRepeat = parameters.EmailRepeat ? parameters.EmailRepeat.toLowerCase() : \"\";\r\n parameters.PecEmail = parameters.PecEmail ? parameters.PecEmail.toLowerCase() : \"\";\r\n \r\n return this._api.post(this.mappings.Web_Api_Post_Register, parameters)\r\n .do(result => result)\r\n .share();\r\n }\r\n\r\n getRegisterPageData(lang: string) {\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Register_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}',customerId)\r\n .replace('{cartid}', cartId);\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n confirmationRegistration(id: string) {\r\n let url = this.mappings.Web_Api_Post_Confirm_Registration.replace('{id}', id);\r\n\r\n return this._api.post(url);\r\n }\r\n\r\n setFacebookLoginData(registerData: any) {\r\n this.facebookLoginData = registerData;\r\n }\r\n\r\n getFacebookLoginData() {\r\n return this.facebookLoginData;\r\n }\r\n\r\n getRegistrationCompletePageData()\r\n {\r\n let lang = this.languageService.getLongLang();\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n let url = this.mappings.Web_Api_Get_Registration_Complete_Page_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}',customerId)\r\n .replace('{cartid}', cartId);\r\n\r\n return this._api.get(url); \r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/register.service.ts","/**\r\n * @license\r\n * Copyright Google Inc. All Rights Reserved.\r\n *\r\n * Use of this source code is governed by an MIT-style license that can be\r\n * found in the LICENSE file at https://angular.io/license\r\n */\r\n\r\nimport {Injectable, Inject } from '@angular/core';\r\n// es6-modules are used here\r\nimport {DomAdapter, getDOM} from '@angular/platform-browser/src/dom/dom_adapter';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n\r\n/**\r\n * Represent meta element.\r\n *\r\n * ### Example\r\n *\r\n * ```ts\r\n * { name: 'application-name', content: 'Name of my application' },\r\n * { name: 'description', content: 'A description of the page', id: 'desc' }\r\n * // ...\r\n * // Twitter\r\n * { name: 'twitter:title', content: 'Content Title' }\r\n * // ...\r\n * // Google+\r\n * { itemprop: 'name', content: 'Content Title' },\r\n * { itemprop: 'description', content: 'Content Title' }\r\n * // ...\r\n * // Facebook / Open Graph\r\n * { property: 'fb:app_id', content: '123456789' },\r\n * { property: 'og:title', content: 'Content Title' }\r\n * ```\r\n *\r\n * @experimental\r\n */\r\nexport interface MetaDefinition {\r\n charset?: string;\r\n content?: string;\r\n httpEquiv?: string;\r\n id?: string;\r\n itemprop?: string;\r\n name?: string;\r\n property?: string;\r\n scheme?: string;\r\n url?: string;\r\n [prop: string]: string;\r\n}\r\n\r\n/**\r\n * A service that can be used to get and add meta tags.\r\n *\r\n * @experimental\r\n */\r\n@Injectable()\r\nexport class Meta {\r\nconstructor(@Inject(DOCUMENT) private _document: any) {}\r\n\r\n private _dom: DomAdapter = getDOM();\r\n\r\n /**\r\n * Adds a new meta tag to the dom.\r\n *\r\n * ### Example\r\n *\r\n * ```ts\r\n * const name: MetaDefinition = {name: 'application-name', content: 'Name of my application'};\r\n * const desc: MetaDefinition = {name: 'description', content: 'A description of the page'};\r\n * const tags: HTMLMetaElement[] = this.meta.addTags([name, desc]);\r\n * ```\r\n *\r\n * @param tags\r\n * @returns {HTMLMetaElement[]}\r\n */\r\n addTags(...tags: Array): HTMLMetaElement[] {\r\n const presentTags = this._flattenArray(tags);\r\n if (presentTags.length === 0) return [];\r\n return presentTags.map((tag: MetaDefinition) => this._addInternal(tag));\r\n }\r\n\r\n /**\r\n * Gets the meta tag by the given selector. Returns element or null\r\n * if there's no such meta element.\r\n *\r\n * ### Example\r\n *\r\n * ```ts\r\n * const meta: HTMLMetaElement = this.meta.getTag('name=description');\r\n * const twitterMeta: HTMLMetaElement = this.meta.getTag('name=\"twitter:title\"');\r\n * const fbMeta: HTMLMetaElement = this.meta.getTag('property=\"fb:app_id\"');\r\n * ```\r\n *\r\n * @param selector\r\n * @returns {HTMLMetaElement}\r\n */\r\n getTag(selector: string): HTMLMetaElement {\r\n if (!selector) return null;\r\n return this._dom.query(`meta[${selector}]`);\r\n }\r\n\r\n /**\r\n * Updates the meta tag with the given selector.\r\n *\r\n * * ### Example\r\n *\r\n * ```ts\r\n * const meta: HTMLMetaElement = this.meta.updateTag('name=description', {name: 'description',\r\n * content: 'New description'});\r\n * console.log(meta.content); // 'New description'\r\n * ```\r\n *\r\n * @param selector\r\n * @param tag updated tag definition\r\n * @returns {HTMLMetaElement}\r\n */\r\n updateTag(selector: string, tag: MetaDefinition): HTMLMetaElement {\r\n const meta: HTMLMetaElement = this.getTag(selector);\r\n if (!meta) {\r\n // create element if it doesn't exist\r\n return this._addInternal(tag);\r\n }\r\n return this._prepareMetaElement(tag, meta);\r\n }\r\n\r\n /**\r\n * Removes meta tag with the given selector from the dom.\r\n *\r\n * ### Example\r\n *\r\n * ```ts\r\n * this.meta.removeTagBySelector('name=description');\r\n * ```\r\n *\r\n * @param selector\r\n */\r\n removeTagBySelector(selector: string): void {\r\n const meta: HTMLMetaElement = this.getTag(selector);\r\n this.removeTagElement(meta);\r\n }\r\n\r\n /**\r\n * Removes given meta element from the dom.\r\n *\r\n * ### Example\r\n * ```ts\r\n * const elem: HTMLMetaElement = this.meta.getTag('name=description');\r\n * this.meta.removeTagElement(elem);\r\n * ```\r\n *\r\n * @param meta meta element\r\n */\r\n removeTagElement(meta: HTMLMetaElement): void {\r\n if (meta) {\r\n this._removeMetaElement(meta);\r\n }\r\n }\r\n\r\n setTitle(title:string): void\r\n {\r\n this._document.title = title\r\n }\r\n\r\n private _addInternal(tag: MetaDefinition): HTMLMetaElement {\r\n const meta: HTMLMetaElement = this._createMetaElement();\r\n this._prepareMetaElement(tag, meta);\r\n this._appendMetaElement(meta);\r\n return meta;\r\n }\r\n\r\n private _createMetaElement(): HTMLMetaElement {\r\n return this._dom.createElement('meta') as HTMLMetaElement;\r\n }\r\n\r\n private _prepareMetaElement(tag: MetaDefinition, el: HTMLMetaElement): HTMLMetaElement {\r\n Object.keys(tag).forEach((prop: string) => this._dom.setAttribute(el, prop, tag[prop]));\r\n return el;\r\n }\r\n\r\n private _appendMetaElement(meta: HTMLMetaElement): void {\r\n const head = this._document.head;\r\n this._dom.appendChild(head, meta);\r\n }\r\n\r\n private _removeMetaElement(meta: HTMLMetaElement): void {\r\n const head = this._dom.parentElement(meta);\r\n this._dom.removeChild(head, meta);\r\n }\r\n\r\n private _flattenArray(input: any[], out: any[] = []): any[] {\r\n if (input) {\r\n for (let i = 0; i < input.length; i++) {\r\n const item: any = input[i];\r\n if (Array.isArray(item)) {\r\n this._flattenArray(item, out);\r\n } else if (item) {\r\n out.push(item);\r\n }\r\n }\r\n }\r\n return out;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/angular2-meta.ts","import { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable, Inject } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings} from '../../shared/mapping';\r\nimport { LocalStorageService } from \"./../core/local-storage\";\r\n\r\n//Model\r\nimport { UserLogin } from \"./../../models/cms/user-login\";\r\nimport { CookieService } from \"./cookie/cookie.service\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { CryptoService } from \"./crypto.service\";\r\n\r\n@Injectable()\r\nexport class AuthService \r\n{\r\n private loggedInUser: UserLogin = null;\r\n\r\n constructor\r\n (\r\n public _api: ApiService, public _cache: CacheService,\r\n @Inject('CookieService') private cookie: CookieService,\r\n private router: Router,\r\n private cryptoService: CryptoService \r\n ) {}\r\n\r\n GetData() \r\n {\r\n let user: UserLogin = new UserLogin()\r\n\r\n if (this.cookie.getObject(\"user\") === undefined) \r\n {\r\n this.loggedInUser = null;\r\n }\r\n\r\n else if (this.cookie.getObject(\"user\") != undefined) \r\n {\r\n let regUser = this.cookie.getObject(\"user\");\r\n user.username = regUser[\"username\"];\r\n\r\n user.isAuthenticated = Boolean(regUser[\"isAuthenticated\"]);\r\n let registeredUser = { \"isAuthenticated\": user.isAuthenticated, \"username\": user.username }\r\n this.loggedInUser = registeredUser;\r\n user = this.loggedInUser;\r\n }\r\n \r\n return user;\r\n }\r\n\r\n GetUserId()\r\n {\r\n let decryptedUserId = \"0\";\r\n let encryptedUserId = this.cookie.get(\"qazwsxedc\");\r\n if (encryptedUserId != null || encryptedUserId != undefined)\r\n {\r\n decryptedUserId = encryptedUserId; \r\n }\r\n else \r\n {\r\n decryptedUserId = this.cryptoService.encryptNumber(Number(decryptedUserId)); \r\n }\r\n \r\n return decryptedUserId;\r\n }\r\n\r\n GetDecryptedUserId()\r\n {\r\n let decryptedUserId = 0;\r\n let encryptedUserId = this.cookie.get(\"qazwsxedc\");\r\n\r\n if (encryptedUserId != null || encryptedUserId != undefined)\r\n {\r\n decryptedUserId = this.cryptoService.decryptNumber(encryptedUserId); \r\n }\r\n else \r\n {\r\n decryptedUserId = Number(this.cryptoService.encryptNumber(decryptedUserId)); \r\n }\r\n \r\n return decryptedUserId;\r\n }\r\n\r\n\r\n Login(id: string, username: string) \r\n {\r\n let user: UserLogin = new UserLogin();\r\n \r\n // user.id = Number(id);\r\n user.isAuthenticated = true;\r\n user.username = username;\r\n \r\n let cryptedUserId = this.cryptoService.encryptNumber(Number(id));\r\n\r\n this.cookie.putObject(\"user\", {\"isAuthenticated\":\"true\", \"username\":username})\r\n\r\n this.cookie.put(\"qazwsxedc\", cryptedUserId);\r\n }\r\n\r\n Logout() \r\n {\r\n this.loggedInUser = null;\r\n this.cookie.remove(\"user\");\r\n this.cookie.remove(\"qazwsxedc\");\r\n \r\n var currentRoute = this.router.url;\r\n\r\n if (currentRoute == \"/it/home\" || \"/en/home\")\r\n {\r\n window.location.reload();\r\n }\r\n\r\n this.router.navigateByUrl(\"\");\r\n }\r\n\r\n getCurrentUserId(): string\r\n { \r\n let userId = this.GetUserId();\r\n\r\n return userId;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/auth.service.ts","import { Injectable, Inject, Renderer } from '@angular/core';\r\nimport { Meta } from './../../services/core/angular2-meta';\r\nimport { SeoViewModel } from \"./../../models/core/seo\";\r\nimport { DomAdapter, getDOM } from '@angular/platform-browser/src/dom/dom_adapter';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n\r\nexport interface LinkDefinition {\r\n charset?: string;\r\n crossorigin?: string;\r\n href?: string;\r\n hreflang?: string;\r\n media?: string;\r\n rel?: string;\r\n rev?: string;\r\n sizes?: string;\r\n target?: string;\r\n type?: string;\r\n [prop: string]: string;\r\n}\r\n\r\n@Injectable()\r\nexport class SeoService {\r\n private _dom: DomAdapter = getDOM();\r\n constructor(@Inject(DOCUMENT) private _document: any,\r\n private metaService: Meta,\r\n private translate: TranslateService,\r\n ) {\r\n }\r\n\r\n setSeoInformation(seoInformation: SeoViewModel) {\r\n this.metaService.updateTag('name=Keywords', { name: 'Keywords', content: seoInformation.Keywords })\r\n this.metaService.updateTag('name=Description', { name: 'Description', content: seoInformation.Description })\r\n this.metaService.updateTag('property=\"og:description\"', { property: 'og:description', content: seoInformation.Description })\r\n this.metaService.updateTag('property=\"og:title\"', { property: 'og:title', content: seoInformation.Title })\r\n this.metaService.updateTag('name=Robots', { name: 'Robots', content: seoInformation.SeoRobots })\r\n this.metaService.setTitle(seoInformation.Title);\r\n this.updateCanonicalTag('link', { rel: 'canonical', href: seoInformation.Url })\r\n }\r\n\r\n setSeoUserArea(url: string) {\r\n this.metaService.updateTag('name=Keywords', { name: 'Keywords', content: \"\" })\r\n this.metaService.updateTag('name=Description', { name: 'Description', content: \"\" })\r\n this.metaService.updateTag('property=\"og:description\"', { property: 'og:description', content: \"\" })\r\n this.metaService.updateTag('property=\"og:title\"', { property: 'og:title', content: \"\" })\r\n this.metaService.updateTag('name=Robots', { name: 'Robots', content: \"index,follow\" })\r\n let title = this.getLabel(\"user_area\");\r\n this.metaService.setTitle(title);\r\n\r\n this.updateCanonicalTag('link', { rel: 'canonical', href: url })\r\n }\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n\r\n return message;\r\n }\r\n\r\n getCanonicalLink(selector: string): HTMLLinkElement {\r\n if (!selector) return null;\r\n return this._dom.query(selector);\r\n }\r\n\r\n updateCanonicalTag(selector: string, tag: LinkDefinition): HTMLLinkElement {\r\n const canonical: HTMLLinkElement = this.getCanonicalLink(selector);\r\n if (!canonical) {\r\n //create element if it doesn't exist\r\n return this._addInternalCanonical(tag);\r\n }\r\n return this._prepareLinkElement(tag, canonical);\r\n }\r\n\r\n //-- *********************************** ANGULAR SERVER SIDE SEO SETUP START ***********************************\r\n generateSeoDomServerSide(document, renderer: Renderer, seoData: SeoViewModel) {\r\n let rootElement, h1, h2, h3, linkEl, nodeList, description;\r\n if (!seoData)\r\n return;\r\n\r\n //-- Creating root element which will be hidden, but available for crawling\r\n rootElement = renderer.createElement(document.body, 'div');\r\n renderer.setElementClass(rootElement, 'd-none', true);\r\n\r\n nodeList = [];\r\n\r\n //-- Creating h1 element\r\n if (seoData.H1) {\r\n h1 = renderer.createElement(document.body, 'h1');\r\n renderer.createText(h1, seoData.H1);\r\n nodeList.push(h1);\r\n }\r\n\r\n //-- Creating h2 element\r\n if (seoData.H2) {\r\n h2 = renderer.createElement(document.body, 'h2');\r\n renderer.createText(h2, seoData.H2);\r\n nodeList.push(h2);\r\n }\r\n\r\n //-- Creating h3 element\r\n if (seoData.H3) {\r\n h3 = renderer.createElement(document.body, 'h3');\r\n renderer.createText(h3, seoData.H3);\r\n nodeList.push(h3);\r\n }\r\n\r\n //-- Creating p short description element\r\n if (seoData.ShortDescription) {\r\n description = renderer.createElement(document.body, 'p');\r\n renderer.setElementProperty(description,'innerHTML',seoData.ShortDescription)\r\n nodeList.push(description);\r\n }\r\n\r\n //-- Creating p short description element\r\n if (seoData.LongDescription) {\r\n description = renderer.createElement(document.body, 'p');\r\n renderer.setElementProperty(description,'innerHTML',seoData.LongDescription)\r\n nodeList.push(description);\r\n }\r\n //-- Appending all elements to the root element as a children\r\n renderer.projectNodes(rootElement, nodeList);\r\n\r\n //generate sitemap list for all pages\r\n this.generateSiteMapList(document, seoData.SiteMapList);\r\n }\r\n\r\n generateSiteMapList(document, siteMapHtml) {\r\n let stringToInject = \"
    \";\r\n //this.appendHtmlString(document.body,\"
      \");\r\n siteMapHtml.forEach(element => {\r\n stringToInject += \"
    • \" + element + \"
    • \"\r\n });\r\n stringToInject += \"
    \";\r\n //this.appendHtmlString(document.body,\"
\");\r\n this.appendHtmlString(document.body, stringToInject);\r\n }\r\n\r\n appendHtmlString(el: any, template: string) {\r\n let div = this._dom.createElement('');\r\n this._dom.setInnerHTML(div, template);\r\n this._dom.insertAllBefore(el.lastChild, this._dom.childNodes(div));\r\n }\r\n\r\n appendScriptsToDOM(el: any, template: string) {\r\n let div = this._dom.createElement('div');\r\n this._dom.setInnerHTML(div, template);\r\n\r\n let listEl = this._dom.childNodesAsList(div);\r\n listEl.forEach(element => this._dom.insertAfter(el.lastChild, element));\r\n }\r\n\r\n setSeoMetaData(document, renderer: Renderer, seoData: SeoViewModel, imgLink = \"\") {\r\n //console.log( seoData)\r\n if (!seoData)\r\n return;\r\n //console.log( seoData.Title)\r\n this.updateMetaDataTitle(renderer, seoData.Title || '');\r\n //-- Setting canonicals\r\n this.createMetaTagUniversalAttribute(document, renderer, 'link', 'rel', 'canonical', 'href', seoData.Url || '');\r\n\r\n //-- Setting meta tags and open graph tags\r\n this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'Keywords', 'content', seoData.Keywords || '');\r\n this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'Robots', 'content', seoData.SeoRobots || '');\r\n this.createMetaTagUniversalAttribute(document, renderer, 'meta', 'name', 'description', 'content', seoData.Description || '');\r\n\r\n this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:description', 'content', seoData.Description || '');\r\n this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:title', 'content', seoData.Title || '');\r\n if (imgLink != null && imgLink.length > 0) {\r\n this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:image', 'content', imgLink || '');\r\n }\r\n this.createMetaTagUniversalProperty(document, renderer, 'meta', 'property', 'og:type', 'content', 'article');\r\n\r\n }\r\n\r\n //-- Updating of title for seo optimization\r\n updateMetaDataTitle(renderer: Renderer, value) {\r\n if (renderer && value)\r\n renderer.setText(renderer.selectRootElement('title'), value);\r\n }\r\n\r\n //-- Creating meta attributes for seo\r\n createMetaTagUniversalAttribute(document, renderer: Renderer, elementType, propertyNameFirst, valueFirst, propertyNameSecond = \"\", valueSecond = \"\") {\r\n let elem = renderer.createElement(document.head, elementType);\r\n if (propertyNameFirst && valueFirst) {\r\n renderer.setElementAttribute(elem, propertyNameFirst, valueFirst);\r\n }\r\n\r\n if (propertyNameSecond && valueSecond)\r\n renderer.setElementAttribute(elem, propertyNameSecond, valueSecond);\r\n }\r\n\r\n //-- Creating meta properties for social networks seo\r\n createMetaTagUniversalProperty(document, renderer: Renderer, elementType, propertyNameFirst, valueFirst, propertyNameSecond = \"\", valueSecond = \"\") {\r\n let elem = renderer.createElement(document.head, elementType);\r\n if (propertyNameFirst && valueFirst) {\r\n renderer.setElementProperty(elem, propertyNameFirst, valueFirst);\r\n }\r\n\r\n if (propertyNameSecond && valueSecond)\r\n renderer.setElementProperty(elem, propertyNameSecond, valueSecond);\r\n }\r\n\r\n //-- ************************************ ANGULAR SERVER SIDE SEO SETUP END*************************************\r\n\r\n private _addInternalCanonical(tag: LinkDefinition): HTMLLinkElement {\r\n const canonical: HTMLLinkElement = this._createLinkElement();\r\n this._prepareLinkElement(tag, canonical);\r\n this._appendLinkElement(canonical);\r\n return canonical;\r\n }\r\n\r\n private _prepareLinkElement(tag: LinkDefinition, el: HTMLLinkElement): HTMLLinkElement {\r\n Object.keys(tag).forEach((prop: string) => this._dom.setAttribute(el, prop, tag[prop]));\r\n return el;\r\n }\r\n\r\n private _appendLinkElement(meta: HTMLLinkElement): void {\r\n const head = this._document.head;\r\n this._dom.appendChild(head, meta);\r\n }\r\n\r\n private _createLinkElement(): HTMLLinkElement {\r\n return this._dom.createElement('link') as HTMLLinkElement;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/seo.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { News } from \"./../../models/cms/news-list\";\r\nimport { LanguageService } from './language.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from '../core/auth.service';\r\n\r\n\r\n@Injectable()\r\nexport class ArticleService {\r\n constructor\r\n (\r\n public _api: ApiService,\r\n public _cache: CacheService,\r\n private mappings: Mappings,\r\n private languageService: LanguageService,\r\n private cartService: ShoppingCartService,\r\n private authService: AuthService\r\n ) { }\r\n\r\n getArticleList(category: string, listtype: string) {\r\n let lang = this.languageService.getLongLang();\r\n\r\n let url = this.mappings.Web_Api_Get_Article_List.replace('{category}', category).replace('{listtype}', listtype).replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getArticleDetails(id: number, lang: string) {\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n let url = this.mappings.Web_Api_Get_News_Details.replace('{lang}', lang).replace('{id}', id.toString()).replace('{userid}',customerId).replace('{cartid}', cartId);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getArticleByUrl(lang: string, seoUrl: string) {\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId(); \r\n let url = this.mappings.Web_Api_Get_Article_By_Url.replace('{lang}', lang).replace('{seoUrl}', seoUrl).replace('{userid}',customerId).replace('{cartid}', cartId);\r\n let key = url;\r\n\r\n return this._api.get(url)\r\n }\r\n\r\n GetArticleByCategoryIdandRows(categoryId: number, lang: string, startRowIndex: number, maxRows: number) {\r\n let url = this.mappings.Web_Api_Get_Article_By_Category_Id.replace('{categoryId}', categoryId.toString()).replace('{lang}', lang).replace('{startRowIndex}', startRowIndex.toString()).replace('{maxRows}', maxRows.toString());\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getBlogData(lang: string, startRowIndex: number, maxRows: number) {\r\n let numberOfItems: number = 15;\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Blog_Data.replace('{lang}', lang).replace('{startRowIndex}', startRowIndex.toString()).replace('{maxRows}', maxRows.toString()).replace('{userid}',customerId).replace('{cartid}', cartId);\r\n let key = url;\r\n return this._api.get(url);\r\n }\r\n\r\n getArticleListCategory(lang: string) {\r\n let url = this.mappings.Web_Api_Get_Article_List_Category.replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getCategoryArticleById(categoryId: string, lang: string, startRowIndex: number, maxRows: number) {\r\n\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n let url = this.mappings.Web_Api_Get_Article_Category_By_Id\r\n .replace('{categoryId}', categoryId)\r\n .replace('{lang}', lang)\r\n .replace('{startRowIndex}', startRowIndex.toString())\r\n .replace('{maxRows}', maxRows.toString())\r\n .replace('{userid}', customerId)\r\n \t .replace('{cartid}', cartId);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getArticleCategoryByUrl(lang: string, categoryUrl: string, startRowIndex: number, maxRows: number) {\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n let url = this.mappings.Web_Api_Get_Article_Category_By_Url\r\n .replace('{lang}', lang)\r\n .replace('{startRowIndex}', startRowIndex.toString())\r\n .replace('{maxRows}', maxRows.toString())\r\n .replace('{categoryUrl}', categoryUrl)\r\n .replace('{userid}', customerId)\r\n \t .replace('{cartid}', cartId);\r\n let key = url;\r\n\r\n return this._api.get(url)\r\n }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/article.service.ts","import { Observable } from 'rxjs/Observable';\r\nimport { Injectable } from '@angular/core';\r\nimport { BehaviorSubject } from 'rxjs'; \r\nimport { ApiService } from '../core/api.service';\r\nimport { AuthService } from \"../core/auth.service\";\r\nimport { UserLogin } from \"../../models/cms/user-login\";\r\n\r\n@Injectable()\r\nexport class HeaderService \r\n{\r\n constructor\r\n (\r\n public _api: ApiService,\r\n private authService: AuthService\r\n ) {\r\n }\r\n\r\n toShowQuickRegistration: boolean = false;\r\n\r\n // Observable source of logged in user\r\n private loginInfo: UserLogin = this.authService.GetData();\r\n private loggedInUser = new BehaviorSubject(this.loginInfo);\r\n\r\n getLoggedInUser(): Observable {\r\n return this.loggedInUser.asObservable();\r\n }\r\n\r\n setLoggedInUser(user: UserLogin)\r\n {\r\n this.loggedInUser.next(user);\r\n }\r\n\r\n setToShowQuickRegistration(toShow: boolean)\r\n {\r\n this.toShowQuickRegistration = toShow;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/header.service.ts","import { Injectable, Inject } from '@angular/core';\r\nimport { URLSearchParams, Headers } from '@angular/http';\r\nimport { Observable } from 'rxjs';\r\n\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { AppConfig } from '../../models/core/app-config';\r\nimport { ApiService } from './api.service';\r\nimport { CookieService } from './cookie';\r\nimport { CacheService } from './cache.service';\r\nimport { NodeLoggerService } from './node-logger.service';\r\n\r\n@Injectable()\r\nexport class ApplicationService {\r\n static ACCESS_TOKEN_KEY: string = 'accessToken';\r\n static APPLICATION_CONFIG: string = 'ApplicationConfig';\r\n\r\n public get accessToken(): string {\r\n return this.cookie.get(ApplicationService.ACCESS_TOKEN_KEY);\r\n }\r\n\r\n public config: AppConfig;\r\n\r\n constructor(private api: ApiService,\r\n @Inject('isNode') private isNode: boolean,\r\n @Inject('CookieService') private cookie: CookieService,\r\n private cache: CacheService,\r\n private nodeLogger: NodeLoggerService) {\r\n this.getConfig();\r\n }\r\n\r\n public getToken(): Observable {\r\n if (!this.isNode /*|| 'string' === typeof this.accessToken*/) {\r\n return;\r\n }\r\n\r\n var startDate = new Date();\r\n\r\n let params = this.getCredentialsParams();\r\n let headers = new Headers();\r\n headers.append('Content-Type', 'application/x-www-form-urlencoded');\r\n return this.api\r\n .post(`${this.config.apiUrl}${Mappings.Web_Api_Get_Token_Url}`, params, {headers})\r\n .do(({access_token}) => {\r\n if (access_token) {\r\n this.cache.set('__ACCESS_TOKEN__', access_token);\r\n this.cookie.put(ApplicationService.ACCESS_TOKEN_KEY, access_token);\r\n }\r\n });\r\n }\r\n\r\n private getCredentialsParams() {\r\n let config = this.getConfig();\r\n let params = new URLSearchParams();\r\n params.set('grant_type', 'password');\r\n params.set('username', config.credentials.username);\r\n params.set('password', config.credentials.password);\r\n return params;\r\n }\r\n\r\n public getConfig(): any {\r\n if (this.config) {\r\n return this.config;\r\n }\r\n if (this.isNode) {\r\n const fs = require('fs');\r\n this.config = JSON.parse(fs.readFileSync('src/assets/config.json', 'utf8'));\r\n this.setConfigToCache();\r\n } else {\r\n this.config = this.cache.get(ApplicationService.APPLICATION_CONFIG);\r\n }\r\n return this.config;\r\n }\r\n\r\n private setConfigToCache() {\r\n let privateKeys = ['credentials'];\r\n let configForCache = {};\r\n for (let key in this.config) if (this.config.hasOwnProperty(key)) {\r\n if (privateKeys.indexOf(key) === -1) {\r\n configForCache[key] = this.config[key];\r\n }\r\n }\r\n this.cache.set(ApplicationService.APPLICATION_CONFIG, configForCache);\r\n }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/application.service.ts","//Angular\r\n\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n//System\r\nimport { Mappings} from '../../shared/mapping'\r\n\r\n//Model\r\nimport { Company } from \"./../../models/core/company\";\r\n\r\n//Services\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\n\r\n@Injectable()\r\nexport class CompanyService {\r\n constructor(public _api: ApiService, public _cache: CacheService, private mappings: Mappings) {\r\n }\r\n\r\n getCompany(){\r\n let url = this.mappings.Web_Api_Get_Default_Company;\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/company.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';import { Router } from '@angular/router';\r\nimport { ApiService } from \"./api.service\";\r\nimport { Mappings } from \"../../shared/mapping\";\r\n\r\n@Injectable()\r\nexport class MessagesService {\r\n\r\n constructor\r\n (\r\n protected router: Router,\r\n protected _api: ApiService,\r\n protected mappings: Mappings\r\n ) {}\r\n\r\n setMessagesAsRead(params) \r\n {\r\n let url = this.mappings.Web_Api_Get_Client_Area_Messages;\r\n \r\n return this._api.post(url, params);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/messages.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';import { Router } from '@angular/router';\r\nimport { ApiService } from \"./api.service\";\r\nimport { Mappings } from \"../../shared/mapping\";\r\n\r\n@Injectable()\r\nexport class ValidationService {\r\n\r\n constructor\r\n (\r\n protected router: Router,\r\n protected _api: ApiService,\r\n protected mappings: Mappings\r\n ) {}\r\n\r\n //validation of phone numbers, disable writing any characters in input except of numbers \r\n validatePhoneNumber(event: any)\r\n {\r\n const pattern = /[0-9]/;\r\n let inputChar = String.fromCharCode(event.charCode);\r\n \r\n if (!pattern.test(inputChar)) {\r\n // invalid character, prevent input\r\n event.preventDefault();\r\n }\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/validation.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { AuthService } from '../core/auth.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { ShoppingCartService } from './shopping-cart.service';\r\n\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\n\r\n@Injectable()\r\nexport class ProductService {\r\n constructor(\r\n public _api: ApiService,\r\n public _cache: CacheService,\r\n public currencyService: CurrencyService,\r\n public ShoppingCartService: ShoppingCartService,\r\n private mappings: Mappings,\r\n private authService: AuthService) {\r\n }\r\n\r\n getProductDetails(productId: number, productType: string, lang: string) {\r\n\r\n //Reading userId\r\n let customerId = this.authService.getCurrentUserId();\r\n let curr = this.currencyService.getCurrency();\r\n let cartId = this.ShoppingCartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Product_Details\r\n .replace('{productId}', productId.toString())\r\n .replace('{productType}', productType)\r\n .replace('{lang}', lang)\r\n .replace('{customerid}', customerId)\r\n .replace('{currency}', curr)\r\n .replace('{cartid}', cartId);\r\n\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getProductsPromotionsData(lang: string) {\r\n let customerId = this.authService.getCurrentUserId();\r\n let curr = this.currencyService.getCurrency();\r\n let cartId = this.ShoppingCartService.getCartId();\r\n \r\n let url = this.mappings.Web_Api_Get_Products_In_Promotion_Data.replace('{lang}', lang).replace('{currency}', curr).replace('{userid}',customerId).replace('{cartid}', cartId);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getProductDetailsBySeoUrl(lang: string, seoUrl: string) {\r\n\r\n //Reading userId\r\n let customerId = this.authService.GetUserId();\r\n let curr = this.currencyService.getCurrency();\r\n let cartId = this.ShoppingCartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Product_By_Url\r\n .replace('{lang}', lang)\r\n .replace('{customerid}', customerId)\r\n .replace('{currency}', curr)\r\n .replace('{seoUrl}', seoUrl)\r\n .replace('{cartid}', cartId);\r\n\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getPriceData(productId: number, lang: string) {\r\n //Reading userId\r\n let customerId = this.authService.getCurrentUserId();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Get_Price_Data\r\n .replace('{productId}', productId.toString())\r\n .replace('{lang}', lang)\r\n .replace('{customerid}', customerId)\r\n .replace('{currency}', curr);\r\n\r\n return this._api.get(url);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/inventory/product.service.ts","import { Injectable, ViewContainerRef, Inject } from '@angular/core';\r\nimport { DomAdapter, getDOM } from '@angular/platform-browser/src/dom/dom_adapter';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { LanguageService } from \"../cms/language.service\";\r\n\r\nimport { SeoService } from '../core/seo.service';\r\nimport { Meta } from '../core/angular2-meta';\r\n\r\n\r\n@Injectable()\r\nexport class ScriptService {\r\n private _dom: DomAdapter = getDOM();\r\n constructor\r\n (\r\n public _api: ApiService,\r\n @Inject(DOCUMENT) private document: any,\r\n private mappings: Mappings,\r\n private language: LanguageService,\r\n private seo: SeoService,\r\n private metaService: Meta\r\n ) { }\r\n\r\n typeSystemPage: string = \"systemPage\";\r\n typeArticleCategory: string = \"articleCategory\";\r\n typeArticle: string = \"article\";\r\n typeCmsPage: string = \"page\";\r\n typeCatalogCategory: string = \"category\";\r\n typeCatalogOtherProduct: string = \"otherProduct\";\r\n typeCatalogProduct: string = \"product\";\r\n\r\n infoRequestId: string = \"26\";\r\n userAreaId: string = \"18\";\r\n privacyPolicyId: string = \"36\";\r\n purchaseConditionsId: string = \"37\";\r\n faqsId: string = \"38\";\r\n cookiesId: string = \"35\";\r\n homeId: string = \"1\";\r\n loginId: string = \"2\";\r\n blogHomeId: string = \"40\";\r\n productsCatalogId: string = \"29\";\r\n promotionsId: string = \"16\";\r\n cartId: string = \"12\";\r\n cartCashId: string = \"15\";\r\n cartSubmittedId: string = \"43\";\r\n userRegistrationId: string = \"5\";\r\n userRecoverPasswordId: string = \"7\";\r\n subscriptionId: string = \"45\";\r\n cartEmptyId: string = \"42\";\r\n ThankYouPagePaypalId: string = \"47\";\r\n ThankYouPagePagOnlineId: string = \"48\";\r\n ThankYouNexiId: string = \"52\";\r\n subscriptionConfirmationId: string = \"46\";\r\n registrationCompletePageId: string = \"49\"\r\n SearchPageId: string = \"50\"\r\n SearchWithPagingPageId: string = \"51\"\r\n\r\n getScript(type: string, rowId: string) {\r\n //reading language\r\n let longLang: string = this.language.getLongLang();\r\n\r\n let url: string = this.mappings.Web_Api_Get_Script\r\n .replace('{rowid}', rowId)\r\n .replace('{type}', type)\r\n .replace('{lang}', longLang)\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getScriptHead(type: string, rowId: string) {\r\n //reading language\r\n let longLang: string = this.language.getLongLang();\r\n\r\n let url: string = this.mappings.Web_Api_Get_Script_Head\r\n .replace('{rowid}', rowId)\r\n .replace('{type}', type)\r\n .replace('{lang}', longLang)\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n checkIfScriptResponseIsValid(content) {\r\n let retVal = true;\r\n if (typeof content === 'object') //-- If it is object, it means that field is empty in backoffice\r\n {\r\n retVal = false\r\n }\r\n else if (typeof content === 'string') {\r\n if (!content) {\r\n retVal = false;\r\n }\r\n }\r\n else {\r\n retVal = false;\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n getSystemPageRowId_OrderId(PageRowId, OrderId) {\r\n return PageRowId + \"_\" + OrderId;\r\n }\r\n\r\n setupExternalScripts(result, pageType, id) {\r\n //-- Retrieving the script to append\r\n if (result.SeoInformation.HasScripts) {\r\n this.getScriptHead(pageType, id).subscribe(response => {\r\n let isValidResponse = this.checkIfScriptResponseIsValid(response);\r\n if (isValidResponse) {\r\n this.seo.appendScriptsToDOM(this.document.head, response);\r\n }\r\n });\r\n\r\n this.getScript(pageType, id).subscribe(response => {\r\n let isValidResponse = this.checkIfScriptResponseIsValid(response);\r\n if (isValidResponse) {\r\n this.seo.appendScriptsToDOM(this.document.body, response);\r\n }\r\n });\r\n }\r\n }\r\n\r\n setGoogleScripts(seoInfo) {\r\n if (!seoInfo)\r\n return;\r\n\r\n //-- Updating title on client side\r\n if (seoInfo.Title)\r\n this.metaService.setTitle(seoInfo.Title);\r\n\r\n //-- Update google analytics\r\n if (seoInfo.HasScripts && seoInfo.AnalyticsId)\r\n gtag('config', seoInfo.AnalyticsId, { 'page_path': seoInfo.UrlForSeo });\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/script.service.ts","import { LanguageService } from './language.service';\r\n//Angular\r\nimport { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { QuickRegister } from '../../models/cms/register';\r\n\r\n@Injectable()\r\nexport class LoginService {\r\n constructor\r\n (\r\n public _api: ApiService,\r\n public _cache: CacheService,\r\n private mappings: Mappings,\r\n private cartService: ShoppingCartService,\r\n private langService: LanguageService\r\n ) { }\r\n\r\n sendLoginRequest(email: string, password: string) {\r\n let cartId = this.cartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Post_Send_Login_Request\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n Email: email.toLowerCase(),\r\n Password: btoa(password),\r\n CartID: cartId\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n authentificateUser(email: string, firstName: string, lastName: string) {\r\n let cartId = this.cartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Post_User_Authentification\r\n\r\n let lang = this.langService.getLongLang();\r\n let key = url;\r\n\r\n let params = {\r\n Email: email.toLowerCase(),\r\n Password: \"\",\r\n FirstName: firstName,\r\n LastName: lastName,\r\n CartID: cartId,\r\n Lang: lang\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n quickRegister(userInfo: QuickRegister) {\r\n let cartId = this.cartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Post_User_Authentification\r\n\r\n let lang = this.langService.getLongLang();\r\n let key = url;\r\n\r\n let params = {\r\n Email: userInfo.EmailRegister != null ? userInfo.EmailRegister.toLowerCase() : '',\r\n Password: userInfo.Password,\r\n FirstName: '',\r\n LastName: '',\r\n CustomerGroup: userInfo.CustomerGroup,\r\n CartID: cartId,\r\n Lang: lang,\r\n CodiceFiscale: userInfo.CodiceFiscale,\r\n PartitaIva: userInfo.PartitaIva,\r\n Newsletter: userInfo.Newsletter\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/login.service.ts","import { Inject, Injectable, isDevMode } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class CacheService {\r\n static KEY = 'CacheService';\r\n\r\n constructor(@Inject('LRU') public _cache: Map) {\r\n\r\n }\r\n\r\n /**\r\n * check if there is a value in our store\r\n */\r\n has(key: string | number): boolean {\r\n let _key = this.normalizeKey(key);\r\n return this._cache.has(_key);\r\n }\r\n\r\n /**\r\n * store our state\r\n */\r\n set(key: string | number, value: any): void {\r\n let _key = this.normalizeKey(key);\r\n if (value && 'string' === typeof value && (/<[a-z][\\s\\S]*>/i).test(value)) {\r\n value = {\r\n _escapedHtml: encodeURIComponent(value)\r\n }\r\n }\r\n this._cache.set(_key, value);\r\n }\r\n\r\n /**\r\n * get our cached value\r\n */\r\n get(key: string | number): any {\r\n let _key = this.normalizeKey(key);\r\n let value = this._cache.get(_key);\r\n if (value && 'object' === typeof value && value._escapedHtml) {\r\n value = decodeURIComponent(value._escapedHtml);\r\n }\r\n return value;\r\n }\r\n\r\n /**\r\n * release memory ref\r\n */\r\n clear(key: string): void {\r\n this._cache.delete(key);\r\n }\r\n\r\n /**\r\n * release memory all refs\r\n */\r\n clearAll(): void {\r\n this._cache.clear();\r\n }\r\n\r\n /**\r\n * convert to json for the client\r\n */\r\n dehydrate(): any {\r\n let json = {};\r\n this._cache.forEach((value: any, key: string) => json[key] = value);\r\n return json;\r\n }\r\n\r\n /**\r\n * convert server json into out initial state\r\n */\r\n rehydrate(json: any): void {\r\n Object.keys(json).forEach((key: string) => {\r\n let _key = this.normalizeKey(key);\r\n let value = json[_key];\r\n this._cache.set(_key, value);\r\n });\r\n }\r\n\r\n /**\r\n * allow JSON.stringify to work\r\n */\r\n toJSON(): any {\r\n return this.dehydrate();\r\n }\r\n\r\n /**\r\n * convert numbers into strings\r\n */\r\n normalizeKey(key: string | number): string {\r\n if (isDevMode() && this._isInvalidValue(key)) {\r\n throw new Error('Please provide a valid key to save in the CacheService');\r\n }\r\n\r\n return key + '';\r\n }\r\n\r\n _isInvalidValue(key): boolean {\r\n return key === null ||\r\n key === undefined ||\r\n key === 0 ||\r\n key === '' ||\r\n typeof key === 'boolean' ||\r\n Number.isNaN(key);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cache.service.ts","//System\r\nimport { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable, Inject } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\n//Services\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { LanguageService } from '../cms/language.service';\r\nimport { AuthService } from '../core/auth.service';\r\nimport { CookieService } from '../core/cookie/cookie.service';\r\n\r\n//Models\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { ClientAreaOrderDetails } from \"./../../models/settings/client-area\";\r\nimport { CartAddressModel } from \"./../../models/core/cart\";\r\nimport { CartProductModel } from \"./../../models/core/cart\";\r\nimport { CartInfo } from \"./../../models/core/cart\";\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\n\r\n@Injectable()\r\nexport class ShoppingCartService {\r\n\r\n private cartId: number = 0;\r\n private cartData: any;\r\n\r\n constructor\r\n (\r\n public _api: ApiService,\r\n public _cache: CacheService,\r\n private mappings: Mappings,\r\n private authService: AuthService,\r\n private languageService: LanguageService,\r\n private currencyService: CurrencyService,\r\n @Inject('CookieService') private cookieService: CookieService\r\n ) { }\r\n\r\n // value of customizationData is set from canvas-widget component after editing is approved. After we can get that data inside of parent component and send it to a server\r\n private customizationData: any = null;\r\n private isProductCanvasEdited: boolean = false;\r\n\r\n saveCart(userId: string, cartId: number, paymentId: number, shipmentId: number) {\r\n\r\n let url = this.mappings.Web_Api_Get_Save_Cart.replace('{userId}', userId).replace('{cartId}', cartId.toString()).replace('{paymentId}', paymentId.toString()).replace('{shipmentId}', shipmentId.toString());\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n applyVoucher(voucherCode: string) {\r\n\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Set_Cart_Voucher;\r\n\r\n var param = {\r\n CartID: cartId,\r\n CustomerID: customerId,\r\n Voucher: voucherCode,\r\n Language: lang,\r\n Currency: curr\r\n }\r\n\r\n let key = url;\r\n\r\n return this._api.post(url, param);\r\n }\r\n\r\n setJobName(rowId: string, jobName: string) {\r\n\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n\r\n let url = this.mappings.Web_Api_Set_Job_Name;\r\n\r\n var param = {\r\n CartID: cartId,\r\n ProductID: rowId,\r\n JobName: jobName\r\n }\r\n\r\n let key = url;\r\n\r\n return this._api.post(url, param);\r\n }\r\n\r\n setAddress(addressObject: any) {\r\n\r\n let cartId = this.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Set_Cart_Address;\r\n\r\n var param = {\r\n CartID: cartId,\r\n AddressCity: addressObject.City,\r\n AddressID: addressObject.Id,\r\n AddressMobile: addressObject.Mobile,\r\n AddressPhone: addressObject.Phone,\r\n AddressPostalCode: addressObject.ZipCode,\r\n AddressProvince: addressObject.Province,\r\n AddressRecipient: addressObject.Recipient,\r\n AddressStreet: addressObject.Address,\r\n CustomerID: addressObject.CustomerID,\r\n Language: addressObject.Language\r\n }\r\n\r\n let key = url;\r\n\r\n return this._api.post(url, param);\r\n }\r\n\r\n confirmOrder() {\r\n\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n\r\n var param = {\r\n CartID: cartId,\r\n Language: lang\r\n }\r\n\r\n let url = this.mappings.Web_Api_Post_Cart_Confirm_Order;\r\n\r\n return this._api.post(url, param);\r\n }\r\n\r\n clearCartAfterConfirmation() {\r\n this.cookieService.remove(\"cartId\");\r\n this.cartData = new CartInfo();\r\n\r\n this.cartData.Products = [];\r\n this.cartData.Addresses = [];\r\n this.cartData.Payments = [];\r\n this.cartData.Shipments = [];\r\n }\r\n\r\n getCartPaymentShipment(cartId: number, lang: string) {\r\n let userId = this.getCustomerId();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Get_Cart_Payment_Shipment.replace('{userId}', userId).replace('{cartId}', cartId.toString()).replace('{lang}', lang).replace('{currency}', curr);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n addWizardCalcolatoToCart(wizardId: number, lavId: number) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let curr = this.currencyService.getCurrency();\r\n let canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n let isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n\r\n let url = this.mappings.Web_Api_Add_Wizard_Calcolato_To_Cart;\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n LavID: lavId.toString(),\r\n Currency: curr,\r\n isCanvasEdited: isCanvasEdited, \r\n CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls: null\r\n }\r\n\r\n \r\n return this._api.post(url, params);\r\n }\r\n\r\n addApProductToCart(productId: number, lavId: number) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Add_Wizard_Calcolato_To_Cart;\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: productId.toString(),\r\n LavID: lavId.toString(),\r\n Currency: curr\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n\r\n addWizardCalcolatoScontisticaToCart(wizardId: number, dateId: number, lavId: number) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n let isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n\r\n let url = this.mappings.Web_Api_Add_Wizard_Calcolato_Scontistica_To_Cart;\r\n\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n LavID: lavId.toString(),\r\n DateID: dateId.toString(),\r\n Currency: curr,\r\n isCanvasEdited: isCanvasEdited, \r\n CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls: null\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n\r\n addWizardListinoToCart(wizardId: number, quantityId: number) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let url = this.mappings.Web_Api_Add_Wizard_Listino_To_Cart\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr\r\n }\r\n return this._api.post(url, params);\r\n }\r\n\r\n addOtherProductListinoToCart(combinationId: number, quantityId: number, wizardId: number) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let url = this.mappings.Web_Api_Add_Other_Product_Listino_To_Cart\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr,\r\n CombinationId: combinationId.toString()\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n addOtherProductListinoScontisticaToCart(combinationId: number, quantityId: number, wizardId: number, dateId: number) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let url = this.mappings.Web_Api_Add_Other_Product_Listino_Scontistica_To_Cart\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr,\r\n CombinationId: combinationId.toString(),\r\n DateID: dateId.toString()\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n addOtherProductCalcolatoListinoToCart(combinationId: number, quantityId: number, wizardId: number, strVariantiCalcolate: string) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let url = this.mappings.Web_Api_Add_Other_Product_Listino_Calcolato_To_Cart\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr,\r\n CombinationId: combinationId.toString(),\r\n StrVariantiCalcolate: strVariantiCalcolate\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n addOtherProductCalcolatoListinoScontisticaToCart(combinationId: number, quantityId: number, wizardId: number, dateId: number, strVariantiCalcolate: string) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let url = this.mappings.Web_Api_Add_Other_Product_Listino_Calcolato_Scontistica_To_Cart\r\n let curr = this.currencyService.getCurrency();\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr,\r\n CombinationId: combinationId.toString(),\r\n DateID: dateId.toString(),\r\n StrVariantiCalcolate: strVariantiCalcolate,\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n addOtherProductCalcolatoScontisticaToCart(productId: number, lavId: number, dateId: number) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Add_Other_Product_Calcolato_Scontistica_To_Cart;\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: productId.toString(),\r\n LavID: lavId.toString(),\r\n DateID: dateId.toString(),\r\n Currency: curr\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n addWizardListinoScontisticaBusteToCart(wizardId: number, quantityId: number, dateId: number, idPantoneFronte1: string, idPantoneFronte2: string, idPantoneRetro1: string, idPantoneRetro2: string) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let url = this.mappings.Web_Api_Add_Wizard_Buste_Listino_Buste_To_Cart\r\n let curr = this.currencyService.getCurrency();\r\n let canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n let isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n\r\n let key = url; let x = 0;\r\n if (idPantoneFronte1 == null || idPantoneFronte1 == \"\") {\r\n idPantoneFronte1 = \"0\";\r\n }\r\n if (idPantoneFronte2 == null || idPantoneFronte2 == \"\") {\r\n idPantoneFronte2 = \"0\";\r\n }\r\n if (idPantoneRetro1 == null || idPantoneRetro1 == \"\") {\r\n idPantoneRetro1 = \"0\";\r\n }\r\n if (idPantoneRetro2 == null || idPantoneRetro2 == \"\") {\r\n idPantoneRetro2 = \"0\";\r\n }\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n DateID: dateId.toString(),\r\n IdPantoneFronte1: idPantoneFronte1.toString(),\r\n IdPantoneFronte2: idPantoneFronte2.toString(),\r\n IdPantoneRetro1: idPantoneRetro1.toString(),\r\n IdPantoneRetro2: idPantoneRetro2.toString(),\r\n Currency: curr,\r\n isCanvasEdited: isCanvasEdited, \r\n CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls: null\r\n }\r\n return this._api.post(url, params);\r\n }\r\n\r\n\r\n addWizardListinoBusteToCart(wizardId: number, quantityId: number, idPantoneFronte1: string, idPantoneFronte2: string, idPantoneRetro1: string, idPantoneRetro2: string) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let url = this.mappings.Web_Api_Add_Wizard_Buste_Listino_To_Cart\r\n let curr = this.currencyService.getCurrency();\r\n let canvasData = this.getIfProductIsCanvasEdited() ? this.getCustomizationCanvasData() : null;\r\n let isCanvasEdited = this.getIfProductIsCanvasEdited();\r\n\r\n let key = url; let x = 0;\r\n\r\n if (idPantoneFronte1 == null || idPantoneFronte1 == \"\") {\r\n idPantoneFronte1 = \"0\";\r\n }\r\n if (idPantoneFronte2 == null || idPantoneFronte2 == \"\") {\r\n idPantoneFronte2 = \"0\";\r\n }\r\n if (idPantoneRetro1 == null || idPantoneRetro1 == \"\") {\r\n idPantoneRetro1 = \"0\";\r\n }\r\n if (idPantoneRetro2 == null || idPantoneRetro2 == \"\") {\r\n idPantoneRetro2 = \"0\";\r\n }\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n IdPantoneFronte1: idPantoneFronte1.toString(),\r\n IdPantoneFronte2: idPantoneFronte2.toString(),\r\n IdPantoneRetro1: idPantoneRetro1.toString(),\r\n IdPantoneRetro2: idPantoneRetro2.toString(),\r\n Currency: curr,\r\n isCanvasEdited: isCanvasEdited, \r\n CanvasStateId: canvasData != null ? canvasData.stateId : null,\r\n CanvasHiResOutputUrls: canvasData != null ? canvasData.hiResOutputUrls: null\r\n }\r\n return this._api.post(url, params);\r\n }\r\n\r\n addWizardListinoScontisticaToCart(wizardId: number, quantityId: number, dateId: number) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let url = this.mappings.Web_Api_Add_Wizard_Listino_Scontistica_To_Cart\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: wizardId.toString(),\r\n QuantityID: quantityId.toString(),\r\n DateID: dateId.toString(),\r\n Currency: curr\r\n }\r\n return this._api.post(url, params);\r\n }\r\n\r\n\r\n addStaticProductToCart(productId: number, quantityId: number) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Add_Static_Product_To_Cart\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: productId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Currency: curr\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n addStaticProductScontisticaToCart(productId: number, quantityId: number, dateId: number) {\r\n\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Add_Static_Product_Scontistica_To_Cart\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: productId.toString(),\r\n QuantityID: quantityId.toString(),\r\n DateID: dateId.toString(),\r\n Currency: curr\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n addMatrixProductToCart(productId: number, quantityId: number, type: string) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Add_Matrix_Product_To_Cart;\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n CustomerID: customerId,\r\n Language: lang,\r\n ProductID: productId.toString(),\r\n QuantityID: quantityId.toString(),\r\n Type: type,\r\n Currency: curr\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n getCartId(): string {\r\n //Reading cartId from cookie\r\n let cartId: string = this.cookieService.get(\"cartId\");\r\n\r\n if (cartId == null || cartId == \"\") {\r\n cartId = \"0\";\r\n }\r\n\r\n return cartId;\r\n }\r\n\r\n setCartId(cartId: number) {\r\n this.cookieService.put(\"cartId\", cartId.toString());\r\n this.cartId = cartId;\r\n }\r\n\r\n getCustomerId(): string {\r\n let userId = this.authService.GetUserId();\r\n\r\n return userId;\r\n }\r\n\r\n getLang(): string {\r\n let lang: string = this.languageService.getLongLang();\r\n\r\n return lang;\r\n }\r\n\r\n updateCart(cartData: any): void {\r\n let currentCartId: string = this.getCartId();\r\n\r\n if (currentCartId == \"0\") {\r\n this.setCartId(cartData.CartID);\r\n }\r\n\r\n //refreshing cart data\r\n this.cartData = cartData;\r\n }\r\n\r\n getCart() {\r\n return this.cartData;\r\n }\r\n\r\n initCart(cartData: any) {\r\n if (this.cartData == null) {\r\n this.cartData = cartData;\r\n }\r\n }\r\n\r\n setPayment(paymentId: string) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Set_Cart_Payment\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n PaymentID: paymentId,\r\n CustomerID: customerId,\r\n Language: lang,\r\n Currency: curr\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n setShipment(shipmentId: string) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Set_Cart_Shipment\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n ShippmentID: shipmentId,\r\n CustomerID: customerId,\r\n Language: lang,\r\n Currency: curr\r\n }\r\n\r\n return this._api.post(url, params);\r\n\r\n }\r\n\r\n removeFromCart(rowId: string) {\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n let lang = this.getLang();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Remove_From_Cart\r\n\r\n let key = url; let x = 0;\r\n\r\n let params = {\r\n CartID: cartId.toString(),\r\n ProductID: rowId,\r\n CustomerID: customerId.toString(),\r\n Language: lang,\r\n Currency: curr\r\n }\r\n\r\n return this._api.post(url, params);\r\n\r\n }\r\n\r\n //Check if the cart data is valid to access to the second step\r\n isCartValid() {\r\n let res: boolean = false;\r\n\r\n let cartId = this.getCartId();\r\n let customerId = this.getCustomerId();\r\n\r\n //Checking if user is logged-ing\r\n if (customerId != null && customerId != \"\" && customerId != \"0\") {\r\n //Checking if there is a cart set\r\n if (cartId != null && cartId != \"\" && cartId != \"0\") {\r\n //Checking if there are products\r\n if (this.cartData.Products != null && this.cartData.Products.length > 0) {\r\n //Checking if there is a payment set\r\n if (this.cartData.Payments != null && this.cartData.Payments.length > 0) {\r\n\r\n let flagPayment = false;\r\n\r\n for (let payment of this.cartData.Payments) {\r\n if (payment.Selected == true) {\r\n flagPayment = true;\r\n break;\r\n }\r\n }\r\n\r\n //Checking if there is a shipment set\r\n if (flagPayment == true) {\r\n\r\n if (this.cartData.Shipments != null && this.cartData.Shipments.length > 0) {\r\n\r\n let flagShipment = false;\r\n\r\n for (let shipment of this.cartData.Shipments) {\r\n if (shipment.Selected == true) {\r\n flagShipment = true;\r\n break;\r\n }\r\n }\r\n\r\n if (flagShipment == true) {\r\n res = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return res;\r\n }\r\n\r\n //Getting Empty cart page data\r\n getEmptyCartPageData() {\r\n let lang = this.getLang();\r\n let customerId = this.getCustomerId();\r\n let cartId = this.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Empty_Cart_Page.replace(\"{lang}\", lang).replace('{userid}',customerId).replace('{cartid}', cartId);\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n setIfProductIsCanvasEdited(isEdited: boolean) {\r\n this.isProductCanvasEdited = isEdited;\r\n }\r\n\r\n getIfProductIsCanvasEdited() {\r\n return this.isProductCanvasEdited;\r\n }\r\n\r\n getCustomizationCanvasData() {\r\n return this.customizationData;\r\n }\r\n\r\n setCustomizationCanvasData(newData) {\r\n this.customizationData = newData;\r\n }\r\n\r\n // reset canvas state because of next adding to a cart\r\n resetCanvasData() {\r\n const emptyObj = {};\r\n this.setIfProductIsCanvasEdited(false);\r\n this.setCustomizationCanvasData(emptyObj);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/inventory/shopping-cart.service.ts","import { MyLavorazioneAccessoria } from \"../document/quoting-model\";\r\n\r\nexport class wizardFormEditoriaModel {\r\n numCopie: string = \"\";\r\n idCopie: string = \"\";\r\n tipoCopie: string = \"\";\r\n numFacciate: string = \"\";\r\n idFacciate: string = \"\";\r\n tipoFacciate: string = \"\";\r\n idFormati: string = \"\";\r\n idColori1: string = \"\";\r\n idCarte1: string = \"\";\r\n nomeCarte1: string = \"\";\r\n nomeCarte2: string = \"\";\r\n idGrammature1: string = \"\";\r\n nomeGrammature1: string = \"\";\r\n idPlastificazioni1: string = \"\";\r\n idCopertine: string = \"\";\r\n idColori2: string = \"\";\r\n idCarte2: string = \"\";\r\n idGrammature2: string = \"\";\r\n nomeGrammature2: string = \"\";\r\n idPlastificazioni2: string = \"\";\r\n idRilegature: string = \"\";\r\n taglio: boolean = false;\r\n sezione: string = \"\";\r\n tipoStampaInternoSoloFronte: boolean = false;\r\n stampa1_colori_fronte: string = \"\";\r\n stampa1_colori_retro: string = \"\";\r\n stampa2_colori_fronte: string = \"\";\r\n stampa2_colori_retro: string = \"\";\r\n lavorazioniAccessorie: Array;\r\n wizardId: number = 0;\r\n customerdId: string;\r\n StrCustomerId: string;\r\n tipoStampaCopertinaSoloFronte: boolean = false;\r\n macrocategoryWizardId: number = 0;\r\n richiestaName: string = \"\";\r\n richiestaSubName: string = \"\";\r\n richiestaEmail: string = \"\";\r\n isRichiestaEmailValid: boolean = false;\r\n richiestaTelephone: string = \"\";\r\n richiestaSocieta: string = \"\";\r\n richiestaJobname: string = \"\";\r\n richiestaCondizioni: boolean = false;\r\n richiestaNote: string = \"\";\r\n idPiegature: string = \"\";\r\n soggettiMultipli: boolean = false;\r\n numSoggetti: string = \"\";\r\n baseFormato: string = \"\";\r\n altezzaFormato: string = \"\";\r\n idTagli: string = \"\";\r\n idBusta: string = \"\";\r\n idMaterialiFlessibili: string = \"\";\r\n idSupportiRigidi: string = \"\";\r\n idOcchielli: string = \"\";\r\n idAsole: string = \"\";\r\n idCuciture: string = \"\";\r\n idElettrosaldature: string = \"\";\r\n disposizione_occhielli_id: string = \"\";\r\n distanza_occhielli: string = \"\";\r\n diametro_asola: string = \"\";\r\n disposizione_asola_id: string = \"\";\r\n disposizione_cucitura_id: string = \"\";\r\n disposizione_elettrosaldatura_id: string = \"\";\r\n tipoBifacciale: string = \"\";\r\n idBiancoCoprente: string = \"\";\r\n language: string = \"\";\r\n currency: string = \"\";\r\n\r\n idPantoneFronte1: string = \"\";\r\n idPantoneFronte2: string = \"\";\r\n idPantoneRetro1: string = \"\";\r\n idPantoneRetro2: string = \"\";\r\n\r\n\r\n idCartoncino: string = \"\";\r\n nomeCartoncino: string = \"\";\r\n idGrammatureCartoncino: string = \"\";\r\n nomeGrammatureCartoncino: string = \"\";\r\n \r\n numDiametroInternoAnimaLabel: number = 0;\r\n numDiametroMassimoEsternoAnimaLabel: number = 0;\r\n numEtichette: string = \"\";\r\n idAvvolgimento: string = \"\";\r\n idFustella: string = \"\";\r\n idFormatoTipo: string = \"\";\r\n idTipoLavoroLabel: string = \"\";\r\n subSection: string = \"\";\r\n}\r\nexport class MatrixModelCalculation\r\n{\r\n lavorazioneVerticaleId: number;\r\n lavorazioneOrizzontaleId: number;\r\n quantita:number;\r\n}\r\n\r\nexport class LavorazioniAccessorieModel {\r\n lavorazioneId: number;\r\n valoreLavorazione: string=\"\";\r\n numWidthFormValue: string = \"\";\r\n numHeightFormValue: string = \"\";\r\n numDepthFormValue: string = \"\";\r\n tipo: number = 0;\r\n matrixValues:Array;\r\n}\r\n\r\nexport class PriceEstimationModel {\r\n RowId: number;\r\n Currency: string = \"€\";\r\n UnitPrice: string = \"0,00\";\r\n Imponibile: string = \"0,00\";\r\n Iva: string = \"0,00\";\r\n Total: string = \"0,00\";\r\n TotalAmount: string = \"0,00\";\r\n WeightUm: string = \"Kg\";\r\n Weight: string = \"0,00\";\r\n TablePriceList: any;\r\n TableScontisticaPriceList: any;\r\n DataId: number;\r\n DayName: string = \"\";\r\n DayNumber: string = \"\";\r\n QuantityID: number;\r\n Quantity: number = 0;\r\n AltezzaDorso: Number = 0.00;\r\n Varianti: string;\r\n PrezzoOriginalestato: boolean;\r\n PrezzoOriginaleimporto: Number = 0.00;\r\n DayDescriptionStatus: boolean;\r\n DayDescriptionName: string = \"\";\r\n}\r\n\r\nexport class FileCombinationModel {\r\n PathFile: string;\r\n NomeFile: string;\r\n PathIstruzioni: string;\r\n NomeIstruzioni: string;\r\n}\r\n\r\nexport class wizardFormAdesiviModel {\r\n numCopie: any;\r\n numSoggetti: any;\r\n formati: any;\r\n base: any;\r\n altezza: any;\r\n plastificazioni1: any;\r\n materialiFlessibili: any;\r\n supportiRigidi: any;\r\n lavorazioniAccessorie: any;\r\n}\r\n\r\n\r\nexport class wizardFormBandieraModel {\r\n numCopie: any;\r\n numSoggetti: any;\r\n formati: any;\r\n base: any;\r\n altezza: any;\r\n materialiFlessibili: any;\r\n occhielli: any;\r\n distanceOcchielli: any;\r\n disposizioneOcchielli: any;\r\n asole: any;\r\n diametroAsola: any;\r\n disposizioneAsole: any;\r\n cuciture: any;\r\n disposizioneCucitura: any;\r\n lavorazioniAccessorie: any;\r\n}\r\n\r\nexport class wizardFormBannerModel {\r\n numCopie: any;\r\n numSoggetti: any;\r\n formati: any;\r\n base: any;\r\n altezza: any;\r\n materialiFlessibili: any;\r\n occhielli: any;\r\n distanceOcchielli: any;\r\n disposizioneOcchielli: any;\r\n asole: any;\r\n diametroAsola: any;\r\n disposizioneAsole: any;\r\n elettrosaldature: any;\r\n disposizioneElettrosaldature: any;\r\n lavorazioniAccessorie: any;\r\n}\r\n\r\nexport class wizardFormBusteModel {\r\n numCopie: any;\r\n numSoggetti: any;\r\n categorieCarte: any;\r\n tipologieBusta: any;\r\n colori1: any;\r\n fronte: any = \"\";\r\n colori2: any;\r\n lavorazioniAccessorie: any;\r\n}\r\n\r\nexport class wizardFormCommercialeModel {\r\n numCopie: any;\r\n numSoggetti: any;\r\n categorieCarte: any;\r\n formati: any;\r\n base: any;\r\n altezza: any;\r\n carte1: any;\r\n grammature1: any;\r\n colori1: any;\r\n colori2: any;\r\n plastificazioni1: any;\r\n piegature: any;\r\n rifilo: any;\r\n lavorazioniAccessorie: any;\r\n}\r\n\r\nexport class wizarFormEtichetteModel {\r\n numCopie: any;\r\n numSoggetti: any;\r\n categorieCarte: any;\r\n formati: any;\r\n base: any;\r\n altezza: any;\r\n carte1: any;\r\n grammature1: any;\r\n colori1: any;\r\n fronte: any = \"\";\r\n plastificazioni1: any;\r\n tagli: any;\r\n lavorazioniAccessorie: any;\r\n}\r\n\r\nexport class wizardFormStampaModel {\r\n numCopie: any;\r\n numSoggetti: any;\r\n formati: any;\r\n base: any;\r\n altezza: any;\r\n supportiRigidi: any;\r\n tagli: any;\r\n stampaBifacciale: any;\r\n biancoCoprente: any;\r\n lavorazioniAccessorie: any;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/document/quoting-submit-model.ts","import { Injectable, Inject } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Location } from '@angular/common';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { Breadcrumbs } from \"../../models/cms/breadcrumbs\";\r\n\r\nimport { RoutesService } from \"../core/routes.service\";\r\nimport { LanguageService } from \"../cms/language.service\";\r\n\r\n\r\n@Injectable()\r\nexport class BreadcrumbsService {\r\n\r\n protected breadcrumbsList: Breadcrumbs[];\r\n\r\n private homeIsInit: boolean = false;\r\n constructor(protected router: Router,\r\n private languageService: LanguageService,\r\n private translateService: TranslateService,\r\n @Inject('isBrowser') private isBrowser: boolean, ) {\r\n }\r\n\r\n\r\n setHomeBreadcrumb() {\r\n if (this.breadcrumbsList != null && this.breadcrumbsList.length > 0) {\r\n if (this.breadcrumbsList[0].Level == 0) {\r\n return;\r\n }\r\n }\r\n\r\n let lang: string = this.languageService.getShortLang();\r\n let homeLink = \"/home\";\r\n if (lang != null && lang != \"\") {\r\n homeLink = lang + homeLink;\r\n }\r\n else {\r\n homeLink = homeLink;\r\n }\r\n\r\n var bread = new Breadcrumbs();\r\n\r\n bread.BreadcrumbLink = homeLink;\r\n bread.BreadcrumbName = this.translateService.get(\"home_area_message_home\")[\"value\"];\r\n bread.Level = 0;\r\n\r\n this.breadcrumbsList.unshift(bread);\r\n this.homeIsInit = true;\r\n }\r\n\r\n\r\n setBreadcrumbs(breadcrumbs: Breadcrumbs[], type?: string) {\r\n this.breadcrumbsList = [];\r\n\r\n if (type != \"cmspage\") {\r\n if (breadcrumbs != null && breadcrumbs.length > 0) {\r\n breadcrumbs.forEach(x => {\r\n x.BreadcrumbLink = x.BreadcrumbLink.toLocaleLowerCase();\r\n });\r\n }\r\n }\r\n\r\n this.breadcrumbsList = breadcrumbs;\r\n // this.setHomeBreadcrumb();\r\n }\r\n\r\n getBreadcrumbs() {\r\n var breadcrumbs = this.breadcrumbsList;\r\n\r\n return breadcrumbs;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/breadcrumbs.service.ts","export class Register {\r\n public CustomerGroup: string;\r\n public CustomerType: string;\r\n public RagSoc: string;\r\n public Piva: string;\r\n public CF: string;\r\n public Name: string;\r\n public SubName: string;\r\n public Address: string;\r\n public City: string;\r\n public Prov: string;\r\n public Cap: string;\r\n public Telephone: string;\r\n public EmailRegister: string;\r\n public EmailRepeat: string;\r\n public PecEmail: string;\r\n public CodiceDestinatario: string;\r\n public Password: string;\r\n public PasswordRepeat: string;\r\n public Newsletter: string;\r\n public Mobile: string;\r\n public Language: string;\r\n public AddressNumber: string;\r\n public IsCompletedRegistration: any;\r\n public CartId: any;\r\n public IsQuickRegistered: boolean;\r\n}\r\n\r\nexport class QuickRegister {\r\n EmailRegister: string = '';\r\n EmailRepeat: string = '';\r\n Password: string = '';\r\n PartitaIva: string = '';\r\n CodiceFiscale: string = '';\r\n Telephone: string = '';\r\n CustomerGroup: string = '5'\r\n info_privacy: string = '';\r\n Newsletter: any;\r\n IsQuickRegistered: boolean = false;\r\n\r\n constructor(email: string = '', emailRepeat: string = '', password: string = '', \r\n telephone: string = '', customerGroup: string = '5', CF: string = '', PIVA: string = '', oldGroup: string = '5')\r\n {\r\n this.CustomerGroup = customerGroup;\r\n this.controlFormReset(oldGroup, CF, PIVA);\r\n this.EmailRegister = email;\r\n this.EmailRepeat = emailRepeat;\r\n this.Password = password;\r\n this.Telephone = telephone;\r\n }\r\n\r\n //-- If client type is changed inside of form from societa to dita individuale, we don't want to reset a PIVA field value also\r\n //-- If client type is changed inside of form from privato to associazione, we don't want to reset a CF field value also\r\n controlFormReset(oldGroup, CF, PIVA)\r\n {\r\n if(((this.CustomerGroup === '5' || this.CustomerGroup === '6') && (oldGroup === '5' || oldGroup === '6')))\r\n this.PartitaIva = PIVA;\r\n else\r\n this.PartitaIva = ''\r\n\r\n if(((this.CustomerGroup === '4' || this.CustomerGroup === '7') && (oldGroup === '4' || oldGroup === '7')))\r\n this.CodiceFiscale = CF;\r\n else\r\n this.CodiceFiscale = ''\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/cms/register.ts","export class Company {\r\n RowId: number;\r\n Id: number;\r\n Name: string;\r\n Piva: string;\r\n Website: string;\r\n StreetAddress: string;\r\n PostalCode: string;\r\n City: string;\r\n Province: string;\r\n Phone: string;\r\n Email: string;\r\n Facebook: string;\r\n Twitter: string;\r\n Youtube: string;\r\n Instagram: string;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/core/company.ts","import { SeoViewModel } from \"../core/seo\";\r\nimport { Configuration } from \"../core/configuration\";\r\n\r\nimport { Breadcrumbs } from \"../cms/breadcrumbs\";\r\n\r\nexport class Product {\r\n Id: number;\r\n IdGruppo: number;\r\n Name: string;\r\n Thumbnail: string;\r\n ShortDescription: string;\r\n Type: string;\r\n LongDescription: string;\r\n PhotoGallery: PhotoGalleryViewModel[];\r\n Attachments:AtachmentViewModel[];\r\n Price: string;\r\n SeoUrl: string;\r\n RouterLink: any[];\r\n TemplateUrl: string;\r\n TemplateHtml: string;\r\n EstimateRequest: boolean;\r\n TimeDiscounts: boolean;\r\n TypeResultView: string;\r\n SeoInformation: SeoViewModel;\r\n PriceData: any;\r\n Active: boolean;\r\n IsWizard: boolean;\r\n BreadcrumbsInfo: Breadcrumbs[];\r\n ManageAttachment: string;\r\n CanvasInfo: any;\r\n listaRegole: Regola[];\r\n HeaderData:any;\r\n FooterData:any;\r\n AltMiniatura: string;\r\n TitleMiniatura: string;\r\n AltTop: string;\r\n TitleTop: string;\r\n AltFinal: string;\r\n TitleFinal: string;\r\n}\r\n\r\nexport interface Regola {\r\n Id: number;\r\n Nome_Regola: string;\r\n Tipo: string;\r\n Categoria_1: string;\r\n Sezione_1: string;\r\n Id_Elemento_1: number;\r\n Categoria_2: string;\r\n Sezione_2: string;\r\n Id_Elemento_2: number;\r\n IdRegoleCategoria: number;\r\n Id_Elemento_Sottochiave_1: number;\r\n Id_Elemento_Sottochiave_2: number;\r\n Tipo_Regola: string;\r\n Flag_Copertina_1?: boolean;\r\n Flag_Copertina_2?: boolean;\r\n Macro_Categoria_1: string;\r\n Macro_Categoria_2: string;\r\n Attivo?: boolean;\r\n nomeCategoria: string;\r\n nomeElemento1: string;\r\n nomeElemento2: string;\r\n stato: boolean;\r\n connectionString: string;\r\n descrizione: string;\r\n}\r\n\r\nexport class PhotoGalleryViewModel {\r\n PhotoUrl: string;\r\n Alt: string;\r\n Title: string;\r\n}\r\nclass AtachmentViewModel {\r\n Name: string;\r\n Url: string;\r\n}\r\nexport class Category {\r\n Id: number;\r\n Name: string;\r\n LongDescription: string;\r\n Image: string;\r\n Thumbnail: string;\r\n SliderImages: SliderViewModel[];\r\n SubCategories: Category[];\r\n SubProducts: Product[];\r\n ShortDescription: string;\r\n SeoUrl: string;\r\n Children: Category[];\r\n RouterLink: any[];\r\n TemplateUrl: string;\r\n TemplateHtml: string;\r\n TypeGruppo: number;\r\n IdWizardMaster: number;\r\n MacroCategoryIdWizardMaster: number;\r\n IdProdottoMaster: number;\r\n WizardResultVisualizationType: string;\r\n WizardTemporalPricing:boolean;\r\n WizardQuotingRequest:boolean;\r\n SeoInformation: SeoViewModel;\r\n MacroCategory: string;\r\n Active: boolean;\r\n Configuration: Configuration;\r\n PriceData: any;\r\n TipoVisualizzazione: string;\r\n BreadcrumbsInfo: Breadcrumbs[];\r\n ProductAttachments:any[];\r\n ManageAttachmentWizard: string;\r\n headerData: any;\r\n footerData: any;\r\n PhotoGallery: any[];\r\n AltMiniatura: string;\r\n TitleMiniatura: string;\r\n AltTop: string;\r\n TitleTop: string;\r\n AltFinal: string;\r\n TitleFinal: string;\r\n}\r\nexport class SliderViewModel {\r\n SliderUrl: string;\r\n}\r\nexport class MegaMenu {\r\n public Id: number;\r\n public ParentId: string;\r\n public Level: number;\r\n public Name: string;\r\n public Target: string;\r\n public Thumbnail: string;\r\n public IsNew: string;\r\n public SeoUrl: string;\r\n Children: Array;\r\n ShortDescription: string;\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/inventory/inventory.ts","import { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\n\r\n@Injectable()\r\nexport class CheckIfExistService {\r\n constructor\r\n (\r\n public _api: ApiService,\r\n public _cache: CacheService,\r\n private mappings: Mappings\r\n ) { }\r\n\r\n //for sending of checking type, because we are using same method on server side for all checking\r\n public readonly emailType: string = \"email\";\r\n public readonly partitaIvaType: string = \"partitaIva\";\r\n public readonly codiceFiscaleType: string = \"codiceFiscale\";\r\n\r\n checkIfEmailExistsInDb(value: string) {\r\n let url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.emailType).replace('{value}', value);\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n checkIfPartitaIvaExistsInDb(value: string) {\r\n let url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.partitaIvaType).replace('{value}', value);\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n checkIfCodiceFiscaleExistsInDb(value: string) {\r\n let url = this.mappings.Web_Api_Check_If_Param_Exists_In_Db.replace('{type}', this.codiceFiscaleType).replace('{value}', value);\r\n\r\n return this._api.get(url);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/check-existence.service.ts","import { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\n\r\n@Injectable()\r\nexport class OrderPaymentService \r\n{\r\n \r\n constructor\r\n (\r\n public _api: ApiService, \r\n public _cache: CacheService,\r\n private mappings: Mappings\r\n ){}\r\n\r\n setOrderAsPayed(orderId) \r\n {\r\n let url = this.mappings.Web_Api_Set_Order_As_Payed;\r\n\r\n let orderID = \r\n {\r\n OrderId:parseInt(orderId)\r\n }\r\n\r\n return this._api.post(url,orderID);\r\n }\r\n\r\n CheckIsOrderPayedUnicredit(orderId) \r\n {\r\n let url = this.mappings.Web_Api_Check_Is_Order_Payed_Unicredit.replace('{orderId}', orderId.toString());\r\n return this._api.post(url);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/order-payment.service.ts","import { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { LanguageService } from \"./language.service\";\r\nimport { ShoppingCartService } from \"../inventory/shopping-cart.service\";\r\nimport { AuthService } from \"../core/auth.service\";\r\n\r\n@Injectable()\r\nexport class RecoverPasswordService \r\n{\r\n constructor\r\n (\r\n public _api: ApiService, \r\n public language: LanguageService,\r\n public _cache: CacheService,\r\n private mappings: Mappings,\r\n private cartService: ShoppingCartService,\r\n private authService: AuthService,\r\n ) {}\r\n\r\n recoverPasswordRequest(email: string) \r\n {\r\n email = email.toLowerCase();\r\n let lang = this.language.getLongLang();\r\n\r\n return this._api.post(this.mappings.Web_Api_Recover_Password, { Email: email, Lang: lang })\r\n .do(result => result)\r\n .share();\r\n }\r\n\r\n getRecoverPasswordData(lang: string) \r\n {\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Recover_Password_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}',customerId)\r\n .replace('{cartid}', cartId);\r\n\r\n return this._api.get(url);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/recover-password.service.ts","\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\n//System\r\nimport { Mappings } from './../../shared/mapping';\r\n\r\n//Models\r\nimport { Configuration } from \"./../../models/core/configuration\";\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\n\r\n\r\n@Injectable()\r\nexport class ConfigurationService {\r\n constructor(public _api: ApiService, public _cache: CacheService,\r\n private mappings: Mappings) {\r\n }\r\n\r\n getConfiguration(lang: string) {\r\n\r\n let url = this.mappings.Web_Api_Get_Configuration.replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n //Return the routes for a given language\r\n getRoutes(lang: string) {\r\n\r\n let url = this.mappings.Web_Api_Get_Routes.replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/configuration.service.ts","import { Injectable, Inject } from '@angular/core';\r\nimport { Http, Headers, RequestOptionsArgs, Response } from '@angular/http';\r\nimport { CookieService } from './cookie';\r\n\r\n@Injectable()\r\nexport class CryptoService {\r\n\r\n constructor\r\n () {}\r\n\r\n\r\n encryptNumber(param: number)\r\n {\r\n let prefix = \"xyZ\";\r\n let sufix = \"xpNw\";\r\n let output = \"\";\r\n\r\n try\r\n {\r\n if (param != null)\r\n {\r\n let newNumber = param + 1264;\r\n output = prefix + newNumber.toString() + sufix;\r\n }\r\n }\r\n catch (Exception)\r\n {\r\n throw Exception;\r\n }\r\n\r\n return output;\r\n }\r\n\r\n decryptNumber(encryptedString: string)\r\n {\r\n let output = -1;\r\n \r\n try\r\n {\r\n if (encryptedString != null || encryptedString != \"\")\r\n {\r\n let stringWithoutPrefix = encryptedString.substring(3, encryptedString.length);\r\n\r\n let stringwithoutSufix = stringWithoutPrefix.substring(0, stringWithoutPrefix.length - 4);\r\n \r\n output = Number(stringwithoutSufix) - 1264;\r\n }\r\n }\r\n catch (Exception)\r\n {\r\n throw Exception;\r\n }\r\n\r\n return output;\r\n }\r\n\r\n decryptString(text: string)\r\n {\r\n text = text.substring(4, text.length);\r\n text = text.substring(0, text.length - 4);\r\n let decryptedText = '';\r\n\r\n for(let c of text)\r\n {\r\n let unicode = c.charCodeAt(0);\r\n unicode -= 5;\r\n\r\n decryptedText += String.fromCharCode(unicode);\r\n }\r\n\r\n return decryptedText;\r\n }\r\n\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/crypto.service.ts","import { Inject, Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class NodeLoggerService {\r\n\r\n isLogActive: boolean = false; //Defines if the log is active or not\r\n logFilepath: string = \"src/assets/log.txt\"; //logfile\r\n\r\n constructor( @Inject('isNode') private isNode: boolean)\r\n { }\r\n\r\n AddLogWithTime(mex: string): void {\r\n\r\n if (this.isNode) {\r\n\r\n if (this.isLogActive == false) {\r\n return;\r\n }\r\n\r\n const fs = require('fs');\r\n\r\n var dateObj = new Date();\r\n var year = dateObj.getFullYear();\r\n var month = dateObj.getMonth() + 1;\r\n var day = dateObj.getDate();\r\n\r\n var hour = dateObj.getHours(); \r\n var minutes = dateObj.getMinutes(); \r\n var seconds = dateObj.getSeconds(); \r\n var milliseconds = dateObj.getMilliseconds(); \r\n\r\n var dateStr = day+\"/\"+month+\"/\"+year+\" \"+hour+\":\"+minutes+\":\"+seconds+\":\"+milliseconds;\r\n \r\n //Prepending date to message\r\n mex = dateStr + \": \"+ mex+\"\\n\"; \r\n\r\n fs.appendFile(\r\n 'src/assets/log.txt', \r\n mex, \r\n 'utf8', \r\n function (err) {\r\n if (err) {\r\n // append failed\r\n } else {\r\n // done\r\n }\r\n }\r\n );\r\n }\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/node-logger.service.ts","import { Injectable } from '@angular/core';\r\nimport { PaypalButtonStyleModel } from '../../models/settings/client-area';\r\ndeclare let paypal: any;\r\n\r\n@Injectable()\r\nexport class PaypalService {\r\n\r\n constructor(\r\n ) {\r\n }\r\n\r\n private isPaypalScriptLoaded: boolean = false;\r\n public isError = false;\r\n public errMessage = \"\";\r\n\r\n public loadPaypalService(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle: PaypalButtonStyleModel, UsePaypalProduction = true) {\r\n //-- Load paypal script if it is not already loaded, else only render a paypal button\r\n if (!this.isPaypalScriptLoaded) {\r\n this.loadExternalScript(externalScriptLink).then(() => {\r\n this.renderPaypalBtn(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction);\r\n });\r\n }\r\n else {\r\n this.renderPaypalBtn(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data, paypalBtnStyle, UsePaypalProduction);\r\n }\r\n }\r\n\r\n private loadExternalScript(scriptUrl: string) {\r\n return new Promise((resolve, reject) => {\r\n const scriptElement = document.createElement('script');\r\n scriptElement.src = scriptUrl;\r\n scriptElement.onload = resolve;\r\n document.body.appendChild(scriptElement);\r\n this.isPaypalScriptLoaded = true;\r\n })\r\n }\r\n\r\n private renderPaypalBtn(externalScriptLink, createPaypalPaymentAPI, executePaypalPaymentAPI, data: any, paypalBtnStyle: PaypalButtonStyleModel, UsePaypalProduction) {\r\n let styleObj = this.getPaypalBtnStyle(paypalBtnStyle);\r\n \r\n paypal.Button.render({\r\n\r\n env: UsePaypalProduction ? 'production' : 'sandbox', /* sandbox | production */\r\n\r\n /* Show the buyer a 'Pay Now' button in the checkout flow */\r\n commit: true,\r\n locale: 'it_IT',\r\n\r\n\r\n style: styleObj,\r\n\r\n /* payment() is called when the button is clicked */\r\n payment: function () {\r\n /* Make a call to your server to set up the payment */\r\n return paypal.request.post(createPaypalPaymentAPI, data)\r\n .then(response => {\r\n return response.id;\r\n });\r\n },\r\n\r\n /* onAuthorize() is called when the buyer approves the payment */\r\n onAuthorize: function (orderData, actions) {\r\n\r\n //-- Generating of execute payment object that we need on server side\r\n var executePaymentObj = {\r\n paymentID: orderData.paymentID,\r\n payerID: orderData.payerID,\r\n intent: orderData.intent,\r\n orderID: orderData.orderID,\r\n paymentToken: orderData.paymentToken,\r\n returnUrl: orderData.returnUrl,\r\n CustomerId: data.CustomerId,\r\n //-- This is our orderId paypal also returns property with same name, so we renamed our OrderId property\r\n CustomerOrderId: data.OrderId,\r\n Lang: data.Lang\r\n };\r\n\r\n /* Make a call to your server to execute the payment */\r\n return paypal.request.post(executePaypalPaymentAPI, executePaymentObj)\r\n .then(res => {\r\n this.isError = res.IsError;\r\n if (!res.IsError) this.isError = false;\r\n\r\n this.errMessage = res.message;\r\n if (!res.message) this.errMessage = \"\";\r\n\r\n if (this.isError) {\r\n window.location.href = `${orderData.returnUrl}&orderId=${executePaymentObj.CustomerOrderId}&isError=${this.isError}&message=${this.errMessage}`;\r\n }\r\n else {\r\n window.location.href = `${orderData.returnUrl}&orderId=${executePaymentObj.CustomerOrderId}&isError=${this.isError}`;\r\n }\r\n }).catch(err => {\r\n window.location.href = `${orderData.returnUrl}&orderId=${executePaymentObj.CustomerOrderId}&isError=true&message=${err.message}`;\r\n })\r\n }\r\n }, '#paypal-btn');\r\n }\r\n\r\n\r\n getPaypalBtnStyle(paypalBtnStyle: PaypalButtonStyleModel) {\r\n let styleObj = {};\r\n\r\n if (paypalBtnStyle) {\r\n let height = this.getPaypalBtnHeight(paypalBtnStyle.PaypalButtonHeight);\r\n\r\n styleObj = {\r\n color: paypalBtnStyle.PaypalButtonColor || 'gold',\r\n shape: paypalBtnStyle.PaypalButtonShape || 'rect',\r\n label: paypalBtnStyle.PaypalButtonLabel || 'paypal',\r\n height: height || 40,\r\n tagline: paypalBtnStyle.PaypalButtonTagline || false,\r\n size: paypalBtnStyle.PaypalButtonSize || 'responsive'\r\n }\r\n }\r\n else {\r\n styleObj = {\r\n color: 'gold',\r\n shape: 'rect',\r\n label: 'paypal',\r\n height: 40,\r\n tagline: false,\r\n size: \"responsive\"\r\n }\r\n }\r\n\r\n return styleObj;\r\n }\r\n\r\n getPaypalBtnHeight(paypalButtonHeight: string) {\r\n let retVal = 40;\r\n if (paypalButtonHeight) {\r\n if (paypalButtonHeight === 'small')\r\n retVal = 30;\r\n else if (paypalButtonHeight === 'large')\r\n retVal = 50;\r\n }\r\n\r\n return retVal;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/paypal.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { AuthService } from '../core/auth.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { CategoryInfoRequest } from \"./../../models/inventory/category-info-request\";\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\nimport { LanguageService } from '../cms/language.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\n\r\n\r\n@Injectable()\r\nexport class CategoryService {\r\n \r\n constructor\r\n (\r\n public _api: ApiService, \r\n public _cache: CacheService,\r\n public currencyService: CurrencyService,\r\n private mappings: Mappings, \r\n private authService: AuthService,\r\n private languageService: LanguageService,\r\n public ShoppingCartService: ShoppingCartService\r\n ) {}\r\n\r\n getCategory(categoryId: number, lang: string) {\r\n \r\n //Reading userId\r\n let customerId = this.authService.getCurrentUserId(); \r\n let curr = this.currencyService.getCurrency();\r\n let cartId = this.ShoppingCartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Category_Details\r\n .replace('{categoryId}', categoryId.toString())\r\n .replace('{lang}', lang)\r\n .replace('{customerid}', customerId)\r\n .replace('{currency}', curr)\r\n .replace('{cartid}', cartId);\r\n \r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getCatalogCategoriesData(lang: string) {\r\n let cartId = this.ShoppingCartService.getCartId();\r\n let curr = this.currencyService.getCurrency();\r\n let customerId = this.authService.getCurrentUserId(); \r\n let url = this.mappings.Web_Api_Get_Catalog_Categories_Data.replace('{lang}', lang).replace('{currency}', curr).replace('{userid}', customerId).replace('{cartid}', cartId);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getCategoryByUrl(lang: string, seoUrl: string) {\r\n\r\n //Reading userId\r\n let customerId = this.authService.GetUserId(); \r\n let curr = this.currencyService.getCurrency();\r\n let cartId = this.ShoppingCartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Category_By_Url\r\n .replace('{lang}', lang)\r\n .replace('{customerid}', customerId)\r\n .replace('{currency}', curr)\r\n .replace('{seoUrl}', seoUrl)\r\n .replace('{cartid}', cartId);\r\n \r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getCategoryInfo(parameters: CategoryInfoRequest) \r\n {\r\n return this._api.post(this.mappings.Web_Api_Post_Send_Category_Info_Request, parameters)\r\n }\r\n\r\n getCategoryPriceData(categoryId: number) {\r\n \r\n //Reading userId\r\n let customerId = this.authService.getCurrentUserId(); \r\n let curr = this.currencyService.getCurrency();\r\n let lang = this.languageService.getLongLang();\r\n\r\n let url = this.mappings.Web_Api_Get_Catalog_Categories_Price_Data\r\n .replace('{categoryId}', categoryId.toString())\r\n .replace('{customerid}', customerId) \r\n .replace('{lang}', lang)\r\n .replace('{currency}', curr);\r\n\r\n return this._api.get(url);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/inventory/category.service.ts","import { Injectable, ViewContainerRef, Compiler, NgModule } from \"@angular/core\";\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { AuthService } from '../core/auth.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\nimport { LanguageService } from '../cms/language.service';\r\n\r\n@Injectable()\r\nexport class SearchService {\r\n constructor\r\n (\r\n public _api: ApiService,\r\n public _cache: CacheService,\r\n public currencyService: CurrencyService,\r\n private mappings: Mappings,\r\n private authService: AuthService,\r\n private languageService: LanguageService\r\n ) {\r\n }\r\n\r\n public query: string;\r\n public base64EncodedValue: string;\r\n public queryText: string = \"\";\r\n\r\n getCategoriesAndProducts(query, startRow, endRow) {\r\n let lang = this.languageService.getLongLang();\r\n\r\n let url = this.mappings.Web_Api_Get_Product_And_Categories\r\n .replace('{startRowIndex}', startRow)\r\n .replace('{maxRows}', endRow)\r\n .replace('{lang}', lang)\r\n .replace('{query}', query);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getQueryValue() {\r\n var response = this.query;\r\n\r\n return response;\r\n }\r\n\r\n setQueryValue(newQuery: string) {\r\n this.query = newQuery;\r\n }\r\n\r\n setQueryPlainTextValue(newQuery: string) {\r\n this.queryText = newQuery;\r\n }\r\n\r\n getQueryPlainTextValue() {\r\n var response = this.queryText;\r\n\r\n return response;\r\n }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/inventory/search.service.ts","import { Injectable } from '@angular/core';\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { ApplicationService } from \"./../core/application.service\";\r\nimport { AppConfig } from '../../models/core/app-config';\r\n\r\n@Injectable()\r\nexport class LanguageService \r\n{\r\n\r\n private lang: string = this.translate.currentLang;\r\n\r\n constructor\r\n (\r\n private translate: TranslateService,\r\n private appService: ApplicationService \r\n ) {}\r\n\r\n getLongLang(): string \r\n {\r\n switch (this.lang) \r\n {\r\n case 'it': return 'it-IT';\r\n case 'en': return 'en-GB';\r\n case 'al': return 'sq-AL';\r\n default: return '';\r\n }\r\n }\r\n\r\n getShortLang(): string \r\n {\r\n return this.lang;\r\n }\r\n\r\n //Return an object containing all the information for the current language (eg. code, lable, icon etc.)\r\n getCurrentLanguage():any\r\n {\r\n let result:LanguageObj = new LanguageObj();\r\n\r\n switch(this.lang)\r\n {\r\n case \"it\": \r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\nexport class LanguageObj\r\n{\r\n ShortCode: string;\r\n LongCode: string;\r\n Text: string;\r\n IconCode: string;\r\n ImageUrl: string;\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/language.service.ts","import { Injectable } from '@angular/core';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { ApiService } from '../core/api.service';\r\n\r\n@Injectable()\r\nexport class CurrencyService {\r\n constructor\r\n (\r\n public _api: ApiService,\r\n private mappings: Mappings\r\n ) { }\r\n\r\n private currencyVal: string = \"\";\r\n\r\n getCurrency() {\r\n let param = '$';\r\n\r\n switch (param) {\r\n case '$': return 'USD';\r\n case '€': return 'EUR';\r\n default: return 'EUR';\r\n }\r\n }\r\n getCurrencyBackend() {\r\n let url = this.mappings.Web_Api_Get_DefaultCurrency\r\n return this._api.get(url);\r\n }\r\n \r\n getDefaultCurrency() {\r\n return this.currencyVal;\r\n }\r\n\r\n setDefaultCurrency(currency:string)\r\n {\r\n this.currencyVal=currency;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/currency.service.ts","import { Subscription } from 'rxjs/Subscription';\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, Inject } from '@angular/core';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { DomAdapter, getDOM } from '@angular/platform-browser/src/dom/dom_adapter';\r\nimport { Router } from \"@angular/router\";\r\n\r\nimport { TemplateService } from './services/settings/template.service';\r\nimport { CacheService } from './services/core/cache.service';\r\nimport { Mappings } from './shared/mapping';\r\nimport { RoutesService } from \"./services/core/routes.service\";\r\nimport { Breadcrumbs } from \"./models/cms/breadcrumbs\";\r\n\r\nimport {\r\n // import as RouterEvent to avoid confusion with the DOM Event\r\n Event as RouterEvent,\r\n NavigationStart,\r\n NavigationCancel,\r\n NavigationError\r\n} from '@angular/router';\r\nimport { ComponentHelperService } from './services/core/component-helper.service';\r\nimport { CurrencyService } from './services/cms/currency.service';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n selector: 'app',\r\n template:require('./app.component.html')\r\n})\r\n\r\nexport class AppComponent {\r\n\r\n private _dom: DomAdapter = getDOM();\r\n \r\n constructor(private template: TemplateService,\r\n @Inject(DOCUMENT) private document: any,\r\n @Inject('isNode') private isNode: boolean,\r\n private cache: CacheService,\r\n private mappings: Mappings,\r\n private router: Router,\r\n private currency: CurrencyService,\r\n public routesService: RoutesService\r\n ) {\r\n let sub = router.events.subscribe((event: RouterEvent) => {\r\n this.navigationInterceptor(event)\r\n });\r\n\r\n let currencysub = currency.getCurrencyBackend().subscribe(result => {\r\n currency.setDefaultCurrency(result);\r\n });\r\n this.subManager.add(sub);\r\n this.subManager.add(currencysub);\r\n }\r\n\r\n subManager = new Subscription();\r\n \r\n // Shows and hides the loading spinner during RouterEvent changes\r\n navigationInterceptor(event: RouterEvent): void {\r\n if (event instanceof NavigationStart) {\r\n this.routesService.showPageLoader();\r\n }\r\n\r\n // Set loading state to false in both of the below events to hide the spinner in case a request fails\r\n if (event instanceof NavigationCancel) {\r\n this.routesService.hidePageLoader(); \r\n }\r\n \r\n if (event instanceof NavigationError) {\r\n this.routesService.hidePageLoader(); \r\n }\r\n }\r\n\r\n ngOnInit() {\r\n if (!this.isNode) {\r\n return;\r\n }\r\n\r\n let templateSub = this.template.getHeadFootData()\r\n .subscribe((headFootData) => {\r\n //Dynamically adding head css, js to the page (head.html)\r\n this.appendHtmlString(this.document.head, headFootData.HeadTemplateHtml);\r\n\r\n //Dynamically adding head css, js to the page (foot.html)\r\n this.appendHtmlString(this.document.body, headFootData.FootTemplateHtml);\r\n });\r\n\r\n this.subManager.add(templateSub);\r\n }\r\n\r\n private appendHtmlString(el: any, template: string) {\r\n let div = this._dom.createElement('div');\r\n this._dom.setInnerHTML(div, template);\r\n this._dom.insertAllBefore(el.lastChild, this._dom.childNodes(div));\r\n }\r\n\r\n clearMemory(){\r\n this._dom = null;\r\n this.subManager.unsubscribe();\r\n this.cache.clearAll();\r\n this.document = null;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.clearMemory();\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/app.component.ts","import { BreadcrumbsService } from './../../../../services/cms/breadcrumbs.service';\r\nimport { Breadcrumbs } from './../../../../models/cms/breadcrumbs';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { ArticleCategory } from \"./../../../../models/cms/news-list\";\r\nimport { News } from \"./../../../../models/cms/news-list\";\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ArticleService } from \"./../../../../services/cms/article.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class ArticleCategoryComponent implements OnInit {\r\n\r\n articleCategory: ArticleCategory = new ArticleCategory();\r\n\r\n constructor(\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private articleService: ArticleService,\r\n private languageService: LanguageService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { this.router.routeReuseStrategy.shouldReuseRoute = () => false; }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n //Reading Language information\r\n let lang: string = this.languageService.getLongLang();\r\n\r\n //Reading id from url\r\n //If id is set, then the information is retrived by id, else by url\r\n let routeSub = this.route.params.subscribe(params => {\r\n\r\n let id = params['id'];\r\n let pageNumber = params['page'];\r\n let startRowIndex: number = 0;\r\n let maxRows: number = 15;\r\n\r\n if (pageNumber == undefined) {\r\n pageNumber = 0;\r\n startRowIndex = pageNumber * maxRows;\r\n }\r\n else if (pageNumber < 0) {\r\n pageNumber = 0;\r\n startRowIndex = pageNumber * maxRows;\r\n }\r\n else {\r\n startRowIndex = (pageNumber - 1) * maxRows;\r\n }\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n \r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n\r\n if (id !== undefined) {\r\n let categoryId: string = id;\r\n\r\n let categorySubId = this.articleService.getCategoryArticleById(categoryId, lang, startRowIndex, maxRows)\r\n .subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n \r\n if (this.isBrowser) {\r\n this.onGetArticleSuccess(result, pageNumber, maxRows,header, categoryId);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeArticleCategory, categoryId);\r\n \r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(categorySubId);\r\n }\r\n\r\n else {\r\n let url = this.router.url;\r\n let pageNumber = params['page'];\r\n\r\n if (pageNumber != undefined) {\r\n url = url.slice(0, url.lastIndexOf('/'));\r\n }\r\n else {\r\n pageNumber = 0;\r\n }\r\n\r\n let categorySubUrl = this.articleService.getArticleCategoryByUrl(lang, url, startRowIndex, maxRows).subscribe(result => {\r\n if (this.isBrowser) {\r\n this.onGetArticleSuccess(result, pageNumber, maxRows,header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeArticleCategory, result.CategoryDetails.Id);\r\n \r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(categorySubUrl);\r\n }\r\n });\r\n\r\n this.subManager.add(routeSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n onGetArticleSuccess(result: any, currentPage: number, maxRows: number,header:any, categoryId?: string ) {\r\n ////Creating sub-component with the returned information\r\n let subComponent = this.createSubComponent(result, currentPage, maxRows,header,categoryId);\r\n\r\n ////Injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n\r\n private createSubComponent(result: any, currentPage: number, maxRows: number,header:any ,categoryId?: string) {\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n\r\n constructor(\r\n private seoService: SeoService,\r\n private scriptService: ScriptService,\r\n private helperService: HelperService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private languageService: LanguageService,\r\n private articleService: ArticleService,\r\n private routesService: RoutesService,\r\n private router: Router,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n articleCategory: ArticleCategory = result.CategoryDetails;\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n blogs: Array = result.ArticleCategoryList;\r\n private pageIsInit: boolean = false;\r\n\r\n category: any;\r\n articleCategories: Array;\r\n lang: string = this.languageService.getLongLang();\r\n categoryId: number = 0;\r\n startRowIndex: number = 0;\r\n maxRows: number = maxRows;\r\n blogCategoryPageName: string[] = [];\r\n blogCategoryPageNumber: string[] = [];\r\n blogPageName: string[] = [];\r\n homePageName: string[] = [];\r\n\r\n private currentPageNumber: number = currentPage;\r\n private disablePreviousPage: boolean = false;\r\n private disableNextPage: boolean = false;\r\n private numberOfPages: number = Math.ceil(result.NumberOfArticles / this.maxRows);\r\n private pages: any = this.createRange(this.numberOfPages);\r\n private zeroPage: number = 0;\r\n private breadcrumbs : Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n footerData: any = result.FooterData;\r\n headerData: any = header;\r\n\r\n ngOnInit() \r\n {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n if(this.currentPageNumber == 0)\r\n {\r\n this.zeroPage = 1;\r\n }\r\n\r\n if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n this.disablePreviousPage = true;\r\n }\r\n else if (this.currentPageNumber == this.numberOfPages) {\r\n this.disableNextPage = true;\r\n }\r\n\r\n this.articleCategories = result.ArticleCategories;\r\n this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n this.homePageName = this.routesService.getRoutePath('HOME');\r\n\r\n if (categoryId != undefined) {\r\n this.blogCategoryPageName = this.routesService.getRoutePath('ArticleCategoryPage');\r\n this.blogCategoryPageNumber = this.routesService.getRoutePath('ArticleCategoryPageWithPaging')\r\n }\r\n\r\n else {\r\n this.blogCategoryPageName.push(this.router.url)\r\n }\r\n\r\n\r\n }\r\n\r\n imageTitle(imgPath) {\r\n let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n\r\n return imgName;\r\n\r\n } \r\n\r\n createRange(number) {\r\n var items: any[] = [];\r\n\r\n for (var i = 1; i <= number; i++) {\r\n items.push(i);\r\n }\r\n\r\n return items;\r\n }\r\n\r\n showClickedPage(index) {\r\n let page = index + 1;\r\n let url: string;\r\n\r\n if (categoryId != undefined) {\r\n url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', page.toString());\r\n }\r\n else {\r\n if (this.currentPageNumber == 0) {\r\n url = this.blogCategoryPageName + \"/\" + page.toString();\r\n }\r\n else {\r\n url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + page.toString();\r\n }\r\n }\r\n\r\n this.router.navigate([url]);\r\n }\r\n\r\n showPreviousPage() {\r\n let previousPage: number = this.currentPageNumber - 1;\r\n\r\n if (previousPage > 0) {\r\n let url: string;\r\n\r\n if (categoryId != undefined) {\r\n url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', previousPage.toString());\r\n }\r\n else {\r\n if (this.currentPageNumber == 0) {\r\n url = this.blogCategoryPageName + \"/\" + previousPage.toString();\r\n }\r\n else {\r\n url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + previousPage.toString();\r\n }\r\n }\r\n\r\n this.router.navigate([url]);\r\n }\r\n }\r\n\r\n showNextPage() {\r\n let page: number = Number(this.currentPageNumber);\r\n if(this.currentPageNumber == 0)\r\n {\r\n page = 1\r\n }\r\n \r\n let nextPage: number = page + 1;\r\n \r\n let url: string;\r\n\r\n if (nextPage <= this.numberOfPages) {\r\n if (categoryId != undefined) {\r\n url = this.blogCategoryPageNumber[0].replace(':id', categoryId.toString()).replace(':page', nextPage.toString());\r\n }\r\n else {\r\n if (this.currentPageNumber == 0) {\r\n url = this.blogCategoryPageName + \"/\" + nextPage.toString();\r\n }\r\n else {\r\n url = this.blogCategoryPageName[0].slice(0, this.blogCategoryPageName.lastIndexOf('/')) + \"/\" + nextPage.toString();\r\n }\r\n }\r\n this.router.navigate([url]);\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/article/sys/article-category.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { ArticleService } from \"./../../../../services/cms/article.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { News } from \"./../../../../models/cms/news-list\";\r\nimport { ArticleCategory } from \"./../../../../models/cms/news-list\";\r\nimport { ActivatedRoute, Router } from \"@angular/router\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class BlogPageComponent implements OnInit {\r\n constructor(\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private articleService: ArticleService,\r\n private languageService: LanguageService,\r\n private activatedRoute: ActivatedRoute,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) {\r\n }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n categoryId: number = 0;\r\n startRowIndex: number = 0;\r\n maxRows: number = 15;\r\n currentPageNumber: number = 0;\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let paramsSub = this.activatedRoute.params.subscribe(params => {\r\n this.currentPageNumber = params['page'];\r\n\r\n if (this.currentPageNumber == undefined) {\r\n this.currentPageNumber = 1;\r\n this.startRowIndex = (this.currentPageNumber - 1) * this.maxRows;\r\n }\r\n else if (this.currentPageNumber < 1) {\r\n this.currentPageNumber = 1;\r\n this.startRowIndex = (this.currentPageNumber - 1) * this.maxRows;\r\n }\r\n else {\r\n this.startRowIndex = (this.currentPageNumber - 1) * this.maxRows;\r\n }\r\n\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n \r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n\r\n\r\n let blogSub = this.articleService.getBlogData(this.lang, this.startRowIndex, this.maxRows).subscribe(result => {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the blog information to inject\r\n let subComponent = this.createSubComponent(result, this.currentPageNumber, this.maxRows,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.blogHomeId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(blogSub);\r\n }\r\n )\r\n\r\n this.subManager.add(paramsSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, currentPage: number, maxRows: number,header:any) {\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor(\r\n private seoService: SeoService,\r\n private _elementRef: ViewContainerRef,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private scriptService: ScriptService,\r\n private helperService: HelperService,\r\n private languageService: LanguageService,\r\n private articleService: ArticleService,\r\n private routesService: RoutesService,\r\n private router: Router,\r\n private activatedRoute: ActivatedRoute,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n blogs: Array = result.ArticleCategoryList;\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private company: any = result.Company;\r\n private pageIsInit: boolean = false;\r\n\r\n private category: any;\r\n private articleCategories: Array;\r\n private lang: string = this.languageService.getLongLang();\r\n private categoryId: number = 0;\r\n private startRowIndex: number = 0;\r\n private maxRows: number = maxRows;\r\n private blogPageName: string[] = [];\r\n private blogPageNumber: string[] = [];\r\n private numberOfPages: number = Math.ceil(result.NumberOfArticles / this.maxRows);\r\n private pages: any = this.createRange(this.numberOfPages);\r\n private currentPageNumber: number = currentPage;\r\n private disableNextPage: boolean = false;\r\n private disablePreviousPage: boolean = false;\r\n private homePageName: string[] = [];\r\n\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n footerData: any = result.FooterData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n this.articleCategories = result.ArticleCategories;\r\n\r\n if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n this.disablePreviousPage = true;\r\n }\r\n else if (this.currentPageNumber == this.numberOfPages) {\r\n this.disableNextPage = true;\r\n }\r\n\r\n this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n this.blogPageNumber = this.routesService.getRoutePath('BLOG_WITH_PAGINATION');\r\n this.homePageName = this.routesService.getRoutePath('HOME');\r\n\r\n \r\n }\r\n\r\n imageTitle(imgPath) {\r\n let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n\r\n return imgName;\r\n\r\n }\r\n\r\n //PAGINATION START************************************************************\r\n createRange(number) {\r\n var items: any[] = [];\r\n\r\n for (var i = 1; i <= number; i++) {\r\n items.push(i);\r\n }\r\n\r\n return items;\r\n }\r\n\r\n showClickedPage(index) {\r\n let page = index + 1;\r\n let url = this.blogPageNumber[0].replace(':page', page.toString());\r\n\r\n this.router.navigate([url]);\r\n }\r\n\r\n showPreviousPage() {\r\n let previousPage: number = this.currentPageNumber - 1;\r\n\r\n if (previousPage > 0) {\r\n let url = this.blogPageNumber[0].replace(':page', previousPage.toString());\r\n\r\n this.router.navigate([url]);\r\n }\r\n }\r\n\r\n showNextPage() {\r\n let nextPage: number = Number(this.currentPageNumber) + 1;\r\n\r\n if (nextPage <= this.numberOfPages) {\r\n let url = this.blogPageNumber[0].replace(':page', nextPage.toString());\r\n\r\n this.router.navigate([url]);\r\n }\r\n }\r\n //PAGINATION END************************************************************\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/article/sys/blog-page.component.ts","import { BreadcrumbsService } from './../../../../services/cms/breadcrumbs.service';\r\nimport { Breadcrumbs } from './../../../../models/cms/breadcrumbs';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ArticleService } from \"./../../../../services/cms/article.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { NewsDetails, ArticleCategory } from \"./../../../../models/cms/news-list\";\r\nimport { NewsletterService } from \"../../../../services/cms/newsletter.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class ArticleComponent implements OnInit {\r\n newsDetails: NewsDetails = new NewsDetails();\r\n\r\n constructor(\r\n private _elementRef: ViewContainerRef,\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private languageService: LanguageService,\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n private articleService: ArticleService,\r\n private templateService: TemplateService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService) {\r\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\r\n }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n //Reading Language information\r\n let lang: string = this.languageService.getLongLang();\r\n\r\n let paramSub = this.route.params.subscribe(params => {\r\n\r\n let id = params['id'];\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n \r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n //Reading id from url\r\n //If id is set, then the page is retrived by id, else by url\r\n if (id !== undefined) {\r\n\r\n let Id: number = id;\r\n\r\n let subArticleId = this.articleService.getArticleDetails(Id, lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n this.onGetPageSuccess(result, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeArticle, Id);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation,result.HeaderImage)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(subArticleId);\r\n }\r\n\r\n else {\r\n let url = this.router.url;\r\n\r\n let subArticleUrl = this.articleService.getArticleByUrl(lang, url).subscribe(result => {\r\n if (this.isBrowser) {\r\n this.onGetPageSuccess(result, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeArticle, result.Id);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation,result.HeaderImage)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(subArticleUrl);\r\n }\r\n });\r\n\r\n this.subManager.add(paramSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n onGetPageSuccess(newsResult: NewsDetails, header: any) {\r\n ////Creating sub-component with the returned information\r\n let subComponent = this.createSubComponent(newsResult, header);\r\n\r\n ////Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n\r\n private createSubComponent(newsObj: NewsDetails, header: any) {\r\n if (newsObj.Id == 0) {\r\n let templateSub = this.templateService.getComponentTemplate(\"newsletterConfirmationTemplate\").subscribe(result => {\r\n newsObj.TemplateHtml = result;\r\n });\r\n\r\n this.subManager.add(templateSub);\r\n }\r\n\r\n @Component({\r\n template: newsObj.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor(\r\n private seoService: SeoService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n private helperService: HelperService,\r\n private newsletterService: NewsletterService,\r\n private routesService: RoutesService,\r\n private articleService: ArticleService,\r\n private languageService: LanguageService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n newsDetails: NewsDetails = newsObj;\r\n slidesNews: any = newsObj.SliderImages;\r\n items: any;\r\n category: any;\r\n private pageIsInit: boolean = false;\r\n private seoInfo: SeoViewModel = newsObj.SeoInformation;\r\n private model =\r\n {\r\n Email: \"\",\r\n Checkbox: false\r\n }\r\n\r\n private newsletterSubmittedArticle: boolean;\r\n private spinnerNewslatterArticle: boolean;\r\n private alreadySubscribedArticle: boolean;\r\n private successfullySubscribedArticle: boolean;\r\n private privacyPageNameArticle: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n\r\n articleCategories: Array;\r\n lang: string = this.languageService.getLongLang();\r\n categoryId: number = 0;\r\n startRowIndex: number = 0;\r\n maxRows: number = 999999;\r\n blogPageName: string[] = [];\r\n homePageName: string[] = [];\r\n\r\n private breadcrumbs: Breadcrumbs[] = newsObj.BreadcrumbsInfo;\r\n\r\n subManager = new Subscription();\r\n\r\n footerData: any = newsObj.FooterData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n this.articleCategories = newsObj.ArticleCategories;\r\n this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n this.homePageName = this.routesService.getRoutePath('HOME');\r\n\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n this.setupSocialNetworks();\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n layoutTheme.initCarousel();\r\n layoutTheme.initLightbox();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n setupSocialNetworks() {\r\n let shareurl = window.location.href;\r\n\r\n let title = this.newsDetails.Title;\r\n let text = encodeURI(title);\r\n\r\n /********************************** SET THIS PART DYNAMICALY **************************************** */\r\n //setting twitter profile name \r\n let companyTwitterProfile = \"DynamicsoftSrl\";\r\n\r\n //setting linkedin profile name\r\n let companyLinkedinProfile = \"DynamicsoftSrl\"\r\n /**************************************************************************************************** */\r\n //encoded current page\r\n let currentPage = encodeURI(shareurl);\r\n //sharing of current page on Facebook\r\n $('.fbsharelink').click(function () {\r\n window.open('https://www.facebook.com/sharer/sharer.php?u=' + shareurl + '&t=' + document.title, '',\r\n 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n return false;\r\n });\r\n\r\n //sharing of current page on LinkedIn\r\n $('.linkedinsharelink').click(function () {\r\n window.open('https://www.linkedin.com/shareArticle?mini=true&url=' + shareurl + '&title=' + document.title +\r\n '&summary=' + text + '&source=' + companyLinkedinProfile, '',\r\n 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600')\r\n });\r\n\r\n //sharing of currentpage on Twitter\r\n $('.twitter-share-button').click(function () {\r\n window.open('https://twitter.com/intent/tweet?text=' + text + '&url=' + currentPage + '&via=' + companyTwitterProfile, '',\r\n 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n })\r\n }\r\n\r\n onSubmit(form) {\r\n this.spinnerNewslatterArticle = true;\r\n if (form) {\r\n let subNewsletter = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(result => {\r\n\r\n if (result == \"-1\") {\r\n this.alreadySubscribedArticle = true;\r\n this.successfullySubscribedArticle = false;\r\n this.spinnerNewslatterArticle = false;\r\n }\r\n\r\n else {\r\n this.alreadySubscribedArticle = false;\r\n this.successfullySubscribedArticle = true;\r\n this.spinnerNewslatterArticle = false;\r\n }\r\n });\r\n\r\n this.subManager.add(subNewsletter);\r\n }\r\n\r\n else {\r\n this.spinnerNewslatterArticle = false;\r\n }\r\n }\r\n\r\n imageTitle(imgPath) {\r\n let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/article/sys/news-page.component.ts","//System\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Input } from '@angular/core';\r\n\r\n//Services\r\nimport { SearchService } from '../../../../services/inventory/search.service';\r\nimport { ComponentHelperService } from '../../../../services/core/component-helper.service';\r\nimport { RoutesService } from '../../../../services/core/routes.service';\r\nimport { ActivatedRoute, Params, Router } from '@angular/router';\r\nimport { type } from 'os';\r\nimport { SearchResult } from '../../../../models/inventory/search-result';\r\nimport { errorHandler } from '@angular/platform-browser/src/browser';\r\nimport { error } from 'util';\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n selector: \"\",\r\n template: ''\r\n})\r\n\r\nexport class SearchComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private searchService: SearchService,\r\n private cmsComponentService: CmsComponentService,\r\n private activatedRoute: ActivatedRoute,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n private query: string;\r\n private currentPageNumber: number;\r\n private startRow: number = 0;\r\n private endRow: number = 10;\r\n private SearchResult: any;\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let paramSub = this.activatedRoute.params.subscribe((params: Params) => {\r\n\r\n let decodedQuery = params['query'];\r\n\r\n var decoded = decodeURIComponent(decodedQuery)\r\n\r\n this.query = encodeURIComponent(decoded);\r\n\r\n this.currentPageNumber = params['page'];\r\n\r\n if (this.currentPageNumber == undefined) {\r\n this.currentPageNumber = 1;\r\n this.startRow = (this.currentPageNumber - 1) * this.endRow;\r\n }\r\n else if (this.currentPageNumber < 1) {\r\n this.currentPageNumber = 1;\r\n this.startRow = (this.currentPageNumber - 1) * this.endRow;\r\n }\r\n else {\r\n this.startRow = (this.currentPageNumber - 1) * this.endRow;\r\n }\r\n\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n\r\n let catAndProdSub = this.searchService.getCategoriesAndProducts(this.query, this.startRow, this.endRow).subscribe(result => {\r\n this.SearchResult = result;\r\n\r\n if (this.isBrowser) {\r\n // Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(header, this.SearchResult, this.query, this.currentPageNumber, this.endRow);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //Eventually retrieving the script to append\r\n if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.SearchPageId);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.SearchWithPagingPageId);\r\n }\r\n }\r\n },\r\n err => this.handleSearchError())\r\n\r\n this.subManager.add(catAndProdSub);\r\n })\r\n\r\n this.subManager.add(paramSub)\r\n }\r\n\r\n handleSearchError() {\r\n this.query = null;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n this.searchService.getCategoriesAndProducts(this.query, this.startRow, this.endRow).subscribe(result => {\r\n this.SearchResult = result;\r\n if (this.isBrowser) {\r\n // Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(header, this.SearchResult, this.query, this.currentPageNumber, this.endRow);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //Eventually retrieving the script to append\r\n if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.SearchPageId);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.SearchWithPagingPageId);\r\n }\r\n }\r\n })\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n\r\n private createSubComponent(header: any, SearchResult: any, query: string, currentPage: number, endRow: number) {\r\n\r\n @Component({\r\n template: SearchResult.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n\r\n constructor\r\n (\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private routesService: RoutesService,\r\n private searchService: SearchService,\r\n private router: Router,\r\n private seoService: SeoService,\r\n private scriptService: ScriptService,\r\n private _elementRef: ViewContainerRef\r\n ) { }\r\n\r\n private seoInfo: SeoViewModel = SearchResult.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n private searchResults: Array;\r\n private defaultImageUrl: string = \"/global_app/img/noimage.jpg\";\r\n private redirectUrlNone: string = \"javascript:void(0)\";\r\n\r\n //pagination\r\n private query = query;\r\n private currentPageNumber: number = currentPage;\r\n private disablePreviousPage: boolean = false;\r\n private disableNextPage: boolean = false;\r\n private numberOfPages: number = Math.ceil(SearchResult.NumberOfResults / endRow);\r\n private searchResultsPage: string[] = [];\r\n private searchResultsPageWithPagination: string[] = [];\r\n private pages: any = this.createRange(this.numberOfPages);\r\n private numberOfResult: number = SearchResult.NumberOfResults;\r\n headerData: any = header;\r\n ngOnInit() {\r\n if (SearchResult.SearchModelList != null) {\r\n this.searchResults = SearchResult.SearchModelList;\r\n }\r\n\r\n if (this.currentPageNumber == 0 || this.currentPageNumber == 1) {\r\n this.disablePreviousPage = true;\r\n }\r\n else if (this.currentPageNumber == this.numberOfPages) {\r\n this.disableNextPage = true;\r\n }\r\n\r\n this.searchResultsPage = this.routesService.getRoutePath('SEARCH - RESULTS');\r\n this.searchResultsPageWithPagination = this.routesService.getRoutePath('SEARCH RESULTS - PAGINATION');\r\n\r\n if (this.searchResults != null && this.searchResults != undefined) {\r\n for (let i = 0; i < this.searchResults.length; i++) {\r\n //setting of default image if image url is not defined\r\n if (this.searchResults[i].ImageUrl == null || this.searchResults[i].ImageUrl == \"\") {\r\n this.searchResults[i].ImageUrl = this.defaultImageUrl;\r\n }\r\n\r\n //setting of url href not to do nothing if url is not defined\r\n if (this.searchResults[i].RedirectUrl == null || this.searchResults[i].RedirectUrl == \"\") {\r\n this.searchResults[i].RedirectUrl = this.redirectUrlNone;\r\n }\r\n }\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n //Pagination start\r\n createRange(number) {\r\n var items: any[] = [];\r\n\r\n for (var i = 1; i <= number; i++) {\r\n items.push(i);\r\n }\r\n\r\n return items;\r\n }\r\n\r\n showClickedPage(index) {\r\n let page = index + 1;\r\n let url = this.searchResultsPageWithPagination[0]\r\n .replace(':query', query)\r\n .replace(':page', page.toString());\r\n\r\n this.router.navigate([url]);\r\n }\r\n\r\n showPreviousPage() {\r\n let previousPage: number = this.currentPageNumber - 1;\r\n\r\n if (previousPage > 0) {\r\n let url = this.searchResultsPageWithPagination[0]\r\n .replace(':query', query)\r\n .replace(':page', previousPage.toString());\r\n\r\n this.router.navigate([url]);\r\n }\r\n }\r\n\r\n showNextPage() {\r\n let nextPage: number = Number(this.currentPageNumber) + 1;\r\n\r\n if (nextPage <= this.numberOfPages) {\r\n let url = this.searchResultsPageWithPagination[0]\r\n .replace(':query', query)\r\n .replace(':page', nextPage.toString());\r\n\r\n this.router.navigate([url]);\r\n }\r\n }\r\n //Pagination end\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/header/widget/search.component.ts","import { CustomersCanvasService } from './../../../../services/inventory/customerscanvas.service';\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\n\r\n//Services\r\nimport { NewsletterService } from '../../../../services/cms/newsletter.service';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CacheService } from '../../../../services/core/cache.service';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { Meta } from '../../../../services/core/angular2-meta';\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: ''\r\n})\r\n\r\nexport class HomeComponent implements OnInit {\r\n data: any = {};\r\n\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n private scriptService: ScriptService,\r\n @Inject(DOCUMENT) private document: any\r\n ) {\r\n this._compiler.clearCache();\r\n }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let homePageInfo: any;\r\n let header: any;\r\n let SideMenu: any;\r\n let promo: any;\r\n let highlith: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n SideMenu = result1;\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n\r\n let highlightPromo = this.cmsComponentService.getproductHilightpromo().subscribe(result => {\r\n //if (this.isBrowser) {\r\n if (result.Promotions) {\r\n promo = result.Promotions;\r\n\r\n }\r\n if (result.Highlights) {\r\n highlith = result.Highlights;\r\n\r\n }\r\n // }\r\n });\r\n this.subManager.add(highlightPromo);\r\n \r\n\r\n let homeSub = this.cmsComponentService.getHomePageDataOptimized().subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (SideMenu) {\r\n result.SideMenuData = SideMenu;\r\n }\r\n if (promo) {\r\n result.Promotions = promo;\r\n }\r\n if (highlith) {\r\n result.Highlights = highlith;\r\n }\r\n if (this.isBrowser) {\r\n homePageInfo = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(homePageInfo, header);\r\n //let subComponent = this.createSubComponent(homePageInfo);\r\n\r\n this._elementRef.clear();\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.homeId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(homeSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n // this.cache.clearAll();\r\n }\r\n\r\n //Creates component to inject\r\n //private createSubComponent(homePageInfo: any) {\r\n\r\n private createSubComponent(homePageInfo: any, header: any) {\r\n @Component({\r\n template: homePageInfo.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private routesService: RoutesService,\r\n private seoService: SeoService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n private helperService: HelperService,\r\n public currency: CurrencyService,\r\n private newsletterService: NewsletterService,\r\n private componentHelper: ComponentHelperService,\r\n private cache: CacheService,\r\n public canvasService: CustomersCanvasService,\r\n private metaService: Meta,\r\n ) { }\r\n\r\n private homeIsInit: boolean = false;\r\n\r\n private productsPageName: string[] = [];\r\n private promotionsPageName: string[] = [];\r\n\r\n private categories: any = homePageInfo.Categories;\r\n private highlights: any = homePageInfo.Highlights;\r\n private promotions: any = homePageInfo.Promotions;\r\n private seoInfo: SeoViewModel = homePageInfo.SeoInformation;\r\n private articles: any = homePageInfo.ArticleCategoryList;\r\n //private headerData: any = homePageInfo.HeaderData;\r\n\r\n private headerData: any = header;\r\n private footerData: any = homePageInfo.FooterData;\r\n private sideMenuData: any = homePageInfo.SideMenuData;\r\n private sliderData: any = homePageInfo.SliderData;\r\n\r\n //newsletter subsciption\r\n private newsletterSubmitted: boolean = false;\r\n private privacySubmitted: boolean = false;\r\n private alreadySubscribed: boolean = false;\r\n private successfullySubscribed: boolean = false;\r\n private spinnerNewslatter: boolean = false;\r\n\r\n private model = {\r\n Email: \"\",\r\n CheckboxSubscribe: false\r\n };\r\n\r\n subManager = new Subscription();\r\n\r\n // private breadcrumbs : Breadcrumbs[] = homePageInfo.BreadcrumbsInfo;\r\n\r\n ngOnInit() {\r\n\r\n // setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n this.sideMenuData.Categories = this.headerData.Categories;\r\n this.productsPageName = this.routesService.getRoutePath('CATALOGO PRODOTTI (HOME)');\r\n this.promotionsPageName = this.routesService.getRoutePath('CATALOGO - PRODOTTI IN OFFERTA');\r\n }\r\n\r\n\r\n filteraArticleOfType(type, numReturn) {\r\n let count = 1;\r\n let result = new Array();\r\n let res = this.articles.filter(x => x.Code_Category == type);\r\n for (let item of res) {\r\n if (count > numReturn) {\r\n return result;\r\n }\r\n result.push(item);\r\n count++;\r\n }\r\n return result;\r\n }\r\n\r\n onSubmit(form) {\r\n this.spinnerNewslatter = true;\r\n if (form) {\r\n let newsSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(result => {\r\n if (result == \"-1\") {\r\n this.alreadySubscribed = true;\r\n this.successfullySubscribed = false;\r\n this.spinnerNewslatter = false;\r\n }\r\n\r\n else {\r\n this.alreadySubscribed = false;\r\n this.successfullySubscribed = true;\r\n this.spinnerNewslatter = false;\r\n }\r\n });\r\n\r\n this.subManager.add(newsSub);\r\n }\r\n\r\n else {\r\n this.spinnerNewslatter = false;\r\n }\r\n }\r\n\r\n imageTitle(imgPath) {\r\n let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.homeIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n layoutTheme.initCarousel();\r\n layoutTheme.initAnimate();\r\n layoutTheme.initVideo();\r\n //Eventually retrieving the script to append\r\n // if (this.seoInfo.HasScripts == true) {\r\n // this.scriptService.appendHomeScript(this._elementRef.element.nativeElement);\r\n // }\r\n\r\n this.homeIsInit = true;\r\n }\r\n\r\n nullifyAllReferences() {\r\n homePageInfo = null;\r\n this.productsPageName = null;\r\n this.promotionsPageName = null;\r\n\r\n this.categories = null;\r\n this.articles = null;\r\n this.highlights = null;\r\n this.promotions = null;\r\n this.seoInfo = null;\r\n\r\n this.headerData = null;\r\n this.footerData = null;\r\n this.sideMenuData = null;\r\n this.sliderData = null;\r\n this.model.CheckboxSubscribe = null;\r\n this.model.Email = null;\r\n }\r\n\r\n doSomething() {\r\n this.nullifyAllReferences();\r\n this.subManager.unsubscribe();\r\n this.componentHelper.clearMemory();\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.nullifyAllReferences();\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/homepage/sys/home.component.ts","import { Subscription } from 'rxjs/Subscription';\r\nimport { BreadcrumbsService } from './../../../../services/cms/breadcrumbs.service';\r\nimport { Breadcrumbs } from './../../../../models/cms/breadcrumbs';\r\n//System\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { DomAdapter, getDOM } from '@angular/platform-browser/src/dom/dom_adapter';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { CmsContentService } from \"./../../../../services/cms/cms-content.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { CmsPage } from \"./../../../../models/cms/cms-page\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Menu } from '../../../../models/cms/menu';\r\nimport { CmsMenuListService } from '../../../../services/cms/cms-menu-list.service';\r\nimport { RoutesService } from '../../../../services/core/routes.service';\r\n\r\n@Component({\r\n template: \"\",\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated\r\n})\r\n\r\nexport class CmsPageComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private cmsContentService: CmsContentService,\r\n private route: ActivatedRoute,\r\n private languageService: LanguageService,\r\n private router: Router,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { this.router.routeReuseStrategy.shouldReuseRoute = () => false; }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n //Reading Language information\r\n let longLangCode: string = this.languageService.getLongLang();\r\n let shortLangCode: string = this.languageService.getShortLang();\r\n\r\n let subParams = this.route.params.subscribe(params => {\r\n let id = params['id'];\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n \r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n //Reading id from url\r\n //If id is set, then the page is retrived by id, else by url\r\n if (id !== undefined) {\r\n let pageId = '' + id;\r\n\r\n let cmsIdSub = this.cmsContentService.getCmsPageById(longLangCode, pageId).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n this.onGetPageSuccess(result, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeCmsPage, pageId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation, result.TopImage)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(cmsIdSub);\r\n }\r\n\r\n else {\r\n let url = this.router.url;\r\n\r\n let cmsUrlSub = this.cmsContentService.getCmsPageByUrl(longLangCode, url).subscribe(result => {\r\n if (this.isBrowser) {\r\n this.onGetPageSuccess(result, header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeCmsPage, result.IdLevel);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation, result.TopImage)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(cmsUrlSub);\r\n }\r\n });\r\n\r\n this.subManager.add(subParams);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n onGetPageSuccess(cmsResult: CmsPage, header: any) {\r\n //Creating subcomponent whith the object get from server\r\n let subComponent = this.createSubComponent(cmsResult, header);\r\n\r\n //injecting created component\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n\r\n //Creates component to inject \r\n private createSubComponent(cmsPageObj: CmsPage, header: any) {\r\n @Component({\r\n template: cmsPageObj.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n private _dom: DomAdapter = getDOM();\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n @Inject(DOCUMENT) private document: any,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n private helperService: HelperService,\r\n private cmsMenuListService: CmsMenuListService,\r\n private languageService: LanguageService,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n cmspage: CmsPage = cmsPageObj;\r\n private seoInfo: SeoViewModel = cmsPageObj.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n menuItems: Menu[] = [];\r\n headerData: any = header;\r\n footerData: any = cmsPageObj.footerData;\r\n\r\n private lang: string = this.languageService.getLongLang();\r\n private breadcrumbs: Breadcrumbs[] = [];\r\n //private breadcrumbs: Breadcrumbs[] = cmsPageObj.BreadcrumbsInfo;\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let paramPage = \"cmspage\";\r\n\r\n //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n this.breadcrumbs = cmsPageObj.BreadcrumbsInfo;\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n if (this.isBrowser == true) {\r\n setTimeout(x => this.menuItems = cmsPageObj.menuItems, 1);\r\n // let cmsMenuSub = this.cmsMenuListService.LoadData(this.cmspage.IdLevel, this.lang).subscribe(result => {\r\n // if (result != null) {\r\n // this.menuItems = result;\r\n // }\r\n // });\r\n\r\n // this.subManager.add(cmsMenuSub);\r\n }\r\n }\r\n\r\n imageTitle(imgPath) {\r\n let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/cms-page.component.ts","import { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { CookiePolicyService } from \"./../../../../services/core/cookie-policy.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Configuration } from \"./../../../../models/core/configuration\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class CookiePolicyComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private languageService: LanguageService,\r\n private cookiePolicyService: CookiePolicyService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let cookieSub = this.cookiePolicyService.getCookiePolicyData(this.lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.cookiesId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(cookieSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, header: any) {\r\n\r\n @Component({\r\n template: result.TemplateHtml,\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n private _elementRef: ViewContainerRef,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private scriptService: ScriptService,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n configuration: Configuration = result.ConfigurationInfo;\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n footerData: any = result.footerData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/cookie-policy.component.ts","import { Subscription } from 'rxjs/Subscription';\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { FaqListService } from \"./../../../../services/cms/faq.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { CompanyService } from \"./../../../../services/core/company.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\ndeclare var jQuery: any;\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class FaqComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private faqlistService: FaqListService,\r\n private languageService: LanguageService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let faqSub = this.faqlistService.getFaqData(this.lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the faq data to inject\r\n let subComponent = this.createSubComponent(result, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.faqsId)\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(faqSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, header: any) {\r\n\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private companyService: CompanyService,\r\n private _elementRef: ViewContainerRef,\r\n private seoService: SeoService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private scriptService: ScriptService,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n faqlist: any = result.FaqList;\r\n footerData: any = result.footerData;\r\n headerData: any = header;\r\n\r\n private pageIsInit: boolean = false;\r\n\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n layoutTheme.initToggle();\r\n\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/faq.component.ts","//Angular\r\nimport { Injectable } from '@angular/core';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { LanguageService } from '../cms/language.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from '../core/auth.service';\r\n\r\n@Injectable()\r\nexport class TemplateService {\r\n\r\n constructor(public _api: ApiService, public _cache: CacheService,\r\n private mappings: Mappings,\r\n private language: LanguageService,\r\n private cache: CacheService,\r\n private cartService: ShoppingCartService,\r\n private authService: AuthService) {\r\n }\r\n\r\n\r\n getThankYouPagePaypalInfo(componentType, id) {\r\n let currentLang = this.language.getLongLang();\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n let url = this.mappings.Web_Api_Get_Information_ThankYouPage_Paypal_Url\r\n .replace('{type}', componentType)\r\n .replace('{orderid}', id)\r\n .replace('{lang}', currentLang)\r\n .replace('{cartid}', cartId)\r\n .replace('{userid}', customerId);\r\n return this._api.get(url);\r\n }\r\n\r\n getThankYouPagOnlineInfo(componentType, id) {\r\n let currentLang = this.language.getLongLang();\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n let url = this.mappings.Web_Api_Get_Information_ThankYouPage_PagOnline_Url\r\n .replace('{type}', componentType)\r\n .replace('{orderid}', id)\r\n .replace('{lang}', currentLang)\r\n .replace('{cartid}', cartId)\r\n .replace('{userid}', customerId);\r\n return this._api.get(url);\r\n }\r\n\r\n getThankYouNexiInfo(componentType, id, messaggio, data, orario) {\r\n let currentLang = this.language.getLongLang();\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n //remove special char\r\n messaggio = messaggio.replace('%2B', ' ')\r\n messaggio = messaggio.replace('+', ' ')\r\n let url = this.mappings.Web_Api_Get_Information_ThankYouPage_Nexi_Url\r\n .replace('{type}', componentType)\r\n .replace('{orderid}', id)\r\n .replace('{messaggio}', messaggio)\r\n .replace('{data}', data)\r\n .replace('{orario}', orario)\r\n .replace('{lang}', currentLang)\r\n .replace('{cartid}', cartId)\r\n .replace('{userid}', customerId);\r\n return this._api.get(url);\r\n }\r\n\r\n /**\r\n * return the html template for a given component\r\n */\r\n getComponentTemplate(componentType) {\r\n let currentLang = this.language.getLongLang();\r\n let url = this.mappings.Web_Api_Get_Template_Url\r\n .replace('{type}', componentType)\r\n .replace('{lang}', currentLang);\r\n return this._api.get(url);\r\n }\r\n\r\n getComponentTemplatePageNotFound(componentType) {\r\n let currentLang = this.language.getLongLang();\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Template_Url_Page_Not_Found\r\n .replace('{type}', componentType)\r\n .replace('{lang}', currentLang)\r\n .replace('{userid}', customerId)\r\n .replace('{cartid}', cartId);;\r\n return this._api.get(url);\r\n }\r\n\r\n getHeadFootData() {\r\n let currentLang = this.language.getLongLang();\r\n\r\n let url = this.mappings.Web_Api_Get_Head_Foot_Data.replace('{lang}', currentLang);\r\n\r\n return this._api.get(url).do(json => {\r\n this.cache.clear(url);\r\n });\r\n }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/settings/template.service.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\n\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { InfoRequestService } from \"./../../../../services/cms/info-request.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\n\r\n//Models\r\nimport { Configuration } from \"./../../../../models/core/configuration\";\r\nimport { HttpParam } from \"./../../../../models/core/http-param\";\r\nimport { Company } from \"./../../../../models/core/company\";\r\nimport { InfoRequest } from \"./../../../../models/cms/info-request\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n template: \"\"\r\n})\r\n\r\nexport class InfoRequestComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private languageService: LanguageService,\r\n private infoRequestService: InfoRequestService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let templateHtml: string;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let infoSub = this.infoRequestService.getInfoRequestData(this.lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n\r\n //templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, header);\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.infoRequestId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(infoSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(componentInfo: any, header: any) {\r\n\r\n @Component({\r\n template: componentInfo.TemplateHtml\r\n\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private infoRequestService: InfoRequestService,\r\n private seoService: SeoService,\r\n private router: Router,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n private configuration: Configuration;\r\n private infoRequestFailed: boolean;\r\n private infoRequestSuccess: boolean;\r\n private model: InfoRequest;\r\n private company: Company = componentInfo.Company;\r\n\r\n private pageIsInit: boolean = false;\r\n private spinnerContact: boolean = false;\r\n private breadcrumbs: Breadcrumbs[] = componentInfo.BreadcrumbsInfo;\r\n footerData: any = componentInfo.footerData;\r\n headerData: any = header;\r\n subManager = new Subscription();\r\n\r\n onSubmit(form) {\r\n this.spinnerContact = true;\r\n\r\n if (form.valid) {\r\n let infoSub = this.infoRequestService.sendInfoRequest(this.model).subscribe(result => {\r\n if (result) {\r\n this.infoRequestSuccess = true;\r\n this.infoRequestFailed = false;\r\n this.spinnerContact = false;\r\n }\r\n\r\n else {\r\n this.infoRequestFailed = true;\r\n this.infoRequestSuccess = false;\r\n this.spinnerContact = false;\r\n }\r\n });\r\n\r\n this.subManager.add(infoSub);\r\n }\r\n\r\n else {\r\n this.infoRequestFailed = true;\r\n this.infoRequestSuccess = false;\r\n this.spinnerContact = false;\r\n }\r\n }\r\n\r\n private seoInfo: SeoViewModel = componentInfo.SeoInformation;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n this.model = new InfoRequest();\r\n this.model.Where = \"motoriDiRicerca\";\r\n this.configuration = componentInfo.ConfigurationInfo;\r\n }\r\n\r\n initMap() {\r\n if (google == undefined || google == null || !google) {\r\n this.initMap();\r\n }\r\n else {\r\n var geocoder = new google.maps.Geocoder();\r\n var street = this.company.StreetAddress.replace(\",\", \"\");\r\n var address = street + \" - \" + this.company.PostalCode + \", \" + this.company.City + \" (\" + this.company.Province + \")\";\r\n var htmlCode = \"\" + this.company.Name + \"
\" + address + \"
Telefono: \" + this.company.Phone;\r\n geocoder.geocode({ 'address': address }, function (results, status) {\r\n\r\n var initLongitude = results[0].geometry.location.lng();\r\n var initLatitude = results[0].geometry.location.lat();\r\n\r\n var mapMarkers = [{\r\n address: address,\r\n html: htmlCode,\r\n icon: {\r\n image: \"/global_app/writefolder/img/pin.png\",\r\n iconsize: [100, 100],\r\n iconanchor: [50, 100]\r\n },\r\n popup: true\r\n }];\r\n\r\n // Map Initial Location\r\n\r\n\r\n // Map Extended Settings\r\n var mapSettings = {\r\n controls: {\r\n draggable: true,\r\n panControl: true,\r\n zoomControl: true,\r\n mapTypeControl: true,\r\n scaleControl: true,\r\n streetViewControl: true,\r\n overviewMapControl: true\r\n },\r\n scrollwheel: false,\r\n markers: mapMarkers,\r\n latitude: initLatitude,\r\n longitude: initLongitude,\r\n zoom: 18\r\n };\r\n\r\n var map = $(\"#map\").gMap(mapSettings);\r\n\r\n // Map Center At\r\n var mapCenterAt = function (options, e) {\r\n e.preventDefault();\r\n $(\"#map\").gMap(\"centerAt\", options);\r\n }\r\n })\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.initMap();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/info-request.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { NewsletterService } from './../../../../services/cms/newsletter.service';\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n template: \"\"\r\n})\r\n\r\nexport class NewsletterConfirmationPageComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private languageService: LanguageService,\r\n private newsletterService: NewsletterService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let templateHtml: string;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n\r\n\r\n let newsConfirmSub = this.newsletterService.getNewsletterConfirmationPageData().subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n \r\n if (this.isBrowser) {\r\n\r\n //Creating subcomponent whith the result to inject\r\n let subComponent = this.createSubComponent(result,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.subscriptionConfirmationId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(newsConfirmSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any,header:any) {\r\n\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n private _elementRef: ViewContainerRef,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private scriptService: ScriptService,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private newsletterService: NewsletterService\r\n ) { }\r\n\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n headerData: any = header;\r\n //newsletter subscription\r\n private newsletterSubmitted: boolean = false;\r\n private privacySubmitted: boolean = false;\r\n private alreadySubscribed: boolean = false;\r\n private successfullySubscribed: boolean = false;\r\n private spinnerNewslatter: boolean = false;\r\n private model = {\r\n Email: \"\",\r\n CheckboxSubscribe: false\r\n };\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n }\r\n\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/newsletter-confirmation-page.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router } from '@angular/router';\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { NewsletterService } from './../../../../services/cms/newsletter.service';\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n template: \"\"\r\n})\r\n\r\nexport class NewsletterPageComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private languageService: LanguageService,\r\n private newsletterService: NewsletterService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let templateHtml: string;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n\r\n\r\n\r\n\r\n let newsPageSub = this.newsletterService.getNewsletterPageData().subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n \r\n if (this.isBrowser) {\r\n\r\n //Creating subcomponent whith the result to inject\r\n let subComponent = this.createSubComponent(result,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.subscriptionId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(newsPageSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any,header:any) {\r\n\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n private _elementRef: ViewContainerRef,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private scriptService: ScriptService,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private newsletterService: NewsletterService,\r\n private router: Router\r\n ) { }\r\n\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n headerData: any = header;\r\n //newsletter subscription\r\n private newsletterSubmitted: boolean = false;\r\n private privacySubmitted: boolean = false;\r\n private alreadySubscribed: boolean = false;\r\n private successfullySubscribed: boolean = false;\r\n private spinnerNewslatter: boolean = false;\r\n private model = {\r\n Email: \"\",\r\n CheckboxSubscribe: false\r\n };\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n }\r\n\r\n onSubmit(form) {\r\n this.spinnerNewslatter = true;\r\n if (form) {\r\n let newsSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(result => {\r\n if (result == \"-1\") {\r\n this.alreadySubscribed = true;\r\n this.successfullySubscribed = false;\r\n this.spinnerNewslatter = false;\r\n }\r\n\r\n else {\r\n\r\n let newsletterCompletePage: string[] = this.routesService.getRoutePath('NEWSLETTER - CONFIRMATION')[0];\r\n this.router.navigate([newsletterCompletePage]);\r\n this.alreadySubscribed = false;\r\n this.successfullySubscribed = true;\r\n this.spinnerNewslatter = false;\r\n }\r\n },\r\n err => {\r\n console.log(err);\r\n })\r\n\r\n this.subManager.add(newsSub);\r\n }\r\n\r\n else {\r\n this.spinnerNewslatter = false;\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/newsletter-page.component.ts","//Angular\r\nimport { Component, OnInit, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { PrivacyPolicyService } from \"./../../../../services/core/privacy-policy.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Configuration } from \"./../../../../models/core/configuration\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class PrivacyPolicyComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private languageService: LanguageService,\r\n private privacyPolicyService: PrivacyPolicyService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n\r\n ngOnInit() {\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let privacySub = this.privacyPolicyService.getPrivacyPolicyData(this.lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the result information to inject\r\n let subComponent = this.createSubComponent(result, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.privacyPolicyId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(privacySub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, header: any) {\r\n\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n private _elementRef: ViewContainerRef,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private scriptService: ScriptService,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n configuration: Configuration = result.ConfigurationInfo;\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n footerData: any = result.footerData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/privacy-policy.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { PurchaseConditionService } from \"./../../../../services/core/purchase-condition.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Configuration } from \"./../../../../models/core/configuration\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class PurchaseConditionComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private languageService: LanguageService,\r\n private purchaseConditionService: PurchaseConditionService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let templateHtml: string;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let conditionSub = this.purchaseConditionService.getPurchaseConditionServiceData(this.lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the result to inject\r\n let subComponent = this.createSubComponent(result, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.purchaseConditionsId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(conditionSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, header: any) {\r\n\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n private _elementRef: ViewContainerRef,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private scriptService: ScriptService,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n configuration: Configuration = result.ConfigurationInfo;\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n footerData: any = result.footerData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/purchase-condition.component.ts","import { SeoViewModel } from './../../../models/core/seo';\r\nimport { SeoService } from './../../../services/core/seo.service';\r\nimport { ShoppingCartService } from './../../../services/inventory/shopping-cart.service';\r\nimport { Breadcrumbs } from './../../../models/cms/breadcrumbs';\r\nimport { BreadcrumbsService } from './../../../services/cms/breadcrumbs.service';\r\n//Angular\r\nimport { Component, OnInit,ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { CmsComponentService } from \"./../../../services/cms/cms-component.service\";\r\n\r\n//System\r\nimport { Mappings } from './../../../shared/mapping';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { CompanyService } from \"./../../../services/core/company.service\";\r\nimport { RoutesService } from \"../../../services/core/routes.service\";\r\nimport { ScriptService } from \"../../../services/cms/script.service\";\r\n//Models\r\n\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class CartEmptyPageComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private cartService: ShoppingCartService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n\r\n let emptyCartSub = this.cartService.getEmptyCartPageData().subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n \r\n if (this.isBrowser) {\r\n var EmptyCartData = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(EmptyCartData,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.cartEmptyId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(emptyCartSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(EmptyCartData: any,header:any) {\r\n\r\n @Component({\r\n template: EmptyCartData.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private companyService: CompanyService,\r\n private mappings: Mappings,\r\n private _elementRef: ViewContainerRef,\r\n private routesService: RoutesService,\r\n private scriptService: ScriptService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private seoService: SeoService\r\n ) { }\r\n\r\n private userLoginImg: string = this.mappings.UserLoginImg_Url;\r\n private pageIsInit: boolean = false;\r\n private seoInfo: SeoViewModel = EmptyCartData.SeoInformation;\r\n private breadcrumbs: Breadcrumbs[] = EmptyCartData.BreadcrumbsInfo;\r\n\r\n footerData: any = EmptyCartData.FooterData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/sys/cart-empty-page.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../services/settings/template.service\";\r\nimport { RoutesService } from \"../../../services/core/routes.service\";\r\nimport { CmsComponentService } from \"../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { SeoService } from \"../../../services/core/seo.service\";\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n\r\n\r\n@Component({\r\n template: \"\"\r\n})\r\n\r\nexport class NotFoundPageComponent implements OnInit {\r\n\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private templateService: TemplateService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let notFoundSub = this.templateService.getComponentTemplatePageNotFound(\"notfoundPageTemplate\").subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n \r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n },\r\n //setting 404 page status code\r\n err => {\r\n if (!this.isBrowser)\r\n return;\r\n //converting response to json\r\n let response = err.json();\r\n\r\n //Creating subcomponent whith the selected template to inject \r\n let subComponent = this.createSubComponent(response.TemplateHtml,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n )\r\n\r\n this.subManager.add(notFoundSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any,header:any) {\r\n\r\n @Component({\r\n template: result\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n\r\n constructor\r\n (\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private routesService: RoutesService\r\n ) {\r\n }\r\n\r\n private pageIsInit: boolean = false;\r\n private headerClass: boolean = false;\r\n footerData: any = result.FooterData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n }\r\n\r\n setAutoHeightAndWeightToLogo() {\r\n this.headerClass = $(\"div\").hasClass(\"header-logo\");\r\n if (this.headerClass == false) {\r\n //setTimeout(x => this.setAutoHeightAndWeightToLogo(), 5);\r\n }\r\n else {\r\n $(\".header-logo\").attr(\"style\", \"height:auto!important\");\r\n $(\".header-logo\").attr(\"style\", \"width:auto!important\");\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.setAutoHeightAndWeightToLogo();\r\n\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/sys/not-found-page.component.ts","//Angular\r\nimport { Component,ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { CmsComponentService } from \"./../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Company } from \"./../../../models/core/company\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { RoutesService } from \"../../../services/core/routes.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { SeoService } from \"../../../services/core/seo.service\";\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class OfflinePageComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let offlinePageData: any;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let offlineSub = this.cmsComponentService.getOfflinePageData().subscribe(result => {\r\n\r\n offlinePageData = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(offlinePageData,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(offlineSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(pageData: any,header:any) {\r\n\r\n @Component({\r\n template: pageData.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private translateService: TranslateService,\r\n private routesService: RoutesService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n private company: Company = pageData.Company;\r\n\r\n private pageIsInit: boolean = false;\r\n\r\n private OfflineMessage: string = pageData.OfflineMessage;\r\n footerData: any = pageData.footerData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/sys/offline-page.component.ts","import { ScriptService } from './../../../services/cms/script.service';\r\n//Angular\r\nimport { Component, OnInit, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Input, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ClientAreaService } from \"./../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { AuthService } from \"./../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../services/settings/template.service\";\r\nimport { Router } from \"@angular/router\";\r\nimport { RoutesService } from \"./../../../services/core/routes.service\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { SeoService } from \"../../../services/core/seo.service\";\r\nimport { BreadcrumbsService } from './../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { ClientAreaOrderDetails } from \"./../../../models/settings/client-area\";\r\nimport { CookieService } from \"../../../services/core/cookie/cookie.service\";\r\nimport { ApiService } from \"../../../services/core/api.service\";\r\nimport { MessagesService } from \"../../../services/core/messages.service\";\r\nimport { Mappings } from \"../../../shared/mapping\";\r\nimport { Breadcrumbs } from './../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\nimport { CurrencyService } from '../../../services/cms/currency.service';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\nexport class ClientAreaOrderListComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private templateService: TemplateService,\r\n private authService: AuthService,\r\n private router: Router,\r\n private clientAreaService: ClientAreaService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (!this.authService.GetData().isAuthenticated || this.authService.GetData().isAuthenticated === undefined) {\r\n this.router.navigate([\"\"]);\r\n }\r\n else {\r\n let ClientAreaOrderListTemplate: any;\r\n let userId = this.authService.GetUserId();\r\n let showAll: string = \"-1\"\r\n let registrationConfirmation: any;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let orderListSub = this.clientAreaService.getClientAreaOrdersList1(userId, showAll, showAll, showAll, showAll).subscribe(result => {\r\n\r\n ClientAreaOrderListTemplate = result;\r\n\r\n // Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(ClientAreaOrderListTemplate, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n\r\n })\r\n\r\n this.subManager.add(orderListSub);\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(ClientAreaOrderListTemplate: any, header: any) {\r\n\r\n @Component({\r\n template: ClientAreaOrderListTemplate.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n @Inject('CookieService') private cookie: CookieService,\r\n private clientAreaService: ClientAreaService,\r\n private router: Router,\r\n private authService: AuthService,\r\n private routesService: RoutesService,\r\n private apiService: ApiService,\r\n private messagesService: MessagesService,\r\n private mappings: Mappings,\r\n public currency: CurrencyService,\r\n private languageService: LanguageService,\r\n private translateService: TranslateService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seoService: SeoService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n private pageIsInit: boolean = false;\r\n\r\n public rows: Array = [];\r\n\r\n public columns: Array = [];\r\n\r\n //translating of header columns titles\r\n translateTableColumnTitle(columnTitle) {\r\n let translation = this.translateService.get(columnTitle)[\"value\"];\r\n return translation;\r\n }\r\n\r\n @Input() clientModel: Array;\r\n\r\n private status: string = \"0\";\r\n private orderNumber: string = \"\";\r\n\r\n private lang: string = this.languageService.getLongLang();\r\n private shortLang: string = this.languageService.getShortLang();\r\n\r\n private modalTitle: string = \"MESSAGES:\";\r\n private modalBody: string = \"\";\r\n private numberOfMessages: number = 0;\r\n private bodyMod = [];\r\n\r\n private isSettedFilter: boolean=false;\r\n private from: any;\r\n private to: any;\r\n private load: boolean = true;\r\n\r\n //checking if invoices and multiple shipment modules are active\r\n private multipleShipmentActive: boolean = ClientAreaOrderListTemplate.isActiveMultipleShipment;\r\n private isActiveInvoicesModule: boolean = ClientAreaOrderListTemplate.isActiveInvoicesModule;\r\n\r\n private breadcrumbs: Breadcrumbs[] = ClientAreaOrderListTemplate.BreadcrumbsInfo;\r\n\r\n //Routes for menu-tabs\r\n private areaClientiHome: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n private areaClientiOrdini: string[] = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n private areaChangeProfile: string[] = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n private areaClientiInvoices: string[] = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n\r\n currentLang;\r\n italianLang = {\r\n \"sProcessing\": \"Attendere...\",\r\n \"sLengthMenu\": \"Visualizza _MENU_ record per pagina\",\r\n \"sZeroRecords\": \"Niente trovato\",\r\n \"sInfo\": \"Mostra _START_ a _END_ di _TOTAL_ record\",\r\n \"sInfoEmpty\": \"Non ci sono record\",\r\n \"sInfoFiltered\": \"(filtrato da _MAX_ record totali)\",\r\n \"sInfoPostFix\": \"\",\r\n \"sUrl\": \"\",\r\n \"oPaginate\": {\r\n \"sPrevious\": \"«\",\r\n \"sNext\": \"»\"\r\n }\r\n }\r\n\r\n englishLang = {\r\n \"oPaginate\": {\r\n \"sPrevious\": \"«\",\r\n \"sNext\": \"»\"\r\n }\r\n }\r\n\r\n subManager = new Subscription();\r\n\r\n footerData: any = ClientAreaOrderListTemplate.FooterData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n if (this.multipleShipmentActive == false) {\r\n this.columns = [\r\n { title: '' },\r\n { title: this.translateTableColumnTitle(\"Jobname\") },\r\n { title: this.translateTableColumnTitle(\"OrderNumber\") },\r\n { title: this.translateTableColumnTitle(\"OrderDate\") },\r\n { title: this.translateTableColumnTitle(\"PriceCell\") },\r\n { title: this.translateTableColumnTitle(\"Status\") },\r\n { title: this.translateTableColumnTitle(\"FileVerification\") },\r\n { title: this.translateTableColumnTitle(\"Payment\") },\r\n { title: this.translateTableColumnTitle(\"Shipment\") },\r\n { title: '' },\r\n { title: '' },\r\n ];\r\n }\r\n\r\n else {\r\n this.columns = [\r\n { title: '' },\r\n { title: this.translateTableColumnTitle(\"Jobname\") },\r\n { title: this.translateTableColumnTitle(\"OrderNumber\") },\r\n { title: this.translateTableColumnTitle(\"OrderDate\") },\r\n { title: this.translateTableColumnTitle(\"PriceCell\") },\r\n { title: this.translateTableColumnTitle(\"Status\") },\r\n { title: this.translateTableColumnTitle(\"FileVerification\") },\r\n { title: this.translateTableColumnTitle(\"Payment\") },\r\n { title: '' },\r\n { title: '' },\r\n ];\r\n }\r\n\r\n //getting of Datatable data\r\n this.rows = ClientAreaOrderListTemplate.ClientAreaOrderList;\r\n this.load = false;\r\n }\r\n ngAfterViewChecked() {\r\n\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n if (this.shortLang == 'en') {\r\n this.currentLang = this.englishLang;\r\n }\r\n else {\r\n this.currentLang = this.italianLang;\r\n }\r\n\r\n //initialization of datatable\r\n $('#datatable').DataTable({\r\n searching: false,\r\n ordering: false,\r\n sDom: 'Rlfrtlip',\r\n oLanguage: this.currentLang\r\n });\r\n\r\n //hiding of first 'per page' section, because we added it on the bottom of the table\r\n $('.dataTables_length').not(':eq(1)').hide();\r\n\r\n\r\n //initialization of datetime picker from and to\r\n $('#fromDate').datetimepicker(\r\n {\r\n locale: this.shortLang,\r\n format: 'DD/MM/YYYY'\r\n }\r\n );\r\n\r\n $('#toDate').datetimepicker(\r\n {\r\n locale: this.shortLang,\r\n useCurrent: false, //Important! See issue #1075\r\n format: 'DD/MM/YYYY'\r\n }\r\n );\r\n\r\n $(\"#fromDate\").on(\"dp.change\", function (e) {\r\n $('#toDate').data(\"DateTimePicker\").minDate(e.date);\r\n }\r\n );\r\n\r\n $(\"#toDate\").on(\"dp.change\", function (e) {\r\n $('#fromDate').data(\"DateTimePicker\").maxDate(e.date);\r\n }\r\n );\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n onClick(indexRow: any, columnName?: string) {\r\n let indexColumn;\r\n let orderId = this.rows[indexRow].OrderId;\r\n\r\n if (columnName == undefined) {\r\n let orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE')[0];\r\n\r\n orderDetailsPage = orderDetailsPage.replace(':id', orderId.toString());\r\n\r\n this.router.navigate([orderDetailsPage]);\r\n }\r\n else if (columnName == 'Upload') {\r\n let loginRoute = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n loginRoute = loginRoute.replace(\":id\", orderId);\r\n loginRoute = loginRoute.replace(\":pagefrom\", \"section_upload\");\r\n\r\n this.router.navigate([loginRoute]);\r\n }\r\n else if (columnName == 'OrderNotesCell') {\r\n let order = this.rows[indexRow];\r\n\r\n //Reading only the messsages for the selected order\r\n this.bodyMod = order.OrderNoteList;\r\n this.numberOfMessages = this.bodyMod.length;\r\n\r\n //The modal is showed only if there are messages\r\n if (this.bodyMod.length > 0) {\r\n let userId = this.authService.GetUserId();\r\n let params =\r\n {\r\n CustomerId: userId.toString(),\r\n OrderId: orderId.toString(),\r\n Lang: this.lang\r\n };\r\n\r\n //setting messages as read\r\n let messReadSub = this.messagesService.setMessagesAsRead(params)\r\n .subscribe(result => { })\r\n\r\n this.subManager.add(messReadSub);\r\n\r\n this.showModal();\r\n\r\n //reseting of value of OrderNoteList\r\n order.OrderNoteList = []\r\n }\r\n }\r\n }\r\n messagesDetails(orderId) {\r\n $(\"#messagesModal\").modal(\"hide\");\r\n let id = orderId;\r\n let orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n\r\n orderDetailsPage = orderDetailsPage.replace(':id', id.toString()).replace(':pagefrom', \"section_comunicazioni\");\r\n\r\n this.router.navigate([orderDetailsPage]);\r\n return true;\r\n }\r\n\r\n showModal() {\r\n $(\"#messagesModal\").modal(\"show\");\r\n }\r\n\r\n hideModal() {\r\n $('#basic').modal('hide');\r\n\r\n this.bodyMod = [];\r\n }\r\n\r\n getOrdersList(userId: string, dateFrom: string, dateTo: string, orderNumber: string, orderStatus: string) {\r\n this.load = true;\r\n let orderListSub = this.clientAreaService.getClientAreaOrdersList1(userId, dateFrom, dateTo, orderNumber, orderStatus)\r\n .subscribe(result => {\r\n\r\n this.rows = result.ClientAreaOrderList;\r\n\r\n this.load = false;\r\n\r\n this.resetTable(this.rows);\r\n })\r\n\r\n this.subManager.add(orderListSub);\r\n }\r\n\r\n //destroying of current context of table and creating a new one with new data\r\n resetTable(tableData) {\r\n $('#datatable').DataTable().destroy();\r\n let currentLang = this.currentLang;\r\n setTimeout(function () {\r\n $('#datatable').DataTable\r\n (\r\n {\r\n data: this.rows,\r\n searching: false,\r\n ordering: false,\r\n sDom: 'Rlfrtlip',\r\n oLanguage: currentLang\r\n }\r\n );\r\n }, 0);\r\n\r\n setTimeout(function () { $('.dataTables_length').not(':eq(1)').hide() }, 0);\r\n }\r\n\r\n resetFilter() {\r\n this.from = \"\";\r\n this.to = \"\";\r\n $('#fromDate').val(\"\");\r\n $('#toDate').val(\"\");\r\n this.status = \"0\";\r\n this.orderNumber = \"\";\r\n if (this.isSettedFilter == true) {\r\n this.isSettedFilter = false;\r\n //this.rows = ClientAreaOrderListTemplate.ClientAreaOrderList;\r\n let userId = this.authService.GetUserId();\r\n let showAll: string = \"-1\"\r\n this.getOrdersList(userId, showAll, showAll, showAll, showAll);\r\n }\r\n }\r\n\r\n filterOrdersList() {\r\n this.isSettedFilter=true;\r\n let orderStatus: string;\r\n let numberOfOrder: string;\r\n\r\n let userId = this.authService.GetUserId();\r\n this.from = $('#fromDate').val();\r\n this.to = $('#toDate').val();\r\n\r\n let dateFrom = this.changeDate(this.from);\r\n let dateTo = this.changeDate(this.to);\r\n\r\n if (dateFrom == \"\") {\r\n dateFrom = \"-1\";\r\n }\r\n\r\n if (dateTo == \"\") {\r\n dateTo = \"-1\";\r\n }\r\n\r\n if (dateFrom == \"Invalid date\" || null) {\r\n dateFrom = \"-1\";\r\n }\r\n\r\n if (dateTo == \"Invalid date\" || null) {\r\n dateTo = \"-1\";\r\n }\r\n\r\n if (this.status == \"0\") {\r\n orderStatus = \"-1\";\r\n }\r\n\r\n else {\r\n orderStatus = this.status\r\n }\r\n\r\n if (this.orderNumber == \"\") {\r\n numberOfOrder = \"-1\";\r\n }\r\n\r\n else {\r\n numberOfOrder = this.orderNumber\r\n };\r\n\r\n this.getOrdersList(userId, dateFrom, dateTo, numberOfOrder, orderStatus);\r\n }\r\n\r\n changeDate(stringDate) {\r\n let date = stringDate.replace(/\\//g, \"-\");\r\n return date;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/sys/client-area-order-list.component.ts","import { Subscription } from 'rxjs/Subscription';\r\n//Angular\r\nimport { Component, OnInit,ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute} from \"@angular/router\";\r\n\r\n//Models\r\nimport { Category } from \"./../../../../models/inventory/inventory\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from \"./../../../../models/cms/breadcrumbs\";\r\n//Services\r\nimport { CategoryService } from \"./../../../../services/inventory/category.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\nimport { BootboxService } from './../../../../services/core/bootbox.service';\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { CategoryInfoRequest } from \"../../../../models/inventory/category-info-request\";\r\nimport { Configuration } from \"../../../../models/core/configuration\";\r\nimport { BreadcrumbsService } from \"../../../../services/cms/breadcrumbs.service\";\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class CategoryComponent implements OnInit \r\n{\r\n category: Category = new Category();\r\n\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private _elementRef: ViewContainerRef,\r\n private componentHelper: ComponentHelperService,\r\n private categoryService: CategoryService,\r\n private languageService: LanguageService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ){this.router.routeReuseStrategy.shouldReuseRoute = () => false; }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() \r\n {\r\n //Reading Language information\r\n let lang: string = this.languageService.getLongLang();\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n \r\n //Reading id from url\r\n //If id is set, then the information is retrived by id, else by url\r\n let paramSub = this.route.params.subscribe(params => \r\n {\r\n let id = params['id'];\r\n\r\n if (id !== undefined) \r\n {\r\n let categoryId: number = id;\r\n\r\n let catIdSub = this.categoryService.getCategory(categoryId, lang).subscribe(result => \r\n {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n \r\n \r\n if (this.isBrowser) {\r\n this.onGetCategorySuccess(result,header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogCategory, categoryId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(catIdSub);\r\n }\r\n else \r\n {\r\n let seoUrl = this.router.url;\r\n let catUrlSub = this.categoryService.getCategoryByUrl(lang, seoUrl).subscribe(result => \r\n {\r\n if (this.isBrowser) {\r\n this.onGetCategorySuccess(result,header);\r\n }\r\n else {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogCategory, result.Id);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(catUrlSub);\r\n }\r\n });\r\n\r\n this.subManager.add(paramSub);\r\n }\r\n\r\n ngOnDestroy() \r\n {\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n onGetCategorySuccess(categoryResult: Category,header:any) \r\n {\r\n if(categoryResult.Active != true)\r\n {\r\n //Creating sub-component with the returned information\r\n let subComponent = this.createSubComponentRedirect();\r\n \r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent); \r\n }\r\n else\r\n {\r\n //Creating sub-component with the returned information\r\n let subComponent = this.createSubComponent(categoryResult,header);\r\n \r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n }\r\n \r\n \r\n private createSubComponentRedirect()\r\n {\r\n @Component({\r\n template: \"\"\r\n })\r\n\r\n class ChildComponent implements OnInit \r\n {\r\n constructor\r\n (\r\n private router: Router, \r\n private routesService: RoutesService\r\n ) {}\r\n\r\n ngOnInit(): void \r\n {\r\n let notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n this.router.navigate(notFoundPage); \r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n\r\n\r\n private createSubComponent(categoryObj: Category,header:any) \r\n {\r\n @Component({\r\n template: categoryObj.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit \r\n {\r\n \r\n category: Category = categoryObj;\r\n categories: any = categoryObj.SubCategories;\r\n products: any = categoryObj.SubProducts;\r\n headerData: any = header;\r\n footerData: any = categoryObj.footerData;\r\n \r\n private loginPageName: string[] = [];\r\n private registerPageName: string[] = [];\r\n \r\n private pageIsInit: boolean = false;\r\n private seoInfo: SeoViewModel = categoryObj.SeoInformation;\r\n private spinnerForm: boolean = false;\r\n private contactFormSent: boolean = false;\r\n private contactFormFailed: boolean = false;\r\n private showSpinner: boolean = true;\r\n private showTable: boolean = true;\r\n\r\n private model: CategoryInfoRequest = {\r\n Company: \"\",\r\n Name: \"\",\r\n Lastname: \"\",\r\n Email: \"\",\r\n Amount: \"\",\r\n Mobile: \"\",\r\n Message: \"\",\r\n Lang:\"\",\r\n options:0\r\n }\r\n\r\n private configuration: Configuration;\r\n private lang: string = this.languageService.getLongLang();\r\n \r\n private breadcrumbs : Breadcrumbs[]=[];\r\n\r\n constructor\r\n (\r\n private seoService: SeoService, \r\n private cartService: ShoppingCartService,\r\n private bootboxService: BootboxService,\r\n private routesService: RoutesService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private scriptService: ScriptService,\r\n private _elementRef: ViewContainerRef,\r\n private helperService: HelperService,\r\n public currency: CurrencyService,\r\n private categoryService: CategoryService,\r\n private languageService: LanguageService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) {}\r\n\r\n subManager = new Subscription();\r\n \r\n ngOnInit()\r\n { //console.log(categoryObj)\r\n //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n this.breadcrumbs = categoryObj.BreadcrumbsInfo;\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n \r\n this.configuration = categoryObj.Configuration;\r\n if(this.isBrowser == true)\r\n {\r\n //if type of category is matrix, get prices\r\n if (categoryObj.TipoVisualizzazione == \"matrice\")\r\n {\r\n let catPriceSub = this.categoryService.getCategoryPriceData(categoryObj.Id)\r\n .subscribe(result => \r\n {\r\n this.category.PriceData = result;\r\n this.showSpinner = false; \r\n })\r\n\r\n this.subManager.add(catPriceSub);\r\n }\r\n }\r\n }\r\n \r\n onSubmit(form)\r\n {\r\n this.contactFormSent = false;\r\n this.contactFormFailed = false; \r\n this.spinnerForm = true;\r\n this.model.Lang = this.languageService.getLongLang();\r\n\r\n if(form.valid && this.model.options == 1)\r\n {\r\n this.model.Amount = this.model.Amount.toString(); \r\n let catInfoSub = this.categoryService.getCategoryInfo(this.model)\r\n .subscribe(result => \r\n {\r\n if(result == true)\r\n {\r\n this.spinnerForm = false;\r\n this.contactFormSent = true;\r\n }\r\n else\r\n {\r\n this.spinnerForm = false;\r\n this.contactFormFailed = true;\r\n }\r\n })\r\n\r\n this.subManager.add(catInfoSub);\r\n }\r\n else\r\n {\r\n this.spinnerForm = false;\r\n }\r\n }\r\n showedFileBoxWizard()\r\n {\r\n let result: boolean = true;\r\n if( this.category.IdWizardMaster <= 0)\r\n {\r\n result = false;\r\n }\r\n else \r\n {\r\n if(this.category.ManageAttachmentWizard==\"Combinazioni\")\r\n {\r\n result = false; \r\n }\r\n }\r\n \r\n return result;\r\n }\r\n addMatrixCommercialeProductToCart(productId: number, quantityId: number) \r\n {\r\n let addToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\").subscribe(result => \r\n {\r\n this.cartService.updateCart(result);\r\n\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n },\r\n err => \r\n {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n );\r\n\r\n this.subManager.add(addToCartSub);\r\n } \r\n\r\n addMatrixEditoriaProductToCart(productId: number, quantityId: number) \r\n {\r\n let addMatEdToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"editoria\").subscribe(result => \r\n {\r\n this.cartService.updateCart(result);\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n },\r\n err => \r\n {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n );\r\n\r\n this.subManager.add(addMatEdToCartSub);\r\n }\r\n\r\n addMatrixProductToCart(productId: number, quantityId: number) \r\n {\r\n let addMatToCartSub = this.cartService.addMatrixProductToCart(productId, quantityId, \"altro\").subscribe(result => \r\n {\r\n this.cartService.updateCart(result);\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n },\r\n err => \r\n {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n );\r\n\r\n this.subManager.add(addMatToCartSub);\r\n } \r\n \r\n ngAfterViewChecked() \r\n {\r\n if (!this.isBrowser || this.pageIsInit) \r\n {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo); \r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n layoutTheme.initCarousel();\r\n layoutTheme.initLightbox();\r\n setTimeout(x => layoutTheme.initThumbGallery(), 1);\r\n \r\n $('.popovers').popover(); \r\n\r\n this.pageIsInit = true;\r\n } \r\n \r\n imageTitle(imgPath)\r\n {\r\n let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/category/sys/category.component.ts","import { BreadcrumbsService } from './../../../../services/cms/breadcrumbs.service';\r\nimport { Breadcrumbs } from './../../../../models/cms/breadcrumbs';\r\n//Angular\r\nimport { Component, OnInit,ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\n\r\n//Services\r\nimport { ProductService } from \"./../../../../services/inventory/product.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Product } from \"./../../../../models/inventory/inventory\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class OtherProductComponent implements OnInit {\r\n product: Product = new Product();\r\n\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private productService: ProductService,\r\n private languageService: LanguageService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n \r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n //Reading Language information\r\n let lang: string = this.languageService.getLongLang();\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n //Reading id from url\r\n //If id is set, then the information is retrived by id, else by url\r\n let paramsSub = this.route.params.subscribe(params => {\r\n let id = params['id'];\r\n\r\n if (id !== undefined) {\r\n let productId: number = id;\r\n\r\n let productByIdSub = this.productService.getProductDetails(productId, \"altroProdotto\", lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n this.onGetProductSuccess(result,header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogOtherProduct, productId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation,result.Thumbnail)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(productByIdSub);\r\n }\r\n else {\r\n let url = this.router.url;\r\n\r\n let productByUrlSub = this.productService.getProductDetailsBySeoUrl(lang, url).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n this.onGetProductSuccess(result,header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogOtherProduct, result.Id);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation,result.Thumbnail)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(productByUrlSub);\r\n }\r\n });\r\n\r\n this.subManager.add(paramsSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n onGetProductSuccess(productResult: Product,header:any) {\r\n if (productResult.Active != true) {\r\n //Creating sub-component with the returned information\r\n let subComponent = this.createSubComponentRedirect();\r\n\r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n let subComponent = this.createSubComponent(productResult,header);\r\n\r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n }\r\n\r\n private createSubComponentRedirect() {\r\n @Component({\r\n template: \"\"\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private router: Router,\r\n private routesService: RoutesService,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n let notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n this.router.navigate(notFoundPage);\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n\r\n\r\n private createSubComponent(otherproductObj: Product,header:any) {\r\n @Component({\r\n template: otherproductObj.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n product: Product = otherproductObj;\r\n\r\n private seoInfo: SeoViewModel = otherproductObj.SeoInformation;\r\n\r\n private loginPageName: string[] = [];\r\n private registerPageName: string[] = [];\r\n private pageIsInit: boolean = false;\r\n private breadcrumbs: Breadcrumbs[] = [];\r\n\r\n footerData: any = otherproductObj.FooterData;\r\n headerData: any = header;\r\n\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n private routesService: RoutesService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n public currency: CurrencyService,\r\n private helperService: HelperService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n ngOnInit() {\r\n //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n this.breadcrumbs = otherproductObj.BreadcrumbsInfo;\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n\r\n }\r\n\r\n imageTitle(imgPath) {\r\n let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n\r\n return imgName;\r\n }\r\n\r\n shareOnFacebook() {\r\n window.open('https://www.facebook.com/sharer/sharer.php?u=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n }\r\n\r\n shareOnTwitter() {\r\n window.open('https://twitter.com/intent/tweet?&url=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n }\r\n\r\n showedFileBox() {\r\n let result: boolean = true;\r\n\r\n if (this.product.ManageAttachment == \"Combinazioni\") {\r\n result = false;\r\n }\r\n return result;\r\n }\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n layoutTheme.initCarousel();\r\n layoutTheme.initLightbox();\r\n setTimeout(x => layoutTheme.initThumbGallery(), 1);\r\n \r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/product/sys/other-product.component.ts","import { Meta } from './../../../../services/core/angular2-meta';\r\nimport { Renderer } from '@angular/core';\r\n//Angular\r\nimport { Component, OnInit, ChangeDetectionStrategy, ViewEncapsulation,ViewContainerRef, Compiler, Inject } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\n\r\n//Services\r\nimport { ProductService } from \"./../../../../services/inventory/product.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\nimport { BootboxService } from './../../../../services/core/bootbox.service';\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { BreadcrumbsService } from \"../../../../services/cms/breadcrumbs.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { Product } from \"./../../../../models/inventory/inventory\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from \"./../../../../models/cms/breadcrumbs\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class ProductDetailsComponent implements OnInit {\r\n product: Product = new Product();\r\n\r\n constructor\r\n (\r\n private _elementRef: ViewContainerRef,\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private productService: ProductService,\r\n private languageService: LanguageService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { this.router.routeReuseStrategy.shouldReuseRoute = () => false; }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n\r\n\r\n //Reading Language information\r\n let lang: string = this.languageService.getLongLang();\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n //Reading id from url\r\n //If id is set, then the information is retrived by id, else by url\r\n let paramsSub = this.route.params.subscribe(params => {\r\n let id = params['id'];\r\n\r\n if (id !== undefined) {\r\n let productId: number = id;\r\n\r\n let prodByIdSub = this.productService.getProductDetails(productId, \"prodotti\", lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (this.isBrowser) {\r\n this.onGetProductSuccess(result, id,header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogProduct, productId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation, result.Thumbnail)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(prodByIdSub);\r\n }\r\n else {\r\n let seoUrl = this.router.url;\r\n let prodByUrlSub = this.productService.getProductDetailsBySeoUrl(lang, seoUrl).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n this.onGetProductSuccess(result, id,header);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeCatalogProduct, result.Id);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation, result.Thumbnail)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(prodByUrlSub);\r\n }\r\n });\r\n\r\n this.subManager.add(paramsSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n onGetProductSuccess(productDetails: Product, productId: any,header: any) {\r\n if (productDetails.Active != true) {\r\n //Creating sub-component with the returned information\r\n let subComponent = this.createSubComponentRedirect();\r\n\r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n let subComponent = this.createSubComponent(productDetails, productId,header);\r\n\r\n //Injecting dynamically created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n }\r\n\r\n\r\n private createSubComponentRedirect() {\r\n @Component({\r\n template: \"\"\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private router: Router,\r\n private routesService: RoutesService,\r\n ) { }\r\n\r\n\r\n ngOnInit(): void {\r\n let notFoundPage = this.routesService.getRoutePath('NOT - FOUND');\r\n this.router.navigate(notFoundPage);\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n\r\n\r\n private createSubComponent(productObj: Product, productId:any,header: any) {\r\n @Component({\r\n template: productObj.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n private showSpinner: boolean = true;\r\n private showSpinnerClick: boolean = false;\r\n currentRowIndex: number = -1;\r\n currentColumnIndex: number = -1;\r\n\r\n product: Product = new Product();\r\n private loginPageName: string[] = [];\r\n private registerPageName: string[] = [];\r\n private facebookShareUrl: any = \"\";\r\n\r\n private pageIsInit: boolean = false;\r\n private seoInfo: SeoViewModel = productObj.SeoInformation;\r\n private breadcrumbs: Breadcrumbs[] = [];\r\n\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n private cartService: ShoppingCartService,\r\n private bootboxService: BootboxService,\r\n private routesService: RoutesService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n public currency: CurrencyService,\r\n private helperService: HelperService,\r\n private productService: ProductService,\r\n private languageService: LanguageService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private metaService: Meta\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n\r\n\r\n //setting new breadcrumbs, setTimeout must be called because it is initializating new event, in opposite, app is crashed\r\n this.breadcrumbs = productObj.BreadcrumbsInfo;\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n let lang = this.languageService.getLongLang();\r\n this.product = productObj;\r\n this.product.HeaderData = header;\r\n if (this.isBrowser) {\r\n if (!this.product.IsWizard) {\r\n let productId = this.product.Id;\r\n let pricesSub = this.productService.getPriceData(productId, lang).subscribe(response => {\r\n this.product.PriceData = response;\r\n this.showSpinner = false;\r\n })\r\n\r\n this.subManager.add(pricesSub);\r\n }\r\n }\r\n //console.log(this.product)\r\n this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n }\r\n\r\n showedFileBox() {\r\n let result: boolean = true;\r\n\r\n if (this.product.ManageAttachment == \"Combinazioni\") {\r\n result = false;\r\n }\r\n return result;\r\n }\r\n shareOnFacebook() {\r\n window.open('https://www.facebook.com/sharer/sharer.php?u=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n }\r\n\r\n shareOnTwitter() {\r\n window.open('https://twitter.com/intent/tweet?&url=' + this.seoInfo.Url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');\r\n }\r\n\r\n addStaticProductToCart(quantityId: number) {\r\n let productId = this.product.Id;\r\n this.showSpinnerClick=true\r\n let staticProdSub = this.cartService.addStaticProductToCart(productId, quantityId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.showSpinnerClick=false\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n },\r\n err => {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n\r\n this.subManager.add(staticProdSub);\r\n }\r\n\r\n addStaticProductScontisticaToCart(dayId: number, quantityId: number) {\r\n let productId = this.product.Id;\r\n this.showSpinnerClick=true\r\n let statProdScontSub = this.cartService.addStaticProductScontisticaToCart(productId, quantityId, dayId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.showSpinnerClick=false\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n },\r\n err => {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n );\r\n\r\n this.subManager.add(statProdScontSub);\r\n }\r\n\r\n isRowSelected(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelected(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n clearSelectedIndex() {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n }\r\n isPriceDiscounted(price: any, priceDiscounted: any) {\r\n let priceInt = parseFloat(price);\r\n let priceDiscountedInt = parseFloat(priceDiscounted);\r\n let result = false;\r\n if (priceDiscountedInt < priceInt) {\r\n result = true; \r\n }\r\n\r\n return result;\r\n }\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n layoutTheme.initCarousel();\r\n layoutTheme.initLightbox();\r\n setTimeout(x => layoutTheme.initThumbGallery(), 1);\r\n\r\n $('.popovers').popover();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n imageTitle(imgPath) {\r\n let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n\r\n return imgName;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/product/sys/product-details.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { CategoryService } from \"./../../../../services/inventory/category.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Category } from \"./../../../../models/inventory/inventory\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\nimport { CurrencyService } from \"../../../../services/cms/currency.service\";\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class ProductPageListComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private categoryService: CategoryService,\r\n private languageService: LanguageService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let categoriesSub = this.categoryService.getCatalogCategoriesData(this.lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the catalog catgories information to inject\r\n let subComponent = this.createSubComponent(result,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.productsCatalogId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(categoriesSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any,header: any) {\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n private helperService: HelperService,\r\n private routesService: RoutesService,\r\n public currency: CurrencyService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n items: any;\r\n columns: number = 4;\r\n category: Category;\r\n private pageIsInit: boolean = false;\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n footerData: any = result.FooterData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n if (this.category == null) {\r\n this.items = result.CatalogCategories;\r\n }\r\n else {\r\n this.items = this.category.SubCategories;\r\n }\r\n\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n imageTitle(imgPath) {\r\n let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/product/sys/product-page-list.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ProductService } from \"./../../../../services/inventory/product.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { HelperService } from \"./../../../../services/core/helper.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Product } from \"./../../../../models/inventory/inventory\";\r\nimport { Category } from \"./../../../../models/inventory/inventory\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\nimport { CurrencyService } from \"../../../../services/cms/currency.service\";\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class PromotionsComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private productService: ProductService,\r\n private languageService: LanguageService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let promotionsSub = this.productService.getProductsPromotionsData(this.lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the promotion page information to inject\r\n let subComponent = this.createSubComponent(result, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.promotionsId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(promotionsSub);\r\n }\r\n\r\n private createSubComponent(result: any, header: any) {\r\n\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n private helperService: HelperService,\r\n public currency: CurrencyService,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n items: Product[];\r\n category: Category;\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n footerData: any = result.FooterData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n if (this.category == null) {\r\n //Reading data from server\r\n this.items = result.ProductPromotionList;\r\n }\r\n else {\r\n this.items = this.category.SubProducts;\r\n }\r\n\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n imageTitle(imgPath) {\r\n let imgName = this.helperService.GetFileNameFromPath(imgPath);\r\n return imgName;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/product/sys/promotions.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\"\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { BootboxService } from './../../../../services/core/bootbox.service';\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { CartInfo } from \"./../../../../models/core/cart\";\r\nimport { CartPaymentModel } from \"./../../../../models/core/cart\";\r\nimport { CartShipmentModel } from \"./../../../../models/core/cart\";\r\nimport { CartAddressModel } from \"./../../../../models/core/cart\";\r\nimport { Configuration } from \"../../../../models/core/configuration\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\nimport { ValidationService } from \"../../../../services/core/validation.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class CartCashComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let cmsSub = this.cmsComponentService.getShoppingCartCashData().subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.cartCashId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(cmsSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(shoppingCartCashData: any, header: any) {\r\n @Component({\r\n template: shoppingCartCashData.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private router: Router,\r\n private shoppingCartService: ShoppingCartService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private clientAreaService: ClientAreaService,\r\n private routesService: RoutesService,\r\n private seoService: SeoService,\r\n private bootboxService: BootboxService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private validationService: ValidationService\r\n ) { }\r\n\r\n currentAddress: CartAddressModel = new CartAddressModel();\r\n\r\n carrello: CartInfo = shoppingCartCashData.ShoppingCart;\r\n\r\n selectedAddress: CartAddressModel = new CartAddressModel();\r\n selectedPayment: CartPaymentModel = new CartPaymentModel();\r\n selectedShipment: CartShipmentModel = new CartShipmentModel();\r\n voucherCode: string = \"\";\r\n showValidationLabels: boolean = false;\r\n cartCashAccepted: boolean = false;\r\n\r\n OrderId: number;\r\n lang: string = this.languageService.getLongLang();\r\n\r\n isVoucherValid: boolean = false;\r\n isVoucherInvalid: boolean = false;\r\n isVoucherApplied: boolean = false;\r\n disableButtonCart: boolean = false;\r\n spinnerCartCash: boolean = false;\r\n $event: any;\r\n\r\n footerData: any = shoppingCartCashData.footerData;\r\n headerData: any = header;\r\n\r\n private pageIsOnDestroy: boolean = false;\r\n private seoInfo: SeoViewModel = shoppingCartCashData.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n private pageIsInitAfter: boolean = false;\r\n private carrelloPageName: string[] = [];\r\n private userId = this.authService.GetUserId();\r\n configuration: Configuration = shoppingCartCashData.ConfigurationInfo;\r\n private breadcrumbs: Breadcrumbs[] = shoppingCartCashData.BreadcrumbsInfo;\r\n private spinnerCart: boolean = false;\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n this.shoppingCartService.initCart(this.carrello);\r\n\r\n if (this.shoppingCartService.isCartValid() == false) {\r\n //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n (window as any).open(this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n }\r\n else {\r\n //Reading selected payment method\r\n let payments = this.carrello.Payments;\r\n let count = payments.length;\r\n\r\n for (var i = 0; i < count; i++) {\r\n let payment = payments[i];\r\n\r\n if (payment.Selected == true) {\r\n this.selectedPayment = payment;\r\n }\r\n }\r\n\r\n //Reading selected shipment method\r\n let shipments = this.carrello.Shipments;\r\n count = shipments.length;\r\n\r\n for (var i = 0; i < count; i++) {\r\n let shipment = shipments[i];\r\n\r\n if (shipment.Selected == true) {\r\n this.selectedShipment = shipment;\r\n }\r\n }\r\n\r\n //Reading selected address\r\n let address = this.carrello.CurrentAddress;\r\n\r\n let completeAddress = address.Address;\r\n\r\n let lastIndex = completeAddress.lastIndexOf(\" \");\r\n let addressStreet: string = \"\";\r\n let addressNumber: string = \"\";\r\n\r\n if (lastIndex > -1) {\r\n addressStreet = completeAddress.slice(0, lastIndex);\r\n addressNumber = completeAddress.slice(lastIndex, completeAddress.length);\r\n }\r\n\r\n if (address != null) {\r\n this.currentAddress.Id = address.Id;\r\n this.currentAddress.Address = lastIndex > -1 ? addressStreet : address.Address;\r\n this.currentAddress.City = address.City;\r\n this.currentAddress.Recipient = address.Recipient;\r\n this.currentAddress.Province = address.Province;\r\n this.currentAddress.Phone = address.Phone;\r\n this.currentAddress.ZipCode = address.ZipCode;\r\n this.currentAddress.Mobile = address.Mobile;\r\n this.currentAddress.CustomerID = this.userId;\r\n this.currentAddress.Language = this.lang;\r\n this.currentAddress.AddressNumber = lastIndex > -1 ? addressNumber : \"\";\r\n }\r\n\r\n this.carrelloPageName = this.routesService.getRoutePath('CARRELLO');\r\n }\r\n }\r\n\r\n //validation of phone numbers, disable writing any characters in input except of numbers\r\n validatePhone(event: any) {\r\n this.validationService.validatePhoneNumber(event);\r\n }\r\n\r\n\r\n //adding all scripts and elements connected to address verification feature \r\n addAddressVerificationScripts(addressKey: string) {\r\n let suggest = \"\";\r\n let address = \"\";\r\n let jquery = \"\";\r\n\r\n $('body > universal-script').before(suggest);\r\n $('body > universal-script').before(jquery);\r\n $('body > universal-script').before(address);\r\n }\r\n\r\n //removing all scripts and elements connected to address verification feature \r\n removeAddressVerificationScripts(addressKey: string) {\r\n $(\"#suggestId\").remove();\r\n $(\"#jqueryuicss\").remove();\r\n $(\"#jqueryuijs\").remove();\r\n $(\"#suggestcss\").remove();\r\n $(\"#initui\").remove();\r\n $(\"#inituicf\").remove();\r\n $(\"#ui-id-1\").remove();\r\n $(\"#ui-id-2\").remove();\r\n $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n\r\n $(\"#jqueryId\").remove();\r\n $(\"#addressVerificationId\").remove();\r\n }\r\n\r\n checkAddressValidation() {\r\n this.currentAddress.Province = $(\"#Prov\").val();\r\n this.currentAddress.ZipCode = $(\"#Cap\").val();\r\n this.currentAddress.City = $(\"#City\").val();\r\n }\r\n\r\n setAddressValue() {\r\n let streetTypeId = $(\"#streetTypeId\").val();\r\n let street = $(\"#Address\").val();\r\n this.currentAddress.Address = street;\r\n\r\n if (streetTypeId != null && streetTypeId != \"\") {\r\n if (!this.currentAddress.Address.startsWith(streetTypeId)) {\r\n this.currentAddress.Address = streetTypeId + \" \" + street;\r\n }\r\n }\r\n else {\r\n this.currentAddress.Address = street;\r\n }\r\n }\r\n\r\n\r\n updateCartAddress() {\r\n //concating address street and number\r\n let model = this.currentAddress;\r\n let currentStreet = model.Address;\r\n model.Address = this.currentAddress.Address.trim() + \" \" + this.currentAddress.AddressNumber.replace(/\\s/g, \"\");\r\n\r\n let cartSub = this.shoppingCartService.setAddress(model).subscribe(result => {\r\n this.shoppingCartService.updateCart(result);\r\n this.carrello = this.shoppingCartService.getCart();\r\n if (result == false) {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n },\r\n err => {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n\r\n this.subManager.add(cartSub);\r\n\r\n model.Address = currentStreet;\r\n }\r\n\r\n changeAddress(addressId) {\r\n //Reading selected address\r\n let addresses = this.carrello.Addresses;\r\n let count = addresses.length;\r\n\r\n var addressVal = $('#idSelectedAdress option:selected').text();\r\n\r\n for (var i = 0; i < count; i++) {\r\n let address = addresses[i];\r\n\r\n let completeAddress = address.Address;\r\n let lastIndex = completeAddress.lastIndexOf(\" \");\r\n let addressStreet: string = \"\";\r\n let addressNumber: string = \"\";\r\n\r\n if (lastIndex > -1) {\r\n addressStreet = completeAddress.slice(0, lastIndex);\r\n addressNumber = completeAddress.slice(lastIndex, completeAddress.length);\r\n }\r\n\r\n if (address.Id == addressId && address.Recipient == addressVal) {\r\n this.currentAddress.Id = address.Id;\r\n this.currentAddress.Address = lastIndex > -1 ? addressStreet : address.Address;\r\n this.currentAddress.City = address.City;\r\n this.currentAddress.Recipient = address.Recipient;\r\n this.currentAddress.Province = address.Province;\r\n this.currentAddress.Phone = address.Phone;\r\n this.currentAddress.ZipCode = address.ZipCode;\r\n this.currentAddress.Mobile = address.Mobile;\r\n this.currentAddress.CustomerID = this.userId;\r\n this.currentAddress.Language = this.lang;\r\n this.currentAddress.AddressNumber = lastIndex > -1 ? addressNumber : \"\";\r\n break;\r\n }\r\n }\r\n\r\n //concating address street and number to one property \"Address\"\r\n let model = this.currentAddress;\r\n model.Address = this.currentAddress.Address.trim() + \" \" + this.currentAddress.AddressNumber.replace(/\\s/g, \"\");\r\n let currentStreet = model.Address;\r\n\r\n let shopCartSub = this.shoppingCartService.setAddress(model).subscribe(result => {\r\n if (result == null || result == undefined) {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n else {\r\n this.shoppingCartService.updateCart(result);\r\n this.carrello = this.shoppingCartService.getCart();\r\n }\r\n },\r\n err => {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n\r\n this.subManager.add(shopCartSub);\r\n\r\n //reverting address text to previous value after sending request \r\n let lastIndex = currentStreet.lastIndexOf(\" \");\r\n let addressStreet: string = currentStreet;\r\n\r\n if (lastIndex > -1) {\r\n addressStreet = currentStreet.slice(0, lastIndex);\r\n }\r\n\r\n model.Address = addressStreet;\r\n };\r\n\r\n setJobName(rowId, jobName) {\r\n if (jobName != \"\") {\r\n let jobNameSub = this.shoppingCartService.setJobName(rowId, jobName).subscribe(result => {\r\n if (result == false) {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n },\r\n err => {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n\r\n this.subManager.add(jobNameSub);\r\n }\r\n }\r\n\r\n applyVoucher(coupon) {\r\n if (this.voucherCode != null && this.voucherCode.trim().length > 0) {\r\n this.spinnerCartCash = true;\r\n let voucherSub = this.shoppingCartService.applyVoucher(this.voucherCode).subscribe(result => {\r\n if (result.CartID != null) {\r\n this.shoppingCartService.updateCart(result);\r\n this.carrello = this.shoppingCartService.getCart();\r\n\r\n this.isVoucherValid = true;\r\n this.isVoucherInvalid = false;\r\n this.isVoucherApplied = true;\r\n this.voucherCode = \"\";\r\n }\r\n else {\r\n this.isVoucherValid = false;\r\n this.isVoucherInvalid = true;\r\n }\r\n this.spinnerCartCash = false;\r\n\r\n },\r\n err => {\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.spinnerCartCash = false;\r\n\r\n });\r\n\r\n this.subManager.add(voucherSub);\r\n }\r\n };\r\n\r\n showModal() {\r\n this.disableButtonCart = false;\r\n this.spinnerCartCash = false;\r\n this.showValidationLabels = true;\r\n\r\n //JobNames\r\n let validProducts: boolean = true;\r\n let count = this.carrello.Products.length;\r\n for (var i = 0; i < count; i++) {\r\n var product = this.carrello.Products[i];\r\n\r\n //If one of the jobnames are not set then the validation fails\r\n if (product.JobName != null && product.JobName.trim().length == 0) {\r\n validProducts = false;\r\n break;\r\n }\r\n }\r\n\r\n let validAddress: boolean = true;\r\n\r\n if (validProducts == false || this.cartCashAccepted == false || !validAddress) {\r\n return;\r\n }\r\n\r\n $(\"#cartCashModal\").modal(\"show\");\r\n }\r\n\r\n\r\n hideModal() {\r\n $('#cartCashModal').modal('hide');\r\n this.disableButtonCart = false;\r\n }\r\n\r\n confirmOrder() {\r\n this.disableButtonCart = true;\r\n this.spinnerCartCash = true;\r\n\r\n //Checking if all fields are valid\r\n let confirmOrderSub = this.shoppingCartService.confirmOrder().subscribe(result => {\r\n if (result > 0) {\r\n this.shoppingCartService.clearCartAfterConfirmation();\r\n\r\n this.OrderId = result;\r\n this.hideModal();\r\n\r\n //Reading link of the page\r\n var cartOrderDetailPageUrl = this.routesService.getRoutePath('CARRELLO ORDINE')[0];\r\n\r\n //Removing system parameter (id)\r\n cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', '');\r\n\r\n //Adding Order Id parameter\r\n cartOrderDetailPageUrl += this.OrderId\r\n this.spinnerCartCash = false;\r\n //this.router.navigate([cartOrderDetailPageUrl]);\r\n (window as any).open(cartOrderDetailPageUrl, \"_self\");\r\n }\r\n else {\r\n this.hideModal();\r\n this.spinnerCartCash = false;\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n },\r\n err => {\r\n this.hideModal();\r\n this.spinnerCartCash = false;\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n });\r\n\r\n this.subManager.add(confirmOrderSub);\r\n };\r\n\r\n ngAfterViewInit() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n setTimeout(function () {\r\n let altezza = $(\"#footer\").outerHeight();\r\n let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n\r\n let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n\r\n let altezzaHead = $(\".header-body\").outerHeight();\r\n let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n\r\n $(\"#resumeCartTotal\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#resumeCartTotal-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n }, 1);\r\n\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n $('.popovers').popover();\r\n\r\n if (shoppingCartCashData.isActiveAddressVerificationModule) {\r\n let addressVerificationKey = shoppingCartCashData.AddressVerificationCode;\r\n if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n this.addAddressVerificationScripts(addressVerificationKey);\r\n $(\"#Cap\").prop('disabled', true);\r\n\r\n }\r\n }\r\n else {\r\n $(\"#Cap\").prop('disabled', false);\r\n }\r\n\r\n this.pageIsInitAfter = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n if (!this.isBrowser || this.pageIsOnDestroy) {\r\n return;\r\n }\r\n\r\n this.subManager.unsubscribe();\r\n\r\n //this method is removing all scripts and elements connected to address verification feature\r\n let addressVerificationKey = shoppingCartCashData.AddressVerificationCode;\r\n this.removeAddressVerificationScripts(addressVerificationKey);\r\n\r\n this.pageIsOnDestroy = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/shopping-cart/sys/cart-cash.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { ClientAreaOrderDetails } from \"./../../../../models/settings/client-area\";\r\nimport { Md5 } from \"ts-md5/dist/md5\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DomSanitizer, DOCUMENT } from \"@angular/platform-browser\";\r\nimport { PaypalService } from \"../../../../services/core/paypal.service\";\r\nimport { Mappings } from \"../../../../shared/mapping\";\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class CartSubmittedComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private route: ActivatedRoute,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n //Depending on the type of the list, a different template is used\r\n let orderId: string;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n //Reading order id from url\r\n //If id is set, then the information is retrived by id, else the not found page is showed\r\n let paramsSub = this.route.params.subscribe(params => {\r\n let templateHtml: string;\r\n let id = params['id'];\r\n\r\n if (id !== undefined) {\r\n orderId = id;\r\n\r\n let cartSub = this.cmsComponentService.getShoppingCartSubmittedData(orderId).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n let scriptId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.cartSubmittedId, orderId);\r\n\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, scriptId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(cartSub);\r\n }\r\n });\r\n\r\n this.subManager.add(paramsSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(cartSubmittedData: any,header:any) {\r\n @Component({\r\n template: cartSubmittedData.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private router: Router,\r\n private clientAreaService: ClientAreaService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private routesService: RoutesService,\r\n private seoService: SeoService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private translateService: TranslateService,\r\n private sanitizer: DomSanitizer,\r\n private paypalService: PaypalService,\r\n private mappings: Mappings\r\n ) { }\r\n\r\n footerData: any = cartSubmittedData.footerData;\r\n headerData: any = header;\r\n private areaClientiName: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n authentication = this.authService.GetData();\r\n clientArea: ClientAreaOrderDetails = cartSubmittedData.OrderDetail;\r\n private seoInfo: SeoViewModel = cartSubmittedData.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n language = this.languageService.getShortLang();\r\n\r\n //cripted orderID with Md5\r\n criptedOrderID = Md5.hashStr(this.clientArea.OrderId.toString());\r\n private paymentCompleteUrl: string;\r\n private paymentUrl: string;\r\n private isTipologiaPagamentoBonifico = cartSubmittedData.OrderDetail.isTipologiaPagamentoBonifico ? cartSubmittedData.OrderDetail.isTipologiaPagamentoBonifico : false;\r\n private numeroTrnInvalid: boolean = false;\r\n private numeroCroInvalid: boolean = false;\r\n private bonificoUploadUrl = this.sanitizer.bypassSecurityTrustResourceUrl(cartSubmittedData.BonificoUploadUrl);\r\n private bonificoUploadedFiles: string[] = cartSubmittedData.OrderDetail.BonificoUploadedFilesNames;\r\n private pageIsAfterViewInit: boolean = false;\r\n\r\n private breadcrumbs: Breadcrumbs[] = cartSubmittedData.BreadcrumbsInfo;\r\n\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n //adding http before link because paypal redirection doesn't work without paypal\r\n this.paymentUrl = this.clientArea.PaymentDoneUrl + this.criptedOrderID;\r\n\r\n //url that the user will be redirected to after paying of order via paypal\r\n this.paymentCompleteUrl = this.paymentUrl.replace('{lang}', this.language);\r\n\r\n this.clientArea.CurrencyCode = \"EUR\";\r\n if (this.clientArea.OrderId == 0) {\r\n this.router.navigate(this.routesService.getRoutePath('HOME'));\r\n }\r\n }\r\n\r\n confirmBonificoDetails() {\r\n // trim value before sending it to a server\r\n this.clientArea.BonificoTrn = this.clientArea.BonificoTrn.trim();\r\n //showing of loading panel after we get all data we need\r\n this.routesService.showPageLoader();\r\n\r\n this.clientAreaService.updateBonificoPaymentDetails(cartSubmittedData.OrderDetail.OrderId, this.clientArea.BonificoCro, this.clientArea.BonificoTrn)\r\n .subscribe(x => {\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.hideBonificoModal();\r\n },\r\n err => {\r\n });\r\n }\r\n\r\n // validate NumeroTrn input\r\n checkNumeroTrn(inputText: any) {\r\n inputText = inputText.trim();\r\n if (inputText.length < 31) {\r\n this.numeroTrnInvalid = false;\r\n }\r\n else {\r\n this.numeroTrnInvalid = true;\r\n }\r\n }\r\n\r\n // validate NumeroCro input\r\n checkNumeroCro(inputNumber: any) {\r\n if (inputNumber < 99999999999) {\r\n this.numeroCroInvalid = false;\r\n }\r\n else {\r\n this.numeroCroInvalid = true;\r\n }\r\n }\r\n\r\n // getting uploaded files for this order and showing it inside of bonifico modal\r\n getBonificoUploadedFiles() {\r\n //showing of loading panel after we get all data we need\r\n this.routesService.showPageLoader();\r\n\r\n this.clientAreaService.getBonificoUploadedFiles(cartSubmittedData.OrderDetail.OrderId).subscribe(x => {\r\n this.bonificoUploadedFiles = x;\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n })\r\n }\r\n\r\n showBonificoModal() {\r\n $(\"#bonificoModal\").modal(\"show\");\r\n }\r\n\r\n hideBonificoModal() {\r\n $(\"#bonificoModal\").modal(\"hide\");\r\n }\r\n\r\n\r\n orderDetailsRedirect() {\r\n //Reading link of the page\r\n var cartOrderDetailPageUrl = this.routesService.getRoutePath('AREA CLIENTI - ORDINE')[0];\r\n\r\n //Removing system parameter (id)\r\n cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', '');\r\n\r\n //Adding Order Id parameter\r\n cartOrderDetailPageUrl += this.clientArea.OrderId;\r\n\r\n //this.router.navigate([cartOrderDetailPageUrl]);\r\n (window as any).open(cartOrderDetailPageUrl, \"_self\");\r\n \r\n }\r\n\r\n fileUploadRedirect() {\r\n //Reading link of the page\r\n var cartOrderDetailPageUrl = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n\r\n //Removing system parameter (id)\r\n cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':id', this.clientArea.OrderId);\r\n cartOrderDetailPageUrl = cartOrderDetailPageUrl.replace(':pagefrom', 'section_upload');\r\n\r\n //this.router.navigate([cartOrderDetailPageUrl]);\r\n (window as any).open(cartOrderDetailPageUrl, \"_self\");\r\n\r\n }\r\n\r\n payWithPaypal() {\r\n let paypalText = \"pay_with_paypal\";\r\n let translatePaypal = this.translateService.get(paypalText)[\"value\"];\r\n\r\n let formHtml = '
' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n\r\n '' +\r\n '
';\r\n\r\n //replacing form with values from field because of security reasons - if somebody change html content\r\n let completePaypalForm = $(\"#completePaypalFormId\").html(formHtml);\r\n\r\n $('#paypalForm').submit();\r\n }\r\n\r\n payWithNexi() {\r\n let NexiForm = $(\"#completeNexiFormId\").html()\r\n let NexiText = \"pay_with_nexi\";\r\n let translateNexi = this.translateService.get(NexiText)[\"value\"];\r\n let formHtml = '
' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '';\r\n if (this.clientArea.NexiModel.gruppo != null && this.clientArea.NexiModel.gruppo != \"\") {\r\n formHtml += '';\r\n }\r\n formHtml += '
' + NexiForm;\r\n // formHtml += ' ';\r\n //replacing form with values from field because of security reasons - if somebody change html content\r\n let completeNexiForm = $(\"#completeNexiFormId\").html(formHtml);\r\n\r\n $('#nexiForm').submit();\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.isBrowser || this.pageIsAfterViewInit) {\r\n return;\r\n }\r\n\r\n //-- If these conditions are not fulfilled, we are not gonna load paypal script, because there is no paypal payment option in the current order.\r\n if (this.clientArea.PaymentType == 'Paypal' && !this.isTipologiaPagamentoBonifico\r\n && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00' && this.clientArea.IsNewPaypalIntegration) {\r\n let userId = this.authService.GetUserId();\r\n let params = {\r\n CustomerId: userId.toString(),\r\n OrderId: this.clientArea.OrderId.toString(),\r\n Lang: this.languageService.getLongLang()\r\n };\r\n\r\n //-- Load paypal service and render a button for paypal payment\r\n this.paypalService.loadPaypalService(this.mappings.Paypal_JS_Lirary_Url,\r\n this.mappings.Web_Api_Create_Paypal_Payment,\r\n this.mappings.Web_Api_Execute_Paypal_Payment, params, this.clientArea.PaypalButtonStyle, this.clientArea.UsePaypalProduction);\r\n }\r\n\r\n this.pageIsAfterViewInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/shopping-cart/sys/cart-submitted.component.ts","import { RegisterService } from './../../../../services/cms/register.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, NavigationExtras } from \"@angular/router\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { BootboxService } from './../../../../services/core/bootbox.service';\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { CartInfo } from \"./../../../../models/core/cart\";\r\nimport { CartShipmentModel } from \"./../../../../models/core/cart\";\r\nimport { CartPaymentModel } from \"./../../../../models/core/cart\";\r\nimport { UserLogin } from \"./../../../../models/cms/user-login\";\r\nimport { Company } from \"./../../../../models/core/company\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from '../../../../services/inventory/customerscanvas.service';\r\nimport { CookieService } from '../../../../services/core/cookie';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class CartComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let cartDataSub = this.cmsComponentService.getShoppingCartData().subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n let scriptId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.cartId, result.ShoppingCart.CartID);\r\n\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, scriptId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(cartDataSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(shoppingCartData: any, header: any) {\r\n @Component({\r\n template: shoppingCartData.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private router: Router,\r\n private shoppingCartService: ShoppingCartService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private routesService: RoutesService,\r\n private seoService: SeoService,\r\n private translate: TranslateService,\r\n private bootboxService: BootboxService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private registerService: RegisterService,\r\n public canvasService: CustomersCanvasService,\r\n @Inject('CookieService') private cookie: CookieService\r\n ) {\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n const canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(\r\n isModalOpened => {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(\r\n isDesignApproved => {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n shoppingCartService.setIfProductIsCanvasEdited(true);\r\n\r\n // get row id of edited element\r\n let productId = this.clickedProductId;\r\n // get data which we get from customer canvas and saved in a cart service\r\n let canvasData = shoppingCartService.getCustomizationCanvasData();\r\n canvasData[\"RowIdPrev\"] = productId;\r\n\r\n if (canvasData && productId && canvasData.status == \"success\") {\r\n let updateCanvas = canvasService.updatePrevCanvasInfo(canvasData).subscribe(x => {\r\n let objectToUpdateStateId = this.carrello.Products.find(obj => {\r\n return obj.Id === productId;\r\n })\r\n objectToUpdateStateId.CanvasStateId = canvasData.stateId;\r\n });\r\n\r\n this.subManager.add(updateCanvas);\r\n }\r\n // reset editor view\r\n shoppingCartService.resetCanvasData();\r\n }\r\n });\r\n\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n\r\n model = {\r\n selectedPayment: new CartPaymentModel(),\r\n selectedShipment: new CartShipmentModel()\r\n }\r\n\r\n private pageIsInit: boolean = false;\r\n private pageIsInitAfter: boolean = false;\r\n\r\n areaStatus: any;\r\n carrello: CartInfo = shoppingCartData.ShoppingCart;\r\n items = this.carrello.Payments;\r\n\r\n selectedPaymentId = 0;\r\n selectedShipmentId = 0;\r\n\r\n footerData: any = shoppingCartData.footerData;\r\n headerData: any = header;\r\n\r\n userLogin = UserLogin;\r\n lang: string = this.languageService.getLongLang();\r\n private isUserAuthenticated: boolean;\r\n company: Company = new Company();\r\n authentication = this.authService.GetData();\r\n private userId = this.authService.GetUserId();\r\n cartId: number = 0;\r\n private seoInfo: SeoViewModel = shoppingCartData.SeoInformation;\r\n private disableModalCartButtons: boolean = false;\r\n private spinnerCart: boolean = false;\r\n private idOfProduct: any;\r\n private breadcrumbs: Breadcrumbs[] = shoppingCartData.BreadcrumbsInfo;\r\n private isCompletedRegistration: any;\r\n private userData: any;\r\n private showProceedBtn: boolean = true;\r\n public parentWidgetData: string = shoppingCartData.CanvasInfo;\r\n private clickedProductId: number = 0;\r\n private selectedProduct: any;\r\n\r\n subManager = new Subscription();\r\n\r\n openCanvasEditor(product) {\r\n this.clickedProductId = product.Id;\r\n\r\n if (shoppingCartData.CanvasInfo.CanvasUrl) {\r\n // we have a state id, because product is already edited, so we kept it's state id in a database\r\n const isStateId = true;\r\n const canvasConfigData = this.setCanvasConfig(product);\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n }\r\n\r\n setCanvasConfig(product) {\r\n const canvasConfigData = {\r\n CanvasUrl: shoppingCartData.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: shoppingCartData.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: shoppingCartData.CanvasInfo.CustomerCanvasUserName,\r\n CanvasStateId: product.CanvasStateId,\r\n Watermark: shoppingCartData.CanvasInfo.WatermarkText,\r\n CanvasApiKey: shoppingCartData.CanvasInfo.ApiKey\r\n };\r\n\r\n return canvasConfigData;\r\n }\r\n\r\n toShowCanvasButton() {\r\n let toShow = false;\r\n let isModuleActive = false;\r\n\r\n if (shoppingCartData.CanvasInfo && shoppingCartData.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = shoppingCartData.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n\r\n toShow = isModuleActive && this.isUserAuthenticated ? true : false;\r\n\r\n return toShow;\r\n }\r\n\r\n // customers canvas state module is active and current product has canvasStateId defined, then send a request to delete a state from customers canvas server\r\n removeCustomersCanvasState() {\r\n if (this.toShowCanvasButton() && this.selectedProduct.CanvasStateId) {\r\n const canvasConfigData = this.setCanvasConfig(this.selectedProduct);\r\n\r\n this.canvasService.deleteCustomerCanvasState(canvasConfigData)\r\n .subscribe(x => x,\r\n err => {\r\n console.log(err);\r\n });\r\n }\r\n }\r\n\r\n goRegistrationPage() {\r\n //-- If this parameter is inside of cookie, it means that user used quick registration feature\r\n let quickRegistration = this.cookie.get(\"IsQuickRegistered\");\r\n\r\n if (quickRegistration && Boolean(quickRegistration)) {\r\n let navigationExtras: NavigationExtras = {\r\n queryParams: { 'quickRegistration': true }\r\n };\r\n\r\n let registerRoute = this.routesService.getRoutePath('REGISTRAZIONE_PAGE_FROM')[0];\r\n registerRoute = registerRoute.replace(\":pagefrom\", \"cart\");\r\n\r\n this.router.navigate([registerRoute], navigationExtras);\r\n }\r\n else {\r\n if (this.isCompletedRegistration == false) {\r\n this.registerService.setFacebookLoginData(this.userData);\r\n\r\n let registerRoute = this.routesService.getRoutePath('REGISTRAZIONE_PAGE_FROM')[0];\r\n registerRoute = registerRoute.replace(\":pagefrom\", \"cart\");\r\n\r\n this.router.navigate([registerRoute]);\r\n }\r\n else {\r\n this.router.navigate(this.routesService.getRoutePath('REGISTRAZIONE'));\r\n }\r\n }\r\n };\r\n\r\n goLoginPage() {\r\n let loginRoute = this.routesService.getRoutePath('LOGIN_PAGE_FROM')[0];\r\n loginRoute = loginRoute.replace(\":pagefrom\", \"cart\");\r\n\r\n this.router.navigate([loginRoute]);\r\n };\r\n\r\n goToConfirmPurchasePage() {\r\n if (this.selectedPaymentId == 0) {\r\n this.bootboxService.i18nAlert(\"selectPayment\", 'pagamento');\r\n }\r\n else if (this.selectedShipmentId == 0) {\r\n this.bootboxService.i18nAlert(\"selectPayment\", 'pagamento');\r\n }\r\n else {\r\n //this.router.navigateByUrl(this.routesService.getRoutePath('ACQUISTO - CASSA'));\r\n (window as any).open(this.routesService.getRoutePath('ACQUISTO - CASSA'), \"_self\");\r\n }\r\n }\r\n\r\n goToModifyProfile() {\r\n this.router.navigate(this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI'));\r\n }\r\n\r\n saveCart() {\r\n let saveCartSub = this.shoppingCartService.saveCart(this.userId, this.cartId, this.selectedPaymentId, this.selectedShipmentId).subscribe(result => {\r\n //this.router.navigate(this.routesService.getRoutePath('ACQUISTO - CASSA'));\r\n (window as any).open(this.routesService.getRoutePath('ACQUISTO - CASSA'), \"_self\");\r\n });\r\n\r\n this.subManager.add(saveCartSub);\r\n }\r\n\r\n selectRadioPayment(paymentId) {\r\n if (this.selectedPaymentId != paymentId) {\r\n this.selectedPaymentId = paymentId;\r\n this.setPayment(paymentId);\r\n }\r\n }\r\n\r\n setPayment(paymentId) {\r\n this.spinnerCart = true;\r\n let paymentSub = this.shoppingCartService.setPayment(paymentId).subscribe(result => {\r\n this.bootboxService.i18nAlert(\"selectedPayment\", 'pagamento');\r\n this.shoppingCartService.updateCart(result);\r\n this.carrello = this.shoppingCartService.getCart();\r\n this.spinnerCart = false;\r\n });\r\n\r\n this.subManager.add(paymentSub);\r\n }\r\n\r\n selectRadioShipment(shipmentId) {\r\n if (this.selectedShipmentId != shipmentId) {\r\n this.selectedShipmentId = shipmentId;\r\n this.setShipment(shipmentId);\r\n }\r\n }\r\n\r\n setShipment(shipmentId) {\r\n this.spinnerCart = true;\r\n let shipmentSub = this.shoppingCartService.setShipment(shipmentId).subscribe(result => {\r\n this.bootboxService.i18nAlert(\"selectedShipment\", 'spedizione');\r\n this.shoppingCartService.updateCart(result);\r\n this.carrello = this.shoppingCartService.getCart();\r\n this.spinnerCart = false;\r\n });\r\n\r\n this.subManager.add(shipmentSub);\r\n }\r\n\r\n removeFromCart() {\r\n this.disableModalCartButtons = true;\r\n this.spinnerCart = true;\r\n\r\n let removeCartSub = this.shoppingCartService.removeFromCart(this.idOfProduct).subscribe(result => {\r\n this.shoppingCartService.updateCart(result);\r\n this.carrello = this.shoppingCartService.getCart();\r\n this.spinnerCart = false;\r\n this.disableModalCartButtons = false;\r\n\r\n this.removeCustomersCanvasState();\r\n\r\n if (this.carrello.Products != null && this.carrello.Products.length == 0) {\r\n this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n }\r\n });\r\n\r\n this.subManager.add(removeCartSub);\r\n\r\n this.hideModal();\r\n }\r\n\r\n showModal(product) {\r\n this.disableModalCartButtons = false;\r\n this.idOfProduct = product.Id;\r\n this.selectedProduct = product;\r\n\r\n $(\"#cartModal\").modal(\"show\");\r\n }\r\n\r\n hideModal() {\r\n $('#cartModal').modal('hide');\r\n }\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n if (shoppingCartData.UserData != null) {\r\n this.isCompletedRegistration = shoppingCartData.UserData.IsCompletedRegistration;\r\n this.userData = shoppingCartData.UserData;\r\n }\r\n\r\n if (this.carrello.Products.length == 0) {\r\n this.router.navigate(this.routesService.getRoutePath('EMPTY CART PAGE'));\r\n }\r\n else {\r\n this.shoppingCartService.updateCart(this.carrello);\r\n\r\n let userData = this.authService.GetData();\r\n this.isUserAuthenticated = userData.isAuthenticated;\r\n for (let payment of this.carrello.Payments) {\r\n if (payment.Selected == true) {\r\n this.selectedPaymentId = payment.Id;\r\n break;\r\n }\r\n }\r\n\r\n for (let shipment of this.carrello.Shipments) {\r\n if (shipment.Selected == true) {\r\n // console.log(\"selectedShipmentId = \"+shipment.Id)\r\n this.selectedShipmentId = shipment.Id;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (this.userData != undefined && this.userData != null) {\r\n if (this.userData.Id_User_Group != 4) {\r\n if ((this.userData.CodiceDestinatarioSDL == \"\" || this.userData.CodiceDestinatarioSDL == \"0000000\" || this.userData.CodiceDestinatarioSDL == undefined) && (this.userData.PecEmail == \"\" || this.userData.PecEmail == undefined)) {\r\n this.showProceedBtn = false;\r\n }\r\n }\r\n }\r\n }\r\n ngAfterViewInit() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n setTimeout(function () {\r\n let altezza = $(\"#footer\").outerHeight();\r\n let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n\r\n let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n\r\n let altezzaHead = $(\".header-body\").outerHeight();\r\n //console.log(\".header-body = \" + altezzaHead)\r\n\r\n let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n\r\n $(\"#resumeCartTotal\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#resumeCartTotal-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n }, 1);\r\n }\r\n\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n $('.popovers').popover();\r\n\r\n this.pageIsInitAfter = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/shopping-cart/sys/cart.component.ts","import { ScriptService } from './../../../../services/cms/script.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n//Services\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { MessagesService } from \"../../../../services/core/messages.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { ClientAreaDetails } from \"./../../../../models/settings/client-area\";\r\nimport { Router } from \"@angular/router\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class ClientAreaHomeComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private clientAreaService: ClientAreaService,\r\n private router: Router,\r\n private authService: AuthService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n private scriptService: ScriptService,\r\n @Inject(DOCUMENT) private document: any\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n\r\n ngOnInit() {\r\n\r\n //console.log(this.authService.GetData().isAuthenticated)\r\n if (!this.authService.GetData().isAuthenticated || this.authService.GetData().isAuthenticated === undefined) {\r\n this.router.navigate([\"\"]);\r\n }\r\n\r\n let userId = this.authService.GetUserId();\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n \r\n let clientDetailsSub = this.clientAreaService.getDetailsClientArea(userId).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the catalog catgories information to inject\r\n let subComponent = this.createSubComponent(result, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.userAreaId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(clientDetailsSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(ClientAreaHomeTemplate: any, header: any) {\r\n @Component({\r\n template: ClientAreaHomeTemplate.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private languageService: LanguageService,\r\n private router: Router,\r\n private authService: AuthService,\r\n private routesService: RoutesService,\r\n private messagesService: MessagesService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seoService: SeoService,\r\n public currency: CurrencyService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n footerData: any = ClientAreaHomeTemplate.FooterData;\r\n headerData: any = header;\r\n clientArea: ClientAreaDetails = new ClientAreaDetails();\r\n lang: string = this.languageService.getLongLang();\r\n\r\n private messagesList: any[] = [];\r\n private numberOfMessages: number = 0;\r\n private bodyMod: any[] = [];\r\n private lastOrderDetailsPage: string = \"\";\r\n private lastOrderId: string;\r\n private userName: string = \"\";\r\n private pageIsInit: boolean = false;\r\n\r\n //checking if invoices module is active\r\n private isActiveInvoicesModule: boolean = ClientAreaHomeTemplate.isActiveInvoicesModule;\r\n\r\n private breadcrumbs: Breadcrumbs[] = ClientAreaHomeTemplate.BreadcrumbsInfo;\r\n //Routes for menu-tabs\r\n private areaClientiHome: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n private areaClientiOrdini: string[] = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n private areaChangeProfile: string[] = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n private areaClientiInvoices: string[] = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n this.userName = this.authService.GetData().username;\r\n this.clientArea = ClientAreaHomeTemplate.ClientAreaDetails;\r\n this.messagesList = this.clientArea.OrderNoteList;\r\n this.numberOfMessages = this.clientArea.NewNoteOrdersCount;\r\n\r\n //getting of the link for details page of latest order\r\n this.lastOrderId = String(this.clientArea[\"LastOrderId\"]);\r\n let url = this.routesService.getRoutePath(\"AREA CLIENTI - ORDINE\")[0];\r\n this.lastOrderDetailsPage = url.replace(':id', this.lastOrderId);\r\n\r\n\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n showModal() {\r\n let userId = this.authService.GetUserId();\r\n\r\n let params = {\r\n CustomerId: userId,\r\n OrderId: \"0\",\r\n Lang: this.lang\r\n };\r\n\r\n let setMessSub = this.messagesService.setMessagesAsRead(params)\r\n .subscribe(result => { })\r\n\r\n this.subManager.add(setMessSub);\r\n\r\n $(\"#messagesModal\").modal(\"show\");\r\n\r\n this.bodyMod = [];\r\n }\r\n\r\n hideModal() {\r\n $('#basic').modal('hide');\r\n this.numberOfMessages = 0;\r\n }\r\n\r\n messagesDetails(orderId) {\r\n $(\"#messagesModal\").modal(\"hide\");\r\n let id = orderId;\r\n let orderDetailsPage = this.routesService.getRoutePath('AREA CLIENTI - ORDINE_PAGE_FROM')[0];\r\n\r\n orderDetailsPage = orderDetailsPage.replace(':id', id.toString()).replace(':pagefrom', \"section_comunicazioni\");\r\n this.router.navigate([orderDetailsPage]);\r\n return true;\r\n }\r\n \r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/client-area-home.component.ts","import { ScriptService } from './../../../../services/cms/script.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Input, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { Router } from \"@angular/router\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { ClientAreaOrderDetails } from \"./../../../../models/settings/client-area\";\r\nimport { CookieService } from \"../../../../services/core/cookie/cookie.service\";\r\nimport { ApiService } from \"../../../../services/core/api.service\";\r\nimport { MessagesService } from \"../../../../services/core/messages.service\";\r\nimport { Mappings } from \"../../../../shared/mapping\";\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\nimport { SeoService } from \"../../../../services/core/seo.service\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\nexport class ClientAreaInvoicesComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private authService: AuthService,\r\n private router: Router,\r\n private clientAreaService: ClientAreaService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (!this.authService.GetData().isAuthenticated) {\r\n this.router.navigate([\"\"]);\r\n }\r\n let ClientAreaInvoicesListTemplate: any;\r\n\r\n let userId = this.authService.GetUserId();\r\n let showAll: string = \"-1\"\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let invoicesSub = this.clientAreaService.getClientAreaInvoicesList(userId, showAll, showAll, showAll).subscribe(result => {\r\n\r\n ClientAreaInvoicesListTemplate = result;\r\n\r\n if (ClientAreaInvoicesListTemplate.isActiveInvoicesModule) {\r\n // Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(ClientAreaInvoicesListTemplate,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n let subComponent = this.redirectToHomepage(ClientAreaInvoicesListTemplate);\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n\r\n })\r\n\r\n this.subManager.add(invoicesSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n //if invoices module is not active, then redirect to homepage\r\n private redirectToHomepage(ClientAreaInvoicesListTemplate: any) {\r\n @Component({\r\n template: ClientAreaInvoicesListTemplate.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n\r\n constructor\r\n (private router: Router) { }\r\n\r\n ngOnInit(): void {\r\n this.router.navigate([\"\"]);\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n\r\n private createSubComponent(ClientAreaInvoicesListTemplate: any,header: any) {\r\n\r\n @Component({\r\n template: ClientAreaInvoicesListTemplate.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n @Inject('CookieService') private cookie: CookieService,\r\n private clientAreaService: ClientAreaService,\r\n private router: Router,\r\n private authService: AuthService,\r\n private routesService: RoutesService,\r\n private apiService: ApiService,\r\n private messagesService: MessagesService,\r\n private mappings: Mappings,\r\n public currency: CurrencyService,\r\n private languageService: LanguageService,\r\n private translateService: TranslateService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seoService: SeoService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n private pageIsInit: boolean = false;\r\n\r\n public rows: Array = [];\r\n\r\n public columns: Array = [];\r\n\r\n //translating of header columns titles\r\n translateTableColumnTitle(columnTitle) {\r\n let translation = this.translateService.get(columnTitle)[\"value\"];\r\n return translation;\r\n }\r\n\r\n @Input() clientModel: Array;\r\n\r\n //filter fields\r\n private documentTypeSelect: string = \"-1\";\r\n private orderNumber: string = \"\";\r\n private invoiceNumber: string = \"\";\r\n\r\n private lang: string = this.languageService.getLongLang();\r\n private shortLang: string = this.languageService.getShortLang();\r\n\r\n private load: boolean = true;\r\n\r\n footerData: any = ClientAreaInvoicesListTemplate.footerData;\r\n headerData: any = header;\r\n\r\n //Routes for menu-tabs\r\n private areaClientiHome: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n private areaClientiOrdini: string[] = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n private areaChangeProfile: string[] = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n private areaClientiInvoices: string[] = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n\r\n private isActiveInvoicesModule: boolean = ClientAreaInvoicesListTemplate.isActiveInvoicesModule;\r\n private breadcrumbs: Breadcrumbs[] = ClientAreaInvoicesListTemplate.BreadcrumbsInfo;\r\n\r\n private currentLang: any;\r\n italianLang = {\r\n \"sProcessing\": \"Attendere...\",\r\n \"sLengthMenu\": \"Visualizza _MENU_ record per pagina\",\r\n \"sZeroRecords\": \"Niente trovato\",\r\n \"sInfo\": \"Mostra _START_ a _END_ di _TOTAL_ record\",\r\n \"sInfoEmpty\": \"Non ci sono record\",\r\n \"sInfoFiltered\": \"(filtrato da _MAX_ record totali)\",\r\n \"sInfoPostFix\": \"\",\r\n \"sUrl\": \"\",\r\n \"oPaginate\": {\r\n \"sPrevious\": \"«\",\r\n \"sNext\": \"»\"\r\n }\r\n }\r\n\r\n englishLang = {\r\n \"oPaginate\": {\r\n \"sPrevious\": \"«\",\r\n \"sNext\": \"»\"\r\n }\r\n }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n this.columns = [\r\n { title: this.translateTableColumnTitle(\"OrderNumberInvoice\") },\r\n { title: this.translateTableColumnTitle(\"InvoiceNumberInvoice\") },\r\n { title: this.translateTableColumnTitle(\"CreationDateInvoice\") },\r\n { title: this.translateTableColumnTitle(\"TotalPriceInvoice\") },\r\n { title: this.translateTableColumnTitle(\"DocumentTypeInvoice\") },\r\n { title: this.translateTableColumnTitle(\"Download\") }\r\n ];\r\n\r\n //getting of Datatable data\r\n this.rows = ClientAreaInvoicesListTemplate.ClientAreaInvoicesList;\r\n this.load = false;\r\n \r\n }\r\n\r\n ngAfterViewChecked() {\r\n\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n if (this.shortLang == 'en') {\r\n this.currentLang = this.englishLang;\r\n }\r\n else {\r\n this.currentLang = this.italianLang;\r\n }\r\n\r\n //initialization of datatable\r\n $('#datatable').DataTable({\r\n searching: false,\r\n ordering: false,\r\n sDom: 'Rlfrtlip',\r\n oLanguage: this.currentLang\r\n });\r\n\r\n //hiding of first 'per page' section, because we added it on the bottom of the table\r\n $('.dataTables_length').not(':eq(1)').hide();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n getInvoicesList(userId: string, orderNumber: string, invoiceNumber: string, documentType: string) {\r\n let showAll = \"-1\";\r\n this.load = true;\r\n let invoicesSub = this.clientAreaService.getClientAreaInvoicesList(userId, orderNumber, invoiceNumber, documentType)\r\n .subscribe(result => {\r\n this.rows = result.ClientAreaInvoicesList;\r\n this.load = false;\r\n\r\n this.resetTable(this.rows);\r\n })\r\n\r\n this.subManager.add(invoicesSub);\r\n }\r\n\r\n //destroying of current context of table and creating a new one with new data\r\n resetTable(tableData) {\r\n $('#datatable').DataTable().destroy();\r\n let currentLang = this.currentLang;\r\n setTimeout(function () {\r\n $('#datatable').DataTable\r\n (\r\n {\r\n data: this.rows,\r\n searching: false,\r\n ordering: false,\r\n sDom: 'Rlfrtlip',\r\n oLanguage: currentLang\r\n }\r\n );\r\n }, 0);\r\n\r\n setTimeout(function () { $('.dataTables_length').not(':eq(1)').hide() }, 0);\r\n }\r\n\r\n resetFilter() {\r\n this.rows = ClientAreaInvoicesListTemplate.ClientAreaInvoicesList;\r\n this.orderNumber = \"\";\r\n this.invoiceNumber = \"\";\r\n this.documentTypeSelect = \"-1\";\r\n this.resetTable(this.rows);\r\n }\r\n\r\n filterInvoicesList() {\r\n let showAll = \"-1\";\r\n let userId = this.authService.GetUserId();\r\n\r\n //checking if inputs for filtering are empty, if they are, set them to \"show all\", which is '-1' value\r\n let filterOrderNumber = this.orderNumber != \"\" ? this.orderNumber : showAll;\r\n let filterInvoiceNumber = this.invoiceNumber != \"\" ? this.invoiceNumber : showAll;\r\n\r\n //if all fields are empty, then don't send request to a server, but set rows value to start\r\n if (filterOrderNumber == showAll && filterInvoiceNumber == showAll && this.documentTypeSelect == showAll) {\r\n this.resetFilter();\r\n }\r\n else {\r\n this.getInvoicesList(userId, filterOrderNumber, filterInvoiceNumber, this.documentTypeSelect);\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/client-area-invoices.component.ts","import { ScriptService } from './../../../../services/cms/script.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute, Params } from \"@angular/router\";\r\n\r\n//Services\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { MessagesService } from \"../../../../services/core/messages.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { CookieService } from \"../../../../services/core/cookie/cookie.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { TranslateService } from \"@ngx-translate/core\";\r\n\r\n//Models\r\nimport { UserLogin } from \"./../../../../models/cms/user-login\";\r\nimport { ClientAreaOrderDetails } from \"./../../../../models/settings/client-area\";\r\nimport { ClientAreaOrderProcessMessages } from \"./../../../../models/settings/client-area\";\r\nimport { ClientAreaProcessingOrders } from \"./../../../../models/settings/client-area\";\r\nimport { ClientAreaOrderProcessFile } from \"./../../../../models/settings/client-area\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//import * as moment from 'moment'\r\nimport { DomSanitizer, DOCUMENT } from \"@angular/platform-browser\";\r\nimport { Md5 } from 'ts-md5/dist/md5';\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { PaypalService } from \"../../../../services/core/paypal.service\";\r\nimport { Mappings } from \"../../../../shared/mapping\";\r\nimport { CurrencyService } from '../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class ClientAreaOrderDetailsComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private templateService: TemplateService,\r\n private route: ActivatedRoute,\r\n private clientAreaService: ClientAreaService,\r\n private cmsComponentService: CmsComponentService,\r\n private authService: AuthService,\r\n private router: Router,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any\r\n ) { }\r\n\r\n orderId: number;\r\n clientArea: ClientAreaOrderDetails = new ClientAreaOrderDetails();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (!this.authService.GetData().isAuthenticated) {\r\n this.router.navigate([\"\"]);\r\n }\r\n\r\n let subComponentTemplateUrl: string;\r\n let orderId: number = 0;\r\n let orderRowId: number = 0;\r\n\r\n let paramsSub = this.route.params.subscribe(params => {\r\n let templateHtml: string;\r\n let id = params['id'];\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n \r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n if (id !== undefined) {\r\n orderId = id;\r\n let UserId = this.authService.GetUserId();\r\n\r\n \r\n let orderIdSub = this.clientAreaService.getClientAreaOrderDetails(UserId, orderId).subscribe(result => {\r\n\r\n templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(templateHtml, orderId,header);\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n\r\n });\r\n\r\n this.subManager.add(orderIdSub);\r\n }\r\n else {\r\n let orderNotFoundSub = this.templateService.getComponentTemplate(\"notfoundPageTemplate\").subscribe(result => {\r\n templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(templateHtml, orderId,header)\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(orderNotFoundSub);\r\n }\r\n });\r\n\r\n this.subManager.add(paramsSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(template: any, orderId: number,header:any) {\r\n @Component({\r\n template: template.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private clientAreaService: ClientAreaService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private routesService: RoutesService,\r\n @Inject('CookieService') private cookie: CookieService,\r\n private router: Router,\r\n private activatedRoute: ActivatedRoute,\r\n private sanitizer: DomSanitizer,\r\n private messagesService: MessagesService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seoService: SeoService,\r\n public currency: CurrencyService,\r\n private translateService: TranslateService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private paypalService: PaypalService,\r\n private mappings: Mappings,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n private areaClientiHome: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n private areaClientiOrdini: string[] = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n private areaChangeProfile: string[] = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n private areaClientiInvoices: string[] = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n\r\n model = {\r\n ProcessOrder: \"\",\r\n processingSubject: \"\",\r\n Description: \"\"\r\n };\r\n\r\n footerData: any = template.footerData;\r\n headerData: any = header;\r\n\r\n clientArea: ClientAreaOrderDetails = new ClientAreaOrderDetails();\r\n\r\n private clientAreaList: Array = new Array();\r\n private userLogin = UserLogin;\r\n private orderProcessMessageList: ClientAreaOrderProcessMessages[] = [];\r\n private message: ClientAreaProcessingOrders = new ClientAreaProcessingOrders();\r\n private lang: string = this.languageService.getLongLang();\r\n private authentication = this.authService.GetData();\r\n private userName = this.authentication.username;\r\n private userId = this.authService.GetUserId();\r\n private idord: ClientAreaProcessingOrders = new ClientAreaProcessingOrders();\r\n private upload: string = \"\";\r\n private info: string = \"active\";\r\n private comunicazioni: string = \"\";\r\n private paymentCompleteUrl: string;\r\n private criptedOrderID: any;\r\n private mdCripted: any;\r\n private noMessages: boolean = false;\r\n private checkValues: boolean = false;\r\n private waitingDetails: boolean = false;\r\n private pageIsInit: boolean = false;\r\n private pageIsAfterViewInit: boolean = false;\r\n private showSpinnerClick: boolean = false;\r\n\r\n //checking if invoices module is active\r\n private isActiveInvoicesModule: boolean = template.isActiveInvoicesModule;\r\n //checking if multiple shipment module is active\r\n private multipleShipmentActive: boolean = template.isActiveMultipleShipment;\r\n private isTipologiaPagamentoBonifico = template.ClientAreaOrderDetails.isTipologiaPagamentoBonifico ? template.ClientAreaOrderDetails.isTipologiaPagamentoBonifico : false;\r\n private numeroTrnInvalid: boolean = false;\r\n private numeroCroInvalid: boolean = false;\r\n private startTrnValue: string = template.ClientAreaOrderDetails.BonificoTrn;\r\n private startCroValue: string = template.ClientAreaOrderDetails.BonificoCro;\r\n private bonificoUploadUrl = this.sanitizer.bypassSecurityTrustResourceUrl(template.BonificoUploadUrl);\r\n private bonificoUploadedFiles: string[] = template.ClientAreaOrderDetails.BonificoUploadedFilesNames;\r\n private breadcrumbs: Breadcrumbs[] = template.BreadcrumbsInfo;\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (this.breadcrumbs != null) {\r\n var len = this.breadcrumbs.length;\r\n let nameLast = this.breadcrumbs[len - 1].BreadcrumbName;\r\n let translatedName = this.translateTableColumnTitle(nameLast);\r\n this.breadcrumbs[len - 1].BreadcrumbName = translatedName;\r\n }\r\n\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n this.waitingDetails = false;\r\n\r\n //if user from the page order list clicked on email\r\n let routeParamsSub = this.activatedRoute.params.subscribe((params: Params) => {\r\n if (params[\"pagefrom\"] == \"section_upload\") {\r\n this.upload = \"active\";\r\n this.info = \"\";\r\n this.comunicazioni = \"\";\r\n }\r\n else if (params[\"pagefrom\"] == \"section_comunicazioni\") {\r\n this.comunicazioni = \"active\";\r\n this.upload = \"\";\r\n this.info = \"\";\r\n let orderId = params[\"id\"];\r\n this.setMessagesAsRead(orderId)\r\n }\r\n\r\n this.waitingDetails = true;\r\n this.clientArea = template.ClientAreaOrderDetails;\r\n\r\n this.clientArea.CurrencyCode = \"EUR\";\r\n let language = this.languageService.getShortLang();\r\n\r\n //cripted orderID with Md5\r\n this.criptedOrderID = Md5.hashStr(this.clientArea.OrderId.toString());\r\n\r\n if (this.clientArea.OrderNoteList.length > 0) {\r\n this.noMessages = false;\r\n }\r\n else {\r\n this.noMessages = true;\r\n }\r\n\r\n //url that the user will be redirected to after paying of order via paypal\r\n this.paymentCompleteUrl = this.clientArea.PaymentDoneUrl + this.criptedOrderID;\r\n let paymentUrl = this.clientArea.PaymentDoneUrl + this.criptedOrderID;\r\n\r\n this.paymentCompleteUrl = paymentUrl.replace('{lang}', language);\r\n if (this.clientArea.NexiModel != null) {\r\n\r\n if (this.clientArea.NexiModel.url_back_dettaglioOrdine != null) {\r\n this.clientArea.NexiModel.url_back_dettaglioOrdine = this.clientArea.NexiModel.url_back_dettaglioOrdine.replace('{lang}', language);\r\n }\r\n }\r\n //getting of link for upload files on order details page\r\n for (let process of this.clientArea.ProcessingOrderList) {\r\n process.FileUploadSecuredUrl = this.sanitizer.bypassSecurityTrustResourceUrl(process.FileUploadUrl);\r\n process.PreflightUploadSecuredUrl = this.sanitizer.bypassSecurityTrustResourceUrl(process.PreflightUploadUrl);\r\n }\r\n })\r\n\r\n this.subManager.add(routeParamsSub);\r\n\r\n if (this.clientArea.TrackingUrl != '' && this.clientArea.TrackingUrl != null) {\r\n if (this.clientArea.TrackingUrl.indexOf(\"http://\") == -1 && this.clientArea.TrackingUrl.indexOf(\"https://\") == -1) {\r\n this.clientArea.TrackingUrl = \"http://\" + this.clientArea.TrackingUrl;\r\n }\r\n }\r\n\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //changing style of status bar(under detail order number) depending on multiple shipment module\r\n if (this.multipleShipmentActive == true) {\r\n $(\"#paymentStatusBar\").addClass('col-md-5').addClass('tabs-style').removeClass('col-md-3').removeClass('tabs-styleNoAfter');\r\n }\r\n else {\r\n $(\"#paymentStatusBar\").addClass('col-md-3').addClass('tabs-styleNoAfter').removeClass('col-md-5').removeClass('tabs-style');\r\n }\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.isBrowser || this.pageIsAfterViewInit) {\r\n return;\r\n }\r\n\r\n //-- If these conditions are not fulfilled, we are not gonna load paypal script, because there is no paypal payment option in the current order.\r\n if (this.clientArea.PaymentType == 'Paypal' && !this.isTipologiaPagamentoBonifico\r\n && this.clientArea.PaymentStatus == 0 && this.clientArea.StrTotalBeforeTax != '0,00' && this.clientArea.IsNewPaypalIntegration) {\r\n let userId = this.authService.GetUserId();\r\n let params = {\r\n CustomerId: userId.toString(),\r\n OrderId: orderId.toString(),\r\n Lang: this.lang,\r\n };\r\n\r\n //-- Load paypal service and render a button for paypal payment\r\n this.paypalService.loadPaypalService(this.mappings.Paypal_JS_Lirary_Url,\r\n this.mappings.Web_Api_Create_Paypal_Payment,\r\n this.mappings.Web_Api_Execute_Paypal_Payment, params, this.clientArea.PaypalButtonStyle, this.clientArea.UsePaypalProduction);\r\n }\r\n\r\n this.pageIsAfterViewInit = true;\r\n }\r\n\r\n confirmBonificoDetails() {\r\n \r\n // trim value before sending it to a server\r\n this.clientArea.BonificoTrn = this.clientArea.BonificoTrn.trim();\r\n \r\n //showing of loading panel after we get all data we need\r\n this.routesService.showPageLoader();\r\n this.clientAreaService.updateBonificoPaymentDetails(orderId, this.clientArea.BonificoCro, this.clientArea.BonificoTrn)\r\n .subscribe(x => {\r\n this.startTrnValue = this.clientArea.BonificoTrn;\r\n this.startCroValue = this.clientArea.BonificoCro;\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n this.hideBonificoModal();\r\n },\r\n err => {\r\n this.clientArea.BonificoTrn = this.startTrnValue;\r\n this.clientArea.BonificoCro = this.startCroValue;\r\n });\r\n }\r\n\r\n // validate NumeroTrn input\r\n checkNumeroTrn(inputText: any) {\r\n inputText = inputText.trim();\r\n if (inputText.length < 31) {\r\n this.numeroTrnInvalid = false;\r\n }\r\n else {\r\n this.numeroTrnInvalid = true;\r\n }\r\n }\r\n\r\n // validate NumeroCro input\r\n checkNumeroCro(inputNumber: any) {\r\n if (inputNumber < 99999999999) {\r\n this.numeroCroInvalid = false;\r\n }\r\n else {\r\n this.numeroCroInvalid = true;\r\n }\r\n }\r\n\r\n // getting uploaded files for this order and showing it inside of bonifico modal\r\n getBonificoUploadedFiles() {\r\n //showing of loading panel after we get all data we need\r\n this.routesService.showPageLoader();\r\n this.clientAreaService.getBonificoUploadedFiles(orderId).subscribe(x => {\r\n this.bonificoUploadedFiles = x;\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n })\r\n }\r\n\r\n showBonificoModal() {\r\n $(\"#bonificoModal\").modal(\"show\");\r\n }\r\n\r\n hideBonificoModal() {\r\n $(\"#bonificoModal\").modal(\"hide\");\r\n\r\n this.clientArea.BonificoTrn = this.startTrnValue;\r\n this.clientArea.BonificoCro = this.startCroValue;\r\n }\r\n\r\n //translating of header columns titles\r\n translateTableColumnTitle(columnTitle) {\r\n let translation = this.translateService.get(columnTitle)[\"value\"];\r\n return translation;\r\n }\r\n\r\n payWithPaypal() {\r\n let paypalText = \"pay_with_paypal\";\r\n let translatePaypal = this.translateService.get(paypalText)[\"value\"];\r\n let formHtml = '
' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n\r\n '' +\r\n '
';\r\n\r\n //replacing form with values from field because of security reasons - if somebody change html content\r\n let completePaypalForm = $(\"#completePaypalFormId\").html(formHtml);\r\n\r\n $('#paypalForm').submit();\r\n }\r\n\r\n payWithNexi() {\r\n let NexiForm = $(\"#completeNexiFormId\").html()\r\n let NexiText = \"pay_with_nexi\";\r\n let translateNexi = this.translateService.get(NexiText)[\"value\"];\r\n let formHtml = '
' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '' +\r\n '';\r\n if (this.clientArea.NexiModel.gruppo != null && this.clientArea.NexiModel.gruppo != \"\") {\r\n formHtml += '';\r\n }\r\n formHtml += '
' + NexiForm;\r\n // formHtml += ' ';\r\n //replacing form with values from field because of security reasons - if somebody change html content\r\n let completeNexiForm = $(\"#completeNexiFormId\").html(formHtml);\r\n\r\n $('#nexiForm').submit();\r\n }\r\n\r\n setMessagesAsRead(orderId) {\r\n let userId = this.authService.GetUserId();\r\n\r\n let params = {\r\n CustomerId: userId.toString(),\r\n OrderId: orderId.toString(),\r\n Lang: this.lang\r\n };\r\n\r\n this.messagesService.setMessagesAsRead(params);\r\n }\r\n\r\n showModal() {\r\n $(\"#confirmModal\").modal(\"show\");\r\n }\r\n\r\n hideModal() {\r\n $('#confirmModal').modal('hide');\r\n }\r\n\r\n //Canceling of orders with status in coda\r\n cancelOrders() {\r\n let userId = this.userId;\r\n\r\n let cancelOrdSub = this.clientAreaService.cancelOrders(userId, orderId)\r\n .subscribe(response => {\r\n if (response == true) {\r\n this.clientArea.Status = 4;\r\n }\r\n });\r\n\r\n this.subManager.add(cancelOrdSub);\r\n\r\n this.hideModal();\r\n }\r\n\r\n isDisabled(form) {\r\n let res: boolean = false;\r\n\r\n if (form.valid && this.model.ProcessOrder !== \"\") {\r\n return true;\r\n }\r\n\r\n else {\r\n return res;\r\n }\r\n }\r\n\r\n //sending of the message from the order details order\r\n processMessage() {\r\n this.showSpinnerClick=true;\r\n let postMessageSub = this.clientAreaService.postClientAreaSendProcessOrderMessageint(this.userId, orderId, parseInt(this.model.ProcessOrder), this.clientArea.OrderNumber, this.clientArea.UserCreated, this.model.processingSubject, this.model.Description, this.lang)\r\n .subscribe(result => {\r\n if(this.clientArea.OrderProcessMessageList==undefined||this.clientArea.OrderProcessMessageList==null)\r\n {\r\n this.clientArea.OrderProcessMessageList= [];\r\n }\r\n this.clientArea.OrderProcessMessageList.push\r\n (\r\n new ClientAreaOrderProcessMessages(), { \"CreatedBy\": this.clientArea.UserCreated, \"StringDateCreated\": result, \"Description\": this.model.Description, \"From\": 2, \"Subject\": this.model.processingSubject }\r\n )\r\n\r\n this.noMessages = false;\r\n this.checkValues = false\r\n this.model.ProcessOrder = \"\";\r\n this.model.processingSubject = \"\";\r\n this.model.Description = \"\";\r\n this.showSpinnerClick=false;\r\n\r\n });\r\n\r\n this.subManager.add(postMessageSub);\r\n }\r\n\r\n refreshProcessFiles(process) {\r\n let processFilesSub = this.clientAreaService.getProcessOrderFiles(process.Id, orderId).subscribe(result => {\r\n result.ListOfFiles.forEach(element => {\r\n if (element.Size.endsWith(\"byte\")) {\r\n element.Size = element.Size.substring(0, element.Size.length - 3);\r\n }\r\n });\r\n\r\n process.FileState = result.FileState;\r\n process.Files = result.ListOfFiles;\r\n });\r\n\r\n this.subManager.add(processFilesSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/client-area-order-details.component.ts","import { Injectable, ViewContainerRef, Compiler, NgModule, ComponentRef, ComponentFactory } from \"@angular/core\";\r\nimport { SharedModule } from \"../../shared/shared.module\";\r\nimport { CacheService } from \"./cache.service\";\r\n\r\n\r\n@Injectable()\r\nexport class ComponentHelperService {\r\n constructor(\r\n private cache: CacheService\r\n ) { }\r\n\r\n cmpRef: ComponentRef | null;\r\n compFactory: ComponentFactory | null;\r\n //Inject a component in the viewContainer\r\n injectComponent(compiler: Compiler, containterRef: ViewContainerRef, componentToInject: any) {\r\n\r\n @NgModule({\r\n imports: [SharedModule],\r\n declarations: [componentToInject]\r\n })\r\n\r\n class DynamicModule { }\r\n\r\n compiler.compileModuleAndAllComponentsAsync(DynamicModule)\r\n .then((moduleWithFactories) => {\r\n this.compFactory = moduleWithFactories.componentFactories.find(x => x.componentType === componentToInject);\r\n\r\n //from v5 - slow and brings in a lot of code. This line of code affects ram performance negatively\r\n //https://angular.io/api/core/ReflectiveInjector\r\n //const injector = ReflectiveInjector.fromResolvedProviders([], containterRef.parentInjector);\r\n\r\n //Clearing current content before injecting new one\r\n // containterRef.clear();\r\n\r\n //containterRef.createComponent(compFactory, 0, injector);\r\n this.cmpRef = containterRef.createComponent(this.compFactory, 0);\r\n\r\n compiler.clearCache();\r\n moduleWithFactories = null;\r\n });\r\n }\r\n\r\n clearMemory() {\r\n if (this.cmpRef) {\r\n this.cmpRef.destroy();\r\n }\r\n this.compFactory = null;\r\n this.cache.clearAll();\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/component-helper.service.ts","import { ScriptService } from './../../../../services/cms/script.service';\r\nimport { ValidationService } from './../../../../services/core/validation.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, EventEmitter, Output, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ClientAreaService } from \"./../../../../services/settings/client-area.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { Router } from \"@angular/router\";\r\n\r\n//Models\r\nimport { ClientAreaUserProfile } from \"./../../../../models/settings/client-area\";\r\nimport { ClientAreaUserAddress } from \"./../../../../models/settings/client-area\";\r\nimport { Register } from \"./../../../../models/cms/register\";\r\nimport { Company } from \"./../../../../models/core/company\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\nexport class ClientAreaProfileComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private clientAreaService: ClientAreaService,\r\n private router: Router,\r\n private authService: AuthService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any\r\n ) { }\r\n\r\n private authentication: any = this.authService.GetData();\r\n private userId = this.authService.GetUserId();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (!this.authService.GetData().isAuthenticated) {\r\n this.router.navigate([\"\"]);\r\n }\r\n let templateHtmlUserProfile: string;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let userProfileSub = this.clientAreaService.getUserAreaProfile(this.userId).subscribe(result => {\r\n\r\n templateHtmlUserProfile = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(templateHtmlUserProfile, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n\r\n })\r\n\r\n this.subManager.add(userProfileSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(userProfile: any, header: any) {\r\n @Component({\r\n template: userProfile.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private clientAreaService: ClientAreaService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private routesService: RoutesService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seoService: SeoService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private validationService: ValidationService,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n @Output() onCreate = new EventEmitter();\r\n\r\n model = {\r\n UserId: 0,\r\n Address: \"\",\r\n City: \"\",\r\n Prov: \"\",\r\n Cap: \"\",\r\n CompanyName: \"\",\r\n Piva: \"\",\r\n TaxCode: \"\",\r\n Name: \"\",\r\n SubName: \"\",\r\n Telephone: \"\",\r\n Mobile: \"\",\r\n CF: \"\",\r\n PecEmail: \"\",\r\n CodiceDestinatario: \"\",\r\n CurrentPassword: \"\",\r\n Password: \"\",\r\n PasswordRepeat: \"\",\r\n AddressRadio: \"\",\r\n Language: \"\",\r\n AddressNumber: \"\",\r\n DefaultAddress: 999999\r\n }\r\n\r\n modelAddAndRemoveAddress = {\r\n UserId: \"\",\r\n AddressId: \"\"\r\n }\r\n\r\n footerData: any = userProfile.footerData;\r\n headerData: any = header;\r\n\r\n private clientAreaProfile: ClientAreaUserProfile = new ClientAreaUserProfile();\r\n private addresses: ClientAreaUserAddress[] = [];\r\n private clientAddress: ClientAreaUserAddress = new ClientAreaUserAddress();\r\n private company: Company = new Company();\r\n private register: Register = new Register();\r\n private authentication: any = this.authService.GetData();\r\n private updateSuccessful: boolean;\r\n private updateFailed: boolean;\r\n private updateAddressFailed: boolean;\r\n private updateAddressSuccessful: boolean;\r\n private changePasswordSuccessful: boolean;\r\n private changePasswordFailed: boolean;\r\n private id1: number;\r\n private isExist: boolean[] = [];\r\n private index: number;\r\n private item: any;\r\n private pageIsInit: boolean = false;\r\n private userId = this.authService.GetUserId();\r\n private decryptedUserId = this.authService.GetDecryptedUserId();\r\n private user = userProfile.ClientAreaUserProfile;\r\n private userGroup: any = this.user.UserGroup;\r\n private showSpinnerClick: boolean = false;\r\n\r\n //checking if invoices module is active\r\n private isActiveInvoicesModule: boolean = userProfile.isActiveInvoicesModule;\r\n private breadcrumbs: Breadcrumbs[] = userProfile.BreadcrumbsInfo;\r\n\r\n private pageIsOnDestroy: boolean = false;\r\n private areaClientiHome: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n private areaClientiOrdini: string[] = this.routesService.getRoutePath('AREA CLIENTI - LISTA ORDINI');\r\n private areaChangeProfile: string[] = this.routesService.getRoutePath('AREA CLIENTI - DATI UTENTE - CAMBIO DATI PERSONALI');\r\n private areaClientiInvoices: string[] = this.routesService.getRoutePath('AREA CLIENTI - INVOICES');\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n this.clientAreaProfile = this.user;\r\n\r\n //spliting address street and number\r\n let address = this.clientAreaProfile.Address;\r\n let lastIndex = -1;\r\n if (address) {\r\n lastIndex = address.lastIndexOf(\" \");\r\n }\r\n let addressStreet: string = \"\";\r\n let addressNumber: string = \"\";\r\n\r\n if (lastIndex > -1) {\r\n addressStreet = address.slice(0, lastIndex);\r\n addressNumber = address.slice(lastIndex, address.length).trim();\r\n }\r\n\r\n this.model.CompanyName = this.user.CompanyName;\r\n this.model.Piva = this.user.Piva;\r\n this.model.TaxCode = this.user.TaxCode;\r\n this.model.Name = this.user.ContactFirstName;\r\n this.model.SubName = this.user.ContactLastName;\r\n this.model.Address = addressStreet;\r\n this.model.AddressNumber = addressNumber;\r\n this.model.City = this.user.City;\r\n this.model.Prov = this.user.AreaCode;\r\n this.model.Cap = this.user.ZipCode;\r\n this.model.Telephone = this.user.ContactPhone;\r\n this.model.DefaultAddress = this.user.DefaultAddressId;\r\n this.model.Mobile = this.user.ContactMobile;\r\n this.model.PecEmail = this.user.PecEmail;\r\n this.model.CodiceDestinatario = this.user.CodiceDestinatario;\r\n\r\n this.id1 = this.user.DefaultAddressId;\r\n\r\n for (var key in this.clientAreaProfile.Addresses) {\r\n this.isExist[this.clientAreaProfile.Addresses[key].AddressId] = true;\r\n }\r\n\r\n // if user group is 4, pec email and cod. destinatario are not required\r\n if (this.userGroup == 4) {\r\n\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n if (userProfile.isActiveAddressVerificationModule) {\r\n let addressVerificationKey = userProfile.AddressVerificationCode;\r\n if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n this.addAddressVerificationScripts(addressVerificationKey);\r\n $(\"#Cap\").prop('disabled', true);\r\n }\r\n }\r\n else {\r\n $(\"#Cap\").prop('disabled', false);\r\n }\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n isCodDestRequired() {\r\n let retVal = false;\r\n if (this.userGroup != \"4\") {\r\n if (this.model.PecEmail == \"\" || this.model.PecEmail == undefined) {\r\n retVal = true;\r\n }\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n isPecEmailRequired() {\r\n let retVal = false;\r\n if (this.userGroup != \"4\") {\r\n if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n retVal = true;\r\n }\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n //adding all scripts and elements connected to address verification feature \r\n addAddressVerificationScripts(addressKey: string) {\r\n let suggest = \"\";\r\n let address = \"\";\r\n let jquery = \"\";\r\n\r\n $('body > universal-script').before(suggest);\r\n $('body > universal-script').before(jquery);\r\n $('body > universal-script').before(address);\r\n }\r\n\r\n\r\n //removing all scripts and elements connected to address verification feature \r\n removeAddressVerificationScripts(addressKey: string) {\r\n $(\"#suggestId\").remove();\r\n $(\"#jqueryuicss\").remove();\r\n $(\"#jqueryuijs\").remove();\r\n $(\"#suggestcss\").remove();\r\n $(\"#initui\").remove();\r\n $(\"#inituicf\").remove();\r\n $(\"#ui-id-1\").remove();\r\n $(\"#ui-id-2\").remove();\r\n $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n\r\n $(\"#jqueryId\").remove();\r\n $(\"#addressVerificationId\").remove();\r\n }\r\n\r\n checkAddressValidation() {\r\n this.model.Prov = $(\"#Prov\").val();\r\n this.model.Cap = $(\"#Cap\").val();\r\n this.model.City = $(\"#City\").val();\r\n }\r\n\r\n //validation of phone numbers, disable writing any characters in input except of numbers\r\n validatePhone(event: any) {\r\n this.validationService.validatePhoneNumber(event);\r\n }\r\n\r\n setAddressValue() {\r\n let streetTypeId = $(\"#streetTypeId\").val();\r\n let street = $(\"#Address\").val();\r\n\r\n if (streetTypeId != null && streetTypeId != \"\") {\r\n this.model.Address = streetTypeId + \" \" + street;\r\n }\r\n else {\r\n this.model.Address = street;\r\n }\r\n\r\n let cap = $(\"#Cap\").val();\r\n this.model.Cap = cap;\r\n }\r\n\r\n changeUserProfile(valid, model) {\r\n model.UserId = this.authService.GetUserId();\r\n\r\n let street = this.model.Address;\r\n\r\n //concating of address street and number to one model field\r\n this.model.Address = this.model.Address + \" \" + this.model.AddressNumber.replace(/\\s/g, \"\");\r\n this.showSpinnerClick = true;\r\n let updateProfileSub = this.clientAreaService.updateUserProfile(model).subscribe(result => {\r\n if (result) {\r\n // show success message\r\n this.updateSuccessful = true;\r\n this.updateFailed = false;\r\n }\r\n else {\r\n // show error message\r\n this.updateSuccessful = false;\r\n this.updateFailed = true;\r\n }\r\n\r\n this.model.Address = street;\r\n this.showSpinnerClick = false;\r\n });\r\n this.subManager.add(updateProfileSub);\r\n };\r\n\r\n showModal(index, item) {\r\n $(\"#editProfileModal\").modal(\"show\");\r\n this.index = index;\r\n this.item = item;\r\n }\r\n\r\n hideModal() {\r\n $('#editProfileModal').modal('hide');\r\n }\r\n\r\n addNewAddress() {\r\n this.modelAddAndRemoveAddress.UserId = this.userId;\r\n\r\n let newAddressSub = this.clientAreaService.addNewAddress(this.modelAddAndRemoveAddress).subscribe(result => {\r\n this.clientAreaProfile.Addresses.push(result);\r\n\r\n let userProfileSub = this.clientAreaService.getUserAreaProfile(this.userId).subscribe(result => {\r\n this.clientAreaProfile = result.ClientAreaUserProfile;\r\n this.model.CompanyName = result.ClientAreaUserProfile.CompanyName;\r\n this.model.Piva = result.ClientAreaUserProfile.Piva;\r\n this.model.TaxCode = result.ClientAreaUserProfile.TaxCode;\r\n this.model.Name = result.ClientAreaUserProfile.ContactFirstName;\r\n this.model.SubName = result.ClientAreaUserProfile.ContactLastName;\r\n this.model.Address = result.ClientAreaUserProfile.Address;\r\n this.model.City = result.ClientAreaUserProfile.City;\r\n this.model.Prov = result.ClientAreaUserProfile.AreaCode;\r\n this.model.Cap = result.ClientAreaUserProfile.ZipCode;\r\n this.model.Telephone = result.ClientAreaUserProfile.ContactPhone;\r\n this.model.DefaultAddress = result.ClientAreaUserProfile.DefaultAddressId;\r\n this.model.Mobile = result.ClientAreaUserProfile.ContactMobile;\r\n this.model.PecEmail = result.ClientAreaUserProfile.PecEmail;\r\n this.model.CodiceDestinatario = result.ClientAreaUserProfile.CodiceDestinatario;\r\n this.id1 = result.ClientAreaUserProfile.DefaultAddressId;\r\n\r\n for (var key in this.clientAreaProfile.Addresses) {\r\n this.isExist[this.clientAreaProfile.Addresses[key].AddressId] = true;\r\n }\r\n });\r\n\r\n this.subManager.add(userProfileSub);\r\n });\r\n\r\n this.subManager.add(newAddressSub);\r\n }\r\n\r\n SubmitPassword(model) {\r\n model.UserId = this.userId;\r\n this.showSpinnerClick = true;\r\n let updatePassSub = this.clientAreaService.updateUserPassword(model).subscribe(result => {\r\n if (result == true) {\r\n this.changePasswordSuccessful = true;\r\n this.changePasswordFailed = false;\r\n }\r\n else {\r\n // show error message\r\n this.changePasswordSuccessful = false;\r\n this.changePasswordFailed = true;\r\n }\r\n this.showSpinnerClick = false;\r\n })\r\n\r\n this.subManager.add(updatePassSub);\r\n }\r\n\r\n setDefaultAddress(index, item) {\r\n this.clientAreaProfile.DefaultAddressId = 0;\r\n\r\n for (var address of this.clientAreaProfile.Addresses) {\r\n if (address.AddressId === this.clientAreaProfile.Addresses[index].AddressId) {\r\n this.clientAreaProfile.DefaultAddressId = address.AddressId;\r\n }\r\n\r\n this.id1 = this.clientAreaProfile.DefaultAddressId;\r\n }\r\n };\r\n\r\n resetAddress() {\r\n for (var address of this.clientAreaProfile.Addresses) {\r\n this.clientAreaProfile.DefaultAddressId = 0;\r\n this.id1 = 0;\r\n };\r\n };\r\n\r\n updateUserAddresses(model, valid, item) {\r\n this.showSpinnerClick = true;\r\n let updateAddressSub = this.clientAreaService.updateAddresses(this.clientAreaProfile.Addresses, this.userId, this.clientAreaProfile.DefaultAddressId)\r\n .subscribe(result => {\r\n let defaultFound = false;\r\n\r\n if (result) {\r\n for (var address of this.clientAreaProfile.Addresses) {\r\n if (this.clientAreaProfile.DefaultAddressId > 0) {\r\n this.clientAreaProfile.DefaultAddressId = address.AddressId;\r\n defaultFound = true;\r\n }\r\n }\r\n\r\n this.updateAddressFailed = false;\r\n this.updateAddressSuccessful = true;\r\n }\r\n else {\r\n this.updateAddressFailed = true;\r\n this.updateAddressSuccessful = false;\r\n }\r\n\r\n if (defaultFound == false) {\r\n this.clientAreaProfile.DefaultAddressId = 0;\r\n }\r\n this.showSpinnerClick = false;\r\n })\r\n\r\n this.subManager.add(updateAddressSub);\r\n };\r\n\r\n removeAddress() {\r\n this.modelAddAndRemoveAddress.UserId = this.userId;\r\n this.modelAddAndRemoveAddress.AddressId = this.item.AddressId;\r\n\r\n let removeAddressSub = this.clientAreaService.removeAddress(this.modelAddAndRemoveAddress).subscribe(result => {\r\n this.clientAreaProfile.Addresses.splice(this.index, 1);\r\n try {\r\n this.isExist[this.item.AddressId] = false;\r\n\r\n this.model.DefaultAddress = 0;\r\n this.id1 = 0;\r\n this.resetAddress();\r\n this.hideModal();\r\n }\r\n catch (exception) { }\r\n });\r\n\r\n this.subManager.add(removeAddressSub);\r\n };\r\n\r\n isDisabled(form) {\r\n let res: boolean = false;\r\n\r\n if (form.valid && this.model.Password.length >= 4 && this.model.Password.length <= 10 && this.model.Password == this.model.PasswordRepeat) {\r\n return true;\r\n }\r\n else {\r\n return res;\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n if (!this.isBrowser || this.pageIsOnDestroy) {\r\n return;\r\n }\r\n\r\n //this method is removing all scripts and elements connected to address verification feature\r\n let addressVerificationKey = userProfile.AddressVerificationCode;\r\n this.removeAddressVerificationScripts(addressVerificationKey);\r\n\r\n this.subManager.unsubscribe();\r\n this.pageIsOnDestroy = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/client-area-profile.component.ts","import { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { ActivatedRoute, Params } from \"@angular/router\";\r\nimport { LanguageService } from \"../../../../services/cms/language.service\";\r\nimport { Md5 } from 'ts-md5/dist/md5';\r\nimport { OrderPaymentService } from \"../../../../services/cms/order-payment.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: ''\r\n})\r\n\r\nexport class PaymentConfirmationComponent implements OnInit {\r\n data: any = {};\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private templateService: TemplateService,\r\n private route: ActivatedRoute,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n private paramsObj: Object = {};\r\n private isNewPaypalImplementation: boolean = false;\r\n\r\n ngOnInit() {\r\n let id = '0';\r\n let orderCheckout: any;\r\n let paramsSub = this.route.params.subscribe(params => {\r\n id = params['orderid'] || 0;\r\n });\r\n\r\n let sub = this.route\r\n .queryParams\r\n .subscribe(params => {\r\n if (id == '0') {\r\n id = params['orderId'] ? Md5.hashStr(params['orderId']).toString() : '0';\r\n this.isNewPaypalImplementation = true;\r\n }\r\n else {\r\n this.isNewPaypalImplementation = false;\r\n }\r\n\r\n this.paramsObj = params;\r\n });\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let thankYouSub = this.templateService.getThankYouPagePaypalInfo(\"orderCheckoutPageTemplate\", id).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n orderCheckout = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(orderCheckout, this.paramsObj, this.isNewPaypalImplementation, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n let typeId = '';\r\n\r\n //-- Get Payment Confirmation row id + '_' + orderId, so we can use it for getting scripts\r\n if (this.isNewPaypalImplementation) {\r\n let OrderId = this.paramsObj['orderId'];\r\n typeId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.ThankYouPagePaypalId, OrderId);\r\n }\r\n else {\r\n typeId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.ThankYouPagePaypalId, id);\r\n }\r\n\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, typeId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(paramsSub);\r\n this.subManager.add(sub);\r\n this.subManager.add(thankYouSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n //Creates component to inject\r\n private createSubComponent(orderCheckout: any, urlParams: any, isNewPaypalImplementation: boolean, header: any) {\r\n @Component({\r\n template: orderCheckout.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private routesService: RoutesService,\r\n private seoService: SeoService,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private activatedRoute: ActivatedRoute,\r\n private languageService: LanguageService,\r\n private orderPaymentService: OrderPaymentService,\r\n private route: ActivatedRoute\r\n ) { }\r\n\r\n private success: boolean = false;\r\n private failed: boolean = false;\r\n private serverError: boolean = false;\r\n private orderId: any;\r\n private seoInfo: SeoViewModel = orderCheckout.SeoInformation;\r\n private encryptedOrder: any;\r\n private hashedOrderId: any;\r\n private pageIsInit: boolean = false;\r\n\r\n subManager = new Subscription();\r\n private createScript: number = 0;\r\n\r\n footerData: any = orderCheckout.FooterData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n\r\n if (this.isBrowser == false) {\r\n return;\r\n }\r\n\r\n //-- If paypal payment is implemented on new way, at this point, the order is already set as paid, else we need to set it\r\n if (isNewPaypalImplementation) {\r\n this.orderId = urlParams['orderId'];\r\n\r\n if (urlParams.isError.toLowerCase() === 'true') {\r\n this.failed = true;\r\n this.success = false;\r\n this.serverError = false;\r\n this.createScript = -1;\r\n }\r\n else {\r\n this.failed = false;\r\n this.success = true;\r\n this.serverError = false;\r\n this.createScript = 1;\r\n }\r\n }\r\n else {\r\n let sub = this.route.queryParams.subscribe(parameters => {\r\n this.orderId = parameters['item_number'] || 0;\r\n\r\n this.hashedOrderId = Md5.hashStr(this.orderId);\r\n\r\n let paramsRouteSub = this.activatedRoute.params.subscribe((params: Params) => {\r\n this.encryptedOrder = params['orderid'] || 0;\r\n });\r\n\r\n this.subManager.add(paramsRouteSub);\r\n\r\n //Checking of order and set it as paid\r\n if (parameters['st'] == \"Completed\" && this.encryptedOrder == this.hashedOrderId) {\r\n this.setOrderAsPaid();\r\n }\r\n else {\r\n this.failed = true;\r\n this.success = false;\r\n }\r\n });\r\n }\r\n }\r\n\r\n setOrderAsPaid() {\r\n let orderPaySub = this.orderPaymentService.setOrderAsPayed(this.orderId)\r\n .subscribe(result => {\r\n if (result == 1) {\r\n this.success = true;\r\n this.failed = false;\r\n this.serverError = false;\r\n this.createScript = 1;\r\n }\r\n else if (result == -1) {\r\n this.success = false;\r\n this.failed = true;\r\n this.serverError = false;\r\n this.createScript = -1;\r\n }\r\n else {\r\n this.success = false;\r\n this.failed = false;\r\n this.serverError = true;\r\n this.createScript = -1;\r\n }\r\n })\r\n\r\n this.subManager.add(orderPaySub);\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/payment-confirmation.component.ts","import { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\n\r\n//System\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { ActivatedRoute, Params } from \"@angular/router\";\r\nimport { LanguageService } from \"../../../../services/cms/language.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: ''\r\n})\r\n\r\nexport class PaymentNexiConfirmationComponent implements OnInit {\r\n data: any = {};\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private templateService: TemplateService,\r\n private route: ActivatedRoute,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let id = 0;\r\n let messaggio = \"\";\r\n let data = \"\";\r\n let orario = \"\";\r\n\r\n let paramsSub = this.route.queryParams.subscribe(params => {\r\n id = params['orderid'];\r\n messaggio = params['messaggio'];\r\n data = params['data'];\r\n orario = params['orario'];\r\n });\r\n\r\n this.subManager.add(paramsSub);\r\n let orderCheckout: any;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let thankYouSub = this.templateService.getThankYouNexiInfo(\"ordernexiPageTemplate\", id, messaggio, data, orario).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n orderCheckout = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(orderCheckout, id,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n let typeId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.ThankYouNexiId, id);\r\n\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, typeId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(thankYouSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n //Creates component to inject\r\n private createSubComponent(orderCheckout: any, OrderId: any,header:any) {\r\n @Component({\r\n template: orderCheckout.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private routesService: RoutesService,\r\n private seoService: SeoService,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private activatedRoute: ActivatedRoute,\r\n private languageService: LanguageService,\r\n private translate: TranslateService\r\n ) { }\r\n\r\n private success: boolean = false;\r\n private errorMessage: string = \"\";\r\n private failed: boolean = false;\r\n private serverError: boolean = false;\r\n private orderId: any = OrderId;\r\n private seoInfo: SeoViewModel = orderCheckout.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n private createScript: number = 0;\r\n subManager = new Subscription();\r\n\r\n footerData: any = orderCheckout.FooterData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n\r\n if (this.isBrowser == false) {\r\n return;\r\n }\r\n\r\n if (orderCheckout.result == false) {\r\n this.success = false;\r\n this.failed = true;\r\n this.serverError = false;\r\n this.errorMessage = this.getLabel('impossibile_pagare_ordine');\r\n this.createScript = -1;\r\n }\r\n else {\r\n this.success = true;\r\n this.failed = false;\r\n this.serverError = false;\r\n this.createScript = 1;\r\n }\r\n }\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n\r\n return message;\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n //Eventually retrieving the script to append\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n return ChildComponent;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/payment-nexi-confirmation.component.ts","import { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\n\r\n//System\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { LanguageService } from \"../../../../services/cms/language.service\";\r\nimport { OrderPaymentService } from \"../../../../services/cms/order-payment.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: ''\r\n})\r\n\r\nexport class PaymentUnicreditConfirmationComponent implements OnInit {\r\n data: any = {};\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private templateService: TemplateService,\r\n private route: ActivatedRoute,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let id = 0;\r\n let paramsSub = this.route.params.subscribe(params => {\r\n id = params['orderid'];\r\n });\r\n\r\n this.subManager.add(paramsSub);\r\n\r\n let orderCheckout: any;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n //console.log(\"sono qui\")\r\n let thankYouSub = this.templateService.getThankYouPagOnlineInfo(\"orderUnicreditPageTemplate\", id).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n\r\n if (this.isBrowser) {\r\n orderCheckout = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(orderCheckout, id,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n let typeId = this.scriptService.getSystemPageRowId_OrderId(this.scriptService.ThankYouPagePagOnlineId, id);\r\n\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, typeId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(thankYouSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n //Creates component to inject\r\n private createSubComponent(orderCheckout: any, OrderId: any,header:any) {\r\n @Component({\r\n template: orderCheckout.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private routesService: RoutesService,\r\n private seoService: SeoService,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private activatedRoute: ActivatedRoute,\r\n private languageService: LanguageService,\r\n private translate: TranslateService,\r\n private orderPaymentService: OrderPaymentService\r\n ) { }\r\n\r\n private success: boolean = false;\r\n private errorMessage: string = \"\";\r\n private failed: boolean = false;\r\n private serverError: boolean = false;\r\n private orderId: any = OrderId;\r\n private seoInfo: SeoViewModel = orderCheckout.SeoInformation;\r\n private encryptedOrder: any;\r\n private hashedOrderId: any;\r\n private pageIsInit: boolean = false;\r\n private createScript: number = 0;\r\n subManager = new Subscription();\r\n\r\n footerData: any = orderCheckout.FooterData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n\r\n if (this.isBrowser == false) {\r\n return;\r\n }\r\n\r\n if (this.orderId == -1) {\r\n this.success = false;\r\n this.failed = true;\r\n this.serverError = false;\r\n this.errorMessage = this.getLabel('impossibile_pagare_ordine');\r\n this.createScript = -1;\r\n }\r\n else {\r\n //setting order as paid \r\n let checkPaymentSub = this.orderPaymentService.CheckIsOrderPayedUnicredit(this.orderId)\r\n .subscribe(result => {\r\n\r\n let res = result.split(\"|\");\r\n if (res[0] == \"1\") {\r\n this.success = true;\r\n this.failed = false;\r\n this.serverError = false;\r\n this.createScript = 1;\r\n }\r\n else if (res[0] == \"-1\") {\r\n this.success = false;\r\n this.failed = true;\r\n this.serverError = false;\r\n this.errorMessage = res[1];\r\n this.createScript = -1;\r\n }\r\n else {\r\n this.success = false;\r\n this.failed = false;\r\n this.serverError = true;\r\n this.errorMessage = res[1];\r\n this.createScript = -1;\r\n }\r\n })\r\n\r\n this.subManager.add(checkPaymentSub);\r\n }\r\n }\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n\r\n return message;\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n //Eventually retrieving the script to append\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n return ChildComponent;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/client-area/sys/payment-unicredit-confirmation.component.ts","import { UserLogin } from './../../../../models/cms/user-login';\r\nimport { ValidationService } from './../../../../services/core/validation.service';\r\nimport { LoginService } from './../../../../services/cms/login.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, Input, Compiler, Inject, ViewChild, ElementRef } from \"@angular/core\";\r\nimport { ComponentHelperService } from '../../../../services/core/component-helper.service';\r\nimport { CheckIfExistService } from \"../../../../services/cms/check-existence.service\";\r\nimport { Subscription } from \"rxjs\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { QuickRegister } from \"../../../../models/cms/register\";\r\nimport { Configuration } from '../../../../models/core/configuration';\r\nimport { LanguageService } from '../../../../services/cms/language.service';\r\nimport { ConfigurationService } from '../../../../services/core/configuration.service';\r\nimport { CompanyService } from '../../../../services/core/company.service';\r\nimport { CookieService } from '../../../../services/core/cookie';\r\nimport { AuthService } from '../../../../services/core/auth.service';\r\nimport { HeaderService } from '../../../../services/cms/header.service';\r\nimport { Company } from '../../../../models/core/company';\r\n\r\n@Component({\r\n selector: \"dy-quick-register\",\r\n template: \"\"\r\n})\r\n\r\nexport class QuickRegistrationComponent implements OnInit {\r\n\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n @Input() parentWidgetData: any;\r\n @Input() companyInfo: Company;\r\n\r\n ngOnInit() {\r\n if (!this.isBrowser)\r\n return;\r\n \r\n if (this.parentWidgetData != null) {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(this.parentWidgetData, this.companyInfo);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n }\r\n\r\n private createSubComponent(quickRegistrationData: any, companyInfo: Company) {\r\n\r\n @Component({\r\n template: quickRegistrationData.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n\r\n constructor\r\n (\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private loginService: LoginService,\r\n private checkExists: CheckIfExistService,\r\n private router: Router,\r\n private routesService: RoutesService,\r\n private activeRoute: ActivatedRoute,\r\n private languageService: LanguageService,\r\n private companyService: CompanyService,\r\n private configurationService: ConfigurationService,\r\n @Inject('CookieService') private cookie: CookieService,\r\n private validationService: ValidationService,\r\n private authService: AuthService,\r\n private headerService: HeaderService\r\n ) { }\r\n\r\n private pageIsInit: boolean = false;\r\n\r\n //-- Email controls\r\n public isEmailValid: boolean = false;\r\n public emailExists: boolean = false;\r\n\r\n //-- Partita iva controls\r\n public isPivaValid: boolean = false;\r\n public pivaExists: boolean = false;\r\n\r\n //-- Codice Fiscale controls\r\n public isCFValid: boolean = false;\r\n public CFExists: boolean = false;\r\n\r\n private isRegisterFailed: boolean;\r\n private pageFrom: string = \"\";\r\n public load: boolean = false;\r\n\r\n private subManager = new Subscription();\r\n\r\n modelRegistration = new QuickRegister();\r\n configuration: Configuration;\r\n lang: string = this.languageService.getLongLang();\r\n company: Company = companyInfo;\r\n oldGroup: string;\r\n\r\n @ViewChild('submitButton') submitButton: ElementRef;\r\n\r\n ngOnInit() {\r\n let paramsSub = this.activeRoute.params.subscribe(params => {\r\n let paramPageFrom = params['pagefrom'];\r\n\r\n if (paramPageFrom !== undefined) {\r\n this.pageFrom = paramPageFrom;\r\n }\r\n });\r\n\r\n this.subManager.add(paramsSub);\r\n\r\n //-- Get configuration from server\r\n this.setConfiguration();\r\n }\r\n\r\n finishQuickRegistration() {\r\n this.load = true;\r\n //-- After submiting form, we are disabling a button until we get a response\r\n this.submitButton.nativeElement.disabled = true;\r\n\r\n let quickRegisterUserObj = this.setQuickRegisterObject();\r\n\r\n //-- Save quick registration user info in cookies so we can reuse it later\r\n this.cookie.putObject(\"QuickRegisterUser\", quickRegisterUserObj);\r\n let isQuickRegister: boolean = true;\r\n\r\n this.cookie.put('IsQuickRegistered', isQuickRegister.toString());\r\n\r\n let sendInfoSub = this.loginService.quickRegister(this.modelRegistration)\r\n .subscribe(response => {\r\n this.load = false;\r\n this.hideModalQuickRegistration();\r\n\r\n if (response.Id_User_Dettail > 0 && response.Active) {\r\n let name = response.Name ? response.Name : response.Email;\r\n this.authService.Login(response.Id_User_Dettail, name);\r\n }\r\n\r\n if (response.IsCompletedRegistration == false) {\r\n if (response.Active) {\r\n let user = new UserLogin();\r\n user.isAuthenticated = true;\r\n user.username = response.Name ? response.Name : response.Email;\r\n\r\n //-- Call service to update header info, to set a logged in user\r\n this.headerService.setLoggedInUser(user);\r\n\r\n //-- Hide quick registration component even after user is logged in, because we want to show an additional dialog modal\r\n this.headerService.setToShowQuickRegistration(true);\r\n\r\n this.showQuickRegistrationSuccessModal();\r\n // let navigationExtras: NavigationExtras = {\r\n // queryParams: { 'quickRegistration': true }\r\n // };\r\n // this.router.navigate([this.routesService.getRoutePath('REGISTRAZIONE')[0]], navigationExtras);\r\n }\r\n }\r\n else if (this.pageFrom == \"cart\") {\r\n this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n }\r\n else {\r\n this.router.navigate(this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n }\r\n }\r\n )\r\n\r\n this.subManager.add(sendInfoSub);\r\n }\r\n\r\n setQuickRegisterObject() {\r\n let quickRegisterObj = {\r\n QuickEmailUser: this.modelRegistration.EmailRegister.trim(),\r\n QuickPartitaIva: this.modelRegistration.PartitaIva.trim(),\r\n QuickCodiceFiscale: this.modelRegistration.CodiceFiscale.trim(),\r\n QuickClientType: this.modelRegistration.CustomerGroup.trim(),\r\n QuickTelephone: this.modelRegistration.Telephone.trim(),\r\n }\r\n\r\n return quickRegisterObj;\r\n }\r\n\r\n quickRegister() {\r\n if (this.isEmailValid) {\r\n this.hideModalQuickRegistrationEmail();\r\n this.showModalQuickRegistration();\r\n }\r\n }\r\n\r\n //-- Checking after changing of focus if the email entered in form already exists in database\r\n checkEmail(form) {\r\n if (form.controls.EmailRegister.valid) {\r\n let checkEmailSub = this.checkExists.checkIfEmailExistsInDb(this.modelRegistration.EmailRegister)\r\n .subscribe(result => {\r\n if (result == 1) {\r\n this.isEmailValid = true;\r\n this.emailExists = false;\r\n }\r\n else {\r\n this.isEmailValid = false;\r\n this.emailExists = true;\r\n }\r\n })\r\n\r\n this.subManager.add(checkEmailSub);\r\n }\r\n else {\r\n this.isEmailValid = false;\r\n this.emailExists = false;\r\n }\r\n }\r\n\r\n //-- Checking after changing of focus if the partita iva entered in form already exists in database\r\n checkPiva(field) {\r\n if (field.valid) {\r\n if (!field.value || !field.value.trim())\r\n return;\r\n\r\n this.checkExists.checkIfPartitaIvaExistsInDb(this.modelRegistration.PartitaIva)\r\n .subscribe(result => {\r\n if (result == 1) {\r\n this.isPivaValid = true;\r\n this.pivaExists = false;\r\n }\r\n else {\r\n if (this.modelRegistration.CustomerGroup !== '7') {\r\n this.isPivaValid = false;\r\n this.pivaExists = true;\r\n }\r\n else {\r\n this.isPivaValid = true;\r\n this.pivaExists = false;\r\n }\r\n }\r\n })\r\n }\r\n else {\r\n if (this.modelRegistration.CustomerGroup !== '7') {\r\n this.isPivaValid = false;\r\n this.pivaExists = false;\r\n }\r\n else {\r\n this.isPivaValid = true;\r\n this.pivaExists = false;\r\n }\r\n }\r\n }\r\n\r\n //-- Checking after changing of focus if the codice fiscale entered in form already exists in database\r\n checkCF(field) {\r\n if (!field.valid) {\r\n this.isPivaValid = false;\r\n this.pivaExists = false;\r\n }\r\n\r\n //-- Check if the CF already exists only when group is privato\r\n if (this.modelRegistration.CustomerGroup === '4') {\r\n if (field.valid) {\r\n this.checkExists.checkIfCodiceFiscaleExistsInDb(this.modelRegistration.CodiceFiscale)\r\n .subscribe(result => {\r\n {\r\n if (result == 1) {\r\n this.isCFValid = true;\r\n this.CFExists = false;\r\n }\r\n else {\r\n this.isCFValid = false;\r\n this.CFExists = true;\r\n }\r\n }\r\n })\r\n }\r\n }\r\n else {\r\n this.isCFValid = true;\r\n this.CFExists = false;\r\n }\r\n }\r\n\r\n //validation of phone numbers, disable writing any characters in input except of numbers\r\n validatePhone(event: any) {\r\n this.validationService.validatePhoneNumber(event);\r\n }\r\n\r\n setConfiguration() {\r\n this.configurationService.getConfiguration(this.lang).subscribe(resultConfiguration => {\r\n let companySub = this.companyService.getCompany().subscribe(resultCompany => {\r\n {\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}').join(resultCompany.Name);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}').join(resultCompany.StreetAddress);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}').join(resultCompany.PostalCode);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}').join(resultCompany.City);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}').join(resultCompany.Province);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}').join(resultCompany.Phone);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}').join(resultCompany.Email);\r\n }\r\n }\r\n\r\n this.configuration = resultConfiguration;\r\n });\r\n\r\n this.subManager.add(companySub);\r\n });\r\n }\r\n\r\n\r\n onCustomerGroupChange(value) {\r\n this.setValuesOnCustomerGroupChange();\r\n this.modelRegistration.CustomerGroup = value;\r\n\r\n if (this.modelRegistration.CustomerGroup == '4' || this.modelRegistration.CustomerGroup == '7') {\r\n this.isPivaValid = true;\r\n }\r\n else {\r\n this.isCFValid = true;\r\n }\r\n }\r\n\r\n saveOldGroup()\r\n {\r\n this.oldGroup = this.modelRegistration.CustomerGroup;\r\n }\r\n\r\n setValuesOnCustomerGroupChange() {\r\n this.modelRegistration = new QuickRegister(this.modelRegistration.EmailRegister,\r\n this.modelRegistration.EmailRepeat,\r\n this.modelRegistration.Password,\r\n this.modelRegistration.Telephone,\r\n this.modelRegistration.CustomerGroup,\r\n this.modelRegistration.CodiceFiscale,\r\n this.modelRegistration.PartitaIva, this.oldGroup);\r\n }\r\n\r\n resetForm() {\r\n this.modelRegistration = new QuickRegister(this.modelRegistration.EmailRegister);\r\n }\r\n\r\n //-- Hiding and showing corresponding modals\r\n showModalQuickRegistration() {\r\n this.showModal('quickRegistrationModal');\r\n }\r\n\r\n hideModalQuickRegistration() {\r\n this.hideModal('quickRegistrationModal');\r\n\r\n this.modelRegistration.EmailRegister = '';\r\n this.resetForm();\r\n }\r\n\r\n showModalQuickRegistrationEmail() {\r\n this.showModal('quickRegistrationEmailModal');\r\n }\r\n\r\n showQuickRegistrationSuccessModal()\r\n {\r\n this.showModal('quickRegistrationSuccessModal');\r\n }\r\n\r\n hideQuickRegistrationSuccessModal()\r\n {\r\n this.hideModal('quickRegistrationSuccessModal');\r\n //-- Hide quick registration component\r\n this.headerService.setToShowQuickRegistration(false);\r\n }\r\n\r\n hideModalQuickRegistrationEmailAndResetEmail() {\r\n this.hideModalQuickRegistrationEmail();\r\n this.modelRegistration.EmailRegister = '';\r\n }\r\n\r\n hideModalQuickRegistrationEmail() {\r\n this.hideModal('quickRegistrationEmailModal');\r\n }\r\n\r\n showModal(modalId: string) {\r\n //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n (document.querySelector('#header') as HTMLElement).style.zIndex = '1041';\r\n $(`#${modalId}`).modal(\"show\");\r\n }\r\n\r\n hideModal(modalId: string) {\r\n //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n (document.querySelector('#header') as HTMLElement).style.zIndex = '1041';\r\n $(`#${modalId}`).modal(\"hide\");\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/quick-registration.component.ts","import { ValidationService } from './../../../../services/core/validation.service';\r\nimport { CookieService } from './../../../../services/core/cookie/cookie.service';\r\n//Angular\r\nimport { Component, OnInit, ChangeDetectionStrategy, ViewEncapsulation, OnDestroy, ViewContainerRef, Compiler, ViewChild, ElementRef, Inject, Renderer } from \"@angular/core\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { Mappings } from \"../../../../shared/mapping\";\r\n\r\n//Services\r\nimport { RegisterService } from \"./../../../../services/cms/register.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { Configuration } from \"../../../../models/core/configuration\";\r\nimport { CompanyService } from \"../../../../services/core/company.service\";\r\nimport { ConfigurationService } from \"../../../../services/core/configuration.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { Register } from \"./../../../../models/cms/register\";\r\nimport { UserType } from \"./../../../../models/cms/user-type\";\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\nimport { Subscription } from \"rxjs/Subscription\";\r\nimport { CheckIfExistService } from '../../../../services/cms/check-existence.service';\r\nimport { AuthService } from '../../../../services/core/auth.service';\r\nimport { LoginService } from '../../../../services/cms/login.service';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class RegisterComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private languageService: LanguageService,\r\n private registerService: RegisterService,\r\n private route: ActivatedRoute,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n ngOnInit() {\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let isQuickRegistration = this.route.snapshot.queryParams[\"quickRegistration\"] || false;\r\n let registerSub = this.registerService.getRegisterPageData(this.lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (this.isBrowser) {\r\n if (!result.IsActiveQuickRegistration) {\r\n isQuickRegistration = false;\r\n }\r\n\r\n //Creating subcomponent whith the register result information to inject\r\n let subComponent = this.createSubComponent(result, isQuickRegistration,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.userRegistrationId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(registerSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, isQuickRegistrationActive: boolean,header:any) {\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n\r\n class ChildComponent implements OnInit, OnDestroy {\r\n\r\n @ViewChild('submitButton') submitButton: ElementRef;\r\n\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n private registerService: RegisterService,\r\n private languageService: LanguageService,\r\n private router: Router,\r\n private mappings: Mappings,\r\n private checkExists: CheckIfExistService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n private companyService: CompanyService,\r\n private configurationService: ConfigurationService,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private _compiler: Compiler,\r\n private route: ActivatedRoute,\r\n private validationService: ValidationService,\r\n @Inject('CookieService') private cookie: CookieService,\r\n private authService: AuthService,\r\n private loginService: LoginService\r\n ) { }\r\n\r\n private isCaptchaInvalid: boolean;\r\n public verified: any;\r\n public siteKey: string = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n public theme: string = \"light\";\r\n private model: Register;\r\n private customerTypeList: Array;\r\n private isRegisterFailed: boolean;\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private emailError: boolean = false;\r\n private passwordError: boolean = false;\r\n private success: boolean = false;\r\n private load: boolean = false;\r\n private emailValid: any;\r\n private validEmail: string = \"\";\r\n private pageIsInit: boolean = false;\r\n private pageIsOnDestroy: boolean = false;\r\n private showEmailInvalid: boolean = false;\r\n private showPivaInvalid: boolean = false;\r\n private showCFInvalid: boolean = false;\r\n private subscription: Subscription;\r\n private isValidCodDest: string = \"\";\r\n private isValidPecEmail: string = \"\";\r\n private isRequiredPecEmail: boolean = true;\r\n public isQuickRegistration: boolean = isQuickRegistrationActive;\r\n public configuration: Configuration;\r\n public quickRegisteredUser: Object = null;\r\n\r\n private lang: string = this.languageService.getLongLang();\r\n\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n private registerViaFbData = this.registerService.getFacebookLoginData();\r\n private disableFbDataFields: boolean = false;\r\n\r\n private cartRoute = this.routesService.getRoutePath('CARRELLO');\r\n private homepageRoute = this.routesService.getRoutePath('HOME');\r\n private pageFrom: string = \"\";\r\n\r\n subManager = new Subscription();\r\n footerData: any = result.footerData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n let paramsSub = this.route.params.subscribe(params => {\r\n let paramPageFrom = params['pagefrom'];\r\n\r\n if (paramPageFrom !== undefined) {\r\n this.pageFrom = paramPageFrom;\r\n }\r\n });\r\n\r\n this.subManager.add(paramsSub);\r\n\r\n this.model = new Register();\r\n this.customerTypeList = result.UserTypes;\r\n\r\n this.model.CustomerGroup = \"5\";\r\n this.model.CustomerType = \"\";\r\n this.model.PecEmail = \"\";\r\n this.model.CodiceDestinatario = \"\";\r\n\r\n //-- If the user used quick registration feature, we can get it's data from the cookies\r\n if (this.isQuickRegistration) {\r\n this.quickRegisteredUser = this.cookie.getObject(\"QuickRegisterUser\");\r\n this.setModelDataFromCookies();\r\n }\r\n\r\n this.showEmailInvalid = false;\r\n\r\n if (this.registerViaFbData) {\r\n this.model.CustomerGroup = \"4\";\r\n\r\n this.setModelDataFromFb(this.registerViaFbData);\r\n }\r\n\r\n this.isCodDestRequired()\r\n this.isPecEmailRequired()\r\n\r\n this.configurationService.getConfiguration(this.lang).subscribe(resultConfiguration => {\r\n let companySub = this.companyService.getCompany().subscribe(resultCompany => {\r\n {\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_RAGIONE_SOCIALE}').join(resultCompany.Name);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_INDIRIZZO}').join(resultCompany.StreetAddress);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CAP}').join(resultCompany.PostalCode);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_CITTA}').join(resultCompany.City);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_PROVINCIA}').join(resultCompany.Province);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_TELEFONO}').join(resultCompany.Phone);\r\n }\r\n\r\n if (resultConfiguration.Privacy.indexOf('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}') > -1) {\r\n resultConfiguration.Privacy = resultConfiguration.Privacy.split('{TAG_CONFIGURAZIONE_INFO_AZIENDA_EMAIL}').join(resultCompany.Email);\r\n }\r\n }\r\n\r\n this.configuration = resultConfiguration;\r\n });\r\n\r\n this.subManager.add(companySub);\r\n });\r\n };\r\n\r\n setModelDataFromCookies() {\r\n if (!this.quickRegisteredUser)\r\n return;\r\n\r\n this.model.EmailRegister = this.quickRegisteredUser['QuickEmailUser'];\r\n this.model.EmailRepeat = this.quickRegisteredUser['QuickEmailUser'];\r\n this.model.CustomerGroup = this.quickRegisteredUser['QuickClientType'];\r\n this.model.Telephone = this.quickRegisteredUser['QuickTelephone'];\r\n\r\n let isQuickRegistered = this.cookie.get(\"IsQuickRegistered\") ? Boolean(this.cookie.get(\"IsQuickRegistered\")) : false;\r\n this.model.IsQuickRegistered = isQuickRegistered;\r\n\r\n //-- If customer group is privato or associazione, then CF was already set during registration, else Partita Iva was set\r\n if (this.model.CustomerGroup === '4' || this.model.CustomerGroup === '7') {\r\n this.model.CF = this.quickRegisteredUser['QuickCodiceFiscale'];\r\n }\r\n else {\r\n this.model.Piva = this.quickRegisteredUser['QuickPartitaIva'];\r\n }\r\n }\r\n\r\n disableFieldsFilledFromFbData() {\r\n this.disableFbDataFields = true;\r\n }\r\n\r\n setModelDataFromFb(reg: any) {\r\n this.model.Name = reg.Name;\r\n this.model.SubName = reg.SubName;\r\n this.model.EmailRegister = reg.Email;\r\n this.model.EmailRepeat = reg.Email;\r\n this.model.Password = reg.Password;\r\n this.model.PasswordRepeat = reg.Password;\r\n\r\n this.disableFieldsFilledFromFbData();\r\n }\r\n\r\n //adding all scripts and elements connected to address verification feature \r\n addAddressVerificationScripts(addressKey: string) {\r\n let suggest = \"\";\r\n let address = \"\";\r\n let jquery = \"\";\r\n\r\n $('body > universal-script').before(suggest);\r\n $('body > universal-script').before(jquery);\r\n $('body > universal-script').before(address);\r\n }\r\n\r\n //removing all scripts and elements connected to address verification feature \r\n removeAddressVerificationScripts(addressKey: string) {\r\n $(\"#suggestId\").remove();\r\n $(\"#jqueryuicss\").remove();\r\n $(\"#jqueryuijs\").remove();\r\n $(\"#suggestcss\").remove();\r\n $(\"#initui\").remove();\r\n $(\"#inituicf\").remove();\r\n $(\"#ui-id-1\").remove();\r\n $(\"#ui-id-2\").remove();\r\n $(\"div\").remove(\".ui-helper-hidden-accessible\");\r\n\r\n $(\"#jqueryId\").remove();\r\n $(\"#addressVerificationId\").remove();\r\n }\r\n\r\n checkAddressValidation() {\r\n this.model.Prov = $(\"#Prov\").val();\r\n this.model.Cap = $(\"#Cap\").val();\r\n this.model.City = $(\"#City\").val();\r\n }\r\n\r\n setAddressValue() {\r\n let streetTypeId = $(\"#streetTypeId\").val();\r\n let street = $(\"#Address\").val();\r\n\r\n if (streetTypeId != null && streetTypeId != \"\") {\r\n this.model.Address = streetTypeId + \" \" + street;\r\n }\r\n else {\r\n this.model.Address = street;\r\n }\r\n }\r\n\r\n isDisabled(form) {\r\n let res: boolean = false;\r\n\r\n if (this.disableFbDataFields) {\r\n if (form.valid && this.model.EmailRegister == this.model.EmailRepeat && this.model.Password == this.model.PasswordRepeat) {\r\n res = true;\r\n }\r\n else {\r\n res = false;\r\n }\r\n }\r\n else if (this.isQuickRegistration && this.quickRegisteredUser) {\r\n if (form.valid && this.model.EmailRegister == this.model.EmailRepeat) {\r\n res = true;\r\n }\r\n else {\r\n res = false;\r\n }\r\n }\r\n else {\r\n if (form.valid && this.model.EmailRegister == this.model.EmailRepeat && this.model.Password == this.model.PasswordRepeat\r\n && this.emailValid == true && this.showCFInvalid == false) {\r\n if (this.model.CustomerGroup != '4') {\r\n if (this.showPivaInvalid == false) {\r\n res = true;\r\n }\r\n else {\r\n res = false;\r\n }\r\n }\r\n else {\r\n res = true;\r\n }\r\n }\r\n else {\r\n res = false;\r\n }\r\n }\r\n\r\n return res;\r\n }\r\n\r\n //checking after changing of focus if the email entered in form already exists in database\r\n checkEmail(form) {\r\n let email = this.model.EmailRegister;\r\n\r\n if (form.controls.EmailRegister.valid) {\r\n if (this.disableFbDataFields == false) {\r\n let checkEmailSub = this.checkExists.checkIfEmailExistsInDb(email)\r\n\r\n .subscribe(result => {\r\n this.showEmailInvalid = false;\r\n\r\n if (result == 1) {\r\n this.emailValid = true;\r\n this.validEmail = \"ng-valid\";\r\n }\r\n else {\r\n this.emailValid = false;\r\n this.validEmail = \"ng-invalid\";\r\n this.showEmailInvalid = true;\r\n }\r\n })\r\n\r\n this.subManager.add(checkEmailSub);\r\n }\r\n\r\n }\r\n else {\r\n this.emailValid = false;\r\n this.validEmail = \"ng-invalid\";\r\n this.showEmailInvalid = false;\r\n }\r\n }\r\n\r\n //checking after changing of focus if the partita iva entered in form already exists in database\r\n checkPiva(field) {\r\n let piva = this.model.Piva;\r\n\r\n if (field.valid) {\r\n if (!field.value || !field.value.trim())\r\n return;\r\n\r\n if (this.disableFbDataFields == false) {\r\n this.checkExists.checkIfPartitaIvaExistsInDb(piva)\r\n .subscribe(result => {\r\n this.showPivaInvalid = false;\r\n\r\n if (result == 1) {\r\n this.showPivaInvalid = false;\r\n }\r\n else {\r\n if (this.model.CustomerGroup !== '7') {\r\n this.showPivaInvalid = true;\r\n }\r\n }\r\n })\r\n }\r\n\r\n }\r\n else {\r\n if (this.model.CustomerGroup !== '7') {\r\n this.showPivaInvalid = true;\r\n }\r\n }\r\n }\r\n\r\n //checking after changing of focus if the codice fiscale entered in form already exists in database\r\n checkCF(field) {\r\n let piva = this.model.CF;\r\n\r\n //-- Check if the CF already exists only when group is privato\r\n if (this.model.CustomerGroup === '4') {\r\n if (field.valid) {\r\n if (this.disableFbDataFields == false) {\r\n this.checkExists.checkIfCodiceFiscaleExistsInDb(piva)\r\n .subscribe(result => {\r\n this.showCFInvalid = false;\r\n\r\n if (result == 1) {\r\n this.showCFInvalid = false;\r\n }\r\n else {\r\n this.showCFInvalid = true;\r\n }\r\n })\r\n }\r\n\r\n }\r\n else {\r\n this.showCFInvalid = true;\r\n }\r\n }\r\n else {\r\n this.showCFInvalid = false;\r\n }\r\n }\r\n\r\n onSubmit() {\r\n //after submiting form, we are disabling a button until we get a response\r\n this.submitButton.nativeElement.disabled = true;\r\n\r\n this.load = true;\r\n this.model.Language = this.languageService.getLongLang();\r\n\r\n //converting CAP field to string\r\n this.model.Cap = this.model.Cap.toString();\r\n\r\n //concating of address street and number to one model field\r\n this.model.Address = this.model.Address + \" \" + this.model.AddressNumber.replace(/\\s/g, \"\");\r\n\r\n if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n this.model.IsCompletedRegistration = false;\r\n }\r\n\r\n let sendInfoSub = this.registerService.sendInfoRequest(this.model)\r\n .subscribe(result => {\r\n if (result[\"selected\"]) {\r\n if (this.isQuickRegistration) {\r\n let authSub = this.loginService.authentificateUser(this.model.EmailRegister, this.model.Name, this.model.Name).subscribe(response => {\r\n this.cookie.remove('QuickRegisterUser');\r\n this.cookie.remove('IsQuickRegistered');\r\n this.authService.Login(response.Id_User_Dettail, response.Name);\r\n this.navigateToCorespondingPage();\r\n });\r\n }\r\n else {\r\n this.navigateToCorespondingPage();\r\n }\r\n\r\n }\r\n else {\r\n this.emailError = false;\r\n this.passwordError = false;\r\n this.isRegisterFailed = true;\r\n this.load = false;\r\n this.success = false;\r\n }\r\n })\r\n\r\n this.subManager.add(sendInfoSub);\r\n }\r\n\r\n navigateToCorespondingPage() {\r\n if (this.pageFrom == \"cart\") {\r\n this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n }\r\n else {\r\n\r\n let registrationCompletePage: string[] = this.routesService.getRoutePath('REGISTRATION - COMPLETE')[0];\r\n this.router.navigate([registrationCompletePage]);\r\n this.emailError = false;\r\n this.passwordError = false;\r\n this.isRegisterFailed = false;\r\n this.load = false;\r\n this.success = true;\r\n }\r\n }\r\n\r\n setVerified(data) {\r\n this.isCaptchaInvalid = data;\r\n }\r\n\r\n onCustomerTypeChange(value) {\r\n this.model.CustomerType = value;\r\n }\r\n\r\n onCustomerGroupChange(value) {\r\n this.model = new Register();\r\n this.model.CustomerGroup = value;\r\n\r\n if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n this.setModelDataFromFb(this.registerViaFbData);\r\n }\r\n\r\n if(value=='4')\r\n {\r\n this.model.CodiceDestinatario=\"0000000\";\r\n }\r\n else {\r\n this.model.CodiceDestinatario=\"\";\r\n }\r\n }\r\n\r\n isCodDestRequired() {\r\n let retVal = false;\r\n //console.log(this.model.CodiceDestinatario)\r\n if (this.model.CustomerGroup != \"4\") {\r\n if (this.model.PecEmail == \"\" || this.model.PecEmail == undefined) {\r\n retVal = true;\r\n }\r\n\r\n if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n this.isRequiredPecEmail=true;\r\n }\r\n else \r\n {\r\n this.isRequiredPecEmail=false;\r\n }\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n isPecEmailRequired() {\r\n let retVal = false;\r\n if (this.model.CustomerGroup != \"4\") {\r\n if (this.model.CodiceDestinatario == \"\" || this.model.CodiceDestinatario == undefined) {\r\n retVal = true;\r\n \r\n }\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n //validation of phone numbers, disable writing any characters in input except of numbers\r\n validatePhone(event: any) {\r\n this.validationService.validatePhoneNumber(event);\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n $('.popovers').popover();\r\n\r\n if (result.isActiveAddressVerificationModule) {\r\n let addressVerificationKey = result.AddressVerificationCode;\r\n if (addressVerificationKey != null && addressVerificationKey != undefined && addressVerificationKey != \"\") {\r\n this.addAddressVerificationScripts(addressVerificationKey);\r\n $(\"#Cap\").prop('disabled', true);\r\n\r\n }\r\n }\r\n else {\r\n $(\"#Cap\").prop('disabled', false);\r\n }\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n if (!this.isBrowser || this.pageIsOnDestroy) {\r\n return;\r\n }\r\n\r\n //this method is removing all scripts and elements connected to address verification feature\r\n let addressVerificationKey = result.AddressVerificationCode;\r\n this.removeAddressVerificationScripts(addressVerificationKey);\r\n\r\n this.subManager.unsubscribe();\r\n\r\n // this.registerService.setFacebookLoginData(null);\r\n this.pageIsOnDestroy = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/register.component.ts","import { RegisterService } from './../../../../services/cms/register.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef,ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class RegistrationConfirmationPageComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private languageService: LanguageService,\r\n private registerService: RegisterService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let templateHtml: string;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let registrationDoneSub = this.registerService.getRegistrationCompletePageData().subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the result to inject\r\n let subComponent = this.createSubComponent(result,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.registrationCompletePageId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(registrationDoneSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any,header:any) {\r\n\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private seoService: SeoService,\r\n private _elementRef: ViewContainerRef,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private scriptService: ScriptService,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private registerService: RegisterService\r\n ) { }\r\n\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n\r\n //newsletter subscription\r\n private newsletterSubmitted: boolean = false;\r\n private privacySubmitted: boolean = false;\r\n private alreadySubscribed: boolean = false;\r\n private successfullySubscribed: boolean = false;\r\n private spinnerNewslatter: boolean = false;\r\n private pageIsOnDestroy: boolean = false;\r\n\r\n private registerViaFbData = this.registerService.getFacebookLoginData();\r\n private isRegisteredViaFacebook: boolean = false;\r\n \r\n footerData: any = result.footerData;\r\n headerData: any = header;\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n\r\n if (this.registerViaFbData != null && this.registerViaFbData != undefined) {\r\n this.isRegisteredViaFacebook = true;\r\n }\r\n }\r\n\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n if (!this.isBrowser || this.pageIsOnDestroy) {\r\n return;\r\n }\r\n\r\n this.registerService.setFacebookLoginData(null);\r\n\r\n this.pageIsOnDestroy = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/registration-complete.component.ts","import { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Renderer } from '@angular/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { ActivatedRoute, Params } from \"@angular/router\";\r\nimport { RegisterService } from \"../../../../services/cms/register.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { SeoService } from '../../../../services/core/seo.service';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: ''\r\n})\r\n\r\nexport class RegistrationConfirmationComponent implements OnInit {\r\n data: any = {};\r\n\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private cmsComponentService: CmsComponentService,\r\n private templateService: TemplateService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let registrationConfirmation: any;\r\n let header: any;\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let compTemplateSub = this.templateService.getComponentTemplate(\"registrationConfirmationPageTemplate\").subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (this.isBrowser) {\r\n registrationConfirmation = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(registrationConfirmation,header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(compTemplateSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n //Creates component to inject\r\n private createSubComponent(registrationConfirmation: any,header:any) {\r\n @Component({\r\n template: registrationConfirmation\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n\r\n constructor\r\n (\r\n private routesService: RoutesService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private activatedRoute: ActivatedRoute,\r\n private registerService: RegisterService\r\n ) { }\r\n\r\n private success: boolean = false;\r\n private failed: boolean = false;\r\n private active: boolean = false;\r\n private pageIsInit: boolean = false;\r\n\r\n headerData: any = header;\r\n footerData: any = registrationConfirmation.FooterData;\r\n\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (this.isBrowser == false) {\r\n return;\r\n }\r\n\r\n let paramsSub = this.activatedRoute.params.subscribe((params: Params) => {\r\n let userId = params['userid'];\r\n\r\n this.checkActivation(userId);\r\n });\r\n\r\n this.subManager.add(paramsSub);\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n }\r\n\r\n checkActivation(userId) {\r\n let confirmRegSub = this.registerService.confirmationRegistration(userId)\r\n .subscribe(response => {\r\n if (response == \"1\") {\r\n this.success = true;\r\n }\r\n else if (response == \"-1\") {\r\n this.active = true;\r\n }\r\n else {\r\n this.failed = true;\r\n }\r\n })\r\n\r\n this.subManager.add(confirmRegSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/registration-confirmation.component.ts","import { RegisterService } from './../../../../services/cms/register.service';\r\nimport { CookieService } from './../../../../services/core/cookie/cookie.service';\r\nimport { ApiService } from './../../../../services/core/api.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ChangeDetectionStrategy, ViewEncapsulation, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../shared/mapping';\r\n\r\n//Service\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { LoginService } from \"../../../../services/cms/login.service\";\r\nimport { AuthService } from \"../../../../services/core/auth.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { RecoverPasswordService } from \"../../../../services/cms/recover-password.service\";\r\nimport { CmsComponentService } from \"../../../../services/cms/cms-component.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { SeoService } from \"../../../../services/core/seo.service\";\r\nimport { Meta } from '../../../../services/core/angular2-meta';\r\nimport { HeaderService } from '../../../../services/cms/header.service';\r\n//Models\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\nimport { SeoViewModel } from \"../../../../models/core/seo\";\r\nimport { UserLogin } from './../../../../models/cms/user-login';\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class UserLoginComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private cmsService: CmsComponentService,\r\n private seo: SeoService,\r\n @Inject(DOCUMENT) private document: any,\r\n private renderer: Renderer,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n let loginData: string;\r\n let header: any;\r\n let headDataSub = this.cmsService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n // this.templateService.getComponentTemplate(\"userLoginPageTemplate\").subscribe(result =>\r\n let loginSub = this.cmsService.getLoginPageData().subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n if (this.isBrowser) {\r\n loginData = result;\r\n\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(loginData, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.loginId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n\r\n this.subManager.add(loginSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(loginData: any, header: any) {\r\n @Component({\r\n template: loginData.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private mappings: Mappings,\r\n private loginService: LoginService,\r\n private _elementRef: ViewContainerRef,\r\n private authService: AuthService,\r\n private scriptService: ScriptService,\r\n private routesService: RoutesService,\r\n private router: Router,\r\n private route: ActivatedRoute,\r\n private seoService: SeoService,\r\n private recoverPasswordService: RecoverPasswordService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private breadcrumbsService: BreadcrumbsService,\r\n private api: ApiService,\r\n @Inject('CookieService') private cookie: CookieService,\r\n private registerService: RegisterService,\r\n private headerService: HeaderService,\r\n private metaService: Meta\r\n ) {\r\n if (!this.isBrowser || this.constructorIsInit) {\r\n return;\r\n }\r\n\r\n\r\n this.constructorIsInit = true;\r\n }\r\n\r\n private breadcrumbs: Breadcrumbs[] = loginData.BreadcrumbsInfo;\r\n\r\n footerData: any = loginData.footerData;\r\n headerData: any = header;\r\n private countFb=0;\r\n private showSpinnerClick: boolean = false;\r\n private userLoginUrl: string = this.mappings.UserLoginImg_Url;\r\n private userNotActive: boolean;\r\n private userNotFound: boolean;\r\n private pageFrom: string = \"\";\r\n private emailError: boolean = false;\r\n private passwordError: boolean = false;\r\n private seoInfo: SeoViewModel = loginData.SeoInformation;\r\n private recoverPasswordFailed: boolean;\r\n private recoverPasswordSuccess: boolean;\r\n private emailErrorRecover: boolean = false;\r\n private pageIsInit: boolean = false;\r\n private constructorIsInit: boolean = false;\r\n private isActiveFacebookModule: boolean = loginData.isActiveFacebookModule;\r\n private model = {\r\n Email: \"\",\r\n Password: \"\"\r\n };\r\n\r\n private modelRecover =\r\n {\r\n Email: \"\"\r\n };\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n setTimeout(x => this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs), 1);\r\n let paramsSub = this.route.params.subscribe(params => {\r\n let paramPageFrom = params['pagefrom'];\r\n\r\n if (paramPageFrom !== undefined) {\r\n this.pageFrom = paramPageFrom;\r\n }\r\n });\r\n\r\n this.subManager.add(paramsSub);\r\n }\r\n\r\n onFacebookLoginClick() {\r\n\r\n FB.login((result: any) => {\r\n this.getUserInfoFromFb();\r\n }, { scope: 'email' });\r\n\r\n this.getUserFromFb();\r\n }\r\n\r\n getUserFromFb() {\r\n let email = this.cookie.get(\"emailFbUser\");\r\n let firstName = this.cookie.get(\"firstNameFbUser\");\r\n let lastName = this.cookie.get(\"lastNameFbUser\");\r\n if (email != undefined && firstName != undefined && lastName != undefined) {\r\n let authSub = this.loginService.authentificateUser(email, firstName, lastName).subscribe(response => {\r\n this.cookie.remove(\"emailFbUser\");\r\n this.cookie.remove(\"firstNameFbUser\");\r\n this.cookie.remove(\"lastNameFbUser\");\r\n\r\n // if(response.Active)\r\n // {\r\n this.authService.Login(response.Id_User_Dettail, response.Name);\r\n // } \r\n if (response.IsCompletedRegistration == false) {\r\n if (response.Active) {\r\n this.registerService.setFacebookLoginData(response);\r\n //update after login the header information\r\n let user = new UserLogin();\r\n user.isAuthenticated = true;\r\n user.username = response.Name ? response.Name : this.model.Email;\r\n this.headerService.setLoggedInUser(user);\r\n this.router.navigate(this.routesService.getRoutePath('REGISTRAZIONE'));\r\n }\r\n else {\r\n this.userNotActive = false;\r\n this.userNotFound = false;\r\n }\r\n }\r\n else if (this.pageFrom == \"cart\") {\r\n //update after login the header information\r\n let user = new UserLogin();\r\n user.isAuthenticated = true;\r\n user.username = response.Name ? response.Name : this.model.Email;\r\n this.headerService.setLoggedInUser(user);\r\n //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n (window as any).open(this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n }\r\n else {\r\n this.router.navigate(this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n }\r\n\r\n });\r\n\r\n this.subManager.add(authSub);\r\n }\r\n else {\r\n setTimeout(x => this.getUserFromFb(), 200);\r\n }\r\n }\r\n\r\n getUserInfoFromFb() {\r\n FB.api('/me?fields=first_name,last_name,email',\r\n function (result) {\r\n if (result && !result.error) {\r\n let email = result.email;\r\n let firstName = result.first_name;\r\n let lastName = result.last_name;\r\n document.cookie = \"emailFbUser=\" + email + \";\";\r\n document.cookie = \"firstNameFbUser=\" + firstName + \";\";\r\n document.cookie = \"lastNameFbUser=\" + lastName + \";\";\r\n } else {\r\n console.log(result.error);\r\n }\r\n }\r\n );\r\n }\r\n\r\n onSubmit(form) {\r\n if (form.valid) {\r\n this.showSpinnerClick=true;\r\n this.emailError = false;\r\n this.passwordError = false;\r\n let loginDataSub = this.loginService.sendLoginRequest(this.model.Email, this.model.Password).subscribe(result => {\r\n if (result.Id_User_Dettail > 0) {\r\n if (result.Active) {\r\n this.authService.Login(result.Id_User_Dettail, result.Name);\r\n\r\n //update after login the header information\r\n let user = new UserLogin();\r\n user.isAuthenticated = true;\r\n user.username = result.Name ? result.Name : this.model.Email;\r\n this.headerService.setLoggedInUser(user);\r\n\r\n if (this.pageFrom == \"cart\") {\r\n //this.router.navigate(this.routesService.getRoutePath('CARRELLO'));\r\n (window as any).open(this.routesService.getRoutePath('CARRELLO'), \"_self\");\r\n }\r\n\r\n else {\r\n this.router.navigate(this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE'));\r\n\r\n }\r\n }\r\n else {\r\n this.userNotActive = false;\r\n this.userNotFound = false;\r\n }\r\n }\r\n\r\n else {\r\n this.userNotActive = false;\r\n this.userNotFound = true;\r\n }\r\n this.showSpinnerClick=false;\r\n })\r\n\r\n this.subManager.add(loginDataSub);\r\n }\r\n\r\n else if (!form.valid) {\r\n if (form.form.controls.password.valid == false) {\r\n this.passwordError = true;\r\n }\r\n\r\n else if (form.form.controls.password.valid == true) {\r\n this.passwordError = false;\r\n }\r\n\r\n if (form.form.controls.email.valid == false) {\r\n this.emailError = true;\r\n }\r\n\r\n else if (form.form.controls.email.valid == true) {\r\n this.emailError = false;\r\n }\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n let fbCode = loginData.FacebookAppID;\r\n this.initFacebook(fbCode)\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n // Eventually retrieving the script to append\r\n // if (this.seoInfo.HasScripts == true) {\r\n // this.scriptService.appendLoginScript(this._elementRef.element.nativeElement);\r\n // }\r\n\r\n this.pageIsInit = true;\r\n }\r\n initFacebook(fbCode) {\r\n try {\r\n this.countFb = this.countFb + 1;\r\n FB.init({\r\n appId: fbCode,\r\n cookie: false,\r\n xfbml: false,\r\n version: 'v2.5'\r\n });\r\n } catch (e) {\r\n if (this.countFb <= 5) {\r\n setTimeout(x => this.initFacebook(fbCode), 1);\r\n }\r\n }\r\n }\r\n \r\n recoverPassword(form) {\r\n if (form.valid) {\r\n this.showSpinnerClick=true;\r\n this.emailErrorRecover = false;\r\n let recoverPassSub = this.recoverPasswordService.recoverPasswordRequest(this.modelRecover.Email).subscribe(result => {\r\n if (result.selected) {\r\n this.modelRecover.Email = \"\";\r\n\r\n this.recoverPasswordFailed = false;\r\n this.recoverPasswordSuccess = true;\r\n }\r\n else {\r\n this.recoverPasswordFailed = true;\r\n this.recoverPasswordSuccess = false;\r\n }\r\n this.showSpinnerClick=false;\r\n });\r\n\r\n this.subManager.add(recoverPassSub);\r\n }\r\n\r\n else if (!form.valid) {\r\n if (form.form.controls.email.valid == false) {\r\n this.emailErrorRecover = true;\r\n }\r\n }\r\n }\r\n\r\n\r\n ngOnDestroy() {\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/user-login.component.ts","//Angular\r\nimport { Component, OnInit,ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, Compiler, Inject, Renderer } from \"@angular/core\";\r\n\r\n//Services\r\nimport { RecoverPasswordService } from \"./../../../../services/cms/recover-password.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { SeoService } from \"./../../../../services/core/seo.service\";\r\nimport { ScriptService } from \"./../../../../services/cms/script.service\";\r\nimport { BreadcrumbsService } from '../../../../services/cms/breadcrumbs.service';\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n//Models\r\nimport { SeoViewModel } from \"./../../../../models/core/seo\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\nimport { Breadcrumbs } from '../../../../models/cms/breadcrumbs';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { DOCUMENT } from \"@angular/platform-browser\";\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n template: \"\"\r\n})\r\n\r\nexport class UserPasswordComponent implements OnInit {\r\n\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private recoverPasswordService: RecoverPasswordService,\r\n private languageService: LanguageService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private seo: SeoService,\r\n private renderer: Renderer,\r\n @Inject(DOCUMENT) private document: any,\r\n private scriptService: ScriptService\r\n ) { }\r\n\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n ngOnInit() {\r\n let header: any;\r\n \r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n header = result;\r\n let SideMenuData = this.cmsComponentService.getSideMenuData().subscribe(result1 => {\r\n if (result1.Categories) {\r\n header.Categories = result1.Categories;\r\n\r\n }\r\n });\r\n this.subManager.add(SideMenuData);\r\n });\r\n this.subManager.add(headDataSub);\r\n let recoverPassSub = this.recoverPasswordService.getRecoverPasswordData(this.lang).subscribe(result => {\r\n if (result.SeoInformation) {\r\n result.SeoInformation.ShortDescription = result.ShortDescription ? result.ShortDescription : '';\r\n result.SeoInformation.LongDescription = result.LongDescription ? result.LongDescription : '';\r\n }\r\n \r\n if (this.isBrowser) {\r\n //Creating subcomponent whith the result to inject\r\n let subComponent = this.createSubComponent(result, header);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n else {\r\n //-- Get head and body scripts\r\n this.scriptService.setupExternalScripts(result, this.scriptService.typeSystemPage, this.scriptService.userRecoverPasswordId);\r\n\r\n //-- Setting SEO data for server side rendering, so it is visible for indexers and crawlers\r\n this.seo.setSeoMetaData(this.document, this.renderer, result.SeoInformation)\r\n this.seo.generateSeoDomServerSide(this.document, this.renderer, result.SeoInformation);\r\n }\r\n });\r\n this.subManager.add(recoverPassSub);\r\n\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any,header:any) {\r\n @Component({\r\n template: result.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private recoverPasswordService: RecoverPasswordService,\r\n private seoService: SeoService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private _elementRef: ViewContainerRef,\r\n private scriptService: ScriptService,\r\n private routesService: RoutesService,\r\n private breadcrumbsService: BreadcrumbsService\r\n ) { }\r\n\r\n private recoverPasswordFailed: boolean = false;\r\n private recoverPasswordSuccess: boolean = false;\r\n private seoInfo: SeoViewModel = result.SeoInformation;\r\n private pageIsInit: boolean = false;\r\n private breadcrumbs: Breadcrumbs[] = result.BreadcrumbsInfo;\r\n private showSpinnerClick: boolean = false;\r\n footerData: any = result.footerData;\r\n headerData: any = header;\r\n \r\n\r\n\r\n private model =\r\n {\r\n Email: \"\"\r\n };\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n //this.headerData.Categories=SideMenu.Categories;\r\n this.breadcrumbsService.setBreadcrumbs(this.breadcrumbs)\r\n //setTimeout(x => , 1);\r\n }\r\n\r\n onSubmit(form) {\r\n if (form.valid) {\r\n this.showSpinnerClick=true;\r\n let recoverPassSub = this.recoverPasswordService.recoverPasswordRequest(this.model.Email).subscribe(result => {\r\n if (result.selected) {\r\n this.recoverPasswordFailed = false;\r\n this.recoverPasswordSuccess = true;\r\n }\r\n else {\r\n this.recoverPasswordFailed = true;\r\n this.recoverPasswordSuccess = false;\r\n }\r\n this.showSpinnerClick=false;\r\n });\r\n\r\n this.subManager.add(recoverPassSub);\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Set title, setup google analytics and other libraries \r\n this.scriptService.setGoogleScripts(this.seoInfo);\r\n\r\n //hiding of loading panel after we get all data we need\r\n this.routesService.hidePageLoader();\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/user-password.component.ts","import { Injectable } from '@angular/core';\r\nimport { Router, ActivatedRoute } from \"@angular/router\";\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { RoutesService } from \"./routes.service\";\r\n\r\n\r\n@Injectable()\r\nexport class BootboxService {\r\n\r\n constructor(private translate: TranslateService,\r\n private router: Router,\r\n private routesService: RoutesService,\r\n private activatedRoute: ActivatedRoute) {\r\n }\r\n\r\n i18nAlert(key: string, val: string = '') {\r\n\r\n let mex = this.getLabel(key);\r\n if (val == '') {\r\n let procededToBuy = this.getLabel('continua_gli_acqisti');\r\n let goToCart = this.getLabel('header_two_cart_button_go_cart');\r\n\r\n let res: boolean;\r\n let bot = this;\r\n\r\n bootbox.dialog({\r\n message: mex,\r\n backdrop: true,\r\n buttons: {\r\n confirm: {\r\n label: procededToBuy\r\n },\r\n cancel: {\r\n label: goToCart,\r\n callback: function () {\r\n bot.navigateToCart();\r\n },\r\n className: 'btn btn-primary'\r\n \r\n }\r\n }\r\n });\r\n }\r\n else {\r\n bootbox.alert({\r\n message: mex,\r\n backdrop: true,\r\n });\r\n }\r\n\r\n }\r\n\r\n navigateToCart() {\r\n var Url = this.routesService.getRoutePath('CARRELLO')[0];\r\n //this.router.navigate([Url]);\r\n (window as any).open(Url, \"_self\");\r\n }\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n return message;\r\n }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/bootbox.service.ts","import { SeoViewModel } from \"../core/seo\";\r\nexport class News {\r\n Id: number;\r\n Title: string;\r\n Text: string;\r\n TemplateUrl: string;\r\n Description: string;\r\n ImageUrl: string;\r\n Date: Date;\r\n FormattedDate: string;\r\n SeoUrl: string;\r\n RouterLink: any[];\r\n Lang: string;\r\n IdRow: number;\r\n IdCategory: number;\r\n Name_Category: string;\r\n CategoryRouterLink: string;\r\n ImageHeader: string;\r\n}\r\n\r\nexport class NewsDetails {\r\n Id: number;\r\n Title: string;\r\n LongDescription: string;\r\n HeaderImage: string;\r\n Date: Date;\r\n FormattedDate: string;\r\n TemplateUrl: string;\r\n TemplateHtml: string;\r\n Author: string;\r\n SliderImages: SliderViewModel[];\r\n SeoInformation: SeoViewModel;\r\n Lang: string;\r\n SeoUrl: string;\r\n RouterLink: any[];\r\n ArticleCategories: Array;\r\n BreadcrumbsInfo:any;\r\n UrlRedirect: string=\"\";\r\n FooterData: any;\r\n HeaderData: any;\r\n}\r\n\r\nexport class SliderViewModel {\r\n SliderUrl: string;\r\n}\r\nexport class ArticleCategory {\r\n Name: string;\r\n Id: number;\r\n DefaultValue: number;\r\n Code_Category: string;\r\n CategorySystem: boolean;\r\n ShowCategory: boolean;\r\n SeoUrl: string;\r\n HeaderImage: string;\r\n ShortDescription: string;\r\n LongDescription: string;\r\n RouterLink: any[];\r\n TemplateUrl: string;\r\n TemplateHtml: string;\r\n Lang: string;\r\n Image: string;\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/cms/news-list.ts","//Angular\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings} from '../../shared/mapping'\r\nimport { AuthService } from '../core/auth.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\n\r\n\r\n@Injectable()\r\nexport class CmsContentService \r\n{\r\n constructor\r\n (\r\n public _api: ApiService, \r\n public _cache: CacheService, \r\n private authService: AuthService,\r\n private mappings: Mappings,\r\n private ShoppingCartService: ShoppingCartService\r\n\r\n ) {}\r\n\r\n //whatever domain/feature method name\r\n\r\n // public Web_Api_Menu_GetCmsPageById = this.Web_Api_Base_Url + \"/menu/getcmsmenu/{customerid}/{lang}/{id}/{cartid}\";\r\n getCmsPageById(lang:string, pageId: string) \r\n {\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.ShoppingCartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Menu_GetCmsPageById\r\n .replace('{customerid}',customerId)\r\n .replace('{lang}',lang)\r\n .replace('{id}',pageId)\r\n .replace('{cartid}', cartId);\r\n\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n // public Web_Api_Menu_GetCmsPageByUrl = this.Web_Api_Base_Url + \"/menu/getcmspagebyurl/{customerid}/{lang}/{cartid}/{url}\";\r\n\r\n getCmsPageByUrl(lang:string, pageUrl: string) \r\n {\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.ShoppingCartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Menu_GetCmsPageByUrl\r\n .replace('{customerid}',customerId)\r\n .replace('{lang}',lang)\r\n .replace('{url}',pageUrl)\r\n .replace('{cartid}', cartId);\r\n\r\n\r\n return this._api.get(url);\r\n } \r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/cms-content.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings} from '../../shared/mapping';\r\nimport { Menu } from \"./../../models/cms/menu\";\r\n\r\n@Injectable()\r\nexport class CmsMenuListService \r\n{\r\n constructor\r\n (\r\n public _api: ApiService, \r\n public _cache: CacheService,\r\n private mappings: Mappings\r\n ) {}\r\n\r\n private setPageUrl(menus) \r\n {\r\n for (let index in menus) \r\n {\r\n if (menus[index].SeoUrl != undefined &&\r\n menus[index].SeoUrl != null &&\r\n menus[index].SeoUrl != \"\") {\r\n menus[index].Url = \"/\" + menus[index].SeoUrl;\r\n } \r\n else \r\n {\r\n menus[index].Url = '/cms/' + menus[index].Id;\r\n }\r\n\r\n if (menus[index].Children !== undefined && menus[index].Children.length > 0) \r\n {\r\n this.setPageUrl(menus[index].Children);\r\n }\r\n }\r\n }\r\n\r\n LoadData(pageId: string, lang: string) \r\n {\r\n let url = this.mappings.Web_Api_Get_Cms_Menu_List\r\n .replace('{id}',pageId)\r\n .replace('{lang}',lang);\r\n let key = url;\r\n\r\n return this._api.get(url)\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/cms-menu-list.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { News } from \"./../../models/cms/news-list\";\r\nimport { AuthService } from '../core/auth.service';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\n\r\n\r\n@Injectable()\r\nexport class FaqListService \r\n{\r\n constructor\r\n (\r\n public _api: ApiService, \r\n public _cache: CacheService,\r\n private mappings: Mappings,\r\n private ShoppingCartService: ShoppingCartService,\r\n private authService: AuthService,\r\n\r\n ) {}\r\n\r\n getFaqData(lang: string) \r\n {\r\n let userid = this.authService.GetUserId();\r\n let cartId = this.ShoppingCartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_FaqData\r\n .replace('{lang}', lang)\r\n .replace('{userid}',userid)\r\n .replace('{cartid}', cartId);\r\n \r\n return this._api.get(url);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/faq.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { InfoRequest } from \"./../../models/cms/info-request\";\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from '../core/auth.service';\r\n\r\n@Injectable()\r\nexport class InfoRequestService \r\n{\r\n constructor\r\n (\r\n public _api: ApiService, \r\n public _cache: CacheService,\r\n private mappings: Mappings,\r\n private cartService: ShoppingCartService,\r\n private authService: AuthService,\r\n ) {}\r\n\r\n sendInfoRequest(parameters: InfoRequest) \r\n {\r\n return this._api.post(this.mappings.Web_Api_Post_Send_Info_Request, parameters)\r\n .do(result => result)\r\n .share();\r\n }\r\n\r\n\r\n getInfoRequestData(lang: string) \r\n {\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Info_Request_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}',customerId)\r\n .replace('{cartid}', cartId);\r\n return this._api.get(url);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/info-request.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings} from '../../shared/mapping';\r\nimport { SliderViewModel } from \"./../../models/cms/cms-page\";\r\n\r\n@Injectable()\r\nexport class SliderService \r\n{\r\n constructor\r\n (\r\n public _api: ApiService, \r\n public _cache: CacheService,\r\n private mappings: Mappings\r\n ) {}\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/slider.service.ts","import { Injectable } from '@angular/core';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { LanguageService } from './language.service';\r\n\r\n@Injectable()\r\nexport class TrustpilotService {\r\n constructor\r\n (\r\n public _api: ApiService,\r\n public _cache: CacheService,\r\n private mappings: Mappings,\r\n private languageService: LanguageService\r\n ) { }\r\n\r\n\r\n getTrustpilotData(type: string) {\r\n let lang = this.languageService.getLongLang();\r\n let url = this.mappings.Web_Api_Get_Trustpilot_Data.replace('{type}', type).replace('{lang}', lang);\r\n\r\n return this._api.get(url);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/trustpilot.service.ts","import { Injectable } from '@angular/core';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from './auth.service';\r\n\r\n@Injectable()\r\nexport class CookiePolicyService {\r\n\r\n constructor(\r\n public _api: ApiService,\r\n private mappings: Mappings,\r\n public ShoppingCartService: ShoppingCartService,\r\n private authService: AuthService) {\r\n }\r\n\r\n getCookiePolicyData(lang: string) {\r\n\r\n let cartId = this.ShoppingCartService.getCartId();\r\n let userId = this.authService.getCurrentUserId();\r\n\r\n let url = this.mappings.Web_Api_Get_Cookie_Policy_Data\r\n .replace('{lang}', lang)\r\n .replace('{cartid}', cartId)\r\n .replace('{userid}', userId);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cookie-policy.service.ts","import { CookieOptionsArgs } from './cookie-options-args';\r\n\r\nexport class CookieOptions {\r\n public path: string;\r\n public domain: string;\r\n public expires: string|Date;\r\n public secure: boolean;\r\n\r\n constructor({path, domain, expires, secure}: CookieOptionsArgs = {}) {\r\n this.path = this.isPresent(path) ? path : null;\r\n this.domain = this.isPresent(domain) ? domain : null;\r\n this.expires = this.isPresent(expires) ? expires : null;\r\n this.secure = this.isPresent(secure) ? secure : false;\r\n }\r\n\r\n public merge(options?: CookieOptionsArgs): CookieOptions {\r\n return new CookieOptions({\r\n path: this.isPresent(options) && this.isPresent(options.path) ? options.path : this.path,\r\n domain: this.isPresent(options) && this.isPresent(options.domain) ? options.domain : this.domain,\r\n expires: this.isPresent(options) && this.isPresent(options.expires) ? options.expires : this.expires,\r\n secure: this.isPresent(options) && this.isPresent(options.secure) ? options.secure : this.secure,\r\n });\r\n }\r\n\r\n private isPresent(obj: any): boolean {\r\n return obj !== undefined && obj !== null;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cookie/cookie-options.ts","import { Injectable } from '@angular/core';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from './auth.service';\r\n\r\n@Injectable()\r\nexport class PrivacyPolicyService {\r\n\r\n constructor(\r\n public _api: ApiService,\r\n private mappings: Mappings,\r\n private cartService: ShoppingCartService,\r\n private authService: AuthService,) {\r\n }\r\n\r\n getPrivacyPolicyData(lang: string) {\r\n \r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Privacy_Policy_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}',customerId)\r\n \t .replace('{cartid}', cartId);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/privacy-policy.service.ts","import { Injectable } from '@angular/core';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { ShoppingCartService } from '../inventory/shopping-cart.service';\r\nimport { AuthService } from './auth.service';\r\n\r\n@Injectable()\r\nexport class PurchaseConditionService {\r\n\r\n constructor(\r\n public _api: ApiService,\r\n private mappings: Mappings,\r\n private cartService: ShoppingCartService,\r\n private authService: AuthService,) {\r\n }\r\n\r\n getPurchaseConditionServiceData(lang: string) {\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Purchase_Condition_Data\r\n .replace('{lang}', lang)\r\n .replace('{userid}',customerId)\r\n \t .replace('{cartid}', cartId);;\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/purchase-condition.service.ts","//Angular\r\nimport { Component, Injectable } from \"@angular/core\";\r\n\r\n//Components\r\nimport { HomeComponent } from \"../../components/cms/homepage/sys/home.component\";\r\nimport { FaqComponent } from \"../../components/cms/page/sys/faq.component\";\r\nimport { CookiePolicyComponent } from \"../../components/cms/page/sys/cookie-policy.component\";\r\nimport { PrivacyPolicyComponent } from \"../../components/cms/page/sys/privacy-policy.component\";\r\nimport { PurchaseConditionComponent } from \"../../components/cms/page/sys/purchase-condition.component\";\r\nimport { InfoRequestComponent } from \"../../components/cms/page/sys/info-request.component\";\r\nimport { UserLoginComponent } from \"../../components/settings/user/sys/user-login.component\";\r\nimport { UserPasswordComponent } from \"../../components/settings/user/sys/user-password.component\";\r\nimport { RegisterComponent } from \"../../components/settings/user/sys/register.component\";\r\nimport { CmsPageComponent } from \"../../components/cms/page/sys/cms-page.component\";\r\nimport { CategoryComponent } from \"../../components/inventory/category/sys/category.component\";\r\nimport { ProductDetailsComponent } from \"../../components/inventory/product/sys/product-details.component\";\r\nimport { ProductPageListComponent } from \"../../components/inventory/product/sys/product-page-list.component\";\r\nimport { PromotionsComponent } from \"../../components/inventory/product/sys/promotions.component\";\r\nimport { ArticleComponent } from \"../../components/cms/article/sys/news-page.component\";\r\nimport { OtherProductComponent } from \"../../components/inventory/product/sys/other-product.component\";\r\nimport { BlogPageComponent } from \"../../components/cms/article/sys/blog-page.component\";\r\nimport { ArticleCategoryComponent } from \"../../components/cms/article/sys/article-category.component\";\r\nimport { ClientAreaHomeComponent } from \"../../components/settings/client-area/sys/client-area-home.component\";\r\nimport { ClientAreaOrderListComponent } from \"../../components/document/sys/client-area-order-list.component\";\r\nimport { ClientAreaProfileComponent } from \"../../components/settings/client-area/sys/client-area-profile.component\";\r\nimport { CartComponent } from \"../../components/inventory/shopping-cart/sys/cart.component\";\r\nimport { CartCashComponent } from \"../../components/inventory/shopping-cart/sys/cart-cash.component\";\r\nimport { CartSubmittedComponent } from \"../../components/inventory/shopping-cart/sys/cart-submitted.component\";\r\nimport { CartEmptyPageComponent } from \"../../components/core/sys/cart-empty-page.component\";\r\nimport { ClientAreaOrderDetailsComponent } from '../../components/settings/client-area/sys/client-area-order-details.component';\r\nimport { RoutesService } from \"../../services/core/routes.service\";\r\nimport { RegistrationConfirmationComponent } from \"../../components/settings/user/sys/registration-confirmation.component\";\r\nimport { OfflinePageComponent } from \"../../components/core/sys/offline-page.component\";\r\nimport { PaymentConfirmationComponent } from \"../../components/settings/client-area/sys/payment-confirmation.component\";\r\nimport { PaymentUnicreditConfirmationComponent } from \"../../components/settings/client-area/sys/payment-unicredit-confirmation.component\";\r\nimport { PaymentNexiConfirmationComponent } from \"../../components/settings/client-area/sys/payment-nexi-confirmation.component\";\r\nimport { NotFoundPageComponent } from \"../../components/core/sys/not-found-page.component\";\r\nimport { SearchComponent } from \"../../components/cms/header/widget/search.component\";\r\nimport { ClientAreaInvoicesComponent } from \"../../components/settings/client-area/sys/client-area-invoices.component\";\r\nimport { NewsletterConfirmationPageComponent } from './../../components/cms/page/sys/newsletter-confirmation-page.component';\r\nimport { NewsletterPageComponent } from './../../components/cms/page/sys/newsletter-page.component';\r\nimport { RegistrationConfirmationPageComponent } from './../../components/settings/user/sys/registration-complete.component';\r\nimport { QuickRegistrationComponent } from \"../../components/settings/user/sys/quick-registration.component\";\r\n\r\n@Injectable()\r\nexport class SysConfig {\r\n\r\n constructor() {\r\n } \r\n\r\n static getComponentByName(componentName) {\r\n let component: any;\r\n\r\n switch (componentName) {\r\n case 'HomeComponent': component = HomeComponent; break;\r\n case 'FaqComponent': component = FaqComponent; break;\r\n case 'ClientAreaHomeComponent': component = ClientAreaHomeComponent; break;\r\n case 'PrivacyPolicyComponent': component = PrivacyPolicyComponent; break;\r\n case 'CookiePolicyComponent': component = CookiePolicyComponent; break;\r\n case 'PurchaseConditionComponent': component = PurchaseConditionComponent; break;\r\n case 'InfoRequestComponent': component = InfoRequestComponent; break;\r\n case 'UserLoginComponent': component = UserLoginComponent; break;\r\n case 'UserPasswordComponent': component = UserPasswordComponent; break;\r\n case 'RegisterComponent': component = RegisterComponent; break;\r\n case 'CmsPageComponent': component = CmsPageComponent; break;\r\n case 'CategoryComponent': component = CategoryComponent; break;\r\n case 'ProductDetailsComponent': component = ProductDetailsComponent; break;\r\n case 'ProductPageListComponent': component = ProductPageListComponent; break;\r\n case 'PromotionsComponent': component = PromotionsComponent; break;\r\n case 'ArticleComponent': component = ArticleComponent; break;\r\n case 'OtherProductComponent': component = OtherProductComponent; break;\r\n case 'BlogPageComponent': component = BlogPageComponent; break;\r\n case 'ArticleCategoryComponent': component = ArticleCategoryComponent; break;\r\n case 'ClientAreaOrderListComponent': component = ClientAreaOrderListComponent; break;\r\n case 'ClientAreaInvoicesComponent': component = ClientAreaInvoicesComponent; break; \r\n case 'ClientAreaProfileComponent': component = ClientAreaProfileComponent; break;\r\n case 'CartComponent': component = CartComponent; break;\r\n case 'CartCashComponent': component = CartCashComponent; break;\r\n case 'CartSubmittedComponent': component = CartSubmittedComponent; break;\r\n case 'CartEmptyPageComponent': component = CartEmptyPageComponent; break;\r\n case 'ClientAreaOrderDetailsComponent': component = ClientAreaOrderDetailsComponent; break;\r\n case 'RegistrationConfirmationComponent': component = RegistrationConfirmationComponent; break;\r\n case 'PaymentConfirmationComponent' : component = PaymentConfirmationComponent; break;\r\n case 'PaymentUnicreditConfirmationComponent' : component = PaymentUnicreditConfirmationComponent; break;\r\n case 'PaymentNexiConfirmationComponent' : component = PaymentNexiConfirmationComponent; break;\r\n case 'OfflinePageComponent': component = OfflinePageComponent; break;\r\n case \"NotFoundPageComponent\": component = NotFoundPageComponent; break;\r\n case \"SearchComponent\": component = SearchComponent; break;\r\n case \"NewsletterPageComponent\": component = NewsletterPageComponent; break;\r\n case \"NewsletterConfirmationPageComponent\": component = NewsletterConfirmationPageComponent; break; \r\n case \"RegistrationConfirmationPageComponent\": component = RegistrationConfirmationPageComponent; break; \r\n case \"QuickRegistrationComponent\": component = QuickRegistrationComponent; break; \r\n default:\r\n component = null;\r\n }\r\n return component;\r\n }\r\n\r\n\r\n static getAllComponents() {\r\n return [\r\n HomeComponent,\r\n FaqComponent,\r\n ClientAreaHomeComponent,\r\n PrivacyPolicyComponent,\r\n CookiePolicyComponent,\r\n PurchaseConditionComponent,\r\n InfoRequestComponent,\r\n UserLoginComponent,\r\n UserPasswordComponent,\r\n RegisterComponent,\r\n CmsPageComponent,\r\n CategoryComponent,\r\n ProductDetailsComponent,\r\n ProductPageListComponent,\r\n PromotionsComponent,\r\n ArticleComponent,\r\n OtherProductComponent,\r\n BlogPageComponent,\r\n ArticleCategoryComponent,\r\n ClientAreaOrderListComponent,\r\n ClientAreaInvoicesComponent,\r\n ClientAreaProfileComponent,\r\n CartComponent,\r\n CartCashComponent,\r\n CartSubmittedComponent,\r\n CartEmptyPageComponent,\r\n ClientAreaOrderDetailsComponent,\r\n RegistrationConfirmationComponent,\r\n PaymentConfirmationComponent,\r\n PaymentUnicreditConfirmationComponent,\r\n PaymentNexiConfirmationComponent,\r\n OfflinePageComponent,\r\n NotFoundPageComponent,\r\n SearchComponent,\r\n NewsletterPageComponent,\r\n NewsletterConfirmationPageComponent,\r\n RegistrationConfirmationPageComponent,\r\n QuickRegistrationComponent\r\n ];\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/system-configuration.service.ts","import { CryptoService } from './../core/crypto.service';\r\nimport { Injectable } from '@angular/core';\r\nimport { ApiService } from '../core/api.service';\r\nimport { PlatformLocation } from '@angular/common'\r\nimport { Subject } from 'rxjs';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { Http, Headers, RequestOptionsArgs} from '@angular/http';\r\n\r\ndeclare var CustomersCanvas: any;\r\n\r\n@Injectable()\r\nexport class CustomersCanvasService {\r\n constructor\r\n (\r\n public _api: ApiService,\r\n private location: PlatformLocation,\r\n private mappings: Mappings,\r\n private http: Http,\r\n private cryptoService: CryptoService\r\n ) {\r\n }\r\n\r\n // Observable string sources\r\n private isCanvasModalOpenedSource = new Subject();\r\n private isCanvasProductDesignApprovedSource = new Subject();\r\n // Observable string streams\r\n isCanvasModalOpened$ = this.isCanvasModalOpenedSource.asObservable();\r\n isCanvasProductDesignApproved$ = this.isCanvasProductDesignApprovedSource.asObservable();\r\n\r\n public toShowCanvasContainer = false;\r\n\r\n //Object containing data generated by getProofImages.\r\n approveData = null;\r\n //Object containing data generated by finishProductDesign.\r\n renderData = null;\r\n //Object containing data generated by saveProduct.\r\n saveData = null;\r\n editor = null;\r\n loadData = null;\r\n currentPage = \"design\";\r\n workflowPages = {};\r\n documentLinks: string[] = [\"\"];\r\n\r\n // Service canvas state / if it is opened or closed \r\n setCanvasState(isOpened: boolean) {\r\n this.isCanvasModalOpenedSource.next(isOpened);\r\n }\r\n\r\n // Service canvas state / if product design is approved or not\r\n setCanvasProductDesignState(isApproved: boolean) {\r\n this.isCanvasProductDesignApprovedSource.next(isApproved);\r\n }\r\n\r\n //load a script and after it is loaded, instantiate an canvas iframe\r\n public openCanvasEditor(canvasInfo: any, isStateId: boolean) {\r\n const canvasUrl = this.cryptoService.decryptString(canvasInfo.CanvasUrl);\r\n\r\n if (canvasUrl != \"\") {\r\n const canvasScript = document.querySelector('script[src=\\\"' + canvasUrl + '\\\"]');\r\n // set canvas state as opened, so inside of components we know when to stick and when unstick some divs\r\n this.setCanvasState(true);\r\n\r\n // if script is already loaded, don't append it again\r\n if (canvasScript == null) {\r\n let node = document.createElement('script');\r\n node.src = canvasUrl;\r\n node.setAttribute(\"id\", \"CcIframeApiScript\");\r\n node.type = 'text/javascript';\r\n node.async = true;\r\n node.charset = 'utf-8';\r\n\r\n // to display canvas container\r\n this.toShowCanvasContainer = true;\r\n\r\n // after script is loaded, instantiate canvas iframe\r\n node.onload = () => {\r\n this.instanciateIframe(canvasInfo, isStateId);\r\n };\r\n\r\n document.getElementsByTagName('head')[0].appendChild(node);\r\n }\r\n else {\r\n this.instanciateIframe(canvasInfo, isStateId);\r\n }\r\n }\r\n }\r\n\r\n public instanciateIframe(canvasInfo: any, isStateId: boolean) {\r\n const templateImagesFolderPath = canvasInfo.TemplateImagesFolderPath;\r\n const canvasUserUsername = canvasInfo.CustomerCanvasUserName;\r\n const watermark = canvasInfo.Watermark;\r\n \r\n // defining product folder path\r\n let productDefinition;\r\n if (isStateId) {\r\n // getting design by state id\r\n productDefinition = canvasInfo.CanvasStateId;\r\n }\r\n else {\r\n productDefinition = { surfaces: templateImagesFolderPath }\r\n }\r\n\r\n // const productDefinition = { surfaces: { designFolder: productFolderPath } };\r\n const editorFrame = document.getElementById(\"editorFrame\");\r\n\r\n const configuration = {\r\n userId: canvasUserUsername,\r\n initialMode: \"Advanced\",\r\n watermark: {\r\n text: {\r\n text: watermark,\r\n opacity: 0.3\r\n }\r\n },\r\n widgets:\r\n {\r\n // To disable a download button when the project is in the production\r\n FinishButton: { mode: \"Disabled\" },\r\n GalleryDialog: {\r\n defaultTabName: \"User\",\r\n tabs: [\r\n {\r\n name: \"User\",\r\n type: \"user\",\r\n translationKey: \"GalleryDialog.TAB_USER\",\r\n canEdit: true,\r\n canUpload: true\r\n },\r\n {\r\n name: \"Public\",\r\n type: \"public\",\r\n subFolderName: \"\",\r\n translationKey: \"GalleryDialog.TAB_PUBLIC\",\r\n canEdit: false\r\n }\r\n ]\r\n }\r\n }\r\n };\r\n\r\n CustomersCanvas.IframeApi.loadEditor(editorFrame, productDefinition, configuration)\r\n .then(e => {\r\n this.editor = e;\r\n }\r\n )\r\n //If there was an error thrown when loading the editor.\r\n .catch(error => {\r\n if (error != null) {\r\n this.loadData = this.handleError(error, \"Load failed with exception: \");\r\n }\r\n });\r\n }\r\n\r\n saveCanvasProduct() {\r\n this.editor.saveProduct()\r\n //If the product has been successfully saved.\r\n .then(result => {\r\n //Saving the product state info.\r\n this.saveData = result;\r\n })\r\n //If there was an error thrown when saving the product.\r\n .catch(error => {\r\n this.saveData = this.handleError(error, \"Save failed with exception: \");\r\n });\r\n }\r\n\r\n getImagesLinks(editorPage, approvePage, finishOrderPage) {\r\n this.workflowPages = {\r\n \"design\": { elements: editorPage },\r\n \"approve\": { elements: approvePage },\r\n \"finish\": { elements: finishOrderPage }\r\n }\r\n this.documentLinks = [];\r\n\r\n if (this.editor) {\r\n this.editor.getProofImages()\r\n //If proof images have been successfully received.\r\n .then(result => {\r\n //Saving proof images info.\r\n this.approveData = result;\r\n // add all links to images to the documentLinks, because we will use that list for element manipulation later\r\n if (this.approveData.proofImageUrls) {\r\n this.approveData.proofImageUrls.forEach(element => {\r\n if (element.length > 0) {\r\n this.documentLinks.push(element[0]);\r\n }\r\n });\r\n }\r\n\r\n //Go to the approval page.\r\n this.setupPage(\"approve\");\r\n this.setBackgroundImagesUrl();\r\n })\r\n //If there was an error thrown while getting the proof images.\r\n .catch(error => {\r\n this.approveData = this.handleError(error, \"Getting proof images failed with exception: \");\r\n });\r\n }\r\n }\r\n\r\n //img tags inside of slider are later changed to be divs with background image url property, so we need to manage that\r\n setBackgroundImagesUrl() {\r\n let sliderImageElements = $(\".tp-bgimg.defaultimg\");\r\n\r\n // because we can't use *ngFor to create as many elements as we need, we need to remove one li element if there is actually only one element we get from customer canvas(we have 2 elements in html)\r\n if (sliderImageElements.length > this.documentLinks.length) {\r\n let differenceItems = sliderImageElements.length - this.documentLinks.length;\r\n for (let index = 1; index <= differenceItems; index++) {\r\n const element = sliderImageElements[sliderImageElements.length - index];\r\n //remove li parent of element we found\r\n const parentLi = $(element).parents(\"li\");\r\n $(parentLi)[0].remove();\r\n }\r\n }\r\n\r\n //because we can't use angular binding with slider plugin (plugin is initialized before service), we need to set url and src attributes of each slide\r\n if (this.documentLinks && this.documentLinks.length > 0) {\r\n sliderImageElements = $(\".tp-bgimg.defaultimg\");\r\n\r\n for (let index = 0; index < this.documentLinks.length; index++) {\r\n const link = this.documentLinks[index];\r\n const foundDomElement = $(sliderImageElements)[index];\r\n\r\n if (foundDomElement) {\r\n $(foundDomElement).css('background-image', 'url(' + link + ')');\r\n $(foundDomElement).attr(\"src\", link);\r\n }\r\n }\r\n }\r\n }\r\n\r\n finishProductCustomization() {\r\n return this.editor.finishProductDesign()\r\n }\r\n\r\n setupPageAfterProductCustomization(renderData: any, isError: boolean) {\r\n if (!isError) {\r\n this.renderData = renderData;\r\n }\r\n else {\r\n this.renderData = this.handleError(renderData, \"Product customization completion failed with exception: \");\r\n }\r\n }\r\n\r\n openDocumentInNewTab() {\r\n let sliderElements = $(\"#approvePage ul li\");\r\n\r\n if (sliderElements.length > 0) {\r\n for (let index = 0; index < sliderElements.length; index++) {\r\n const element = sliderElements[index];\r\n //if element has this class, it means it is active inside of slider, so we want to open that element in a new tab\r\n if ($(element).hasClass(\"active-revslide\")) {\r\n window.open(this.documentLinks[index], \"_blank\");\r\n }\r\n }\r\n }\r\n }\r\n\r\n openNewProductInEditor() {\r\n if (this.editor != null) {\r\n this.editor.revertProduct();\r\n this.setupPage(\"design\");\r\n }\r\n }\r\n\r\n reopenProductInEditor() {\r\n this.setupPage(\"design\");\r\n }\r\n\r\n // set details of view we want to show and set layout properties depending on view\r\n setupPage(page) {\r\n const destPageData = this.workflowPages[page];\r\n\r\n if (this.workflowPages[this.currentPage]) {\r\n const elements = this.workflowPages[this.currentPage].elements;\r\n if (elements && elements.nativeElement && elements.nativeElement.id) {\r\n // getting id of element that needs to be hidden\r\n const generatedIdHide = `#${elements.nativeElement.id}`;\r\n $(generatedIdHide).fadeOut(() => {\r\n if (destPageData && destPageData.elements && destPageData.elements.nativeElement && destPageData.elements.nativeElement.id) {\r\n // getting id of element that needs to be shown\r\n const generatedIdShow = `#${destPageData.elements.nativeElement.id}`\r\n $(generatedIdShow).show();\r\n\r\n this.currentPage = page;\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n handleError(error, message) {\r\n console.error(message, error);\r\n return error;\r\n };\r\n\r\n\r\n updatePrevCanvasInfo(canvasData: any) {\r\n let url = this.mappings.Web_Api_Update_Prev_Canvas_Info;\r\n\r\n const params = {\r\n RowIdPrev: canvasData.RowIdPrev,\r\n CanvasStateId: canvasData.stateId,\r\n CanvasHiResOutputUrls: canvasData.hiResOutputUrls\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n // removing state from customers canvas\r\n deleteCustomerCanvasState(canvasInfo) {\r\n // const apiKey = '01b3ecc6-6423-4684-b469-f258afa87100';\r\n const decryptedApiKey = this.cryptoService.decryptString(canvasInfo.CanvasApiKey);\r\n const baseUrl = this.mappings.Canvas_Web_Api_Base_Url.replace('{apiKey}', decryptedApiKey);\r\n \r\n let url = baseUrl + this.mappings.Web_Api_Delete_Customers_Canvas_State;\r\n url = url.replace('{userId}', canvasInfo.CustomerCanvasUserName).replace('{stateId}', canvasInfo.CanvasStateId);\r\n const apiKeyFinal = `ApiKey_${decryptedApiKey}`;\r\n\r\n // configure headers for creating a valid request\r\n let options: RequestOptionsArgs = {};\r\n options.headers = new Headers();\r\n\r\n options.headers.append('X-CustomersCanvasAPIKey', apiKeyFinal);\r\n options.headers.append('Content-Type', 'application/json');\r\n\r\n return this.http.delete(url, options);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/inventory/customerscanvas.service.ts","function webpackEmptyContext(req) {\n\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = 464;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src async\n// module id = 464\n// module chunks = 0","\r\n/*\r\n * THIS IS TEMPORARY TO PATCH 2.1.1+ Core bugs\r\n */\r\n\r\n/* tslint:disable */\r\nlet __compiler__ = require('@angular/compiler');\r\nimport { __platform_browser_private__ } from '@angular/platform-browser';\r\nimport { __core_private__ } from '@angular/core';\r\nif (!__core_private__['ViewUtils']) {\r\n __core_private__['ViewUtils'] = __core_private__['view_utils'];\r\n}\r\n\r\n\r\n\r\nif (__compiler__ && __compiler__.SelectorMatcher && __compiler__.CssSelector) {\r\n (__compiler__).__compiler_private__ = {\r\n SelectorMatcher: __compiler__.SelectorMatcher,\r\n CssSelector: __compiler__.CssSelector\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/__workaround.browser.ts","import { NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { RouterModule } from '@angular/router';\r\nimport { UniversalModule, isBrowser, isNode } from 'angular2-universal/browser'; // for AoT we need to manually split universal packages\r\nimport { IdlePreload, IdlePreloadModule } from '@angularclass/idle-preload';\r\nimport { RequestOptions } from '@angular/http';\r\nimport { TranslateModule, TranslateLoader, TranslateService } from '@ngx-translate/core';\r\n\r\nimport { AppModule, AppComponent } from './+app/app.module';\r\nimport { SharedModule } from './+app/shared/shared.module';\r\nimport { CacheService } from './+app/services/core/cache.service';\r\nimport { NodeLoggerService } from './+app/services/core/node-logger.service';\r\n\r\n// Will be merged into @angular/platform-browser in a later release\r\n// see https://github.com/angular/angular/pull/12322\r\nimport { Meta } from './+app/services/core/angular2-meta';\r\nimport { DefaultRequestOptions } from './+app/services/core/default-request-options';\r\nimport { CookieBrowserService } from './+app/services/core/cookie';\r\nimport { RoutesService } from './+app/services/core/routes.service';\r\nimport { RoutesBrowserService } from './+app/services/core/routes-browser.service';\r\nimport { ApiService } from './+app/services/core/api.service';\r\nimport { ApplicationService } from './+app/services/core/application.service';\r\nimport { TranslateStaticLoader } from './+app/services/multi-language/browser';\r\n\r\n// import * as LRU from 'modern-lru';\r\n\r\nexport function getLRU(lru?: any) {\r\n // use LRU for node\r\n // return lru || new LRU(10);\r\n return lru || new Map();\r\n}\r\nexport function getRequest() {\r\n // the request object only lives on the server\r\n return { cookie: document.cookie };\r\n}\r\nexport function getResponse() {\r\n // the response object is sent as the index.html and lives on the server\r\n return {};\r\n}\r\n\r\nexport function TranslateStaticLoaderFactory(http, cache) {\r\n return new TranslateStaticLoader(http, cache);\r\n}\r\n\r\n// TODO(gdi2290): refactor into Universal\r\nexport const UNIVERSAL_KEY = 'UNIVERSAL_CACHE';\r\n\r\n@NgModule({\r\n bootstrap: [ AppComponent ],\r\n imports: [\r\n UniversalModule,\r\n\r\n FormsModule,\r\n TranslateModule.forRoot({\r\n loader: {\r\n provide: TranslateLoader,\r\n useFactory: (TranslateStaticLoaderFactory),\r\n deps: [ApiService, ApplicationService]\r\n }\r\n }),\r\n RouterModule.forRoot([], { useHash: false, preloadingStrategy: IdlePreload }),\r\n\r\n IdlePreloadModule.forRoot(),\r\n SharedModule.forRoot(),\r\n AppModule\r\n ],\r\n providers: [\r\n { provide: RequestOptions, useClass: DefaultRequestOptions },\r\n { provide: 'CookieService', useClass: CookieBrowserService },\r\n { provide: RoutesService, useClass: RoutesBrowserService },\r\n { provide: 'isBrowser', useValue: isBrowser },\r\n { provide: 'isNode', useValue: isNode },\r\n\r\n { provide: 'req', useFactory: getRequest },\r\n { provide: 'res', useFactory: getResponse },\r\n\r\n { provide: 'LRU', useFactory: getLRU, deps: [] },\r\n\r\n NodeLoggerService,\r\n CacheService,\r\n\r\n Meta\r\n ]\r\n})\r\nexport class MainModule {\r\n constructor(public cache: CacheService,\r\n public nodeLogger: NodeLoggerService,\r\n private routes: RoutesService,\r\n private translate: TranslateService) {\r\n // TODO(gdi2290): refactor into a lifecycle hook\r\n this.doRehydrate();\r\n\r\n this.translate.use(this.routes.getLang());\r\n\r\n this.routes.loadRoutes();\r\n }\r\n\r\n doRehydrate() {\r\n let defaultValue = {};\r\n let serverCache = this._getCacheValue(CacheService.KEY, defaultValue);\r\n this.cache.rehydrate(serverCache);\r\n }\r\n\r\n _getCacheValue(key: string, defaultValue: any): any {\r\n // browser\r\n const win: any = window;\r\n if (win[UNIVERSAL_KEY] && win[UNIVERSAL_KEY][key]) {\r\n let serverCache = defaultValue;\r\n try {\r\n serverCache = JSON.parse(win[UNIVERSAL_KEY][key]);\r\n if (typeof serverCache !== typeof defaultValue) {\r\n console.log('Angular Universal: The type of data from the server is different from the default value type');\r\n serverCache = defaultValue;\r\n }\r\n } catch (e) {\r\n console.log('Angular Universal: There was a problem parsing the server data during rehydrate');\r\n serverCache = defaultValue;\r\n }\r\n return serverCache;\r\n } else {\r\n console.log('Angular Universal: UNIVERSAL_CACHE is missing');\r\n }\r\n return defaultValue;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/browser.module.ts","import { Injectable } from '@angular/core';\r\n\r\n@Injectable()\r\nexport class HelperService {\r\n\r\n constructor() {}\r\n\r\n //Return the name of a file, withouth extention, from a path \r\n //Eg. \r\n //Input:http://www.wscprinter.it/business-cards.jpg\r\n //Output:business-cards\r\n GetFileNameFromPath(filePath: string) \r\n {\r\n let fileName: string = \"\";\r\n \r\n if(filePath != null)\r\n {\r\n let split = filePath.split(\"/\");\r\n if(split != null)\r\n {\r\n let pop = split.pop();\r\n\r\n if(pop != null)\r\n {\r\n fileName = pop.replace(/\\.[^/.]+$/, \"\");\r\n }\r\n }\r\n\r\n return fileName;\r\n }\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/helper.service.ts","export class QuotingModel {\r\n public formati: Array;\r\n public formato: Array;\r\n public categorieCarte: Array;\r\n public categorieCarteCount: number = 0;\r\n public categorieCarteInterno: Array;\r\n public categorieCarteCopertina: Array;\r\n public categorieCarteCopertinaCount: number = 0;\r\n public carte1: Array;\r\n public carte1Count: number = 0;\r\n public carte2: Array;\r\n public carte2Count: number = 0;\r\n public colori1: Array;\r\n public colori1Count: number = 0;\r\n public colori2: Array;\r\n public colori2Count: number = 0;\r\n public grammature1: Array;\r\n public grammature1Count: number = 0;\r\n public grammature2: Array;\r\n public grammature2Count: number = 0;\r\n public plastificazioni1: Array;\r\n public plastificazioni1Count: number = 0;\r\n public plastificazioni2: Array;\r\n public plastificazioni2Count: number = 0;\r\n public piegature: Array;\r\n public piegatureCount: number = 0;\r\n public coloriStampaInterno: Array;\r\n public materialiFlessibili: Array;\r\n public materialiFlessibiliCount: number = 0;\r\n public copie: Array;\r\n public copieCount: number = 0;\r\n public supportiRigidi: Array;\r\n public supportiRigidiCount: number = 0;\r\n public lavorazioniAccessorie: Array;\r\n public elettrosaldature: Array;\r\n public elettrosaldatureCount: number = 0;\r\n public tagli: Array;\r\n public tagliCount: number = 0;\r\n public coloriCarte: Array;\r\n public copertine: Array;\r\n public copertineCount: number = 0;\r\n public coloriStampaCopertina: Array;\r\n public rilegature: Array;\r\n public rilegatureCount: number = 0;\r\n public facciate: Array;\r\n public facciateCount: number = 0;\r\n public facciateComePagine: boolean;\r\n public tipologieBusta: Array;\r\n public tipologieBustaCount: number = 0;\r\n public taglio: string;\r\n public numCopie: string;\r\n public idCopie: string;\r\n public numSoggetti: string;\r\n public numFacciate: string;\r\n public idFacciate: string;\r\n public categorieCarteId: number;\r\n public categorieCarteIdCopertina: number;\r\n public tipoCopie: string;\r\n public minimoCopie: number;\r\n public minimoFacciate: number;\r\n public massimoFacciate: number;\r\n public multiploFacciate: number = 0;\r\n public tipoStampaCopertinaSoloFronte: boolean;\r\n public tipoColoriOffset: string;\r\n public plastificazioneInterno: string;\r\n public cartacopertina: string;\r\n public plastificazioneCopertina: string;\r\n public soggettiMultipli: boolean;\r\n public formatoPersonalizzato: boolean;\r\n public massimoCopie: number;\r\n public minimoBase: number;\r\n public massimoBase: number;\r\n public minimoAltezza: number;\r\n public massimoAltezza: number;\r\n public disposizione_asola: string;\r\n public tipoFacciate: string;\r\n public tipoTaglio: boolean;\r\n public tipoStampaInternoSoloFronte: boolean;\r\n public tipoCalcoloTaglio: string;\r\n public listaRegole: Array;\r\n public listaRegoleGrammaturaFacciate: Array;\r\n public idCarte1: string;\r\n public idCopertine: string;\r\n public idCarte2: string;\r\n public idPlastificazioni1: string;\r\n public idPlastificazioni2: string;\r\n public idRilegature: string;\r\n public idFormati: string;\r\n public idGrammature1: string;\r\n public idGrammature2: string;\r\n public idColori1: string;\r\n public idColori2: string;\r\n public idPiegature: string;\r\n public idRifili: string;\r\n public idTagli: string;\r\n public idCategorieCarte1: string;\r\n public idCategorieCarte2: string;\r\n public stampa1_colori_fronte: string;\r\n public stampa1_colori_retro: string;\r\n public stampa2_colori_fronte: string;\r\n public stampa2_colori_retro: string;\r\n public copieIsValid: boolean = true;\r\n public facciateIsValid: boolean = true;\r\n public formatiIsValid: boolean = true;\r\n public carte1IsValid: boolean = true;\r\n public grammature1IsValid: boolean = true;\r\n public carte2IsValid: boolean = true;\r\n public grammature2IsValid: boolean = true;\r\n public copertineIsValid: boolean = true;\r\n public rilegatureIsValid: boolean = true;\r\n public lavorazioniIsValid: boolean = true;\r\n public copieMessage: string;\r\n public facciateMessage: string;\r\n public formatiMessage: string;\r\n public carte1Message: string;\r\n public grammature1Message: string;\r\n public carte2Message: string;\r\n public grammature2Message: string;\r\n public copertineMessage: string;\r\n public rilegatureMessage: string;\r\n public taglioShowed: boolean = false;\r\n public isTaglioVisible: boolean = false;\r\n public valueStampaInternoSoloFronte: boolean;\r\n public valueStampaCopertinaSoloFronte: boolean;\r\n public calculationType: string;\r\n public isWizardWithScontistica: boolean;\r\n public formatoDescription: string;\r\n public formatoImage: string;\r\n public formatiShowInfo: boolean;\r\n public formatiHasInfo: boolean;\r\n public carte1Description: string;\r\n public carte1Image: string;\r\n public carte1ShowInfo: boolean;\r\n public carte1HasInfo: boolean;\r\n public carte2Description: string;\r\n public carte2Image: string;\r\n public carte2ShowInfo: boolean;\r\n public carte2HasInfo: boolean;\r\n public plastificazioni1Description: string;\r\n public plastificazioni1Image: string;\r\n public plastificazioni1ShowInfo: boolean;\r\n public plastificazioni1HasInfo: boolean;\r\n public plastificazioni2Description: string;\r\n public plastificazioni2Image: string;\r\n public plastificazioni2ShowInfo: boolean;\r\n public plastificazioni2HasInfo: boolean;\r\n public rilegatureDescription: string;\r\n public rilegatureImage: string;\r\n public rilegatureShowInfo: boolean;\r\n public rilegatureHasInfo: boolean;\r\n\r\n public copieOrder: number = 0;\r\n public facciateOrder: number = 0;\r\n public formatiOrder: number = 0;\r\n public stampaInternoFronteOrder: number = 0;\r\n public stampaInternoOrder: number = 0;\r\n public carteInternoOrder: number = 0;\r\n public plastificazioniInternoOrder: number = 0;\r\n public copertineOrder: number = 0;\r\n public stampaCopertinaFronteOrder: number = 0;\r\n public stampaCopertinaOrder: number = 0;\r\n public cartaCopertinaOrder: number = 0;\r\n public plastificazioniCopertinaOrder: number = 0;\r\n public cartoncinoOrder: number = 0;\r\n public rilegatureOrder: number = 0;\r\n public rifiloOrder: number = 0;\r\n public lavorazioniAccessorieOrder: number = 0;\r\n public companyNumber: string;\r\n public companyEmail: string;\r\n public companyCondizioni: string;\r\n\r\n public piegatureDescription: string;\r\n public piegatureImage: string;\r\n public piegatureShowInfo: boolean;\r\n public piegatureHasInfo: boolean;\r\n public piegatureIsValid: boolean = true;\r\n public piegatureMessage: string;\r\n\r\n public plastificazione1IsValid: boolean = true;\r\n public plastificazione1Message: string;\r\n\r\n public plastificazione2IsValid: boolean = true;\r\n public plastificazione2Message: string;\r\n\r\n public soggettiOrder: number = 0;\r\n public soggettiIsValid: boolean = true;\r\n public soggettiMessage: string;\r\n public baseFormato: string;\r\n public altezzaFormato: string;\r\n public baseFormatoIsValid: boolean = true;\r\n public baseFormatoMessage: string = \"\";\r\n public altezzaFormatoIsValid: boolean = true;\r\n public altezzaFormatoMessage: string = \"\";\r\n\r\n public formatiVisual: boolean = false;\r\n public stampaInternoVisual: boolean = false;\r\n public carteInternoVisual: boolean = false;\r\n public plastificazioniInternoVisual: boolean = false;\r\n public copertineVisual: boolean = false;\r\n public stampaCopertinaVisual: boolean = false;\r\n public cartaCopertinaVisual: boolean = false;\r\n public plastificazioniCopertinaVisual: boolean = false;\r\n public rilegatureVisual: boolean = false;\r\n public lavorazioniAccessorieVisual: boolean = false;\r\n public piegatureVisual: boolean = false;\r\n\r\n public taglioOrder: number = 0;\r\n public taglioDescription: string;\r\n public taglioImage: string;\r\n public taglioShowInfo: boolean;\r\n public taglioHasInfo: boolean;\r\n public taglioIsValid: boolean = true;\r\n public taglioMessage: string;\r\n\r\n public bustaOrder: number = 0;\r\n public bustaDescription: string;\r\n public bustaImage: string;\r\n public bustaShowInfo: boolean;\r\n public bustaHasInfo: boolean;\r\n public bustaIsValid: boolean = true;\r\n public bustaMessage: string;\r\n public idBusta: string;\r\n\r\n public materialeOrder: number = 0;\r\n public materialeDescription: string;\r\n public materialeImage: string;\r\n public materialeShowInfo: boolean;\r\n public materialeHasInfo: boolean;\r\n public materialeIsValid: boolean = true;\r\n public materialeMessage: string;\r\n public idMaterialiFlessibili: string;\r\n\r\n public supportoOrder: number = 0;\r\n public supportoDescription: string;\r\n public supportoImage: string;\r\n public supportoShowInfo: boolean;\r\n public supportoHasInfo: boolean;\r\n public supportoIsValid: boolean = true;\r\n public supportoMessage: string;\r\n public idSupportiRigidi: string;\r\n public idGruppo: number = 0;\r\n\r\n public occhiellaturaOrder: number = 0;\r\n public occhiellaturaDescription: string;\r\n public occhiellaturaImage: string;\r\n public occhiellaturaShowInfo: boolean;\r\n public occhiellaturaHasInfo: boolean;\r\n public occhiellaturaIsValid: boolean = true;\r\n public occhiellaturaMessage: string;\r\n public idOcchielli: string;\r\n public disposizione_occhielli_id: string;\r\n public distanza_occhielli: string;\r\n public occhielli: Array;\r\n public occhielliCount: number = 0;\r\n public occhielliDisposizione: Array;\r\n public occhielliDisposizioneCount: number = 0;\r\n public asolaOrder: number = 0;\r\n public asolaDescription: string;\r\n public asolaImage: string;\r\n public asolaShowInfo: boolean;\r\n public asolaHasInfo: boolean;\r\n public asolaIsValid: boolean = true;\r\n public asolaMessage: string;\r\n public idAsole: string;\r\n public diametro_asola: string;\r\n public disposizione_asola_id: string;\r\n public asole: Array;\r\n public asoleCount: number = 0;\r\n public asoleDisposizioni: Array;\r\n public asoleDisposizioniCount: number = 0;\r\n public cucituraOrder: number = 0;\r\n public cucituraDescription: string;\r\n public cucituraImage: string;\r\n public cucituraShowInfo: boolean;\r\n public cucituraHasInfo: boolean;\r\n public cucituraIsValid: boolean = true;\r\n public cucituraMessage: string;\r\n public idCuciture: string;\r\n public disposizione_cucitura_id: string;\r\n public cuciture: Array;\r\n public cucitureCount: number = 0;\r\n public cucitureDisposizioni: Array;\r\n public cucitureDisposizioniCount: number = 0;\r\n public elettroOrder: number = 0;\r\n public elettroDescription: string;\r\n public elettroImage: string;\r\n public elettroShowInfo: boolean;\r\n public elettroHasInfo: boolean;\r\n public elettroIsValid: boolean = true;\r\n public elettroMessage: string;\r\n public idElettrosaldature: string;\r\n public disposizione_elettrosaldatura_id: string;\r\n public elettrosaldatureDisposizioni: Array;\r\n public elettrosaldatureDisposizioniCount: number = 0;\r\n public bifaccialeOrder: number = 0;\r\n public stampaBifacciale: number;\r\n public tipoBifacciale: string;\r\n public biancoCoprenteOrder: number = 0;\r\n public biancoCoprente: Array;\r\n public biancoCoprenteCount: number = 0;\r\n public idBiancoCoprente: string;\r\n\r\n public oraOrdine: string;\r\n public richiesteScontistica: string;\r\n\r\n public distanzaOcchielliIsValid: boolean = true;\r\n public distanzaOcchielliMessage: string;\r\n\r\n public diametroAsolaIsValid: boolean = true;\r\n public diametroAsolaMessage: string;\r\n\r\n\r\n public pantoni: Array;\r\n public pantoniCount: number = 0;\r\n public idPantoneFronte1: string;\r\n public pantoneFronte1Description: string;\r\n public pantoneFronte1Image: string;\r\n public pantoneFronte1HasInfo: boolean;\r\n public pantoneFronte1ShowInfo: boolean;\r\n public pantoneFronte1Visual: boolean;\r\n\r\n public idPantoneFronte2: string;\r\n public pantoneFronte2Description: string;\r\n public pantoneFronte2Image: string;\r\n public pantoneFronte2HasInfo: boolean;\r\n public pantoneFronte2ShowInfo: boolean;\r\n public pantoneFronte2Visual: boolean;\r\n public idPantoneRetro1: string;\r\n public pantoneRetro1Description: string;\r\n public pantoneRetro1Image: string;\r\n public pantoneRetro1HasInfo: boolean;\r\n public pantoneRetro1ShowInfo: boolean;\r\n public pantoneRetro1Visual: boolean;\r\n public idPantoneRetro2: string;\r\n public pantoneRetro2Description: string;\r\n public pantoneRetro2Image: string;\r\n public pantoneRetro2HasInfo: boolean;\r\n public pantoneRetro2ShowInfo: boolean;\r\n public pantoneRetro2Visual: boolean;\r\n public colori1IsValid: boolean = true;\r\n public colori1Message: string;\r\n\r\n //Cartoncino\r\n public cartoncinoIsValid: boolean = true;\r\n public cartoncinoHasInfo: boolean;\r\n public cartoncinoVisual: boolean = false;\r\n public idCartoncino: string;\r\n public cartoncini: Array;\r\n public cartonciniCount: number = 0;\r\n public cartoncinoMessage: string;\r\n public cartoncinoShowInfo: boolean;\r\n public cartoncinoImage: string;\r\n public cartoncinoDescription: string;\r\n public grammatureCartoncinoIsValid: boolean = true;\r\n public idGrammatureCartoncino: string;\r\n public grammatureCartoncino: Array;\r\n public grammatureCartoncinoCount: number = 0;\r\n public grammatureCartoncinoMessage: string;\r\n public FilesCombinazioniObj: FileCombinationModel;\r\n public ManageAttachment: string;\r\n public isStampaInternoRequired: boolean;\r\n public isStampaCopertinaRequired: boolean;\r\n public isStampaBifaccialeSiHide: boolean;\r\n public isStampaBifaccialeNoHide: boolean;\r\n public IsPackagingWizard: boolean;\r\n public listaPackagingParameter: Array;\r\n public basePackagingIsValid: boolean = true;\r\n public profonditaPackagingIsValid: boolean = true;\r\n public idBasePackaging: number = 0;\r\n public idProfonditaPackaging: number = 0;\r\n public basePackagingMessage: string;\r\n public profonditaPackagingMessage: string;\r\n public formatiCount: number = 0;\r\n public gapLabel: number = 0;\r\n public tipologiaLavoriLabel: Array;\r\n public avvolgimentiLabel: Array;\r\n public diametroInterno: number = 0;\r\n public diametroMassimoEsterno: number = 0;\r\n public ListafustelleLabel: Array;\r\n public TipologiaFormatiLabel: Array;\r\n \r\n public subSection: string;\r\n public formatiTipoOrder: number;\r\n public formatiTipoImgPath: string;\r\n public formatiTipoVisual: boolean;\r\n public formatiTipoImage: string;\r\n public formatiTipoHasInfo: boolean;\r\n public formatiTipoLabelCount: number = 0;\r\n public formatiTipoLabelShowInfo: boolean;\r\n public formatiTipoLabelIsValid: boolean = true;\r\n\r\n public idFormatoTipo: string;\r\n public fustelleOrder: number;\r\n public idFustella: string;\r\n public fustelleLabelCount: number = 0;\r\n public fustellaLabelIsValid: boolean = true;\r\n\r\n public idTipoLavoroLabel: string;\r\n\r\n public avvolgimentiOrder: number;\r\n public avvolgimentiImgPath: string;\r\n public avvolgimentiVisual: boolean;\r\n public avvolgimentiImage: string;\r\n public avvolgimentiHasInfo: boolean;\r\n public idAvvolgimento: string;\r\n public avvolgimentiCount: number = 0;\r\n public avvolgimentiShowInfo: boolean;\r\n public avvolgimentiIsValid: boolean = true;\r\n\r\n public numEtichetteOrder: number;\r\n public numEtichetteImgPath: string;\r\n public numEtichetteIsValid: boolean = true;\r\n public numEtichetteMessage: string;\r\n public numEtichette: string = \"1\";\r\n\r\n public massimaDistanzaEtichetteLabel: number;\r\n public minimaDistanzaEtichetteLabel: number;\r\n\r\n public DiametroInternoAnimaEditabileLabel: boolean = false;\r\n public numDiametroInternoAnimaEditabileLabel: number;\r\n public DiametroInternoAnimaIsValid: boolean = true;\r\n public DiametroInternoAnimaMessage: string;\r\n public numDiametroInternoAnimaLabel: number;\r\n \r\n\r\n public numDiametroMassimoEsternoAnimaEditabile: number;\r\n public DiametroMassimoEsternoAnimaEditabile: boolean = false;\r\n public DiametroMassimoEsternoAnimaIsValid: boolean = true;\r\n public DiametroMassimoEsternoAnimaMessage: string;\r\n public numDiametroMassimoEsternoAnimaLabel: number;\r\n\r\n public diametriOrder: number;\r\n public diametriImgPath: string;\r\n}\r\nexport class FileCombinationModel {\r\n listaFilesCombinazioni: any[];\r\n FormatList: any[];\r\n PiegheList: any[];\r\n}\r\n\r\nexport class Object {\r\n public chiave: string;\r\n public valore: string;\r\n public selected: boolean;\r\n public isVisible: boolean = true;\r\n public subElements: Array;\r\n public wrap_valore: string;\r\n public parentId: string;\r\n public descrizione: string;\r\n public image: string;\r\n public hasInfo: boolean;\r\n public colorExaForMatrix: string;\r\n public mostraPerVariantiMatrice: number;\r\n}\r\n\r\nexport class WizardListinoScontistica {\r\n public rowId: number;\r\n public columnId: number;\r\n public value: string;\r\n public buttonWizardListino: string;\r\n}\r\n\r\nexport class SelectObject {\r\n public chiave: string;\r\n public valore: string;\r\n}\r\nexport class MyVarianteMatrice {\r\n public id: number;\r\n public nome: string;\r\n public colore: string;\r\n public popup: string;\r\n public imgPath: string;\r\n public mostraPerVariantiMatrice: string;\r\n public qta: number;\r\n public VarianteVerticale: Array;\r\n public VarianteOrizzontale: Array;\r\n}\r\nexport class MyLavorazioneAccessoria {\r\n public id: number;\r\n public type: string;\r\n public isValid: boolean = false;\r\n public isVisible: boolean = true;\r\n public lavId: number;\r\n public nome: string;\r\n public tipo: string;\r\n public tipoSelezione: string;\r\n public valore: string;\r\n public valori: Array;\r\n public valoriCount: number = 0;\r\n public value: any;\r\n public selected: boolean;\r\n public obbligatorio: boolean;\r\n public isCalculated: boolean;\r\n public lavorazioneCheckValue: boolean;\r\n public lavorazioneMessage: string;\r\n public description: string;\r\n public image: string;\r\n public showInfo: boolean;\r\n public hasInfo: boolean;\r\n public maxQtaInput: number;\r\n public minQtaInput: number;\r\n public idVarianteMatriceVerticale: number;\r\n public idVarianteMatriceOrizzontale: number;\r\n public VarianteMatrix: Array;\r\n}\r\n\r\nexport class Regola {\r\n public Id: number;\r\n public Nome_Regola: string;\r\n public Tipo: string;\r\n public Categoria_1: string;\r\n public Sezione_1: string;\r\n public Id_Elemento_1: number;\r\n public Categoria_2: string;\r\n public Sezione_2: string;\r\n public Id_Elemento_2: number;\r\n public IdRegoleCategoria: number;\r\n public Id_Elemento_Sottochiave_1: number;\r\n public Id_Elemento_Sottochiave_2: number;\r\n public Tipo_Regola: string;\r\n public Flag_Copertina_1: boolean;\r\n public Flag_Copertina_2: boolean\r\n public Macro_Categoria_1: string;\r\n public Macro_Categoria_2: string;\r\n public Attivo: boolean;\r\n}\r\n\r\n\r\nexport class MyLavorazioneAccessoriaReturn {\r\n public id: number;\r\n public value: string;\r\n}\r\n\r\nexport class LavorazioniComponents {\r\n public checkBox: number = 0;\r\n public inputBox: number = 1;\r\n public selectBox: number = 2;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/document/quoting-model.ts","import { NgModule } from '@angular/core';\r\n\r\nimport { SharedModule } from './shared/shared.module';\r\n\r\nimport { AppComponent } from './app.component';\r\n\r\nimport { HomeModule } from './components/cms/homepage/sys/home.module';\r\nimport { CmsPageModule } from './components/cms/page/sys/cms-page.module';\r\nimport { InventoryProductModule } from './components/inventory/product/sys/inventory-product.module';\r\nimport { InventoryCategoryModule } from './components/inventory/category/sys/inventory-category.module';\r\nimport { SettingsModule } from './components/settings/user/sys/settings.module';\r\nimport { SysConfig } from './services/core/system-configuration.service';\r\nimport { Ng2TableModule } from 'ng2-table/ng2-table';\r\n\r\n// Need for defer included components by dynamic routing\r\nconst entryComponents = SysConfig.getAllComponents();\r\n\r\n@NgModule({\r\n declarations: [ AppComponent ],\r\n imports: [\r\n SharedModule,\r\n HomeModule,\r\n CmsPageModule,\r\n InventoryProductModule,\r\n InventoryCategoryModule,\r\n SettingsModule,\r\n Ng2TableModule,\r\n ],\r\n\r\n entryComponents: [\r\n ...entryComponents\r\n ]\r\n})\r\nexport class AppModule {\r\n}\r\n\r\nexport { AppComponent } from './app.component';\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/app.module.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Input, ComponentFactory, ReflectiveInjector, Compiler, Inject } from \"@angular/core\";\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { ArticleService } from \"./../../../../services/cms/article.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\n\r\n\r\n\r\n@Component({\r\n selector: \"dy-article-list\",\r\n template: \"\"\r\n})\r\n\r\nexport class NewsListComponent implements OnInit \r\n{\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private templateService: TemplateService,\r\n private articleService: ArticleService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) {}\r\n\r\n @Input() items: any;\r\n @Input() category: string;\r\n @Input() newsOrientation: string;\r\n @Input() headerTypeNews: string;\r\n @Input() columns: number = 4;\r\n \r\n ngOnInit() \r\n {\r\n if (!this.isBrowser)\r\n return;\r\n\r\n //Depending on the type of the list, a different template is used\r\n let subComponentTemplateUrl: string;\r\n\r\n switch (this.newsOrientation) \r\n {\r\n case \"newsVertical\": subComponentTemplateUrl = \"newsListVerticalPageTemplate\"; break;\r\n case \"newsHorizontal\": subComponentTemplateUrl = \"newsListHorizontalPageTemplate\"; break;\r\n case \"newsVerticalBanner\": subComponentTemplateUrl = \"newsListVerticalBannerPageTemplate\"; break;\r\n case \"newsHorizontalBanner\": subComponentTemplateUrl = \"newsListHorizontalBannerHomepageTemplate\"; break; \r\n }\r\n\r\n this.articleService.getArticleList(this.category, subComponentTemplateUrl).subscribe(result => \r\n { \r\n let templateData = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(templateData, this.items, this.category, this.newsOrientation, this.headerTypeNews, this.columns);\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }); \r\n }\r\n\r\n private createSubComponent(response: any, inputItems: any, inputCategory: string, inputNewsOrientation: string, inputHeaderTypeNews: string, inputColumns: number) {\r\n\r\n @Component({\r\n template: response.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit \r\n {\r\n constructor\r\n (\r\n private languageService: LanguageService,\r\n private articleService: ArticleService\r\n ) {}\r\n\r\n items: any = inputItems;\r\n category: string = inputCategory;\r\n newsOrientation: string = inputNewsOrientation;\r\n headerTypeNews: string = inputHeaderTypeNews;\r\n lang: string = this.languageService.getLongLang();\r\n columns: number = inputColumns;\r\n\r\n ngOnInit() \r\n {\r\n this.items = response.ArticleList;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/article/widget/news-list.component.ts","//System\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Input, Inject } from '@angular/core';\r\nimport { Router, ActivatedRoute} from \"@angular/router\";\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { AuthService } from './../../../../services/core/auth.service';\r\nimport { NewsletterService } from \"./../../../../services/cms/newsletter.service\";\r\n\r\n//Models\r\nimport { UserLogin } from \"./../../../../models/cms/user-login\";\r\nimport { Company } from \"./../../../../models/core/company\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { HeaderService } from '../../../../services/cms/header.service';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n selector: \"dy-footer\",\r\n template: ''\r\n})\r\n\r\nexport class FooterComponent implements OnInit {\r\n data: any = {};\r\n\r\n @Input() parentFooterData: any;\r\n\r\n constructor(\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private cmsComponentService: CmsComponentService,\r\n private route: ActivatedRoute,\r\n private router: Router,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n\r\n ){this.router.routeReuseStrategy.shouldReuseRoute = () => false; }\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if(!this.isBrowser)\r\n return;\r\n\r\n if (this.parentFooterData != null) {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(this.parentFooterData);\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n\r\n else {\r\n let footerData: any;\r\n\r\n let footerSub = this.cmsComponentService.getFooterData().subscribe(result => {\r\n footerData = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(footerData);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(footerSub);\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n //Creates component to inject \r\n private createSubComponent(footerData: any) {\r\n @Component({\r\n template: footerData.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private routesService: RoutesService,\r\n private authService: AuthService,\r\n private newsletterService: NewsletterService,\r\n private headerService: HeaderService\r\n ) {\r\n this.headerService.getLoggedInUser().subscribe((user: UserLogin | null) => {\r\n this.loggedIdUser = user;\r\n });\r\n }\r\n\r\n private loggedIdUser: UserLogin = new UserLogin();\r\n private company: Company = footerData.Company;\r\n public isActiveQuickRegistration: boolean = footerData.IsActiveQuickRegistration;\r\n\r\n private faqPageName: string[] = this.routesService.getRoutePath('FAQ');\r\n private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n private cookiePageName: string[] = this.routesService.getRoutePath('INFO COOKIE');\r\n private purchasePageName: string[] = this.routesService.getRoutePath('INFO CONDIZIONI DI VENDITA');\r\n private contactPageName: string[] = this.routesService.getRoutePath('RICHIESTA INFORMAZIONI');\r\n private loginPageName: string[] = this.routesService.getRoutePath('LOGIN');\r\n private passwordPageName: string[] = this.routesService.getRoutePath('RECUPERA PASSWORD');\r\n private registerPageName: string[] = this.routesService.getRoutePath('REGISTRAZIONE');\r\n private areaClientiPageName: string[] = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n private carrelloPageName: string[] = this.routesService.getRoutePath('CARRELLO');\r\n private blogPageName: string[] = this.routesService.getRoutePath('BLOG');\r\n\r\n //Newsletter variables\r\n private newsletterSubmitted: boolean;\r\n private privacySubmitted: boolean;\r\n private alreadySubscribed: boolean;\r\n private successfullySubscribed: boolean;\r\n private isCaptchaInvalid = true;\r\n public verified: any;\r\n public siteKey: string = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n public theme: string = \"light\";\r\n\r\n public isArrayInit: boolean = false;\r\n private spinnerNewslatter: boolean = false;\r\n\r\n private model = {\r\n Email: \"\"\r\n };\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n //setup of links, they must start with http to work properly\r\n let linkStart = \"http://\";\r\n let linkSecuredStart = \"https://\";\r\n\r\n if (this.company.Facebook != null) {\r\n if (this.company.Facebook.indexOf(linkStart) == -1 && this.company.Facebook.indexOf(linkSecuredStart) == -1) {\r\n this.company.Facebook = linkStart + this.company.Facebook;\r\n }\r\n }\r\n\r\n if (this.company.Youtube != null) {\r\n if (this.company.Youtube.indexOf(linkStart) == -1 && this.company.Youtube.indexOf(linkSecuredStart) == -1) {\r\n this.company.Youtube = linkStart + this.company.Youtube;\r\n }\r\n }\r\n\r\n if (this.company.Twitter != null) {\r\n if (this.company.Twitter.indexOf(linkStart) == -1 && this.company.Twitter.indexOf(linkSecuredStart) == -1) {\r\n this.company.Twitter = linkStart + this.company.Twitter;\r\n }\r\n }\r\n\r\n if (this.company.Website != null) {\r\n if (this.company.Website.indexOf(linkStart) == -1 && this.company.Website.indexOf(linkSecuredStart) == -1) {\r\n this.company.Website = linkStart + this.company.Website;\r\n }\r\n }\r\n\r\n if (this.company.Instagram != null) {\r\n if (this.company.Instagram.indexOf(linkStart) == -1 && this.company.Instagram.indexOf(linkSecuredStart) == -1) {\r\n this.company.Instagram = linkStart + this.company.Instagram;\r\n }\r\n }\r\n }\r\n\r\n onSubmit(form) \r\n {\r\n this.spinnerNewslatter = true;\r\n if (form) \r\n {\r\n let newsletterSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(result => \r\n {\r\n if (result == \"-1\")\r\n {\r\n this.alreadySubscribed = true;\r\n this.successfullySubscribed = false;\r\n this.spinnerNewslatter = false;\r\n }\r\n\r\n else {\r\n this.alreadySubscribed = false;\r\n this.successfullySubscribed = true;\r\n this.spinnerNewslatter = false;\r\n }\r\n });\r\n\r\n this.subManager.add(newsletterSub);\r\n }\r\n\r\n else \r\n {\r\n this.spinnerNewslatter = false; \r\n }\r\n }\r\n\r\n setVerified(data) {\r\n this.isCaptchaInvalid = !data;\r\n }\r\n\r\n showModalQuickRegistrationEmail() {\r\n //-- We set z-index to 1041 because there is a element with z-index 1040 that overrides modal\r\n (document.querySelector('#header') as HTMLElement).style.zIndex = '1041';\r\n $(`#quickRegistrationEmailModal`).modal(\"show\");\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/footer/widget/footer.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef,Compiler, Inject } from \"@angular/core\";\r\n\r\n//Services\r\nimport { NewsletterService } from \"./../../../../services/cms/newsletter.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { RoutesService } from \"../../../../services/core/routes.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\n\r\n@Component({\r\n selector: \"dy-newsletter\",\r\n template: \"\"\r\n\r\n})\r\n\r\nexport class NewsletterComponent implements OnInit \r\n{\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private templateService: TemplateService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) {}\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() \r\n {\r\n if(!this.isBrowser)\r\n return;\r\n\r\n let pageTemplateSub = this.templateService.getComponentTemplate(\"newsletterPageTemplate\").subscribe(result => {\r\n\r\n var templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(templateHtml);\r\n \r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(pageTemplateSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(template: string) {\r\n\r\n @Component({\r\n template: template\r\n })\r\n\r\n class ChildComponent implements OnInit \r\n {\r\n constructor\r\n (\r\n private newsletterService: NewsletterService,\r\n private routesService: RoutesService\r\n ) {}\r\n\r\n private newsletterSubmitted: boolean;\r\n private privacySubmitted: boolean;\r\n private alreadySubscribed: boolean;\r\n private successfullySubscribed: boolean;\r\n private isCaptchaInvalid = true;\r\n public verified: any;\r\n public siteKey: string = \"6LcTlhYTAAAAAADnzMzRAmFtNPyHxr-IvkwXfCZ1\";\r\n public theme: string = \"light\";\r\n private spinnerNewslatter: boolean = false;\r\n private model = {\r\n Email: \"\",\r\n CheckboxFooter: false\r\n };\r\n private privacyPageNameNewsletter: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n \r\n subManager = new Subscription();\r\n \r\n ngOnInit() {\r\n }\r\n\r\n onSubmit(form) \r\n {\r\n this.spinnerNewslatter = true;\r\n\r\n if (form) \r\n {\r\n let newsletterSub = this.newsletterService.newsletterSubscribe(this.model.Email).subscribe(result => \r\n {\r\n if (result == \"-1\")\r\n {\r\n this.alreadySubscribed = true;\r\n this.successfullySubscribed = false;\r\n this.spinnerNewslatter = false;\r\n }\r\n\r\n else\r\n {\r\n this.alreadySubscribed = false;\r\n this.successfullySubscribed = true;\r\n this.spinnerNewslatter = false;\r\n }\r\n });\r\n\r\n this.subManager.add(newsletterSub);\r\n }\r\n\r\n else \r\n {\r\n this.spinnerNewslatter = false; \r\n }\r\n }\r\n \r\n setVerified(data) \r\n {\r\n this.isCaptchaInvalid = !data;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/footer/widget/newsletter.component.ts","//System\r\nimport { Component, ChangeDetectionStrategy, ViewEncapsulation, OnInit, ViewContainerRef, Compiler, Inject, Input } from '@angular/core';\r\nimport { Location } from '@angular/common';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { CompanyService } from \"./../../../../services/core/company.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\nimport { AuthService } from './../../../../services/core/auth.service';\r\nimport { SysConfig } from \"./../../../../services/core/system-configuration.service\";\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\n\r\n//Models\r\nimport { Mappings } from './../../../../shared/mapping';\r\nimport { Company } from \"./../../../../models/core/company\";\r\nimport { Template } from \"./../../../../models/settings/template\";\r\nimport { Menu } from \"./../../../../models/cms/menu\";\r\nimport { UserLogin } from \"./../../../../models/cms/user-login\";\r\nimport { SearchService } from '../../../../services/inventory/search.service';\r\nimport { Router, Params } from \"@angular/router\";\r\nimport { ActivatedRoute } from '@angular/router/src/router_state';\r\nimport { ApplicationService } from './../../../../services/core/application.service';\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from '../../../../services/inventory/customerscanvas.service';\r\nimport { HeaderService } from '../../../../services/cms/header.service';\r\n\r\n@Component({\r\n changeDetection: ChangeDetectionStrategy.Default,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n selector: \"dy-header\",\r\n template: ''\r\n})\r\n\r\nexport class HeaderComponent implements OnInit {\r\n data: any = {};\r\n @Input() parentHeaderData: any;\r\n\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n subManager = new Subscription();\r\n\r\n\r\n ngOnInit() {\r\n if(!this.isBrowser)\r\n return;\r\n \r\n if (this.parentHeaderData != null) {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(this.parentHeaderData);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n\r\n else {\r\n //let templateHtml: string;\r\n let headerInfo: any;\r\n\r\n //Instead of reading only the template, also the information to show are retrieved (eg. menu list)\r\n let headDataSub = this.cmsComponentService.getHeaderData().subscribe(result => {\r\n headerInfo = result;\r\n var startDate = new Date();\r\n\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(headerInfo);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n\r\n // var endDate = new Date();\r\n\r\n\r\n // this.nodeLogger.AddLogWithTime(\"injecting Header (\" + diffMs + \")\");\r\n });\r\n\r\n this.subManager.add(headDataSub);\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n //Creates component to inject \r\n private createSubComponent(headerInfo: any) {\r\n @Component({\r\n template: headerInfo.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private language: LanguageService,\r\n private authService: AuthService,\r\n private cartService: ShoppingCartService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private searchService: SearchService,\r\n private routesService: RoutesService,\r\n private router: Router,\r\n protected appService: ApplicationService,\r\n private activatedRoute: ActivatedRoute,\r\n public canvasService: CustomersCanvasService,\r\n private headerService: HeaderService\r\n ) {\r\n this.cartService.initCart(headerInfo.CartInfo);\r\n this.headerService.getLoggedInUser().subscribe((user: UserLogin | null) => {\r\n this.loggedIdUser = user;\r\n });\r\n }\r\n\r\n private headerIsInit: boolean = false;\r\n\r\n private company: Company = headerInfo.Company;\r\n private menuItems: Array = headerInfo.MenuList;\r\n private megaMenuItems: any = headerInfo.Categories;\r\n public isActiveQuickRegistration: boolean = headerInfo.IsActiveQuickRegistration;\r\n public quickRegistrationData: any = headerInfo.QuickRegistrationData;\r\n public isLazyLoadActive: boolean = headerInfo.isEnableLAzyLoad;\r\n\r\n private languagesList: any[] = headerInfo.Languages;\r\n private currentLanguage: any = {};\r\n private loggedIdUser: UserLogin = new UserLogin();\r\n private shoppingCart: any = headerInfo.CartInfo;\r\n private homePageName: string[] = [];\r\n private productsPageName: string[] = [];\r\n private promotionsPageName: string[] = [];\r\n\r\n private loginPageName: string[] = [];\r\n private registerPageName: string[] = [];\r\n private areaClientiName: string[] = [];\r\n private carrelloPageName: string[] = [];\r\n private blogPageName: string[] = [];\r\n private contactPageName: string[] = [];\r\n private disableModalButtons: boolean = false;\r\n private spinner: boolean = false;\r\n private productId: any;\r\n private selectedProduct: any;\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n var date = new Date();\r\n let lang: string = this.language.getShortLang();\r\n\r\n //Setting current language info\r\n for (let entry of this.languagesList) {\r\n if (entry.ShortCode == lang) {\r\n this.currentLanguage = entry;\r\n break;\r\n }\r\n }\r\n\r\n this.homePageName = this.routesService.getRoutePath('HOME');\r\n this.productsPageName = this.routesService.getRoutePath('CATALOGO PRODOTTI (HOME)');\r\n this.promotionsPageName = this.routesService.getRoutePath('CATALOGO - PRODOTTI IN OFFERTA');\r\n\r\n this.loginPageName = this.routesService.getRoutePath('LOGIN');\r\n this.registerPageName = this.routesService.getRoutePath('REGISTRAZIONE');\r\n this.areaClientiName = this.routesService.getRoutePath('AREA CLIENTI - STATISTICHE');\r\n this.carrelloPageName = this.routesService.getRoutePath('CARRELLO');\r\n this.blogPageName = this.routesService.getRoutePath('BLOG');\r\n this.contactPageName = this.routesService.getRoutePath('RICHIESTA INFORMAZIONI');\r\n\r\n //setup of links, they must start with http to work properly\r\n let linkStart = \"http://\";\r\n let linkSecuredStart = \"https://\";\r\n\r\n if (this.company.Facebook != null) {\r\n if (this.company.Facebook.indexOf(linkStart) == -1 && this.company.Facebook.indexOf(linkSecuredStart) == -1) {\r\n this.company.Facebook = linkStart + this.company.Facebook;\r\n }\r\n }\r\n\r\n if (this.company.Youtube != null) {\r\n if (this.company.Youtube.indexOf(linkStart) == -1 && this.company.Youtube.indexOf(linkSecuredStart) == -1) {\r\n this.company.Youtube = linkStart + this.company.Youtube;\r\n }\r\n }\r\n\r\n if (this.company.Twitter != null) {\r\n if (this.company.Twitter.indexOf(linkStart) == -1 && this.company.Twitter.indexOf(linkSecuredStart) == -1) {\r\n this.company.Twitter = linkStart + this.company.Twitter;\r\n }\r\n }\r\n\r\n if (this.company.Website != null) {\r\n if (this.company.Website.indexOf(linkStart) == -1 && this.company.Website.indexOf(linkSecuredStart) == -1) {\r\n this.company.Website = linkStart + this.company.Website;\r\n }\r\n }\r\n\r\n if (this.company.Instagram != null) {\r\n if (this.company.Instagram.indexOf(linkStart) == -1 && this.company.Instagram.indexOf(linkSecuredStart) == -1) {\r\n this.company.Instagram = linkStart + this.company.Instagram;\r\n }\r\n }\r\n }\r\n\r\n\r\n showModal(product) {\r\n this.disableModalButtons = false;\r\n $(\"#headerModal\").modal(\"show\");\r\n this.productId = product.Id;\r\n this.selectedProduct = product;\r\n }\r\n\r\n\r\n hideModal() {\r\n $('#headerModal').modal('hide');\r\n this.disableModalButtons = true;\r\n }\r\n\r\n // customers canvas state module is active and current product has canvasStateId defined, then send a request to delete a state from customers canvas server\r\n removeCustomersCanvasState() {\r\n if (this.selectedProduct.isCanvasEdited && this.selectedProduct.CanvasStateId) {\r\n const canvasConfigData = this.setCanvasConfig(this.selectedProduct);\r\n\r\n this.canvasService.deleteCustomerCanvasState(canvasConfigData)\r\n .subscribe(x => x,\r\n err => {\r\n console.log(err);\r\n });\r\n }\r\n }\r\n\r\n setCanvasConfig(product) {\r\n const canvasConfigData = {\r\n CanvasUrl: headerInfo.CanvasInfo.CanvasUrl,\r\n CustomerCanvasUserName: headerInfo.CanvasInfo.CustomerCanvasUserName,\r\n CanvasStateId: product.CanvasStateId,\r\n CanvasApiKey: headerInfo.CanvasInfo.ApiKey\r\n };\r\n\r\n return canvasConfigData;\r\n }\r\n\r\n //Redirect the user to the homepage for the selected language\r\n setLanguage(lang) {\r\n window.location.href = \"/\" + lang + '/home';\r\n }\r\n\r\n logout() {\r\n this.authService.Logout();\r\n }\r\n\r\n removeFromCart() {\r\n this.spinner = true;\r\n this.disableModalButtons = true;\r\n let removeCartSub = this.cartService.removeFromCart(this.productId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.shoppingCart = this.cartService.getCart();\r\n this.removeCustomersCanvasState();\r\n\r\n this.hideModal();\r\n this.spinner = false;\r\n });\r\n\r\n this.subManager.add(removeCartSub);\r\n }\r\n\r\n //getting value of search input and redirecting to search result page\r\n getSearchResults(inputVal) {\r\n let query = \"\";\r\n inputVal = inputVal.trim();\r\n\r\n if (inputVal == \"\") {\r\n return;\r\n }\r\n else {\r\n this.searchService.setQueryPlainTextValue(inputVal);\r\n\r\n if (inputVal != undefined) {\r\n query = inputVal;\r\n }\r\n else {\r\n let subParam = this.activatedRoute.params.subscribe((params: Params) => {\r\n let encodedQuery = params['query'];\r\n query = decodeURIComponent(encodedQuery);\r\n })\r\n\r\n this.subManager.add(subParam);\r\n\r\n }\r\n }\r\n\r\n query = decodeURIComponent(query);\r\n let uriString = encodeURIComponent(query);\r\n\r\n this.searchService.setQueryValue(uriString);\r\n\r\n let searchRoute = this.routesService.getRoutePath('SEARCH - RESULTS')[0];\r\n searchRoute = searchRoute.replace(\":query\", query);\r\n\r\n this.router.navigate([searchRoute]);\r\n }\r\n setAutoHeightAndWeightToLogo() {\r\n let headerClass = $(\"div\").hasClass(\"header-logo\");\r\n if (headerClass == false) {\r\n //setTimeout(x => this.setAutoHeightAndWeightToLogo(), 1);\r\n }\r\n else {\r\n $(\".header-logo\").attr(\"style\", \"height:auto!important\");\r\n $(\".header-logo\").attr(\"style\", \"width:auto!important\");\r\n }\r\n }\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.headerIsInit) {\r\n return;\r\n }\r\n //setting value of search textbox to search condition value if the current page is search-result page, else, clean it's content\r\n let documentUrl = window.location.href;\r\n\r\n if (documentUrl.indexOf(\"search-results\") != -1) {\r\n var plainSearchText = this.searchService.getQueryPlainTextValue();\r\n if (plainSearchText != \"\") {\r\n $(\"#searchQuery\").val(plainSearchText);\r\n }\r\n else {\r\n this.activatedRoute.params.subscribe((params: Params) => {\r\n let encodedQuery = params['query'];\r\n\r\n var decodedQuery = decodeURIComponent(encodedQuery)\r\n $(\"#searchQuery\").val(decodedQuery);\r\n })\r\n }\r\n }\r\n else {\r\n $(\"#searchQuery\").val(\"\");\r\n }\r\n\r\n $(\"#searchQuery\").keyup(function (event) {\r\n if (event.keyCode === 13) {\r\n $(\"#searchQueryButton\").click();\r\n }\r\n });\r\n\r\n\r\n layoutTheme.initNavMenu();\r\n layoutTheme.initStickyHeader();\r\n if(this.isLazyLoadActive==true)\r\n {\r\n layoutTheme.initLazy();\r\n }\r\n \r\n let config = this.appService.getConfig();\r\n if (config.webStoreStatus == \"offline\") {\r\n this.setAutoHeightAndWeightToLogo();\r\n }\r\n this.headerIsInit = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/header/widget/header.component.ts","import { NgModule } from '@angular/core';\r\nimport { HomeComponent } from './home.component';\r\n\r\n@NgModule({\r\n imports: [\r\n ],\r\n declarations: [\r\n HomeComponent\r\n ]\r\n})\r\nexport class HomeModule { }\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/homepage/sys/home.module.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Injector, Renderer, ComponentFactory, Input, ReflectiveInjector, Compiler, Inject } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\n\r\n//Models\r\nimport { Menu } from \"./../../../../models/cms/menu\";\r\nimport { MegaMenu } from \"./../../../../models/inventory/inventory\";\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { CategoryService } from \"./../../../../services/inventory/category.service\";\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\n\r\n\r\n@Component({\r\n selector: \"dy-side-bar\",\r\n template: \"\"\r\n})\r\n\r\nexport class SideBarMenuComponent implements OnInit \r\n{\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) {}\r\n\r\n @Input() sideType: string = \"sideBarMenu\";\r\n @Input() parentSideMenuData: any;\r\n @Input() bredcrumpInfo: Array;\r\n\r\n ngOnInit() \r\n {\r\n if(!this.isBrowser)\r\n return;\r\n\r\n if (this.parentSideMenuData != null) \r\n {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(this.parentSideMenuData,this.bredcrumpInfo);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n\r\n else \r\n {\r\n let subComponentTemplateUrl: string = \"sideBarMenuTemplate\";\r\n\r\n this.cmsComponentService.getSideMenuData().subscribe(result => \r\n {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result,this.bredcrumpInfo);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n } \r\n }\r\n\r\n private createSubComponent(data: any,breadcrumbs:Array) \r\n {\r\n @Component({\r\n template: data.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit \r\n {\r\n constructor() {}\r\n\r\n megaMenuItems: any = data.Categories;\r\n \r\n breadcrumbsList: Array = new Array() ;\r\n\r\n ngOnInit() \r\n {\r\n if(breadcrumbs!=null)\r\n {\r\n this.breadcrumbsList=breadcrumbs;\r\n }\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/homepage/widget/side-bar-menu.component.ts","import { NgModule } from '@angular/core';\r\n\r\nimport { SharedModule } from '../../../../shared/shared.module';\r\nimport { CmsPageComponent } from './cms-page.component';\r\n\r\n@NgModule({\r\n imports: [\r\n SharedModule\r\n ],\r\n declarations: [\r\n CmsPageComponent\r\n ]\r\n})\r\nexport class CmsPageModule { }\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/cms/page/sys/cms-page.module.ts","import { Injectable } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Location } from '@angular/common';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\nimport { SysConfig } from './system-configuration.service';\r\nimport { CookieService } from './cookie';\r\nimport { CacheService } from './cache.service';\r\n\r\n@Injectable()\r\nexport class RoutesService {\r\n static COOKIE_LANG_KEY: string = 'CURRENT_LANG';\r\n\r\n protected locales: string[];\r\n protected browserLangs: string[];\r\n protected visiblePageLoader: boolean = false;\r\n\r\n constructor(protected router: Router,\r\n protected translate: TranslateService,\r\n protected cookie: CookieService,\r\n protected location: Location,\r\n protected isBrowser: boolean,\r\n protected cache: CacheService) {\r\n }\r\n\r\n public loadRoutes() {\r\n }\r\n\r\n protected getRoutesWithComponents(rawRoutes) {\r\n return rawRoutes.map((route) => {\r\n if (route.component && 'string' === typeof route.component) {\r\n return Object.assign({}, route, {\r\n component: SysConfig.getComponentByName(route.component)\r\n });\r\n }\r\n return route;\r\n });\r\n }\r\n\r\n protected getOnlyOfflineRoutes(rawRoutes) {\r\n\r\n //Keeping only the offline route\r\n let offlineRawRoutes = []\r\n\r\n for (let rowRoute of rawRoutes) \r\n {\r\n if(rowRoute.name == \"OFFLINE\")\r\n {\r\n let redirectToRoute = {\r\n path:\"\",\r\n redirectTo: rowRoute.path,\r\n pathMatch: \"full\"\r\n }\r\n\r\n offlineRawRoutes.push(redirectToRoute);\r\n\r\n let offlineRoute = {\r\n path:rowRoute.path,\r\n component: rowRoute.component,\r\n name: rowRoute.name\r\n }\r\n\r\n offlineRawRoutes.push(offlineRoute);\r\n \r\n let fallBackRoute = {\r\n path:\"**\",\r\n redirectTo: rowRoute.path\r\n }\r\n\r\n offlineRawRoutes.push(fallBackRoute);\r\n\r\n break;\r\n }\r\n else\r\n {\r\n continue;\r\n }\r\n }\r\n\r\n return offlineRawRoutes;\r\n }\r\n\r\n public getLang(): string {\r\n if (!this.locales) {\r\n this.locales = this.cache.get('Locales');\r\n }\r\n let langFromUrl: string = null;\r\n let langFromUrlMatch: RegExpMatchArray;\r\n if (langFromUrlMatch = this.location.path().match(/^\\/(\\w{2})\\//)) {\r\n langFromUrl = langFromUrlMatch[1];\r\n }\r\n let cookieLang: string = this.cookie.get(RoutesService.COOKIE_LANG_KEY);\r\n if (langFromUrl && this.locales.find((existLang) => existLang === langFromUrl)) {\r\n return langFromUrl;\r\n }\r\n if (cookieLang && this.locales.find((existLang) => existLang === cookieLang)) {\r\n return cookieLang;\r\n }\r\n for (let existBrowserLang of this.browserLangs) {\r\n if (this.locales.find((existLang) => existLang === existBrowserLang)) {\r\n return existBrowserLang;\r\n }\r\n }\r\n return this.locales[0];\r\n }\r\n\r\n public getRoutes() : any\r\n {\r\n\r\n }\r\n\r\n public getRoutePath(routeName: string) : any\r\n {\r\n let routes = this.getRoutes();\r\n let routePath: string = \"\";\r\n\r\n\r\n\r\n if(routes!=undefined &&routes!=null )\r\n {\r\n \r\n routes.filter(x => x.name == routeName).forEach(route => {\r\n routePath=\"/\"+route.path;\r\n });\r\n }\r\n//console.log(routes);\r\n//console.log(routes.filter(x => x.name == routeName));\r\n // for (let route of routes) {\r\n // //if the name of the route match the one give in input then the relative route path is returned\r\n // if (route.name == routeName) {\r\n // routePath = \"/\" + route.path;\r\n // break;\r\n // }\r\n // }\r\n\r\n if(routePath===\"\")\r\n {\r\n routePath=\"/\";\r\n }\r\n return [routePath];\r\n }\r\n\r\n public getPage(routeName: string): any {\r\n let routePath: string = \"/\";\r\n if (routeName != \"\" || routeName != undefined) {\r\n let routes = this.getRoutes();\r\n if (routes!= undefined) {\r\n if(routes!=undefined &&routes!=null )\r\n {\r\n \r\n routes.filter(x => x.name == routeName).forEach(route => {\r\n routePath=\"/\"+route.path;\r\n });\r\n }\r\n \r\n \r\n \r\n // for (let route of routes) {\r\n // //if the name of the route match the one give in input then the relative route path is returned\r\n // if (route.name == routeName) {\r\n // routePath = \"/\" + route.path;\r\n // break;\r\n // }\r\n // }\r\n }\r\n }\r\n return routePath;\r\n }\r\n \r\nshowPageLoader()\r\n {\r\n this.visiblePageLoader = true;\r\n }\r\n\r\n hidePageLoader()\r\n { \r\n this.visiblePageLoader = false \r\n // window.setTimeout(() =>\r\n // this.visiblePageLoader = false, 1)\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/routes.service.ts","import { ShoppingCartService } from './../../../services/inventory/shopping-cart.service';\r\n//Angular\r\nimport {\r\n Component, OnInit, ViewContainerRef, Input,\r\n Compiler, Inject, ViewChild, ElementRef, Output, EventEmitter\r\n} from \"@angular/core\";\r\nimport { Subscription } from 'rxjs/Subscription';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { CustomersCanvasService } from \"../../../services/inventory/customerscanvas.service\";\r\n\r\n\r\n@Component({\r\n selector: \"customer-canvas-widget\",\r\n template: \"\"\r\n})\r\n\r\nexport class CanvasWidgetComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n\r\n @Input() parentWidgetData: any;\r\n\r\n ngOnInit() {\r\n if(!this.isBrowser)\r\n return;\r\n \r\n if (this.parentWidgetData != null) {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(this.parentWidgetData);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n }\r\n\r\n private createSubComponent(canvasWidgetComponent: any) {\r\n\r\n @Component({\r\n template: canvasWidgetComponent.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n\r\n @ViewChild('editorPage') editorPage: ElementRef;\r\n @ViewChild('approvePage') approvePage: ElementRef;\r\n @ViewChild('finishOrderPage') finishOrderPage: ElementRef;\r\n\r\n constructor\r\n (\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n\r\n public canvasService: CustomersCanvasService,\r\n private shoppingCartService: ShoppingCartService\r\n ) { }\r\n\r\n private pageIsInit: boolean = false;\r\n\r\n ngOnInit() { }\r\n\r\n // when want to finish design, to move to the second step\r\n finishDesign() {\r\n this.canvasService.getImagesLinks(this.editorPage, this.approvePage, this.finishOrderPage);\r\n }\r\n\r\n // when close a modal with canvas editor, set state to false, so from component we can know the modal is closed\r\n isCanvasModalOpened(isOpened: boolean) {\r\n this.canvasService.openNewProductInEditor();\r\n this.canvasService.setCanvasState(isOpened);\r\n }\r\n\r\n // when the product is successfully created and approved, and second step is done\r\n finishProductCustomization() {\r\n //If the product customization has been successfully completed.\r\n this.canvasService.finishProductCustomization()\r\n .then(result => {\r\n // set canvas response to a property in service, so it can be available to a parent component\r\n this.shoppingCartService.setCustomizationCanvasData(result);\r\n \r\n //Saving hi-res output info.\r\n this.canvasService.setupPageAfterProductCustomization(result, false);\r\n\r\n /* Send notification to the service that we finished product customization, so from parent component we know it and can call method for adding to cart */\r\n this.canvasService.setCanvasProductDesignState(true);\r\n this.canvasService.openNewProductInEditor();\r\n })\r\n //If there was an error thrown while finishing the product customization.\r\n .catch(error => {\r\n this.canvasService.setupPageAfterProductCustomization(error, true);\r\n });\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n layoutTheme.initSlider();\r\n\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/widget/canvas-widget.components.ts","//Angular\r\nimport {\r\n Component, OnInit, ViewContainerRef, Input, Output, EventEmitter, ComponentFactory, ReflectiveInjector,\r\n Compiler, Inject, ElementRef, Renderer\r\n} from \"@angular/core\";\r\n\r\n//Services\r\nimport { SysConfig } from \"./../../../services/core/system-configuration.service\";\r\nimport { SliderService } from \"./../../../services/cms/slider.service\";\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../services/settings/template.service\";\r\nimport { CmsComponentService } from \"./../../../services/cms/cms-component.service\";\r\n\r\n//Models\r\nimport { SliderViewModel } from \"./../../../models/cms/cms-page\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { SeoService } from \"../../../services/core/seo.service\";\r\n\r\n\r\n@Component({\r\n selector: \"dy-slider\",\r\n template: \"\"\r\n})\r\n\r\nexport class SliderWidgetComponent implements OnInit \r\n{\r\n constructor\r\n (\r\n private _compiler: Compiler, \r\n private componentHelper: ComponentHelperService, \r\n private _elementRef: ViewContainerRef, \r\n private templateService: TemplateService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) {}\r\n\r\n @Input() id: string;\r\n @Input() type: string;\r\n @Input() parentSliderData: any;\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (!this.isBrowser)\r\n return;\r\n\r\n if (this.parentSliderData != null) {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(this.parentSliderData);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }\r\n\r\n else {\r\n let sliderData: any;\r\n\r\n let sliderDataSub = this.cmsComponentService.getSliderData(this.type, this.id).subscribe(result => {\r\n sliderData = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(sliderData);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(sliderDataSub);\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n //private createSubComponent(template:string, sliderId: string, sliderType: string) {\r\n private createSubComponent(sliderData: any) {\r\n\r\n @Component({\r\n template:sliderData.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit \r\n {\r\n constructor\r\n (\r\n private sliderService: SliderService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private elementRef: ElementRef, \r\n private renderer: Renderer\r\n ) \r\n {\r\n this.renderer.setElementStyle\r\n (\r\n this.elementRef.nativeElement,\r\n 'display',\r\n this.isBrowser ? 'block' : 'none'\r\n );\r\n }\r\n\r\n slides: any = sliderData.Slides;\r\n sliderIsInit: boolean = false;\r\n\r\n ngOnInit() {}\r\n\r\n goToUrl(url)\r\n {\r\n if(url != null && url.length > 0)\r\n {\r\n window.location.href = url;\r\n }\r\n }\r\n\r\n ngAfterViewChecked() \r\n {\r\n if (!this.isBrowser || this.sliderIsInit) \r\n {\r\n return;\r\n }\r\n\r\n layoutTheme.initSlider();\r\n\r\n this.sliderIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/widget/slider-widget.component.ts","import { Subscription } from 'rxjs/Subscription';\r\n//Angular\r\nimport {\r\n Component, OnInit, ViewContainerRef, Input,\r\n Compiler, Inject, OnDestroy\r\n} from \"@angular/core\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../services/core/component-helper.service\";\r\nimport { TrustpilotService } from \"../../../services/cms/trustpilot.service\";\r\n\r\n@Component({\r\n selector: \"trustpilot-widget\",\r\n template: \"\"\r\n})\r\n\r\nexport class TrustpilotWidgetComponent implements OnInit, OnDestroy {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n private trustpilotService: TrustpilotService\r\n ) { }\r\n\r\n\r\n private sub = new Subscription();\r\n @Input() trustpilotType: string;\r\n\r\n ngOnInit() {\r\n if (!this.trustpilotType)\r\n this.trustpilotType = 'default';\r\n\r\n let trustpilotSub = this.trustpilotService.getTrustpilotData(this.trustpilotType).subscribe(result => {\r\n //-- If result is null, it means that trustpilot with given type doesn't exist, or trustpilot module is not active\r\n let subComponent = this.createSubComponent(result);\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n })\r\n\r\n this.sub.add(trustpilotSub);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.sub.unsubscribe();\r\n }\r\n\r\n private createSubComponent(trustpilotData: any) {\r\n\r\n //-- If trustpilot module is not active, we are going to set a template to empty string \r\n @Component({\r\n template: trustpilotData.TemplateHtml || \"\"\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n\r\n constructor\r\n (\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n ) { }\r\n\r\n private pageIsInit: boolean = false;\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n //-- Initializing trustbox\r\n const trustboxesRef = Array.from(document.querySelectorAll('.trustpilot-widget'));\r\n //-- Initialize all trustbox instances on the page\r\n if (trustboxesRef && trustboxesRef.length > 0)\r\n trustboxesRef.forEach(singleTrustboxInstance => Trustpilot.loadFromElement(singleTrustboxInstance));\r\n\r\n this.pageIsInit = true;\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/core/widget/trustpilot-widget.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Input, ComponentFactory, ReflectiveInjector, Compiler, Inject } from \"@angular/core\";\r\n\r\n//Services\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { ProductService } from \"./../../../../../../services/inventory/product.service\";\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\n\r\n@Component({\r\n selector: \"dy-quoting-order-totals-widget\",\r\n template: \"\"\r\n})\r\nexport class QuotingOrderTotalsComponent implements OnInit \r\n{\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private templateService: TemplateService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) {}\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() \r\n {\r\n if (!this.isBrowser)\r\n return;\r\n \r\n let templateHtml: string;\r\n\r\n let orderTotalSub = this.templateService.getComponentTemplate(\"quotingOrderTotalsWidgetTemplate\").subscribe(result => \r\n {\r\n templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(templateHtml);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n \r\n this.subManager.add(orderTotalSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(template: string) {\r\n\r\n @Component({\r\n template: template\r\n })\r\n\r\n class ChildComponent implements OnInit \r\n {\r\n constructor\r\n (\r\n private productService: ProductService, \r\n private languageService: LanguageService, \r\n private cartService: ShoppingCartService,\r\n private _elementChildRef: ViewContainerRef\r\n ) {}\r\n\r\n ngOnInit() {}\r\n\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting-result/wizard/widget/quoting-order-totals.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Inject, Compiler, Input } from \"@angular/core\";\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { BootboxService } from './../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../services/inventory/shopping-cart.service\";\r\nimport { CmsComponentService } from \"./../../../../services/cms/cms-component.service\";\r\nimport { RoutesService } from \"./../../../../services/core/routes.service\";\r\n//Models\r\nimport { LavorazioniAccessorieModel } from \"./../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel,MatrixModelCalculation } from \"./../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../models/document/quoting-submit-model\";\r\nimport { QuotingConstants } from './../../../../models/constants/quoting-constants';\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { ExcludingComponent } from \"./quoting-excluding.component\";\r\nimport { SharedConstants } from \"../../../../models/constants/shared-constants\";\r\nimport { QuotingModel, MyLavorazioneAccessoria, MyVarianteMatrice, } from \"../../../../models/document/quoting-model\";\r\nimport { CurrencyService } from \"../../../../services/cms/currency.service\";\r\n\r\n@Component({\r\n selector: \"dy-other-product-quoting-form\",\r\n template: \"\"\r\n})\r\n\r\n\r\nexport class OtherProductFormComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private authService: AuthService,\r\n private languageService: LanguageService,\r\n private cmsComponentService: CmsComponentService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n @Input() productId: string;\r\n\r\n autentification = this.authService.GetData();\r\n lang: string = this.languageService.getLongLang();\r\n private userId = this.authService.GetUserId();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (!this.isBrowser) {\r\n return;\r\n }\r\n\r\n //Instead of reading only the template, also the information to show are retrieved (eg. menu list)\r\n let otherProdSub = this.cmsComponentService.getOtherProductData(this.productId, this.userId).subscribe(result => {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, this.productId);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(otherProdSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(formInfo: any, InputresourceId: string) {\r\n\r\n @Component({\r\n template: formInfo.TemplateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private _quotingService: QuotingService,\r\n private authService: AuthService,\r\n private translate: TranslateService,\r\n private routesService: RoutesService,\r\n public currency: CurrencyService,\r\n private cartService: ShoppingCartService,\r\n private bootboxService: BootboxService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n formData = formInfo.FormData;\r\n private pageIsInit: boolean = false;\r\n private pageIsInitAfter: boolean = false;\r\n private loggedIdUser: UserLogin;\r\n private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n\r\n resourceId: string = InputresourceId;\r\n model = new wizardFormEditoriaModel();\r\n resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n resultCalculation: boolean = false;\r\n isDataInitialized: boolean = false;\r\n requestInfoSuccess: boolean = null;\r\n showErrorMessage: boolean = false;\r\n companyInformation = formInfo.CompanyInfo;\r\n isFormValid: boolean = true;\r\n currentRowIndex: number = -1;\r\n currentColumnIndex: number = -1;\r\n typePriceResult: string;\r\n copieMessage: string;\r\n MatrixMessage: string;\r\n sumQtaMatrix: number = 0\r\n totalQtaForMatrix: number = 0\r\n isCalculatedProduct: boolean = false;\r\n isVisibleMatrixLav: boolean = false;\r\n private ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n private responseModel: QuotingModel = new QuotingModel();\r\n //isapplyingrules: boolean = false;\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array>();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n this.typePriceResult = \"no-tax\";\r\n this.formData.gruppi.forEach(group => {\r\n group.varianti.forEach(varianti => {\r\n if (varianti.tipo == 7) {\r\n varianti.VarianteMatrix = this.createMatriceObj(varianti);\r\n this.isVisibleMatrixLav = true;\r\n }\r\n });\r\n\r\n });\r\n\r\n this.ExcludingRules.setMacrocategory(SharedConstants.OTHER_PRODUCTS_TYPE);\r\n\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new QuotingModel();\r\n if (!this.isDataInitialized) {\r\n this.convertLogicalToViewQuotingModel();\r\n this.checkValidation()\r\n }\r\n }\r\n\r\n //-- Create quoting object from form data object, because we need it for applying rules(regole)\r\n private convertLogicalToViewQuotingModel() {\r\n this.responseModel.listaRegole = this.formData.listaRegole;\r\n this.responseModel.calculationType = this.formData.calculationType;\r\n this.responseModel.companyCondizioni = this.formData.companyCondizioni;\r\n this.responseModel.lavorazioniAccessorie = [];\r\n\r\n //-- From gruppi obect get all varianti and convert it to Lavorazioni Accessorie model\r\n this.formData.gruppi.forEach(group => {\r\n group.varianti.forEach(varianti => {\r\n let lavAcc = this.convertLogicalToViewModelVarianti(varianti);\r\n\r\n this.responseModel.lavorazioniAccessorie.push(lavAcc);\r\n });\r\n });\r\n }\r\n\r\n //-- Convert varianti model to lavorazioni accessorie model\r\n private convertLogicalToViewModelVarianti(varianti) {\r\n let lavAcc: MyLavorazioneAccessoria = new MyLavorazioneAccessoria();\r\n\r\n lavAcc.id = varianti.id;\r\n lavAcc.obbligatorio = varianti.obbligatorio;\r\n lavAcc.tipo = varianti.tipo;\r\n lavAcc.description = varianti.description;\r\n lavAcc.hasInfo = varianti.hasInfo;\r\n lavAcc.showInfo = varianti.showInfo;\r\n lavAcc.isVisible = varianti.isVisible;\r\n lavAcc.image = varianti.image;\r\n lavAcc.value = varianti.value;\r\n lavAcc.valori = varianti.valori;\r\n lavAcc.lavorazioneCheckValue = (varianti.lavorazioneCheckValue == 'true');\r\n lavAcc.isCalculated = varianti.isCalculated;\r\n lavAcc.tipoSelezione = varianti.tipoSelezione;\r\n lavAcc.idVarianteMatriceOrizzontale = varianti.idVarianteMatriceOrizzontale;\r\n lavAcc.idVarianteMatriceVerticale = varianti.idVarianteMatriceVerticale;\r\n if (varianti.tipo == 7) {\r\n //lavAcc.VarianteMatrix=this.createMatriceObj(varianti);\r\n lavAcc.VarianteMatrix = this.formData.VarianteMatrix;\r\n }\r\n //--If type is numeric or dropdown, valore is intFormValue, else it is valore\r\n if (varianti.tipo == 1 || varianti.tipo == 2) {\r\n lavAcc.valore = varianti.intFormValue;\r\n }\r\n else {\r\n lavAcc.valore = varianti.valore;\r\n }\r\n\r\n return lavAcc;\r\n }\r\n createMatriceObj(variante) {\r\n let varianteMatrice: MyVarianteMatrice = new MyVarianteMatrice();\r\n varianteMatrice.VarianteVerticale = new Array();\r\n varianteMatrice.VarianteOrizzontale = new Array();\r\n this.formData.gruppi.forEach(group => {\r\n group.varianti.forEach(varianti => {\r\n if (variante.idVarianteMatriceVerticale == varianti.id) {\r\n varianti.isMatrix = true;\r\n varianti.valori.forEach(option => {\r\n let varianteMatverticale: MyVarianteMatrice = new MyVarianteMatrice();\r\n varianteMatverticale.id = option.chiave;\r\n varianteMatverticale.nome = option.valore;\r\n varianteMatverticale.colore = option.colorExaForMatrix;\r\n varianteMatverticale.imgPath = option.image;\r\n varianteMatverticale.mostraPerVariantiMatrice = option.mostraPerVariantiMatrice;\r\n varianteMatverticale.popup = \"\";\r\n varianteMatverticale.VarianteOrizzontale = new Array();\r\n group.varianti.forEach(varianti2 => {\r\n if (variante.idVarianteMatriceOrizzontale == varianti2.id) {\r\n varianti.isMatrix = true;\r\n varianti2.valori.forEach(option2 => {\r\n let varianteMat2: MyVarianteMatrice = new MyVarianteMatrice();\r\n varianteMat2.id = option2.chiave;\r\n varianteMat2.nome = option2.valore;\r\n varianteMat2.qta = 0;\r\n varianteMat2.colore = option2.colorExaForMatrix;\r\n varianteMat2.imgPath = option2.image;\r\n varianteMat2.mostraPerVariantiMatrice = option2.mostraPerVariantiMatrice;\r\n varianteMatverticale.VarianteOrizzontale.push(varianteMat2);\r\n });\r\n }\r\n });\r\n varianteMatrice.VarianteVerticale.push(varianteMatverticale);\r\n });\r\n }\r\n if (variante.idVarianteMatriceOrizzontale == varianti.id) {\r\n varianti.isMatrix = true;\r\n varianti.valori.forEach(option3 => {\r\n let varianteMat3: MyVarianteMatrice = new MyVarianteMatrice();\r\n varianteMat3.id = option3.chiave;\r\n varianteMat3.nome = option3.valore;\r\n varianteMat3.qta = 0;\r\n varianteMat3.colore = option3.colorExaForMatrix;\r\n varianteMat3.imgPath = option3.image;\r\n varianteMat3.mostraPerVariantiMatrice = option3.mostraPerVariantiMatrice;\r\n varianteMatrice.VarianteOrizzontale.push(varianteMat3);\r\n });\r\n }\r\n });\r\n });\r\n return varianteMatrice;\r\n }\r\n checkRegoleOtherProducts() {\r\n try {\r\n let lavAccArray = new Array();\r\n\r\n this.formData.gruppi.forEach(group => {\r\n group.varianti.forEach(varianti => {\r\n //console.log(varianti)\r\n let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (varianti.tipo == \"2\") {\r\n lav.lavorazioneId = varianti.id;\r\n lav.valoreLavorazione = varianti.intFormValue;\r\n lavAccArray.push(lav);\r\n }\r\n })\r\n })\r\n\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n this.ExcludingRules.ResetRegole(\"AP\", \"ACCESSORIA\", \"\", \"ALTRO_PRODOTTO\", null, null, this.responseModel, this.formData.gruppi);\r\n\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"AP\", \"ALTRO_PRODOTTO\", this.responseModel, this.formData.gruppi);\r\n\r\n //if the old value id different to the new one i call the method for update description and image\r\n let count = 0;\r\n this.formData.gruppi.forEach(group => {\r\n group.varianti.forEach(lavorazione => {\r\n count = 0;\r\n for (let lavorazioneOld of lavAccArray) {\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.intFormValue != lavorazioneOld.valoreLavorazione)) {\r\n this.dropDownChange(lavorazione,true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n })\r\n })\r\n //this.isapplyingrules=false;\r\n }\r\n catch (error) {\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n checkBoxChanged(lavorazione) {\r\n //-- Updating lavorazioniAccessorie model\r\n for (let variante of this.responseModel.lavorazioniAccessorie) {\r\n if (variante.id == lavorazione.id) {\r\n variante.hasInfo = lavorazione.hasInfo;\r\n variante.lavorazioneCheckValue = (lavorazione.lavorazioneCheckValue == 'true');\r\n variante.valore = lavorazione.intFormValue;\r\n break;\r\n }\r\n }\r\n\r\n this.convertLogicalToViewQuotingModel();\r\n this.checkValidation();\r\n }\r\n\r\n dropDownChange(lavorazione,isrules=false) {\r\n //this.isapplyingrules=true;\r\n //-- Setting option description (if there is)\r\n for (let variante of lavorazione.valori) {\r\n if (lavorazione.intFormValue == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n //-- Updating lavorazioniAccessorie model\r\n for (let variante of this.responseModel.lavorazioniAccessorie) {\r\n if (variante.id == lavorazione.id) {\r\n variante.hasInfo = lavorazione.hasInfo;\r\n variante.valore = lavorazione.intFormValue;\r\n }\r\n }\r\n if(isrules==false)\r\n {\r\n this.checkValidation()\r\n }\r\n }\r\n \r\n\r\n\r\n lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n lavorazione.intFormValue = lavorazioneId;\r\n this.dropDownChange(lavorazione);\r\n }\r\n\r\n checkValidation() {\r\n\r\n\r\n this.isCalculatedProduct = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n\r\n this.checkRegoleOtherProducts();\r\n //console.log(this.isapplyingrules)\r\n //if (this.isapplyingrules == false) {\r\n\r\n this.checkForm();\r\n if (this.isFormValid) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel()\r\n }\r\n\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n // }\r\n }\r\n\r\n checkFormRichiestaPrevIsValid() {\r\n let result: boolean = false;\r\n\r\n if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n sendRequestInfo() {\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n if (result == true) {\r\n this.requestInfoSuccess = true;\r\n }\r\n else {\r\n this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n \r\n },\r\n err => {\r\n this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n }\r\n\r\n showHideLavDescription(lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n }\r\n\r\n checkForm() {\r\n if (this.isCalculationTypeCalcolato() || this.isCalculationTypeCalcolatoScontistica()) {\r\n this.isFormValid=true;\r\n let message;\r\n let numCopie = parseInt(this.formData.quantity);\r\n let minCopie = this.formData.minimo_quantita;\r\n let maxCopie = this.formData.maximo_quantita;\r\n\r\n if (this.formData.tipoCopie == 'libera') {\r\n //Quantity\r\n if (this.formData.quantity == null || numCopie <= 0) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.formData.isQuantityValidated = false;\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n }\r\n else if (maxCopie == 0 || this.formData.maximo_quantita == null) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.formData.isQuantityValidated = false;\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n }\r\n else {\r\n this.formData.isQuantityValidated = true;\r\n this.isFormValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.formData.isQuantityValidated = true;\r\n this.isFormValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.formData.isQuantityValidated = false;\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n }\r\n }\r\n\r\n this.copieMessage = message;\r\n }\r\n else {\r\n if (this.formData.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.formData.isQuantityValidated = false;\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n }\r\n else {\r\n this.formData.quantity = this.formData.idCopie;\r\n this.formData.isQuantityValidated = true;\r\n }\r\n\r\n if (this.formData.tipoCopie === 'fissa' && this.formData.copie != null) {\r\n this.formData.copieCount = this.formData.copie.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n }\r\n else {\r\n if (parseInt(this.formData.quantity) <= 0) {\r\n this.formData.quantity = 1;\r\n }\r\n this.isFormValid = true;\r\n this.formData.isQuantityValidated = true;\r\n }\r\n\r\n this.sumQtaMatrix = 0;\r\n let ismatrixPresent=false;\r\n //Attributes\r\n for (let group of this.formData.gruppi) {\r\n for (let attribute of group.varianti) {\r\n //-- Count all varianti options that should be visible\r\n if (attribute.valori != null) {\r\n attribute.valoriCount = attribute.valori.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n if (attribute.tipo == 1) //NUMERIC\r\n {\r\n let message: string = \"\";\r\n let qta = parseInt(attribute.intFormValue);\r\n let minQta = attribute.minQtaInput;\r\n let maxQta = attribute.maxQtaInput;\r\n if (attribute.intFormValue == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n attribute.isValidated = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n attribute.isValidated = false;\r\n }\r\n else {\r\n attribute.isValidated = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n attribute.isValidated = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n attribute.isValidated = false;\r\n }\r\n }\r\n if (attribute.isValidated == false) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n }\r\n attribute.lavorazioneMessage = message;\r\n }\r\n else if (attribute.tipo == 2) //DROPDOWN\r\n {\r\n //The value shall be greater than zero\r\n if (attribute.intFormValue < 0) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n\r\n attribute.isValidated = false;\r\n }\r\n\r\n else {\r\n attribute.isValidated = true;\r\n }\r\n }\r\n\r\n else if (attribute.tipo == 5) //FORMAT\r\n {\r\n //Width validation\r\n let convertedWidth = Number(attribute.numWidthFormValue);\r\n let convertedHeight = Number(attribute.numHeightFormValue);\r\n let convertedDepth = Number(attribute.numDepthFormValue);\r\n\r\n //Checking if it is not mandatory\r\n if (attribute.obbligatorio == false) {\r\n //There is no validation if the three dimentions are not set\r\n if (convertedWidth == 0 && convertedHeight == 0 && convertedDepth == 0) {\r\n attribute.isWidthValidated = true;\r\n attribute.isHeightValidated = true;\r\n attribute.isDepthValidated = true;\r\n continue;\r\n }\r\n }\r\n\r\n //Checking if it is a valid number\r\n\r\n if (isNaN(convertedWidth)) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n\r\n attribute.isWidthValidated = false;\r\n attribute.widthErrorMex = \"Inserisci un valore valido\";\r\n }\r\n\r\n else {\r\n if (attribute.max_base == 0) {\r\n //The value shall be greater than the minimum\r\n if (convertedWidth < attribute.min_base) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n\r\n attribute.isWidthValidated = false;\r\n attribute.widthErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_base\r\n }\r\n\r\n else {\r\n attribute.isWidthValidated = true;\r\n attribute.widthErrorMex = \"\";\r\n }\r\n }\r\n\r\n else {\r\n //3 - minbase = 0 - maxbase N - inserisci un valore compresto tra 0 e N\r\n //4 - minbase = N - maxbase M - inserisci un valore compresto tra 0 e N\r\n if (convertedWidth < attribute.min_base || convertedWidth > attribute.max_base) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n\r\n attribute.isWidthValidated = false;\r\n attribute.widthErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_base + \" e \" + attribute.max_base\r\n }\r\n\r\n else {\r\n attribute.isWidthValidated = true;\r\n attribute.widthErrorMex = \"\";\r\n }\r\n }\r\n }\r\n\r\n //Height validation\r\n\r\n //Checking if it is a valid number\r\n if (isNaN(convertedHeight)) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n\r\n attribute.isHeightValidated = false;\r\n attribute.heightErrorMex = \"Inserisci un valore valido\";\r\n }\r\n\r\n else {\r\n if (attribute.max_altezza == 0) {\r\n //1 - min_altezza = 0 - max_altezza 0 - inserisci un valore maggiore id zero\r\n //2 - min_altezza = N - max_altezza 0 - inserisci un valore maggiore id N \r\n\r\n //The value shall be greater than the minimum\r\n if (convertedHeight < attribute.min_altezza) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n\r\n attribute.isHeightValidated = false;\r\n attribute.heightErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_altezza\r\n }\r\n\r\n else {\r\n attribute.isHeightValidated = true;\r\n attribute.heightErrorMex = \"\";\r\n }\r\n }\r\n\r\n else {\r\n //3 - min_altezza = 0 - max_altezza N - inserisci un valore compresto tra 0 e N\r\n //4 - min_altezza = N - max_altezza M - inserisci un valore compresto tra 0 e N\r\n if (convertedHeight < attribute.min_altezza || convertedHeight > attribute.max_altezza) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n\r\n attribute.isHeightValidated = false;\r\n attribute.heightErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_altezza + \" e \" + attribute.max_altezza\r\n }\r\n\r\n else {\r\n attribute.isHeightValidated = true;\r\n attribute.heightErrorMex = \"\";\r\n }\r\n }\r\n }\r\n\r\n //Depth\r\n if (attribute.hasDepth == true) {\r\n //Checking if it is a valid number\r\n if (isNaN(convertedDepth)) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n\r\n attribute.isDepthValidated = false;\r\n attribute.depthErrorMex = \"Inserisci un valore valido\";\r\n }\r\n\r\n else {\r\n if (attribute.max_profondita == 0) {\r\n //1 - min_profondita = 0 - max_profondita 0 - inserisci un valore maggiore id zero\r\n //2 - min_profondita = N - max_profondita 0 - inserisci un valore maggiore id N \r\n\r\n //The value shall be greater than the minimum\r\n if (convertedDepth < attribute.min_profondita) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n\r\n attribute.isDepthValidated = false;\r\n attribute.depthErrorMex = \"Inserisci un valore maggiore o uguale a \" + attribute.min_profondita\r\n }\r\n\r\n else {\r\n attribute.isDepthValidated = true;\r\n attribute.depthErrorMex = \"\";\r\n }\r\n }\r\n\r\n else {\r\n //3 - min_profondita = 0 - max_profondita N - inserisci un valore compresto tra 0 e N\r\n //4 - min_profondita = N - max_profondita M - inserisci un valore compresto tra 0 e N\r\n if (convertedDepth < attribute.min_profondita || convertedDepth > attribute.max_profondita) {\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n\r\n attribute.isDepthValidated = false;\r\n attribute.depthErrorMex = \"Inserisci un valore compreso tra \" + attribute.min_profondita + \" e \" + attribute.max_profondita\r\n }\r\n\r\n else {\r\n attribute.isDepthValidated = true;\r\n attribute.depthErrorMex = \"\";\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n else if (attribute.tipo == 7)//MATRIX\r\n {\r\n ismatrixPresent=true;\r\n attribute.VarianteMatrix.VarianteVerticale.forEach(varianti => {\r\n varianti.VarianteOrizzontale.filter(x => x.qta > 0).forEach(varianti2 => {\r\n this.sumQtaMatrix += varianti2.qta\r\n });\r\n });\r\n }\r\n }\r\n }\r\n\r\n if (ismatrixPresent == true) {\r\n\r\n if (this.formData.tipoCopie == 'libera') {\r\n\r\n this.totalQtaForMatrix = this.formData.quantity\r\n }\r\n else {\r\n this.totalQtaForMatrix = this.formData.idCopie\r\n }\r\n if (this.totalQtaForMatrix != this.sumQtaMatrix) {\r\n this.formData.isQuantityMatrixValidated = false;\r\n if (this.isFormValid == true) {\r\n this.isFormValid = false;\r\n }\r\n let message = this.getLabel('matrix_message_qta');\r\n message += \" \" + this.totalQtaForMatrix;\r\n this.MatrixMessage = message;\r\n }\r\n else {\r\n this.formData.isQuantityMatrixValidated = true;\r\n }\r\n }\r\n \r\n }\r\n\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n\r\n return message;\r\n }\r\n /// Create model for passed in input to the calculation method\r\n getCalculationModel() {\r\n if (this.formData.tipoCopie != 'libera') {\r\n this.model.numCopie = this.formData.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.formData.quantity;\r\n }\r\n\r\n this.model.macrocategoryWizardId = 13;\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = parseInt(this.resourceId);\r\n\r\n this.model.lavorazioniAccessorie = new Array();\r\n\r\n for (let gruppo of this.formData.gruppi) {\r\n for (let variante of gruppo.varianti) {\r\n if (variante.isVisible == true) {\r\n let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n lavorazione.matrixValues = new Array();\r\n //checkbox\r\n if (parseInt(variante.tipo) == 0) {\r\n lavorazione.lavorazioneId = variante.id;\r\n if (variante.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n //combo\r\n else if (parseInt(variante.tipo) == 2) {\r\n if (!variante.isMatrix) {\r\n if (variante.intFormValue == \"0\") {\r\n lavorazione.lavorazioneId = variante.id;\r\n lavorazione.valoreLavorazione = \"-1\";\r\n }\r\n\r\n else {\r\n lavorazione.lavorazioneId = variante.id;\r\n lavorazione.valoreLavorazione = variante.intFormValue;\r\n }\r\n }\r\n }\r\n //numeric\r\n else if (parseInt(variante.tipo) == 1) {\r\n if (variante.intFormValue != null) {\r\n lavorazione.lavorazioneId = variante.id;\r\n lavorazione.valoreLavorazione = variante.intFormValue;\r\n }\r\n }\r\n //formato\r\n else if (parseInt(variante.tipo) == 5) {\r\n if (variante.numWidthFormValue != null) {\r\n lavorazione.lavorazioneId = variante.id;\r\n lavorazione.tipo = variante.tipo;\r\n if (variante.hasDepth == true) {\r\n lavorazione.numWidthFormValue = variante.numWidthFormValue;\r\n lavorazione.numHeightFormValue = variante.numHeightFormValue;\r\n lavorazione.numDepthFormValue = variante.numDepthFormValue;\r\n }\r\n\r\n else {\r\n lavorazione.numWidthFormValue = variante.numWidthFormValue;\r\n lavorazione.numHeightFormValue = variante.numHeightFormValue;\r\n }\r\n }\r\n }\r\n //textarea\r\n else if (parseInt(variante.tipo) == 6) {\r\n lavorazione.lavorazioneId = variante.id;\r\n lavorazione.valoreLavorazione = variante.value;\r\n }\r\n else if (parseInt(variante.tipo) == 7)\r\n {\r\n variante.VarianteMatrix.VarianteVerticale.forEach(varianti => {\r\n varianti.VarianteOrizzontale.filter(x => x.qta > 0).forEach(varianti2 => {\r\n let matrix: MatrixModelCalculation = new MatrixModelCalculation();\r\n matrix.quantita=varianti2.qta;\r\n matrix.lavorazioneOrizzontaleId=varianti2.id;\r\n matrix.lavorazioneVerticaleId=varianti.id;\r\n lavorazione.tipo = variante.tipo;\r\n lavorazione.lavorazioneId = variante.id;\r\n lavorazione.matrixValues.push(matrix)\r\n });\r\n });\r\n }\r\n\r\n if ((lavorazione.lavorazioneId != null && lavorazione.valoreLavorazione != \"-1\")||parseInt(variante.tipo) == 7) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n this.isDataInitialized = true;\r\n }\r\n if (this.formData.calculationType != QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO) {\r\n let calculationSub = this._quotingService.getCalculatedAp(this.model).subscribe(result => {\r\n this.resultPrice = result;\r\n this.isCalculatedProduct = true;\r\n\r\n if (this.isCalculationTypeCalcolatoScontistica()) {\r\n let scontisticaTable = this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n let price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListino() || this.isCalculationTypeCalcolatoListino() || this.isCalculationTypeCalcolatoListinoFornitori()) {\r\n let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListinoScontistica() || this.isCalculationTypeCalcolatoListinoScontistica() || this.isCalculationTypeCalcolatoListinoFornitoriScontistica()) {\r\n //Selecting first element\r\n let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n let breakFlag = false;\r\n for (let priceRow of tableScontisticaPriceListSliced) {\r\n let slicedPriceRow = priceRow.slice(1);\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (let price of reverse) {\r\n if (price.Price != -1) {\r\n this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n this.subManager.add(calculationSub);\r\n\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n },\r\n err => {\r\n this.isCalculatedProduct = false;\r\n this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n );\r\n\r\n this.subManager.add(calculationSub);\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n this.isDataInitialized = true;\r\n }\r\n\r\n isCustomerLoggedIn() {\r\n return this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n isCalculationTypeCalcolatoQuotigPrev() {\r\n let result: boolean = false;\r\n\r\n if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolato() {\r\n let result: boolean = false;\r\n if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoScontistica() {\r\n let result: boolean = false;\r\n if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_SCONTISTICA) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListino(): boolean {\r\n let retVal: boolean = false;\r\n if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO) {\r\n retVal = true;\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n isCalculationTypeListinoScontistica(): boolean {\r\n let retVal: boolean = false;\r\n if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_LISTINO_SCONTISTICA) {\r\n retVal = true;\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n isCalculationTypeCalcolatoListino(): boolean {\r\n let retVal: boolean = false;\r\n if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO) {\r\n retVal = true;\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n isCalculationTypeCalcolatoListinoFornitori(): boolean {\r\n let retVal: boolean = false;\r\n if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI) {\r\n retVal = true;\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n\r\n isCalculationTypeCalcolatoListinoScontistica(): boolean {\r\n let retVal: boolean = false;\r\n if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_SCONTISTICA) {\r\n retVal = true;\r\n }\r\n\r\n return retVal;\r\n }\r\n isCalculationTypeCalcolatoListinoFornitoriScontistica(): boolean {\r\n let retVal: boolean = false;\r\n if (this.formData.calculationType == QuotingConstants.WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI_SCONTISTICA) {\r\n retVal = true;\r\n }\r\n\r\n return retVal;\r\n }\r\n ngAfterViewInit() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n $('#quotingFormLoader').hide();\r\n let altezza = $(\"#footer\").outerHeight();\r\n let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n\r\n let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n\r\n let altezzaHead = $(\".header-body\").outerHeight();\r\n let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n }\r\n\r\n checkEmailIsValid() {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n }\r\n\r\n setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n setListinoScontisticaPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n\r\n isRowSelectedListino(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isRowSelected(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelected(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelectedListino(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n //Deselecting the current price and selected the one passed in input\r\n for (let price of this.resultPrice.TablePriceList) {\r\n price.IsSelected = false;\r\n }\r\n\r\n price.IsSelected = true;\r\n\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n this.resultPrice.DayDescriptionName = price.DayDescriptionName;\r\n this.resultPrice.DayDescriptionStatus = price.DayDescriptionStatus;\r\n\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n }\r\n\r\n isColumnSelected(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setTypePriceResult(type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n }\r\n\r\n setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n setListinoPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n\r\n addToCartApProduct() {\r\n let wizardId = parseInt(this.resourceId);\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let addToCartSub = this.cartService.addApProductToCart(wizardId, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(addToCartSub);\r\n }\r\n\r\n addToCartOtherProductCalcolatoScontistica(quantityId: number) {\r\n let wizardId = parseInt(this.resourceId);\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addOtherProductCalcolatoScontisticaToCart(wizardId, this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListino(quantityId: number) {\r\n let wizardId = parseInt(this.resourceId);\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n\r\n\r\n let sub = this.cartService.addOtherProductListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListinoScontistica(quantityId: number) {\r\n let wizardId = parseInt(this.resourceId);\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addOtherProductListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addOtherProductCalcolatoListinoToCart(quantityId: number) {\r\n let wizardId = parseInt(this.resourceId);\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n\r\n let sub = this.cartService.addOtherProductCalcolatoListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.Varianti).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addOtherProductCalcolatoListinoScontisticaToCart(quantityId: number) {\r\n let wizardId = parseInt(this.resourceId);\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addOtherProductCalcolatoListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, wizardId, this.resultPrice.DataId, this.resultPrice.Varianti).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n textAreaCheck(event: any) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n $('.popovers').popover();\r\n layoutTheme.initToggle();\r\n this.setPopoverVariableForMAtrix();\r\n this.pageIsInitAfter = true;\r\n }\r\n\r\n setPopoverVariableForMAtrix()\r\n {\r\n for (let gruppo of this.formData.gruppi) {\r\n for (let variante of gruppo.varianti) {\r\n if (parseInt(variante.tipo) == 7) {\r\n variante.VarianteMatrix.VarianteVerticale.forEach(varianti => {\r\n\r\n varianti.popup = $('#popover_content_wrapper_' + varianti.id).html()\r\n });\r\n }\r\n }\r\n }\r\n }\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/other-product-form.component.ts","import { Subscription } from 'rxjs/Subscription';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Input, Inject } from \"@angular/core\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../services/core/component-helper.service\";\r\nimport { LanguageService } from \"./../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../services/settings/template.service\";\r\n\r\n@Component({\r\n selector: \"dy-quoting\",\r\n template: \"\"\r\n})\r\n\r\n\r\n\r\nexport class QuotingMainComponent implements OnInit \r\n{\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private templateService: TemplateService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n\r\n ) {}\r\n\r\n @Input() QResourceId: number;\r\n @Input() QMacroCat: number;\r\n @Input() QType: string;\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() \r\n {\r\n if (!this.isBrowser)\r\n return;\r\n\r\n let templateHtml: string;\r\n\r\n let compSub = this.templateService.getComponentTemplate(\"quotingMainTemplate\").subscribe(result => \r\n {\r\n templateHtml = result;\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(templateHtml, this.QResourceId, this.QMacroCat, this.QType);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n }); \r\n\r\n this.subManager.add(compSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(template: string, InputresourceId: number, InputMacroCatId: number, InputTypeId: string) \r\n {\r\n @Component({\r\n template: template\r\n })\r\n\r\n class ParentComponent implements OnInit \r\n {\r\n constructor\r\n (\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n ) {}\r\n\r\n QResourceId: number = InputresourceId;\r\n QMacroCat: number = InputMacroCatId;\r\n QType: string = InputTypeId;\r\n\r\n lang: string = this.languageService.getLongLang();\r\n autentification = this.authService.GetData();\r\n\r\n ngOnInit() {\r\n\r\n }\r\n\r\n }\r\n\r\n return ParentComponent;\r\n }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/quoting-main.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, ComponentFactory, ReflectiveInjector, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../../../shared/mapping';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n\r\n///Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from \"../../../../../../services/inventory/customerscanvas.service\";\r\n\r\n@Component({\r\n selector: \"dy-wizard-adesivi-widget\",\r\n template: \"\"\r\n})\r\n\r\n\r\nexport class WizardAdesiviComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private _quotingService: QuotingService,\r\n private authService: AuthService,\r\n private languageService: LanguageService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n @Input() resourceId: number;\r\n autentification = this.authService.GetData();\r\n private userId = this.authService.GetUserId();\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (!this.isBrowser)\r\n return;\r\n\r\n let wizardSub = this._quotingService.getWizardAdesiviData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(wizardSub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, InputresourceId: number) {\r\n\r\n @Component({\r\n template: result.templateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private _quotingService: QuotingService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private translate: TranslateService,\r\n private routesService: RoutesService,\r\n private cartService: ShoppingCartService,\r\n private bootboxService: BootboxService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n public canvasService: CustomersCanvasService\r\n ) {\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n const canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(\r\n isModalOpened => {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(\r\n isDesignApproved => {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n\r\n if (this.isCalculationTypeCalcolato()) {\r\n this.addToCartWizardCalcolato(1);\r\n }\r\n else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n this.addToCartWizardListino(1);\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n\r\n private pageIsInit: boolean = false;\r\n private pageIsInitAfter: boolean = false;\r\n private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n private loggedIdUser: UserLogin;\r\n waiting: boolean = false;\r\n carteValue: number = -1;\r\n lang: string = this.languageService.getLongLang();\r\n responseModel: QuotingModel = new QuotingModel();\r\n autentification = this.authService.GetData();\r\n resourceId: number = InputresourceId;\r\n isDataInitialized: boolean = false;\r\n resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n typePriceResult: string;\r\n model = new wizardFormEditoriaModel();\r\n currentRowIndex: number = -1;\r\n currentColumnIndex: number = -1;\r\n requestInfoSuccess: boolean = null;\r\n resultCalculation: boolean = false;\r\n showErrorMessage: boolean = false;\r\n blockquoting: boolean = false;\r\n listaFile: Array;\r\n\r\n isCalculatedWizard: boolean = false;\r\n\r\n // sending info to a child component\r\n public parentWidgetData: string = result.CanvasInfo;\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array>();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n\r\n if (this.responseModel.idGruppo == 6) {\r\n this.ExcludingRules.setMacrocategory(\"ADESIVI\");\r\n }\r\n else if (this.responseModel.idGruppo == 8) {\r\n this.ExcludingRules.setMacrocategory(\"MANIFESTI\");\r\n }\r\n else if (this.responseModel.idGruppo == 10) {\r\n this.ExcludingRules.setMacrocategory(\"PANNELLI\");\r\n }\r\n\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation()\r\n }\r\n }\r\n\r\n openCanvasEditor() {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n\r\n const canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n const isStateId = false;\r\n\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n }\r\n\r\n setCanvasConfig() {\r\n const canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n\r\n return canvasConfigData;\r\n }\r\n\r\n toShowCanvasButton() {\r\n let toShow = false;\r\n let isModuleActive = false;\r\n let isUserLoggedIn = false;\r\n\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n return toShow;\r\n }\r\n\r\n CheckRegoleAdesivi() {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n let oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n let oldSupporto = this.responseModel.idSupportiRigidi;\r\n let oldFormato = this.responseModel.idFormati;\r\n let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n let lavAccArray = new Array();\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"ADESIVI\", null, null, this.responseModel);\r\n\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"ADESIVI\", null, null, this.responseModel);\r\n\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"ADESIVI\", idFormato, 0, this.responseModel);\r\n }\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"ADESIVI\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n this.onMaterialeChange(true);\r\n }\r\n if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n this.onSuportoChange(true);\r\n }\r\n let count = 0;\r\n for (let lavorazioneOld of lavAccArray) {\r\n count = 0;\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n CheckRegoleManifesti() {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n let oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n let oldSupporto = this.responseModel.idSupportiRigidi;\r\n let oldFormato = this.responseModel.idFormati;\r\n let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n let lavAccArray = new Array();\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"MANIFESTI\", null, null, this.responseModel);\r\n\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"MANIFESTI\", null, null, this.responseModel);\r\n\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"MANIFESTI\", idFormato, 0, this.responseModel);\r\n }\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"MANIFESTI\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n this.onMaterialeChange(true);\r\n }\r\n if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n this.onSuportoChange(true);\r\n }\r\n let count = 0;\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n count = 0;\r\n for (let lavorazioneOld of lavAccArray) {\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione,true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n CheckRegolePannelli() {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n let oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n let oldSupporto = this.responseModel.idSupportiRigidi;\r\n let oldFormato = this.responseModel.idFormati;\r\n let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n let lavAccArray = new Array();\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"PANNELLI\", null, null, this.responseModel);\r\n\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"PANNELLI\", null, null, this.responseModel);\r\n\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"PANNELLI\", idFormato, 0, this.responseModel);\r\n }\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"PANNELLI\", this.responseModel);\r\n\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n this.onMaterialeChange(true);\r\n }\r\n if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n this.onSuportoChange(true);\r\n }\r\n let count = 0;\r\n for (let lavorazioneOld of lavAccArray) {\r\n count = 0;\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione,true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n parameterValidation() {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n\r\n //apply all rules\r\n\r\n if (this.responseModel.idGruppo == 6) {\r\n this.CheckRegoleAdesivi();\r\n }\r\n else if (this.responseModel.idGruppo == 8) {\r\n this.CheckRegoleManifesti();\r\n }\r\n else if (this.responseModel.idGruppo == 10) {\r\n this.CheckRegolePannelli();\r\n }\r\n\r\n //verify validation for all parameters \r\n this.validationCopie();\r\n\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n\r\n this.validationFormati();\r\n\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n\r\n this.validationMateriali();\r\n\r\n this.validationSupporti();\r\n\r\n this.countPlastificazioni();\r\n\r\n this.validationLavorazioneAccessoria();\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n }\r\n\r\n countPlastificazioni() {\r\n if (this.responseModel.plastificazioni1 != null) {\r\n this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n selectFileCombination() {\r\n this.listaFile = new Array()\r\n for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n if (this.responseModel.idFormati != null) {\r\n\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n if (file.FormatId == idFormato) {\r\n\r\n let fileObj = new FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj)\r\n }\r\n }\r\n }\r\n }\r\n\r\n checkZero(val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n }\r\n\r\n setTypePriceResult(type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n }\r\n setListinoScontisticaPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n setListinoPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n isRowSelected(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelected(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelected(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n clearSelectedIndex() {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n }\r\n\r\n isRowSelectedListino(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelectedListino(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n /// Create model for passed in input to the calculation method\r\n getCalculationModel() {\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n\r\n this.model.idMaterialiFlessibili = this.responseModel.idMaterialiFlessibili;\r\n this.model.idSupportiRigidi = this.responseModel.idSupportiRigidi;\r\n this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n\r\n this.model.lavorazioniAccessorie = new Array();\r\n\r\n for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n //combo\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n //numeric\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n //text area\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n\r\n this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n let calcWizSub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n this.resultPrice = result;\r\n this.isCalculatedWizard = true;\r\n if (this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n\r\n for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n let price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n let breakFlag = false;\r\n for (let priceRow of tableScontisticaPriceListSliced) {\r\n let slicedPriceRow = priceRow.slice(1);\r\n\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (let price of reverse) {\r\n if (price.Price != -1) {\r\n this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false\r\n\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n },\r\n err => {\r\n this.isCalculatedWizard = true;\r\n this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n );\r\n\r\n this.subManager.add(calcWizSub);\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n\r\n this.isDataInitialized = true;\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n\r\n let altezza = $(\"#footer\").outerHeight();\r\n let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n\r\n let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n\r\n let altezzaHead = $(\".header-body\").outerHeight();\r\n let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n checkValidation() {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.materialeIsValid\r\n && this.responseModel.supportoIsValid\r\n ) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n\r\n validationBaseFormati() {\r\n let message;\r\n let base = parseFloat(this.responseModel.baseFormato)\r\n let minBase = this.responseModel.minimoBase;\r\n let maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n }\r\n\r\n validationAltezzaFormati() {\r\n let message;\r\n let altezza = parseFloat(this.responseModel.altezzaFormato)\r\n let minAltezza = this.responseModel.minimoAltezza;\r\n let maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n\r\n this.responseModel.altezzaFormatoMessage = message;\r\n }\r\n\r\n validationSoggetti() {\r\n let message;\r\n let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.responseModel.soggettiMessage = message;\r\n }\r\n\r\n validationCopie() {\r\n let message;\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n let numCopie = parseInt(this.responseModel.numCopie);\r\n let minCopie = this.responseModel.minimoCopie;\r\n let maxCopie = this.responseModel.massimoCopie;\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.copieMessage = message;\r\n }\r\n\r\n validationFormati() {\r\n let message;\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.formatiMessage = message;\r\n }\r\n\r\n validationMateriali() {\r\n let message;\r\n if (this.responseModel.idMaterialiFlessibili == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.materialeIsValid = false;\r\n }\r\n else {\r\n this.responseModel.materialeIsValid = true;\r\n }\r\n\r\n if (this.responseModel.materialiFlessibili != null) {\r\n this.responseModel.materialiFlessibiliCount = this.responseModel.materialiFlessibili.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.materialeMessage = message;\r\n }\r\n\r\n validationSupporti() {\r\n let message;\r\n\r\n if (this.responseModel.idSupportiRigidi == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.supportoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.supportoIsValid = true;\r\n }\r\n\r\n if (this.responseModel.supportiRigidi != null) {\r\n this.responseModel.supportiRigidiCount = this.responseModel.supportiRigidi.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.supportoMessage = message;\r\n }\r\n\r\n validationLavorazioneAccessoria() {\r\n let message: string = \"\";\r\n let valid: boolean = true;\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n let qta = parseInt(lavorazione.value);\r\n let minQta = lavorazione.minQtaInput;\r\n let maxQta = lavorazione.maxQtaInput;\r\n\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n this.responseModel.lavorazioniIsValid = valid;\r\n }\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n\r\n let transSub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n\r\n this.subManager.add(transSub);\r\n\r\n return message;\r\n }\r\n\r\n checkIsPlastificazioneInternoIsShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isAttributeFixed(tipoLavorazione) {\r\n let result: boolean = false;\r\n\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n textAreaCheck(event: any) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n let result: boolean = false;\r\n let isVisible: boolean = false;\r\n\r\n for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n onFormatiChange(isrules = false) {\r\n for (let formato of this.responseModel.formati) {\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onFormatiVisualChange(formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n }\r\n\r\n onMaterialeChange(isrules = false) {\r\n for (let materiale of this.responseModel.materialiFlessibili) {\r\n if (materiale.chiave == this.responseModel.idMaterialiFlessibili) {\r\n this.responseModel.materialeDescription = materiale.descrizione;\r\n this.responseModel.materialeImage = materiale.image;\r\n this.responseModel.materialeHasInfo = materiale.hasInfo;\r\n this.responseModel.materialeShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onMaterialeVisualChange(materialeId) {\r\n this.responseModel.idMaterialiFlessibili = materialeId;\r\n this.onMaterialeChange();\r\n }\r\n\r\n\r\n onSuportoChange(isrules = false) {\r\n for (let supporto of this.responseModel.supportiRigidi) {\r\n if (supporto.chiave == this.responseModel.idSupportiRigidi) {\r\n this.responseModel.supportoDescription = supporto.descrizione;\r\n this.responseModel.supportoImage = supporto.image;\r\n this.responseModel.supportoHasInfo = supporto.hasInfo;\r\n this.responseModel.supportoShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onSuportoVisualChange(supportoId) {\r\n this.responseModel.idSupportiRigidi = supportoId;\r\n this.onSuportoChange();\r\n }\r\n\r\n onPlastificationInternoChange(isrules = false) {\r\n for (let plastification of this.responseModel.plastificazioni1) {\r\n if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n this.responseModel.plastificazioni1Image = plastification.image;\r\n this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onPlastificationInternoViasualChange(plastificationId) {\r\n this.responseModel.idPlastificazioni1 = plastificationId;\r\n this.onPlastificationInternoChange();\r\n }\r\n\r\n lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n for (let variante of lavorazione.valori) {\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n }\r\n\r\n showHideLavDescription(lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n }\r\n\r\n showHideFormatDescription() {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n }\r\n\r\n showHideMaterialeDescription() {\r\n if (this.responseModel.materialeShowInfo) {\r\n this.responseModel.materialeShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.materialeShowInfo = true;\r\n }\r\n }\r\n\r\n showHideSupportoDescription() {\r\n if (this.responseModel.supportoShowInfo) {\r\n this.responseModel.supportoShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.supportoShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePlastficationInternoDescription() {\r\n if (this.responseModel.plastificazioni1ShowInfo) {\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni1ShowInfo = true;\r\n }\r\n }\r\n\r\n isCalculationTypeCalcolato() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoQuotigPrev() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListino() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListinoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n addToCartWizardCalcolato(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let wizCalSub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(wizCalSub);\r\n }\r\n\r\n addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let wizSconSub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(wizSconSub);\r\n }\r\n\r\n addToCartWizardListino(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let wizLisSub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(wizLisSub);\r\n }\r\n\r\n addToCartWizardListinoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let wizLisSconSub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(wizLisSconSub);\r\n }\r\n\r\n setPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n //Deselecting the current price and selected the one passed in input\r\n for (let price of this.resultPrice.TablePriceList) {\r\n price.IsSelected = false;\r\n }\r\n\r\n price.IsSelected = true;\r\n\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n }\r\n\r\n isCustomerLoggedIn() {\r\n return this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n checkEmailIsValid() {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n }\r\n\r\n checkFormRichiestaPrevIsValid() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n\r\n sendRequestInfo() {\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n if (result == true) {\r\n this.requestInfoSuccess = true;\r\n }\r\n else {\r\n this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n\r\n },\r\n err => {\r\n this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-adesivi.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../../../shared/mapping';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n\r\n///Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from \"../../../../../../services/inventory/customerscanvas.service\";\r\n\r\n@Component({\r\n selector: \"dy-wizard-banner-widget\",\r\n template: \"\"\r\n})\r\n\r\n\r\nexport class WizardBannerComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private _quotingService: QuotingService,\r\n private authService: AuthService,\r\n private languageService: LanguageService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n @Input() resourceId: number;\r\n autentification = this.authService.GetData();\r\n private userId = this.authService.GetUserId();\r\n lang: string = this.languageService.getLongLang();\r\n\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (!this.isBrowser)\r\n return;\r\n\r\n let sub = this._quotingService.getWizardBannerData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, InputresourceId: number) {\r\n\r\n @Component({\r\n template: result.templateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private _quotingService: QuotingService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private translate: TranslateService,\r\n private routesService: RoutesService,\r\n private cartService: ShoppingCartService,\r\n private bootboxService: BootboxService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n public canvasService: CustomersCanvasService\r\n ) {\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n const canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(\r\n isModalOpened => {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(\r\n isDesignApproved => {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n\r\n if (this.isCalculationTypeCalcolato()) {\r\n this.addToCartWizardCalcolato(1);\r\n }\r\n else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n this.addToCartWizardListino(1);\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n\r\n private pageIsInit: boolean = false;\r\n private pageIsInitAfter: boolean = false;\r\n private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n private loggedIdUser: UserLogin;\r\n waiting: boolean = false;\r\n carteValue: number = -1;\r\n lang: string = this.languageService.getLongLang();\r\n responseModel: QuotingModel = new QuotingModel();\r\n autentification = this.authService.GetData();\r\n resourceId: number = InputresourceId;\r\n isDataInitialized: boolean = false;\r\n resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n typePriceResult: string;\r\n model = new wizardFormEditoriaModel();\r\n currentRowIndex: number = -1;\r\n currentColumnIndex: number = -1;\r\n requestInfoSuccess: boolean = null;\r\n resultCalculation: boolean = false;\r\n showErrorMessage: boolean = false;\r\n blockquoting: boolean = false;\r\n listaFile: Array;\r\n\r\n isCalculatedWizard: boolean = false;\r\n\r\n // sending info to a child component\r\n public parentWidgetData: string = result.CanvasInfo;\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array>();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n\r\n if (this.responseModel.idGruppo == 7) {\r\n this.ExcludingRules.setMacrocategory(\"BANNER\");\r\n }\r\n else if (this.responseModel.idGruppo == 9) {\r\n this.ExcludingRules.setMacrocategory(\"BANDIERE\");\r\n }\r\n\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation()\r\n }\r\n }\r\n\r\n\r\n openCanvasEditor() {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n\r\n const canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n const isStateId = false;\r\n\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n }\r\n\r\n setCanvasConfig() {\r\n const canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n\r\n return canvasConfigData;\r\n }\r\n\r\n toShowCanvasButton() {\r\n let toShow = false;\r\n let isModuleActive = false;\r\n let isUserLoggedIn = false;\r\n\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n return toShow;\r\n }\r\n\r\n CheckRegoleBanner() {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n let oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n let oldFormato = this.responseModel.idFormati;\r\n let oldAsola = this.responseModel.idAsole;\r\n let oldElettro = this.responseModel.idElettrosaldature;\r\n let oldOcchielli = this.responseModel.idOcchielli;\r\n let lavAccArray = new Array();\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANNER\", null, null, this.responseModel);\r\n\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole occhiellatura\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole asola\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole elettro\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ELETTROSALDATURA\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"BANNER\", null, null, this.responseModel);\r\n\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANNER\", idFormato, 0, this.responseModel);\r\n }\r\n\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", this.responseModel.idOcchielli, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", this.responseModel.idAsole, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ELETTROSALDATURA\", \"\", this.responseModel.idElettrosaldature, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"BANNER\", this.responseModel);\r\n\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n\r\n if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n this.onMaterialeChange(true);\r\n }\r\n if (oldOcchielli != this.responseModel.idOcchielli) {\r\n this.onOcchielliChange(true);\r\n }\r\n if (oldAsola != this.responseModel.idAsole) {\r\n this.onAsoleChange(true);\r\n }\r\n if (oldElettro != this.responseModel.idElettrosaldature) {\r\n this.onElettrosaldatureChange(true);\r\n }\r\n let count = 0;\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n count = 0;\r\n for (let lavorazioneOld of lavAccArray) {\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n checkIsAsolaIsShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.asole != null && this.responseModel.asole.length > 0) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsCucituraIsShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.cuciture != null && this.responseModel.cuciture.length > 0) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsElettroIsShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.elettrosaldature != null && this.responseModel.elettrosaldature.length > 0) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n checkIsOcchielliIsShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.occhielli != null && this.responseModel.occhielli.length > 0) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n\r\n CheckRegoleBandiere() {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n let oldMateriale = this.responseModel.idMaterialiFlessibili;\r\n let oldFormato = this.responseModel.idFormati;\r\n let oldAsola = this.responseModel.idAsole;\r\n let oldCucitura = this.responseModel.idCuciture;\r\n let oldOcchielli = this.responseModel.idOcchielli;\r\n let lavAccArray = new Array();\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANDIERE\", null, null, this.responseModel);\r\n\r\n //Reset regole materialeFlessibile\r\n this.ExcludingRules.ResetRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole occhiellatura\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole asola\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole elettro\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"CUCITURA\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"BANDIERE\", null, null, this.responseModel);\r\n\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"BANDIERE\", idFormato, 0, this.responseModel);\r\n }\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"MATERIALE_FLESSIBILE\", \"\", \"\", this.responseModel.idMaterialiFlessibili, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"OCCHIELLATURA\", \"\", this.responseModel.idOcchielli, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"ASOLA\", \"\", this.responseModel.idAsole, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"CUCITURA\", \"\", this.responseModel.idCuciture, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"BANDIERE\", this.responseModel);\r\n\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldMateriale != this.responseModel.idMaterialiFlessibili) {\r\n this.onMaterialeChange(true);\r\n }\r\n if (oldOcchielli != this.responseModel.idOcchielli) {\r\n this.onOcchielliChange(true);\r\n }\r\n if (oldAsola != this.responseModel.idAsole) {\r\n this.onAsoleChange(true);\r\n }\r\n if (oldCucitura != this.responseModel.idCuciture) {\r\n this.onCucitureChange(true);\r\n }\r\n \r\n let count = 0;\r\n for (let lavorazioneOld of lavAccArray) {\r\n count = 0;\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n isBannerQuotingForm() {\r\n result = false;\r\n if (this.responseModel.idGruppo == 7) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isBandiereQuotingForm() {\r\n result = false;\r\n if (this.responseModel.idGruppo == 9) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n parameterValidation() {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n\r\n //apply all rules\r\n if (this.responseModel.idGruppo == 7) {\r\n this.CheckRegoleBanner();\r\n if (this.responseModel.elettrosaldature != null && this.responseModel.elettrosaldature.length > 0) {\r\n this.validationElettro();\r\n }\r\n else {\r\n this.responseModel.elettroIsValid = true;\r\n }\r\n\r\n this.responseModel.cucituraIsValid = true;\r\n }\r\n else if (this.responseModel.idGruppo == 9) {\r\n this.CheckRegoleBandiere();\r\n if (this.responseModel.cuciture != null && this.responseModel.cuciture.length > 0) {\r\n this.validationCuciture();\r\n }\r\n else {\r\n this.responseModel.cucituraIsValid = true;\r\n }\r\n\r\n this.responseModel.elettroIsValid = true;\r\n }\r\n\r\n //verify validation for all parameters\r\n this.validationCopie();\r\n\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n\r\n this.validationFormati();\r\n\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n\r\n if (this.responseModel.asole != null && this.responseModel.asole.length > 0) {\r\n this.validationAsole();\r\n if (this.responseModel.idAsole != \"0\") {\r\n this.validationDiametroAsole();\r\n }\r\n else {\r\n this.responseModel.diametroAsolaIsValid = true;\r\n }\r\n }\r\n else {\r\n this.responseModel.diametroAsolaIsValid = true;\r\n this.responseModel.asolaIsValid = true;\r\n }\r\n\r\n if (this.responseModel.occhielli != null && this.responseModel.occhielli.length > 0) {\r\n this.validationOcchielli();\r\n if (this.responseModel.idOcchielli != \"0\") {\r\n this.validationDistanzaOcchielli();\r\n }\r\n else {\r\n this.responseModel.distanzaOcchielliIsValid = true;\r\n }\r\n }\r\n else {\r\n this.responseModel.occhiellaturaIsValid = true;\r\n this.responseModel.distanzaOcchielliIsValid = true;\r\n }\r\n\r\n\r\n this.validationMateriali();\r\n\r\n this.countOcchielliDisposizione();\r\n this.countAsoleDisposizioni();\r\n this.countTelettrosaldature();\r\n this.countTelettrosaldatureDisposizioni();\r\n this.countCucitureDisposizioni();\r\n\r\n this.validationLavorazioneAccessoria();\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n }\r\n\r\n countOcchielliDisposizione() {\r\n if (this.responseModel.occhielliDisposizione != null) {\r\n this.responseModel.occhielliDisposizioneCount = this.responseModel.occhielliDisposizione.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n countAsoleDisposizioni() {\r\n if (this.responseModel.asoleDisposizioni != null) {\r\n this.responseModel.asoleDisposizioniCount = this.responseModel.asoleDisposizioni.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n countTelettrosaldature() {\r\n if (this.responseModel.elettrosaldature != null) {\r\n this.responseModel.elettrosaldatureCount = this.responseModel.elettrosaldature.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n countTelettrosaldatureDisposizioni() {\r\n if (this.responseModel.elettrosaldatureDisposizioni != null) {\r\n this.responseModel.elettrosaldatureDisposizioniCount = this.responseModel.elettrosaldatureDisposizioni.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n countCucitureDisposizioni() {\r\n if (this.responseModel.cucitureDisposizioni != null) {\r\n this.responseModel.cucitureDisposizioniCount = this.responseModel.cucitureDisposizioni.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n selectFileCombination() {\r\n\r\n this.listaFile = new Array()\r\n for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n if (file.FormatId == idFormato) {\r\n let fileObj = new FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj)\r\n }\r\n }\r\n }\r\n }\r\n checkZero(val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n }\r\n\r\n setTypePriceResult(type) {\r\n this.typePriceResult = type;\r\n\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n }\r\n setListinoScontisticaPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n setListinoPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n isRowSelected(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelected(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelected(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n clearSelectedIndex() {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n }\r\n\r\n isRowSelectedListino(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelectedListino(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n /// Create model for passed in input to the calculation method\r\n getCalculationModel() {\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n\r\n this.model.idMaterialiFlessibili = this.responseModel.idMaterialiFlessibili;\r\n\r\n this.model.idAsole = this.responseModel.idAsole;\r\n if (this.responseModel.idAsole != \"0\") {\r\n this.model.disposizione_asola_id = this.responseModel.disposizione_asola_id;\r\n this.model.diametro_asola = this.responseModel.diametro_asola;\r\n }\r\n\r\n this.model.idCuciture = this.responseModel.idCuciture;\r\n if (this.responseModel.idCuciture != \"0\") {\r\n this.model.disposizione_cucitura_id = this.responseModel.disposizione_cucitura_id;\r\n }\r\n\r\n this.model.idElettrosaldature = this.responseModel.idElettrosaldature;\r\n\r\n if (this.responseModel.idElettrosaldature != \"0\") {\r\n this.model.disposizione_elettrosaldatura_id = this.responseModel.disposizione_elettrosaldatura_id;\r\n }\r\n\r\n this.model.idOcchielli = this.responseModel.idOcchielli;\r\n\r\n if (this.responseModel.idOcchielli != \"0\") {\r\n this.model.disposizione_occhielli_id = this.responseModel.disposizione_occhielli_id;\r\n this.model.distanza_occhielli = this.responseModel.distanza_occhielli;\r\n }\r\n\r\n\r\n this.model.lavorazioniAccessorie = new Array();\r\n\r\n for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n //combo\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n //numeric\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n //text area\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n\r\n this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n let sub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n this.resultPrice = result;\r\n this.isCalculatedWizard = true;\r\n\r\n if (this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n\r\n for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n let price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n let breakFlag = false;\r\n for (let priceRow of tableScontisticaPriceListSliced) {\r\n let slicedPriceRow = priceRow.slice(1);\r\n\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (let price of reverse) {\r\n if (price.Price != -1) {\r\n this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false\r\n\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n },\r\n err => {\r\n this.isCalculatedWizard = true;\r\n this.showErrorMessage = true;\r\n\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n this.isDataInitialized = true;\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n\r\n let altezza = $(\"#footer\").outerHeight();\r\n let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n\r\n let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n\r\n let altezzaHead = $(\".header-body\").outerHeight();\r\n let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n this.pageIsInit = true;\r\n }\r\n\r\n checkValidation() {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.materialeIsValid\r\n && this.responseModel.occhiellaturaIsValid\r\n && this.responseModel.elettroIsValid\r\n && this.responseModel.asolaIsValid\r\n && this.responseModel.distanzaOcchielliIsValid\r\n && this.responseModel.diametroAsolaIsValid\r\n && this.responseModel.cucituraIsValid\r\n ) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n\r\n validationBaseFormati() {\r\n let message;\r\n let base = parseFloat(this.responseModel.baseFormato)\r\n let minBase = this.responseModel.minimoBase;\r\n let maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n }\r\n\r\n validationAltezzaFormati() {\r\n let message;\r\n let altezza = parseFloat(this.responseModel.altezzaFormato)\r\n let minAltezza = this.responseModel.minimoAltezza;\r\n let maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n\r\n this.responseModel.altezzaFormatoMessage = message;\r\n }\r\n\r\n validationSoggetti() {\r\n let message;\r\n let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.responseModel.soggettiMessage = message;\r\n }\r\n\r\n validationCopie() {\r\n let message;\r\n\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n let numCopie = parseInt(this.responseModel.numCopie);\r\n let minCopie = this.responseModel.minimoCopie;\r\n let maxCopie = this.responseModel.massimoCopie;\r\n\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.copieMessage = message;\r\n }\r\n\r\n validationFormati() {\r\n let message;\r\n\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.formatiMessage = message;\r\n }\r\n\r\n validationMateriali() {\r\n let message;\r\n\r\n if (this.responseModel.idMaterialiFlessibili == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.materialeIsValid = false;\r\n }\r\n else {\r\n this.responseModel.materialeIsValid = true;\r\n }\r\n\r\n if (this.responseModel.materialiFlessibili != null) {\r\n this.responseModel.materialiFlessibiliCount = this.responseModel.materialiFlessibili.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.materialeMessage = message;\r\n }\r\n\r\n validationOcchielli() {\r\n let message;\r\n\r\n if (this.responseModel.idOcchielli == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.occhiellaturaIsValid = false;\r\n }\r\n else {\r\n this.responseModel.occhiellaturaIsValid = true;\r\n }\r\n\r\n if (this.responseModel.occhielli != null) {\r\n this.responseModel.occhielliCount = this.responseModel.occhielli.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.occhiellaturaMessage = message;\r\n }\r\n\r\n validationAsole() {\r\n let message;\r\n\r\n if (this.responseModel.idAsole == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.asolaIsValid = false;\r\n }\r\n else {\r\n this.responseModel.asolaIsValid = true;\r\n }\r\n\r\n if (this.responseModel.asole != null) {\r\n this.responseModel.asoleCount = this.responseModel.asole.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.asolaMessage = message;\r\n }\r\n\r\n validationDiametroAsole() {\r\n let message;\r\n let diametro = parseInt(this.responseModel.diametro_asola);\r\n\r\n if (this.responseModel.diametro_asola == null) {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.diametroAsolaIsValid = false;\r\n }\r\n else if (diametro <= 0) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" 0\";\r\n this.responseModel.diametroAsolaIsValid = false;\r\n }\r\n else {\r\n this.responseModel.diametroAsolaIsValid = true;\r\n }\r\n\r\n this.responseModel.diametroAsolaMessage = message;\r\n }\r\n\r\n validationDistanzaOcchielli() {\r\n let message;\r\n let distanza = parseInt(this.responseModel.distanza_occhielli);\r\n\r\n if (this.responseModel.distanza_occhielli == null) {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.distanzaOcchielliIsValid = false;\r\n }\r\n else if (distanza <= 0) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" 0\";\r\n this.responseModel.distanzaOcchielliIsValid = false;\r\n }\r\n else {\r\n this.responseModel.distanzaOcchielliIsValid = true;\r\n }\r\n\r\n this.responseModel.distanzaOcchielliMessage = message;\r\n }\r\n\r\n validationElettro() {\r\n let message;\r\n\r\n if (this.responseModel.idElettrosaldature == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.elettroIsValid = false;\r\n }\r\n else {\r\n this.responseModel.elettroIsValid = true;\r\n }\r\n\r\n this.responseModel.elettroMessage = message;\r\n }\r\n\r\n validationCuciture() {\r\n let message;\r\n\r\n if (this.responseModel.idCuciture == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.cucituraIsValid = false;\r\n }\r\n else {\r\n this.responseModel.cucituraIsValid = true;\r\n }\r\n\r\n if (this.responseModel.cuciture != null) {\r\n this.responseModel.cucitureCount = this.responseModel.cuciture.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.cucituraMessage = message;\r\n }\r\n\r\n validationLavorazioneAccessoria() {\r\n let message: string = \"\";\r\n let valid: boolean = true;\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n let qta = parseInt(lavorazione.value);\r\n let minQta = lavorazione.minQtaInput;\r\n let maxQta = lavorazione.maxQtaInput;\r\n\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.lavorazioniIsValid = valid;\r\n }\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n let sub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n\r\n this.subManager.add(sub);\r\n\r\n return message;\r\n }\r\n\r\n\r\n\r\n isAttributeFixed(tipoLavorazione) {\r\n let result: boolean = false;\r\n\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n textAreaCheck(event: any) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n let result: boolean = false;\r\n let isVisible: boolean = false;\r\n\r\n for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n\r\n }\r\n\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n onFormatiChange(isrules = false) {\r\n for (let formato of this.responseModel.formati) {\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onFormatiVisualChange(formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n }\r\n\r\n onOcchielliChange(isrules = false) {\r\n for (let occhiellatura of this.responseModel.occhielli) {\r\n if (occhiellatura.chiave == this.responseModel.idOcchielli) {\r\n this.responseModel.occhiellaturaDescription = occhiellatura.descrizione;\r\n this.responseModel.occhiellaturaImage = occhiellatura.image;\r\n this.responseModel.occhiellaturaHasInfo = occhiellatura.hasInfo;\r\n this.responseModel.occhiellaturaShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onOcchielliVisualChange(occhielliId) {\r\n this.responseModel.idOcchielli = occhielliId;\r\n this.onOcchielliChange();\r\n }\r\n\r\n onAsoleChange(isrules = false) {\r\n for (let asola of this.responseModel.asole) {\r\n if (asola.chiave == this.responseModel.idAsole) {\r\n this.responseModel.asolaDescription = asola.descrizione;\r\n this.responseModel.asolaImage = asola.image;\r\n this.responseModel.asolaHasInfo = asola.hasInfo;\r\n this.responseModel.asolaShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onAsoleVisualChange(asoleId) {\r\n this.responseModel.idAsole = asoleId;\r\n this.onAsoleChange();\r\n }\r\n\r\n onElettrosaldatureChange(isrules = false) {\r\n for (let elettro of this.responseModel.elettrosaldature) {\r\n if (elettro.chiave == this.responseModel.idElettrosaldature) {\r\n this.responseModel.elettroDescription = elettro.descrizione;\r\n this.responseModel.elettroImage = elettro.image;\r\n this.responseModel.elettroHasInfo = elettro.hasInfo;\r\n this.responseModel.elettroShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onElettrosaldatureVisualChange(elettroId) {\r\n this.responseModel.idElettrosaldature = elettroId;\r\n this.onElettrosaldatureChange();\r\n }\r\n\r\n\r\n onCucitureChange(isrules = false) {\r\n for (let cucitura of this.responseModel.cuciture) {\r\n if (cucitura.chiave == this.responseModel.idCuciture) {\r\n this.responseModel.cucituraDescription = cucitura.descrizione;\r\n this.responseModel.cucituraImage = cucitura.image;\r\n this.responseModel.cucituraHasInfo = cucitura.hasInfo;\r\n this.responseModel.cucituraShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onCucitureVisualChange(cucituraId) {\r\n this.responseModel.idCuciture = cucituraId;\r\n this.onCucitureChange();\r\n }\r\n\r\n onMaterialeChange(isrules = false) {\r\n for (let materiale of this.responseModel.materialiFlessibili) {\r\n if (materiale.chiave == this.responseModel.idMaterialiFlessibili) {\r\n this.responseModel.materialeDescription = materiale.descrizione;\r\n this.responseModel.materialeImage = materiale.image;\r\n this.responseModel.materialeHasInfo = materiale.hasInfo;\r\n this.responseModel.materialeShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onMaterialeVisualChange(materialeId) {\r\n this.responseModel.idMaterialiFlessibili = materialeId;\r\n this.onMaterialeChange();\r\n }\r\n\r\n\r\n lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n for (let variante of lavorazione.valori) {\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n }\r\n\r\n showHideLavDescription(lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n }\r\n\r\n showHideFormatDescription() {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n }\r\n\r\n showHideOcchiellaturaDescription() {\r\n if (this.responseModel.occhiellaturaShowInfo) {\r\n this.responseModel.occhiellaturaShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.occhiellaturaShowInfo = true;\r\n }\r\n }\r\n\r\n showHideAsolaDescription() {\r\n if (this.responseModel.asolaShowInfo) {\r\n this.responseModel.asolaShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.asolaShowInfo = true;\r\n }\r\n }\r\n\r\n showHideElettrosaldatureDescription() {\r\n if (this.responseModel.elettroShowInfo) {\r\n this.responseModel.elettroShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.elettroShowInfo = true;\r\n }\r\n }\r\n\r\n showHideCucitureDescription() {\r\n if (this.responseModel.cucituraShowInfo) {\r\n this.responseModel.cucituraShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.cucituraShowInfo = true;\r\n }\r\n }\r\n\r\n showHideMaterialeDescription() {\r\n if (this.responseModel.materialeShowInfo) {\r\n this.responseModel.materialeShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.materialeShowInfo = true;\r\n }\r\n }\r\n showHideSupportoDescription() {\r\n if (this.responseModel.supportoShowInfo) {\r\n this.responseModel.supportoShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.supportoShowInfo = true;\r\n }\r\n }\r\n\r\n isCalculationTypeCalcolato() {\r\n let result: boolean = false;\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoQuotigPrev() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListino() {\r\n let result: boolean = false;\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListinoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n addToCartWizardCalcolato(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(result => {\r\n\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListino(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListinoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n setPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n //Deselecting the current price and selected the one passed in input\r\n for (let price of this.resultPrice.TablePriceList) {\r\n price.IsSelected = false;\r\n }\r\n\r\n price.IsSelected = true;\r\n\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n }\r\n\r\n isCustomerLoggedIn() {\r\n return this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n checkEmailIsValid() {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n }\r\n\r\n checkFormRichiestaPrevIsValid() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n sendRequestInfo() {\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n if (result == true) {\r\n this.requestInfoSuccess = true;\r\n }\r\n else {\r\n this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n\r\n },\r\n err => {\r\n this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n return ChildComponent;\r\n }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-banner.component.ts","import { CustomersCanvasService } from './../../../../../../services/inventory/customerscanvas.service';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, ComponentFactory, ReflectiveInjector, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n//Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CurrencyService } from '../../../../../../services/cms/currency.service';\r\n\r\n@Component({\r\n selector: \"dy-wizard-buste-widget\",\r\n template: \"\"\r\n})\r\n\r\n\r\nexport class WizardBusteComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private _quotingService: QuotingService,\r\n private authService: AuthService,\r\n private languageService: LanguageService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n @Input() resourceId: number;\r\n autentification = this.authService.GetData();\r\n private userId = this.authService.GetUserId();\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n\r\n ngOnInit() {\r\n if (!this.isBrowser)\r\n return;\r\n\r\n let sub = this._quotingService.getWizardBusteData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, InputresourceId: number) {\r\n\r\n @Component({\r\n template: result.templateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private _quotingService: QuotingService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private translate: TranslateService,\r\n private routesService: RoutesService,\r\n public currency: CurrencyService,\r\n private cartService: ShoppingCartService,\r\n private bootboxService: BootboxService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n public canvasService: CustomersCanvasService\r\n ) {\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n const canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(\r\n isModalOpened => {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(\r\n isDesignApproved => {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n\r\n if (this.isCalculationTypeCalcolato()) {\r\n this.addToCartWizardCalcolato(1);\r\n }\r\n else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n this.addToCartWizardListino(1);\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n\r\n private pageIsInit: boolean = false;\r\n private pageIsInitAfter: boolean = false;\r\n private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n private loggedIdUser: UserLogin;\r\n waiting: boolean = false;\r\n carteValue: number = -1;\r\n lang: string = this.languageService.getLongLang();\r\n responseModel: QuotingModel = new QuotingModel();\r\n autentification = this.authService.GetData();\r\n resourceId: number = InputresourceId;\r\n isDataInitialized: boolean = false;\r\n resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n typePriceResult: string;\r\n model = new wizardFormEditoriaModel();\r\n currentRowIndex: number = -1;\r\n currentColumnIndex: number = -1;\r\n requestInfoSuccess: boolean = null;\r\n resultCalculation: boolean = false;\r\n showErrorMessage: boolean = false;\r\n //blockquoting: boolean = false;\r\n resultPriceQuantity: number = 0;\r\n resultPriceImponibile: number = 0;\r\n resultPriceCurrency: any = this.currency.getDefaultCurrency();\r\n\r\n isCalculatedWizard: boolean = false;\r\n\r\n // sending info to a child component\r\n public parentWidgetData: string = result.CanvasInfo;\r\n\r\n subManager = new Subscription();\r\n\r\n listaFile: Array;\r\n\r\n ngOnInit() {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array>();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n this.ExcludingRules.setMacrocategory(\"BUSTE\");\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation()\r\n }\r\n }\r\n\r\n openCanvasEditor() {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n\r\n const canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n const isStateId = false;\r\n\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n }\r\n\r\n setCanvasConfig() {\r\n const canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n\r\n return canvasConfigData;\r\n }\r\n\r\n toShowCanvasButton() {\r\n let toShow = false;\r\n let isModuleActive = false;\r\n let isUserLoggedIn = false;\r\n\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n return toShow;\r\n }\r\n\r\n\r\n getTableValues(index) {\r\n this.resultPriceQuantity = this.resultPrice.TablePriceList[index].Quantity;\r\n this.resultPriceImponibile = this.resultPrice.TablePriceList[index].StrDiscountedPrice;\r\n this.resultPriceCurrency = this.resultPrice.TablePriceList[index].Currency;\r\n }\r\n\r\n\r\n onStampaRetroChangeDocta() {\r\n if (this.responseModel.idColori2 == \"5\") {\r\n this.responseModel.idColori1 = \"5\";\r\n for (let col of this.responseModel.colori1) {\r\n if (col.chiave == \"5\") {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n }\r\n }\r\n else if (this.responseModel.idColori2 == \"4\") {\r\n this.responseModel.idColori1 = \"4\";\r\n for (let col of this.responseModel.colori1) {\r\n if (col.chiave == \"4\") {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n }\r\n }\r\n else if ((this.responseModel.idColori2 == \"0\" || this.responseModel.idColori2 == \"1\") && (this.responseModel.idColori1 == \"5\" || this.responseModel.idColori1 == \"4\")) {\r\n this.responseModel.idColori1 = this.responseModel.idColori2;\r\n for (let col of this.responseModel.colori1) {\r\n if (col.chiave == this.responseModel.idColori2) {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n\r\n }\r\n }\r\n this.parameterValidation();\r\n }\r\n\r\n onStampaFronteChangeDocta() {\r\n if (this.responseModel.idColori1 == \"5\" && (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"1\")) {\r\n this.responseModel.idColori2 = \"5\";\r\n for (let col of this.responseModel.colori2) {\r\n if (col.chiave == \"5\") {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n\r\n }\r\n }\r\n else if (this.responseModel.idColori1 == \"4\" && (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"1\")) {\r\n this.responseModel.idColori2 = \"4\";\r\n for (let col of this.responseModel.colori2) {\r\n if (col.chiave == \"4\") {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n\r\n }\r\n }\r\n else if ((this.responseModel.idColori1 == \"0\" || this.responseModel.idColori1 == \"1\") && (this.responseModel.idColori2 == \"5\" || this.responseModel.idColori2 == \"4\")) {\r\n this.responseModel.idColori2 = this.responseModel.idColori1;\r\n for (let col of this.responseModel.colori2) {\r\n if (col.chiave == this.responseModel.idColori1) {\r\n col.selected = true;\r\n }\r\n else {\r\n col.selected = false;\r\n }\r\n\r\n }\r\n }\r\n this.parameterValidation();\r\n }\r\n\r\n\r\n\r\n parameterValidation() {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n\r\n //verify validation for all parameters \r\n this.validationCopie();\r\n\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n\r\n this.validationBusta();\r\n this.validationColori();\r\n\r\n this.countPantoni();\r\n\r\n this.validationLavorazioneAccessoria();\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n //$('#quotingForm').hide();\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n }\r\n\r\n countPantoni() {\r\n if (this.responseModel.pantoni != null) {\r\n this.responseModel.pantoniCount = this.responseModel.pantoni.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n selectFileCombination() {\r\n this.listaFile = new Array()\r\n for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n if (this.responseModel.idBusta != null) {\r\n var data = this.responseModel.idBusta.split(\"_\");\r\n let idBusta = data[0];\r\n if (file.FormatId == idBusta) {\r\n\r\n let fileObj = new FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj)\r\n }\r\n }\r\n }\r\n }\r\n checkZero(val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n }\r\n\r\n setTypePriceResult(type) {\r\n this.typePriceResult = type;\r\n\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n }\r\n\r\n isRowSelected(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelected(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelected(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n clearSelectedIndex() {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n }\r\n\r\n isRowSelectedListino(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelectedListino(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n /// Create model for passed in input to the calculation method\r\n getCalculationModel() {\r\n this.model.macrocategoryWizardId = 15;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n\r\n if (this.responseModel.idBusta != \"-1\") {\r\n this.model.idBusta = this.responseModel.idBusta;\r\n }\r\n\r\n this.model.idColori1 = this.responseModel.idColori1;\r\n this.model.idPantoneFronte1 = \"\";\r\n this.model.idPantoneFronte2 = \"\";\r\n this.model.idPantoneRetro1 = \"\";\r\n this.model.idPantoneRetro2 = \"\";\r\n if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\" && this.model.idColori1 != \"4\" && this.model.idColori1 != \"5\") {\r\n this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n }\r\n else if (this.model.idColori1 == \"4\") {\r\n this.model.idPantoneFronte1 = this.responseModel.idPantoneFronte1;\r\n }\r\n else if (this.model.idColori1 == \"5\") {\r\n this.model.idPantoneFronte1 = this.responseModel.idPantoneFronte1;\r\n this.model.idPantoneFronte2 = this.responseModel.idPantoneFronte2;\r\n }\r\n\r\n this.model.idColori2 = this.responseModel.idColori2;\r\n if (this.model.idColori2 == \"4\") {\r\n this.model.idPantoneRetro1 = this.responseModel.idPantoneRetro1;\r\n }\r\n else if (this.model.idColori2 == \"5\") {\r\n this.model.idPantoneRetro1 = this.responseModel.idPantoneRetro1;\r\n this.model.idPantoneRetro2 = this.responseModel.idPantoneRetro2;\r\n }\r\n\r\n this.model.lavorazioniAccessorie = new Array();\r\n\r\n for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n //combo\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n //numeric\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n //text area\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n\r\n this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n let sub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n\r\n this.resultPrice = result;\r\n this.isCalculatedWizard = true;\r\n\r\n if (this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n this.setPriceResult(scontisticaTable[0]);\r\n }\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n let breakFlag = false;\r\n for (let priceRow of tableScontisticaPriceListSliced) {\r\n let slicedPriceRow = priceRow.slice(1);\r\n\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (let price of reverse) {\r\n if (price.Price != -1) {\r\n this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n } else if (this.isCalculationTypeListino()) {\r\n let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n\r\n this.subManager.add(sub);\r\n\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n },\r\n err => {\r\n this.isCalculatedWizard = true;\r\n this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n );\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n\r\n this.isDataInitialized = true;\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n\r\n let altezza = $(\"#footer\").outerHeight();\r\n let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n\r\n let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n\r\n let altezzaHead = $(\".header-body\").outerHeight();\r\n let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n checkValidation() {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.bustaIsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.colori1IsValid\r\n ) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n\r\n validationColori() {\r\n let message;\r\n\r\n if (this.responseModel.idColori1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.colori1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.colori1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.colori1 != null) {\r\n this.responseModel.colori1Count = this.responseModel.colori1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n if (this.responseModel.colori2 != null) {\r\n this.responseModel.colori2Count = this.responseModel.colori2.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.colori1Message = message;\r\n }\r\n\r\n validationSoggetti() {\r\n let message;\r\n let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n this.responseModel.soggettiMessage = message;\r\n }\r\n\r\n validationCopie() {\r\n let message;\r\n\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n let numCopie = parseInt(this.responseModel.numCopie);\r\n let minCopie = this.responseModel.minimoCopie;\r\n let maxCopie = this.responseModel.massimoCopie;\r\n\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.copieMessage = message;\r\n }\r\n\r\n validationBusta() {\r\n let message;\r\n\r\n if (this.responseModel.idBusta == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.bustaIsValid = false;\r\n }\r\n else {\r\n this.responseModel.bustaIsValid = true;\r\n }\r\n\r\n if (this.responseModel.tipologieBusta != null) {\r\n this.responseModel.tipologieBustaCount = this.responseModel.tipologieBusta.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.bustaMessage = message;\r\n }\r\n\r\n validationLavorazioneAccessoria() {\r\n let message: string = \"\";\r\n let valid: boolean = true;\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n let qta = parseInt(lavorazione.value);\r\n let minQta = lavorazione.minQtaInput;\r\n let maxQta = lavorazione.maxQtaInput;\r\n\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.lavorazioniIsValid = valid;\r\n }\r\n\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n let sub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n\r\n this.subManager.add(sub);\r\n\r\n return message;\r\n }\r\n\r\n\r\n isAttributeFixed(tipoLavorazione) {\r\n let result: boolean = false;\r\n\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n textAreaCheck(event: any) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n let result: boolean = false;\r\n let isVisible: boolean = false;\r\n\r\n for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n onBustaChange() {\r\n for (let busta of this.responseModel.tipologieBusta) {\r\n if (busta.chiave == this.responseModel.idBusta) {\r\n this.responseModel.bustaDescription = busta.descrizione;\r\n this.responseModel.bustaImage = busta.image;\r\n this.responseModel.bustaHasInfo = busta.hasInfo;\r\n this.responseModel.bustaShowInfo = false;\r\n }\r\n }\r\n\r\n this.parameterValidation();\r\n }\r\n\r\n onBustaVisualChange(bustaId) {\r\n this.responseModel.idBusta = bustaId;\r\n this.onBustaChange();\r\n }\r\n\r\n\r\n\r\n onPantoneFronte1VisualChange(pantoneValue) {\r\n this.responseModel.idPantoneFronte1 = pantoneValue;\r\n this.onPantoneFronte1Change();\r\n }\r\n\r\n onPantoneFronte1Change() {\r\n for (let pantone of this.responseModel.pantoni) {\r\n if (pantone.chiave == this.responseModel.idPantoneFronte1) {\r\n this.responseModel.pantoneFronte1Description = pantone.descrizione;\r\n this.responseModel.pantoneFronte1Image = pantone.image;\r\n this.responseModel.pantoneFronte1HasInfo = pantone.hasInfo;\r\n this.responseModel.pantoneFronte1ShowInfo = false;\r\n }\r\n }\r\n\r\n this.parameterValidation();\r\n }\r\n\r\n onPantoneFronte2VisualChange(pantoneValue) {\r\n this.responseModel.idPantoneFronte2 = pantoneValue;\r\n this.onPantoneFronte2Change();\r\n }\r\n\r\n onPantoneFronte2Change() {\r\n for (let pantone of this.responseModel.pantoni) {\r\n if (pantone.chiave == this.responseModel.idPantoneFronte2) {\r\n this.responseModel.pantoneFronte2Description = pantone.descrizione;\r\n this.responseModel.pantoneFronte2Image = pantone.image;\r\n this.responseModel.pantoneFronte2HasInfo = pantone.hasInfo;\r\n this.responseModel.pantoneFronte2ShowInfo = false;\r\n }\r\n }\r\n this.parameterValidation();\r\n }\r\n\r\n\r\n\r\n onPantoneRetro1VisualChange(pantoneValue) {\r\n this.responseModel.idPantoneRetro1 = pantoneValue;\r\n this.onPantoneRetro1Change();\r\n }\r\n\r\n onPantoneRetro1Change() {\r\n for (let pantone of this.responseModel.pantoni) {\r\n if (pantone.chiave == this.responseModel.idPantoneRetro1) {\r\n this.responseModel.pantoneRetro1Description = pantone.descrizione;\r\n this.responseModel.pantoneRetro1Image = pantone.image;\r\n this.responseModel.pantoneRetro1HasInfo = pantone.hasInfo;\r\n this.responseModel.pantoneRetro1ShowInfo = false;\r\n }\r\n }\r\n this.parameterValidation();\r\n }\r\n\r\n onPantoneRetro2VisualChange(pantoneValue) {\r\n this.responseModel.idPantoneRetro2 = pantoneValue;\r\n this.onPantoneRetro2Change();\r\n }\r\n onPantoneRetro2Change() {\r\n for (let pantone of this.responseModel.pantoni) {\r\n if (pantone.chiave == this.responseModel.idPantoneRetro2) {\r\n this.responseModel.pantoneRetro2Description = pantone.descrizione;\r\n this.responseModel.pantoneRetro2Image = pantone.image;\r\n this.responseModel.pantoneRetro2HasInfo = pantone.hasInfo;\r\n this.responseModel.pantoneRetro2ShowInfo = false;\r\n }\r\n }\r\n this.parameterValidation();\r\n }\r\n\r\n onStampaInternoVisualChange(stampaInternoValue) {\r\n this.responseModel.idColori1 = stampaInternoValue;\r\n this.parameterValidation();\r\n }\r\n\r\n onStampaRetroVisualChange(stampaCopertinaValue) {\r\n this.responseModel.idColori2 = stampaCopertinaValue;\r\n this.parameterValidation();\r\n }\r\n\r\n lavorazioniAccessorieComboChange(lavorazione) {\r\n for (let variante of lavorazione.valori) {\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n\r\n this.parameterValidation();\r\n }\r\n\r\n lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n }\r\n\r\n\r\n\r\n showHideLavDescription(lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n }\r\n\r\n showHideBusteDescription() {\r\n if (this.responseModel.bustaShowInfo) {\r\n this.responseModel.bustaShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.bustaShowInfo = true;\r\n }\r\n }\r\n showHidePantoneFronte1Description() {\r\n if (this.responseModel.pantoneFronte1ShowInfo) {\r\n this.responseModel.pantoneFronte1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.pantoneFronte1ShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePantoneFronte2Description() {\r\n if (this.responseModel.pantoneFronte2ShowInfo) {\r\n this.responseModel.pantoneFronte2ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.pantoneFronte2ShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePantoneRetro1Description() {\r\n if (this.responseModel.pantoneRetro1ShowInfo) {\r\n this.responseModel.pantoneRetro1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.pantoneRetro1ShowInfo = true;\r\n }\r\n }\r\n showHidePantoneRetro2Description() {\r\n if (this.responseModel.pantoneRetro2ShowInfo) {\r\n this.responseModel.pantoneRetro2ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.pantoneRetro2ShowInfo = true;\r\n }\r\n }\r\n isPantoneFronte1Showed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.idColori1 == \"4\" || this.responseModel.idColori1 == \"5\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n isPantoneFronte2Showed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.idColori1 == \"5\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n isPantoneRetro1Showed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.idColori2 == \"4\" || this.responseModel.idColori2 == \"5\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n isPantoneRetro2Showed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.idColori2 == \"5\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n isCalculationTypeCalcolato() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoQuotigPrev() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListino() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListinoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n addToCartWizardCalcolato(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.resetCanvasData();\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.resetCanvasData();\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListino(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardListinoBusteToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.model.idPantoneFronte1, this.model.idPantoneFronte2, this.model.idPantoneRetro1, this.model.idPantoneRetro2).subscribe(result => {\r\n this.cartService.resetCanvasData();\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListinoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardListinoScontisticaBusteToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId, this.model.idPantoneFronte1, this.model.idPantoneFronte2, this.model.idPantoneRetro1, this.model.idPantoneRetro2).subscribe(result => {\r\n this.cartService.resetCanvasData();\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n setPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n //Deselecting the current price and selected the one passed in input\r\n for (let price of this.resultPrice.TablePriceList) {\r\n price.IsSelected = false;\r\n }\r\n\r\n price.IsSelected = true;\r\n\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n }\r\n\r\n setListinoScontisticaPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n\r\n setListinoPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n\r\n isCustomerLoggedIn() {\r\n return this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n checkEmailIsValid() {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n }\r\n\r\n checkFormRichiestaPrevIsValid() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n sendRequestInfo() {\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n if (result == true) {\r\n this.requestInfoSuccess = true;\r\n }\r\n else {\r\n this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n \r\n },\r\n err => {\r\n this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n // set variable for check if product is canvas edited to a initial state, because of other products\r\n this.cartService.setIfProductIsCanvasEdited(false);\r\n\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n return ChildComponent;\r\n }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-buste.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../../../shared/mapping';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n//Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { Object } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from \"../../../../../../services/inventory/customerscanvas.service\";\r\n\r\n@Component({\r\n selector: \"dy-wizard-commerciale-widget\",\r\n template: \"\"\r\n})\r\n\r\n\r\nexport class WizardCommercialeComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private _quotingService: QuotingService,\r\n private authService: AuthService,\r\n private languageService: LanguageService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n @Input() resourceId: number;\r\n autentification = this.authService.GetData();\r\n private userId = this.authService.GetUserId();\r\n lang: string = this.languageService.getLongLang();\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (!this.isBrowser)\r\n return;\r\n let sub = this._quotingService.getWizardCommercialeData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, InputresourceId: number) {\r\n @Component({\r\n template: result.templateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private _quotingService: QuotingService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private translate: TranslateService,\r\n private cartService: ShoppingCartService,\r\n private routesService: RoutesService,\r\n private bootboxService: BootboxService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n public canvasService: CustomersCanvasService\r\n ) {\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n const canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(\r\n isModalOpened => {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(\r\n isDesignApproved => {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n\r\n if (this.isCalculationTypeCalcolato()) {\r\n this.addToCartWizardCalcolato(1);\r\n }\r\n else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n this.addToCartWizardListino(1);\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n\r\n private pageIsInit: boolean = false;\r\n private pageIsInitAfter: boolean = false;\r\n private loggedIdUser: UserLogin;\r\n private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n waiting: boolean = false;\r\n carteValue: number = -1;\r\n lang: string = this.languageService.getLongLang();\r\n responseModel: QuotingModel = new QuotingModel();\r\n autentification = this.authService.GetData();\r\n resourceId: number = InputresourceId;\r\n isDataInitialized: boolean = false;\r\n resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n typePriceResult: string;\r\n model = new wizardFormEditoriaModel();\r\n currentRowIndex: number = -1;\r\n currentColumnIndex: number = -1;\r\n requestInfoSuccess: boolean = null;\r\n resultCalculation: boolean = false;\r\n showErrorMessage: boolean = false;\r\n listaFile: Array;\r\n blockquoting: boolean = false;\r\n listaProfonditaPackaging: Array = new Array();\r\n listaFormatiFull: Array = new Array();\r\n\r\n isCalculatedWizard: boolean = false;\r\n\r\n // sending info to a child component\r\n public parentWidgetData: string = result.CanvasInfo;\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array>();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n this.ExcludingRules.setMacrocategory(\"COMMERCIALE\");\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n this.listaFormatiFull = this.responseModel.formati;\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation()\r\n }\r\n\r\n if (this.responseModel.IsPackagingWizard == true) {\r\n this.onBasePackagingChange();\r\n }\r\n }\r\n\r\n openCanvasEditor() {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n\r\n const canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n const isStateId = false;\r\n\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n }\r\n\r\n setCanvasConfig() {\r\n const canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n\r\n return canvasConfigData;\r\n }\r\n\r\n toShowCanvasButton() {\r\n let toShow = false;\r\n let isModuleActive = false;\r\n let isUserLoggedIn = false;\r\n\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n return toShow;\r\n }\r\n\r\n CheckRegoleCommerciale() {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n let oldCarta = this.responseModel.idCarte1;\r\n let oldFormato = this.responseModel.idFormati;\r\n let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n let oldPiegature = this.responseModel.idPiegature;\r\n let lavAccArray = new Array();\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"COMMERCIALE\", null, null, this.responseModel);\r\n\r\n //Reset regole carta e grammature\r\n this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PIEGATURA\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"COMMERCIALE\", null, null, this.responseModel);\r\n\r\n //Reset regole taglio\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", null, null, this.responseModel);\r\n\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"COMMERCIALE\", null, null, this.responseModel);\r\n\r\n\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"COMMERCIALE\", this.responseModel.idFormati, 0, this.responseModel);\r\n\r\n if (this.responseModel.idCarte1 != null) {\r\n var data = this.responseModel.idCarte1.split(\"_\");\r\n let idCarta = data[0];\r\n\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n }\r\n\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"COMMERCIALE\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PIEGATURA\", \"\", this.responseModel.idPiegature, 0, this.responseModel);\r\n\r\n if (!this.isTaglioCalculated()) {\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", 1, 0, this.responseModel);\r\n }\r\n else {\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"COMMERCIALE\", 2, 0, this.responseModel);\r\n }\r\n\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"COMMERCIALE\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldCarta != this.responseModel.idCarte1) {\r\n this.onCartaInternoFieldChanged(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldPiegature != this.responseModel.idPiegature) {\r\n this.onPiegaturaChange(true);\r\n }\r\n let count = 0;\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n count = 0;\r\n for (let lavorazioneOld of lavAccArray) {\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n parameterValidation() {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n\r\n //apply all rules\r\n this.CheckRegoleCommerciale();\r\n\r\n //verify validation for all parameters \r\n this.validationCopie();\r\n\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n\r\n if (this.responseModel.IsPackagingWizard == true) {\r\n this.validationBasePackaging();\r\n this.validationProfonditaPackaging();\r\n }\r\n else {\r\n this.responseModel.basePackagingIsValid = true;\r\n this.responseModel.profonditaPackagingIsValid = true;\r\n }\r\n\r\n this.validationFormati();\r\n\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n\r\n this.validationColori();\r\n\r\n this.validationCarteInterno();\r\n this.validationGrammatureCarteInterno();\r\n\r\n this.validationPiegatura();\r\n this.validationPlastificazione();\r\n this.validationLavorazioneAccessoria();\r\n\r\n this.countCartaCategories()\r\n\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n }\r\n\r\n countCartaCategories() {\r\n if (this.responseModel.categorieCarte != null) {\r\n this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n checkZero(val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n }\r\n\r\n setTypePriceResult(type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n }\r\n\r\n isRowSelected(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelected(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelected(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n clearSelectedIndex() {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n }\r\n\r\n isRowSelectedListino(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelectedListino(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n /// Create model for passed in input to the calculation method\r\n getCalculationModel() {\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n this.model.idCarte1 = this.responseModel.idCarte1;\r\n\r\n for (let carta of this.responseModel.carte1) {\r\n if (this.model.idCarte1 == carta.chiave) {\r\n this.model.nomeCarte1 = carta.valore\r\n }\r\n }\r\n this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n\r\n for (let grammatureInterno of this.responseModel.grammature1) {\r\n if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n this.model.nomeGrammature1 = grammatureInterno.valore\r\n }\r\n }\r\n\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n\r\n this.model.idColori1 = this.responseModel.idColori1;\r\n\r\n if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n }\r\n\r\n this.model.idColori2 = this.responseModel.idColori2;\r\n\r\n this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n\r\n this.model.taglio = this.isTaglioCalculated();\r\n\r\n if (this.responseModel.idPiegature != \"-1\") {\r\n this.model.idPiegature = this.responseModel.idPiegature;\r\n }\r\n\r\n this.model.lavorazioniAccessorie = new Array();\r\n\r\n for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n //combo\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n //numeric\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n //text area\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n\r\n this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n let sub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n this.resultPrice = result;\r\n this.isCalculatedWizard = true;\r\n\r\n if (this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n\r\n for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n let price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n let breakFlag = false;\r\n for (let priceRow of tableScontisticaPriceListSliced) {\r\n let slicedPriceRow = priceRow.slice(1);\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (let price of reverse) {\r\n if (price.Price != -1) {\r\n this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n\r\n this.subManager.add(sub);\r\n\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n },\r\n err => {\r\n this.showErrorMessage = true;\r\n this.isCalculatedWizard = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n );\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n\r\n }\r\n\r\n this.isDataInitialized = true;\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n\r\n let altezza = $(\"#footer\").outerHeight();\r\n let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n\r\n let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n\r\n let altezzaHead = $(\".header-body\").outerHeight();\r\n let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n checkValidation() {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.carte1IsValid\r\n && this.responseModel.grammature1IsValid\r\n && this.responseModel.piegatureIsValid\r\n && this.responseModel.plastificazione1IsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.colori1IsValid\r\n && this.responseModel.basePackagingIsValid\r\n && this.responseModel.profonditaPackagingIsValid\r\n ) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n\r\n validationColori() {\r\n let message;\r\n\r\n if (this.responseModel.idColori1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.colori1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.colori1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.colori1 != null) {\r\n this.responseModel.colori1Count = this.responseModel.colori1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n if (this.responseModel.colori2 != null) {\r\n this.responseModel.colori2Count = this.responseModel.colori2.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.colori1Message = message;\r\n }\r\n\r\n\r\n validationBaseFormati() {\r\n let message;\r\n let base = parseFloat(this.responseModel.baseFormato)\r\n let minBase = this.responseModel.minimoBase;\r\n let maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n }\r\n\r\n validationAltezzaFormati() {\r\n let message;\r\n let altezza = parseFloat(this.responseModel.altezzaFormato)\r\n let minAltezza = this.responseModel.minimoAltezza;\r\n let maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n\r\n this.responseModel.altezzaFormatoMessage = message;\r\n }\r\n\r\n validationSoggetti() {\r\n let message;\r\n let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n\r\n this.responseModel.soggettiMessage = message;\r\n }\r\n\r\n validationCopie() {\r\n let message;\r\n\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n let numCopie = parseInt(this.responseModel.numCopie);\r\n let minCopie = this.responseModel.minimoCopie;\r\n let maxCopie = this.responseModel.massimoCopie;\r\n\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.copieMessage = message;\r\n }\r\n\r\n validationBasePackaging() {\r\n let message;\r\n\r\n if (this.responseModel.idBasePackaging == 0 || this.responseModel.idBasePackaging == null) {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.basePackagingIsValid = false;\r\n }\r\n else {\r\n this.responseModel.basePackagingIsValid = true;\r\n }\r\n\r\n this.responseModel.basePackagingMessage = message;\r\n }\r\n\r\n validationProfonditaPackaging() {\r\n let message;\r\n\r\n if (this.responseModel.idProfonditaPackaging == 0 || this.responseModel.idProfonditaPackaging == null) {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.profonditaPackagingIsValid = false;\r\n }\r\n else {\r\n this.responseModel.profonditaPackagingIsValid = true;\r\n }\r\n\r\n this.responseModel.profonditaPackagingMessage = message;\r\n }\r\n\r\n validationFormati() {\r\n let message;\r\n\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n\r\n this.responseModel.formatiMessage = message;\r\n\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n }\r\n\r\n validationCarteInterno() {\r\n let message;\r\n\r\n if (this.responseModel.idCarte1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.carte1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.carte1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.carte1 != null) {\r\n this.responseModel.carte1Count = this.responseModel.carte1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.carte1Message = message;\r\n }\r\n\r\n validationGrammatureCarteInterno() {\r\n let message;\r\n\r\n if (this.responseModel.idGrammature1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.grammature1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.grammature1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.grammature1 != null) {\r\n this.responseModel.grammature1Count = this.responseModel.grammature1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.grammature1Message = message;\r\n }\r\n\r\n validationLavorazioneAccessoria() {\r\n let message: string = \"\";\r\n let valid: boolean = true;\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n let qta = parseInt(lavorazione.value);\r\n let minQta = lavorazione.minQtaInput;\r\n let maxQta = lavorazione.maxQtaInput;\r\n\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.lavorazioniIsValid = valid;\r\n }\r\n\r\n validationPiegatura() {\r\n let message;\r\n\r\n if (this.responseModel.idPiegature == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.piegatureIsValid = false;\r\n }\r\n else {\r\n this.responseModel.piegatureIsValid = true;\r\n }\r\n\r\n if (this.responseModel.piegature != null) {\r\n this.responseModel.piegatureCount = this.responseModel.piegature.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.piegatureMessage = message;\r\n }\r\n\r\n validationPlastificazione() {\r\n let message;\r\n\r\n if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.plastificazione1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.plastificazione1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.plastificazioni1 != null) {\r\n this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.plastificazione1Message = message;\r\n }\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n\r\n return message;\r\n }\r\n\r\n isTaglioCalculated() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.isTaglioVisible == false) {\r\n if (this.responseModel.tipoCalcoloTaglio == \"si\" && !this.responseModel.taglioShowed) {\r\n result = true;\r\n }\r\n else if (this.responseModel.tipoCalcoloTaglio == \"no\" && !this.responseModel.taglioShowed) {\r\n result = false;\r\n }\r\n else if (this.responseModel.taglioShowed) {\r\n result = this.responseModel.tipoTaglio;\r\n }\r\n }\r\n else {\r\n result = false;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsPlastificazioneInternoIsShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isAttributeFixed(tipoLavorazione) {\r\n let result: boolean = false;\r\n\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n textAreaCheck(event: any) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n let result: boolean = false;\r\n let isVisible: boolean = false;\r\n\r\n for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsTaglioShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n onCategoriaCartaInternoFieldChanged() {\r\n let selectedPaper = false;\r\n\r\n for (let carte of this.responseModel.carte1) {\r\n if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n\r\n carte.isVisible = true;\r\n }\r\n else {\r\n carte.isVisible = false;\r\n }\r\n }\r\n else {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n\r\n carte.isVisible = true;\r\n }\r\n }\r\n this.parameterValidation();\r\n }\r\n\r\n onCartaInternoFieldChanged(isrules = false) {\r\n for (let grammature of this.responseModel.carte1) {\r\n if (grammature.chiave == this.responseModel.idCarte1) {\r\n this.responseModel.carte1Description = grammature.descrizione;\r\n this.responseModel.carte1Image = grammature.image;\r\n this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = grammature.subElements;\r\n this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n this.model.idGrammature1 = grammature.wrap_valore;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onCartaInternoVisualFieldChanged(paperId) {\r\n this.responseModel.idCarte1 = paperId;\r\n this.onCartaInternoFieldChanged();\r\n }\r\n\r\n onFormatiChange(isrules = false) {\r\n if (this.responseModel.idFormati == \"-1\") {\r\n this.responseModel.formatoDescription = \"\";\r\n this.responseModel.formatoImage = \"\";\r\n this.responseModel.formatiHasInfo = false;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n for (let formato of this.responseModel.formati) {\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onBasePackagingChange() {\r\n\r\n if (this.responseModel.listaPackagingParameter.length > 0 && this.responseModel.listaPackagingParameter != null) {\r\n for (let base of this.responseModel.listaPackagingParameter) {\r\n if (base.IdBase == this.responseModel.idBasePackaging) {\r\n this.listaProfonditaPackaging = base.listPackagingRelProfondita;\r\n if (this.listaProfonditaPackaging != null && this.listaProfonditaPackaging.length > 0) {\r\n this.responseModel.idProfonditaPackaging = this.listaProfonditaPackaging[0].IdProfondita;\r\n this.onProfonditaPackagingChange();\r\n }\r\n else {\r\n this.responseModel.formati = new Array();\r\n this.responseModel.idProfonditaPackaging = 0;\r\n this.onFormatiVisualChange(\"-1\");\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n this.responseModel.idBasePackaging = 0;\r\n this.responseModel.idProfonditaPackaging = 0;\r\n this.onFormatiVisualChange(\"-1\");\r\n }\r\n\r\n this.parameterValidation();\r\n }\r\n\r\n onProfonditaPackagingChange() {\r\n if (this.listaProfonditaPackaging.length > 0 && this.listaProfonditaPackaging != null) {\r\n let firstFormato = 0;\r\n for (let profondita of this.listaProfonditaPackaging) {\r\n\r\n if (profondita.IdProfondita == this.responseModel.idProfonditaPackaging && profondita.IdBase == this.responseModel.idBasePackaging) {\r\n this.responseModel.formati = new Array();\r\n\r\n if (profondita.listPackagingRelFormato.length > 0 && profondita.listPackagingRelFormato != null) {\r\n\r\n for (let formato of this.listaFormatiFull) {\r\n for (let formatiRel of profondita.listPackagingRelFormato) {\r\n if (formato.chiave == formatiRel.IdFormato.toString()) {\r\n formato.isVisible = true;\r\n this.responseModel.formati.push(formato);\r\n if (firstFormato == 0) {\r\n firstFormato++;\r\n this.onFormatiVisualChange(formato.chiave)\r\n }\r\n\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n this.responseModel.formati = new Array();\r\n this.onFormatiVisualChange(\"-1\");\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n this.responseModel.formati = new Array();\r\n this.onFormatiVisualChange(\"-1\");\r\n }\r\n this.parameterValidation();\r\n }\r\n\r\n onFormatiVisualChange(formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n }\r\n\r\n onStampaInternoVisualChange(stampaInternoValue) {\r\n this.responseModel.idColori1 = stampaInternoValue;\r\n this.parameterValidation();\r\n }\r\n\r\n onStampaRetroVisualChange(stampaCopertinaValue) {\r\n this.responseModel.idColori2 = stampaCopertinaValue;\r\n this.parameterValidation();\r\n }\r\n\r\n onGrammatureInternoVisualFieldChanged(grammatureId) {\r\n this.responseModel.idGrammature1 = grammatureId;\r\n this.parameterValidation();\r\n }\r\n\r\n onPlastificationInternoChange(isrules = false) {\r\n for (let plastification of this.responseModel.plastificazioni1) {\r\n if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n this.responseModel.plastificazioni1Image = plastification.image;\r\n this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onPlastificationInternoViasualChange(plastificationId) {\r\n this.responseModel.idPlastificazioni1 = plastificationId;\r\n this.onPlastificationInternoChange();\r\n }\r\n\r\n lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n for (let variante of lavorazione.valori) {\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n }\r\n\r\n onPiegaturaChange(isrules = false) {\r\n for (let piegatura of this.responseModel.piegature) {\r\n if (piegatura.chiave == this.responseModel.idPiegature) {\r\n this.responseModel.piegatureDescription = piegatura.descrizione;\r\n this.responseModel.piegatureImage = piegatura.image;\r\n this.responseModel.piegatureHasInfo = piegatura.hasInfo;\r\n this.responseModel.piegatureShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onPiegaturaVisualChange(piegaturaId) {\r\n this.responseModel.idPiegature = piegaturaId;\r\n this.onPiegaturaChange();\r\n }\r\n\r\n\r\n\r\n showHidePiegatureDescription() {\r\n if (this.responseModel.piegatureShowInfo) {\r\n this.responseModel.piegatureShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.piegatureShowInfo = true;\r\n }\r\n }\r\n\r\n showHideLavDescription(lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n }\r\n\r\n showHideFormatDescription() {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePaperInternoDescription() {\r\n if (this.responseModel.carte1ShowInfo) {\r\n this.responseModel.carte1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.carte1ShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePlastficationInternoDescription() {\r\n if (this.responseModel.plastificazioni1ShowInfo) {\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni1ShowInfo = true;\r\n }\r\n }\r\n\r\n isCalculationTypeCalcolato() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoQuotigPrev() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListino() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListinoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n addToCartWizardCalcolato(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListino(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListinoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n setActive(id) {\r\n $(\".calendar-list\").removeClass(\"hoverActive\");\r\n $($(\".calendar-list\")[id]).addClass(\"hoverActive\");\r\n }\r\n\r\n selectFileCombination() {\r\n this.listaFile = new Array()\r\n for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n if (file.FormatId == this.responseModel.idFormati) {\r\n\r\n if (this.responseModel.piegature != null) {\r\n if (file.PiegaId == this.responseModel.idPiegature) {\r\n let fileObj = new FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj)\r\n }\r\n }\r\n else {\r\n let fileObj = new FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n this.listaFile.push(fileObj)\r\n }\r\n }\r\n }\r\n }\r\n\r\n setPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n //Deselecting the current price and selected the one passed in input\r\n for (let price of this.resultPrice.TablePriceList) {\r\n price.IsSelected = false;\r\n }\r\n\r\n price.IsSelected = true;\r\n\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n }\r\n\r\n setListinoScontisticaPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n setListinoPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n isCustomerLoggedIn() {\r\n return this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n checkEmailIsValid() {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n }\r\n\r\n checkFormRichiestaPrevIsValid() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n sendRequestInfo() {\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n if (result == true) {\r\n this.requestInfoSuccess = true;\r\n }\r\n else {\r\n this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n\r\n },\r\n err => {\r\n this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n }\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-commerciale.component.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\n//Model\r\nimport { wizardFormEditoriaModel } from \"./../../models/document/quoting-submit-model\";\r\nimport { LanguageService } from \"../cms/language.service\";\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\nimport { AuthService } from '../core/auth.service';\r\n@Injectable()\r\nexport class QuotingService {\r\n\r\n constructor(\r\n public _api: ApiService, \r\n public language: LanguageService,\r\n public currency: CurrencyService,\r\n public _cache: CacheService,\r\n private mappings: Mappings,\r\n private authService: AuthService\r\n ) {}\r\n\r\n getWizardStampaData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n let url = this.mappings.Web_Api_Get_Wizard_Stampa_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n\r\n getWizardBannerData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n let url = this.mappings.Web_Api_Get_Wizard_Banner_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getWizardAdesiviData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n let url = this.mappings.Web_Api_Get_Wizard_Adesivi_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getWizardBusteData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n let url = this.mappings.Web_Api_Get_Wizard_Buste_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n\r\n getWizardEtichetteData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n let url = this.mappings.Web_Api_Get_Wizard_Etichette_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getWizardCommercialeData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n let url = this.mappings.Web_Api_Get_Wizard_Commerciale_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getWizardEditoriaData(modelType: string, resourceId: number, userId: string, lang: string) {\r\n let url = this.mappings.Web_Api_Get_Wizard_Editoria_Data.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getWizardDataRequest(modelType: string, resourceId: number, lang: string) {\r\n let userId: string = this.authService.GetUserId();\r\n \r\n let url = this.mappings.Web_Api_Get_Wizard_Data_Address.replace('{modelType}', modelType).replace('{resourceId}', resourceId.toString()).replace('{userId}', userId).replace('{lang}', lang);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n\r\n }\r\n\r\n getCalculatedWizard(data: wizardFormEditoriaModel) {\r\n\r\n data.language = this.language.getLongLang();\r\n data.currency = this.currency.getCurrency();\r\n\r\n return this._api.post(this.mappings.Web_Api_Post_Get_Wizard_Price_Estimation, data)\r\n .do(result => result)\r\n .share();\r\n }\r\n \r\n getCalculatedAp(data: wizardFormEditoriaModel) {\r\n\r\n data.language = this.language.getLongLang();\r\n data.currency = this.currency.getCurrency();\r\n \r\n return this._api.post(this.mappings.Web_Api_Post_Get_Ap_Price_Estimation, data)\r\n .do(result => result)\r\n .share();\r\n }\r\n\r\n sendRequestInfo(data: wizardFormEditoriaModel) {\r\n\r\n data.language = this.language.getLongLang();\r\n\r\n return this._api.post(this.mappings.Web_Api_Post_Send_Request_Info_Wizard, data)\r\n .do(result => result)\r\n .share();\r\n }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/document/quoting.service.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Compiler, Input, Inject } from \"@angular/core\";\r\nimport { TranslateService } from '@ngx-translate/core';\r\nimport { LavorazioniComponents } from \"./../../../../../../models/document/quoting-model\";\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n//Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\n\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from \"../../../../../../services/inventory/customerscanvas.service\";\r\n\r\n@Component({\r\n selector: \"dy-wizard-editoria-widget\",\r\n template: \"\"\r\n})\r\n\r\nexport class WizardEditoriaComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private authService: AuthService,\r\n private _elementRef: ViewContainerRef,\r\n private _quotingService: QuotingService,\r\n private languageService: LanguageService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n @Input() resourceId: number;\r\n @Input() resourceType: string;\r\n\r\n autentification = this.authService.GetData();\r\n private userId = this.authService.GetUserId();\r\n lang: string = this.languageService.getLongLang();\r\n\r\n\r\n subManager = new Subscription();\r\n ngOnInit() {\r\n if (!this.isBrowser)\r\n return;\r\n let sub = this._quotingService.getWizardEditoriaData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, this.resourceId, this.resourceType);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, InputresourceId: number, InputresourceType: string) {\r\n @Component({\r\n template: result.templateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private _quotingService: QuotingService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private cartService: ShoppingCartService,\r\n private routesService: RoutesService,\r\n private bootboxService: BootboxService,\r\n private translate: TranslateService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n public canvasService: CustomersCanvasService\r\n ) {\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n const canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(\r\n isModalOpened => {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(\r\n isDesignApproved => {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n\r\n if (this.isCalculationTypeCalcolato()) {\r\n this.addToCartWizardCalcolato(1);\r\n }\r\n else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n this.addToCartWizardListino(1);\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n\r\n private loggedIdUser: UserLogin;\r\n private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n\r\n model = new wizardFormEditoriaModel();\r\n components: LavorazioniComponents = new LavorazioniComponents();\r\n isDataInitialized: boolean = false;\r\n ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n private pageIsInit: boolean = false;\r\n private pageIsInitAfter: boolean = false;\r\n lang: string = this.languageService.getLongLang();\r\n responseModel: QuotingModel = new QuotingModel();\r\n resourceId: number = InputresourceId;\r\n resourceType: string = InputresourceType;\r\n EditioriaCopertinaSelect = \"-1\";\r\n isValidated = false;\r\n resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n typePriceResult: string;\r\n currentRowIndex: number = -1;\r\n currentColumnIndex: number = -1;\r\n requestInfoSuccess: boolean = null;\r\n resultCalculation: boolean = false;\r\n showErrorMessage: boolean = false;\r\n blockquoting: boolean = false;\r\n listaFile: Array;\r\n\r\n isCalculatedWizard: boolean = false;\r\n\r\n // sending info to a child component\r\n public parentWidgetData: string = result.CanvasInfo;\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array>();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n this.ExcludingRules.setMacrocategory(\"EDITORIA\");\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.stampa1_colori_fronte = \"1\"\r\n this.responseModel.stampa1_colori_retro = \"1\"\r\n this.responseModel.stampa2_colori_fronte = \"1\"\r\n this.responseModel.stampa2_colori_retro = \"1\"\r\n this.EditioriaCopertinaSelect = this.responseModel.idCopertine;\r\n\r\n if (this.responseModel.idCopertine == null) {\r\n this.responseModel.idCopertine = \"-1\";\r\n }\r\n\r\n this.responseModel.taglioShowed = this.responseModel.tipoTaglio;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation()\r\n }\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n\r\n let altezza = $(\"#footer\").outerHeight();\r\n let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n\r\n let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n\r\n let altezzaHead = $(\".header-body\").outerHeight();\r\n let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n openCanvasEditor() {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n\r\n const canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n const isStateId = false;\r\n\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n }\r\n\r\n setCanvasConfig() {\r\n const canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n\r\n return canvasConfigData;\r\n }\r\n\r\n toShowCanvasButton() {\r\n let toShow = false;\r\n let isModuleActive = false;\r\n let isUserLoggedIn = false;\r\n\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n return toShow;\r\n }\r\n\r\n\r\n checkZero(val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n }\r\n\r\n setTypePriceResult(type) {\r\n this.typePriceResult = type;\r\n\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n }\r\n\r\n setListinoPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n isRowSelected(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelected(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelected(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n clearSelectedIndex() {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n }\r\n\r\n isRowSelectedListino(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelectedListino(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n isCustomerLoggedIn() {\r\n return this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n /// Create model for passed in input to the calculation method\r\n getCalculationModel() {\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n\r\n this.model.tipoFacciate = this.responseModel.tipoFacciate;\r\n\r\n if (this.responseModel.tipoFacciate != 'libera') {\r\n this.model.idFacciate = this.responseModel.idFacciate;\r\n }\r\n\r\n else {\r\n this.model.numFacciate = this.responseModel.numFacciate;\r\n }\r\n\r\n this.model.tipoStampaInternoSoloFronte = this.responseModel.valueStampaInternoSoloFronte;\r\n this.model.tipoStampaCopertinaSoloFronte = this.responseModel.valueStampaCopertinaSoloFronte;\r\n\r\n this.model.idCarte1 = this.responseModel.idCarte1;\r\n\r\n for (let carta of this.responseModel.carte1) {\r\n if (this.model.idCarte1 == carta.chiave) {\r\n this.model.nomeCarte1 = carta.valore\r\n }\r\n }\r\n this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n\r\n for (let grammatureInterno of this.responseModel.grammature1) {\r\n if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n this.model.nomeGrammature1 = grammatureInterno.valore\r\n }\r\n }\r\n\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n\r\n this.model.idColori1 = this.responseModel.idColori1;\r\n\r\n if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n }\r\n\r\n this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n\r\n if (this.EditioriaCopertinaSelect != \"0\" && this.EditioriaCopertinaSelect != \"-1\") {\r\n this.model.idCarte2 = this.responseModel.idCarte2;\r\n for (let cartaCopertina of this.responseModel.carte2) {\r\n if (this.model.idCarte2 == cartaCopertina.chiave) {\r\n this.model.nomeCarte2 = cartaCopertina.valore\r\n }\r\n }\r\n\r\n this.model.idGrammature2 = this.responseModel.idGrammature2;\r\n\r\n for (let grammatureCopertina of this.responseModel.grammature2) {\r\n if (this.model.idGrammature2 == grammatureCopertina.chiave) {\r\n this.model.nomeGrammature2 = grammatureCopertina.valore\r\n }\r\n }\r\n\r\n this.model.idCopertine = this.responseModel.idCopertine;\r\n this.model.idPlastificazioni2 = this.responseModel.idPlastificazioni2;\r\n this.model.idColori2 = this.responseModel.idColori2;\r\n }\r\n else {\r\n this.model.idGrammature2 = \"0\";\r\n this.model.idCarte2 = \"\";\r\n this.model.nomeCarte2 = \"\";\r\n this.model.nomeGrammature2 = \"0\";\r\n this.model.idCopertine = \"\";\r\n this.model.idPlastificazioni2 = \"\";\r\n this.model.idColori2 = \"\";\r\n }\r\n\r\n if (this.responseModel.cartoncini != null && this.responseModel.cartoncini.length > 0) {\r\n this.model.idCartoncino = this.responseModel.idCartoncino;\r\n\r\n for (let cartaCartoncino of this.responseModel.cartoncini) {\r\n if (this.model.idCartoncino == cartaCartoncino.chiave) {\r\n this.model.nomeCartoncino = cartaCartoncino.valore\r\n }\r\n }\r\n\r\n this.model.idGrammatureCartoncino = this.responseModel.idGrammatureCartoncino;\r\n\r\n for (let grammatureCartoncino of this.responseModel.grammatureCartoncino) {\r\n if (this.model.idGrammatureCartoncino == grammatureCartoncino.chiave) {\r\n this.model.nomeGrammatureCartoncino = grammatureCartoncino.valore\r\n }\r\n }\r\n }\r\n else {\r\n this.model.idGrammatureCartoncino = \"0\";\r\n this.model.idCartoncino = \"0\";\r\n this.model.nomeCartoncino = \"0\";\r\n this.model.nomeGrammatureCartoncino = \"0\";\r\n }\r\n\r\n this.model.taglio = this.isTaglioCalculated();\r\n\r\n if (this.responseModel.idRilegature != \"-1\") {\r\n this.model.idRilegature = this.responseModel.idRilegature;\r\n }\r\n\r\n this.model.lavorazioniAccessorie = new Array();\r\n\r\n for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n //combo\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n //numeric\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n //text area\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n\r\n this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n this.resultPrice = result;\r\n this.isCalculatedWizard = true;\r\n\r\n let dorsoString = parseFloat(this.resultPrice.AltezzaDorso.toString());\r\n let dorso = parseFloat(dorsoString.toFixed(2));\r\n this.resultPrice.AltezzaDorso = dorso;\r\n if (this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n\r\n for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n let price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n let breakFlag = false;\r\n for (let priceRow of tableScontisticaPriceListSliced) {\r\n let slicedPriceRow = priceRow.slice(1);\r\n\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (let price of reverse) {\r\n if (price.Price != -1) {\r\n this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n },\r\n err => {\r\n this.isCalculatedWizard = true;\r\n this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n );\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n\r\n }\r\n this.isDataInitialized = true;\r\n }\r\n\r\n isTaglioCalculated() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.isTaglioVisible == false) {\r\n if (this.responseModel.tipoCalcoloTaglio == \"si\" && !this.responseModel.taglioShowed) {\r\n result = true;\r\n }\r\n else if (this.responseModel.tipoCalcoloTaglio == \"no\" && !this.responseModel.taglioShowed) {\r\n result = false;\r\n }\r\n else if (this.responseModel.taglioShowed) {\r\n result = this.responseModel.tipoTaglio;\r\n }\r\n }\r\n else {\r\n result = false;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsCopertinaShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.EditioriaCopertinaSelect != '0' && this.EditioriaCopertinaSelect != '-1') {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsCartoncinoShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.cartoncini != null && this.responseModel.cartoncini.length > 0) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsPlastificazioneInternoIsShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isAttributeFixed(tipoLavorazione) {\r\n let result: boolean = false;\r\n\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsPlastificazioneCopertinaIsShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.plastificazioni2 != null && this.responseModel.plastificazioni2.length > 0 && this.checkIsCopertinaShowed()) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n textAreaCheck(event: any) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId, lavIsVisible) {\r\n let result: boolean = false;\r\n let isVisible: boolean = false;\r\n\r\n for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsTaglioShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n onCategoriaCartaInternoFieldChanged() {\r\n let selectedPaper = false;\r\n\r\n for (let carte of this.responseModel.carte1) {\r\n if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n\r\n carte.isVisible = true;\r\n }\r\n else {\r\n carte.isVisible = false;\r\n }\r\n }\r\n else {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n\r\n carte.isVisible = true;\r\n }\r\n }\r\n\r\n this.parameterValidation();\r\n }\r\n\r\n onCartaInternoFieldChanged(isrules = false) {\r\n for (let grammature of this.responseModel.carte1) {\r\n if (grammature.chiave == this.responseModel.idCarte1) {\r\n this.responseModel.carte1Description = grammature.descrizione;\r\n this.responseModel.carte1Image = grammature.image;\r\n this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = grammature.subElements;\r\n this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n this.model.idGrammature1 = grammature.wrap_valore;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onCartoncinoFieldChanged() {\r\n for (let grammature of this.responseModel.cartoncini) {\r\n if (grammature.chiave == this.responseModel.idCartoncino) {\r\n this.responseModel.cartoncinoDescription = grammature.descrizione;\r\n this.responseModel.cartoncinoImage = grammature.image;\r\n this.responseModel.cartoncinoHasInfo = grammature.hasInfo;\r\n this.responseModel.cartoncinoShowInfo = false;\r\n this.responseModel.grammatureCartoncino = grammature.subElements;\r\n this.responseModel.idGrammatureCartoncino = grammature.wrap_valore;\r\n this.model.idGrammatureCartoncino = grammature.wrap_valore;\r\n }\r\n }\r\n\r\n this.parameterValidation();\r\n }\r\n\r\n onCartaInternoVisualFieldChanged(paperId) {\r\n this.responseModel.idCarte1 = paperId;\r\n this.onCartaInternoFieldChanged();\r\n }\r\n\r\n onCartoncinoVisualFieldChanged(paperId) {\r\n this.responseModel.idCartoncino = paperId;\r\n this.onCartoncinoFieldChanged();\r\n }\r\n\r\n onCategoriaCartaCopertinaFieldChanged() {\r\n let selectedPaper = false;\r\n\r\n for (let carteCopertina of this.responseModel.carte2) {\r\n if (this.responseModel.idCategorieCarte2 != \"-1\") {\r\n if (carteCopertina.parentId == this.responseModel.idCategorieCarte2) {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte2 = carteCopertina.chiave;\r\n this.model.idCarte2 = carteCopertina.chiave;\r\n this.responseModel.carte2Description = carteCopertina.descrizione;\r\n this.responseModel.carte2Image = carteCopertina.image;\r\n this.responseModel.carte2HasInfo = carteCopertina.hasInfo;\r\n this.responseModel.carte2ShowInfo = false;\r\n this.responseModel.grammature2 = carteCopertina.subElements;\r\n this.responseModel.idGrammature2 = carteCopertina.wrap_valore;\r\n this.model.idGrammature2 = carteCopertina.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n\r\n carteCopertina.isVisible = true;\r\n }\r\n else {\r\n carteCopertina.isVisible = false;\r\n }\r\n }\r\n else {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte2 = carteCopertina.chiave;\r\n this.model.idCarte2 = carteCopertina.chiave;\r\n this.responseModel.carte2Description = carteCopertina.descrizione;\r\n this.responseModel.carte2Image = carteCopertina.image;\r\n this.responseModel.carte2HasInfo = carteCopertina.hasInfo;\r\n this.responseModel.carte2ShowInfo = false;\r\n\r\n this.responseModel.grammature2 = carteCopertina.subElements;\r\n this.responseModel.idGrammature2 = carteCopertina.wrap_valore;\r\n this.model.idGrammature2 = carteCopertina.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n\r\n carteCopertina.isVisible = true;\r\n }\r\n }\r\n this.parameterValidation();\r\n }\r\n\r\n onCartaCopertinaFieldChanged(isrules = false) {\r\n for (let grammatureCartaCopertina of this.responseModel.carte2) {\r\n if (grammatureCartaCopertina.chiave == this.responseModel.idCarte2) {\r\n this.responseModel.carte2Description = grammatureCartaCopertina.descrizione;\r\n this.responseModel.carte2Image = grammatureCartaCopertina.image;\r\n this.responseModel.carte2HasInfo = grammatureCartaCopertina.hasInfo;\r\n this.responseModel.carte2ShowInfo = false;\r\n this.responseModel.grammature2 = grammatureCartaCopertina.subElements;\r\n this.responseModel.idGrammature2 = grammatureCartaCopertina.wrap_valore;\r\n this.model.idGrammature2 = grammatureCartaCopertina.wrap_valore;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onCopertineFieldChange(isrules = false) {\r\n this.EditioriaCopertinaSelect = this.responseModel.idCopertine;\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onCopertineFieldVisualChange(copertinaId) {\r\n this.responseModel.idCopertine = copertinaId;\r\n this.onCopertineFieldChange();\r\n }\r\n\r\n onCartaCopertinaVisualFieldChanged(paperId) {\r\n this.responseModel.idCarte2 = paperId;\r\n this.onCartaCopertinaFieldChanged();\r\n }\r\n\r\n onFormatiChange(isrules = false) {\r\n for (let formato of this.responseModel.formati) {\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onFormatiVisualChange(formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n }\r\n\r\n onStampaInternoVisualChange(stampaInternoValue) {\r\n this.responseModel.idColori1 = stampaInternoValue;\r\n this.parameterValidation();\r\n }\r\n\r\n onStampaCopertinaVisualChange(stampaCopertinaValue) {\r\n this.responseModel.idColori2 = stampaCopertinaValue;\r\n this.parameterValidation();\r\n }\r\n\r\n\r\n onPlastificationInternoChange(isrules = false) {\r\n for (let plastification of this.responseModel.plastificazioni1) {\r\n if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n this.responseModel.plastificazioni1Image = plastification.image;\r\n this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onPlastificationInternoViasualChange(plastificationId) {\r\n this.responseModel.idPlastificazioni1 = plastificationId;\r\n this.onPlastificationInternoChange();\r\n }\r\n\r\n onGrammatureInternoVisualFieldChanged(grammatureId) {\r\n this.responseModel.idGrammature1 = grammatureId;\r\n this.parameterValidation();\r\n }\r\n\r\n onGrammatureCartoncinoVisualFieldChanged(grammatureId) {\r\n this.responseModel.idGrammatureCartoncino = grammatureId;\r\n this.parameterValidation();\r\n }\r\n\r\n onGrammatureCopertinaVisualFieldChanged(grammatureId) {\r\n this.responseModel.idGrammature2 = grammatureId;\r\n this.parameterValidation();\r\n }\r\n\r\n onPlastificationCopertinaChange(isrules = false) {\r\n for (let plastification of this.responseModel.plastificazioni2) {\r\n if (plastification.chiave == this.responseModel.idPlastificazioni2) {\r\n this.responseModel.plastificazioni2Description = plastification.descrizione;\r\n this.responseModel.plastificazioni2Image = plastification.image;\r\n this.responseModel.plastificazioni2HasInfo = plastification.hasInfo;\r\n this.responseModel.plastificazioni2ShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onPlastificationCopertinaVisualChange(plastificationId) {\r\n this.responseModel.plastificazioni2 = plastificationId;\r\n this.onPlastificationCopertinaChange();\r\n }\r\n\r\n lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n for (let variante of lavorazione.valori) {\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n }\r\n\r\n onRilegaturaChange(isrules = false) {\r\n for (let rilegature of this.responseModel.rilegature) {\r\n if (rilegature.chiave == this.responseModel.idRilegature) {\r\n this.responseModel.rilegatureDescription = rilegature.descrizione;\r\n this.responseModel.rilegatureImage = rilegature.image;\r\n this.responseModel.rilegatureHasInfo = rilegature.hasInfo;\r\n this.responseModel.rilegatureShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onRilegaturaVisualChange(rilegaturaId) {\r\n this.responseModel.idRilegature = rilegaturaId;\r\n this.onRilegaturaChange();\r\n }\r\n\r\n showHideLavDescription(lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n }\r\n\r\n showHideFormatDescription() {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePaperInternoDescription() {\r\n if (this.responseModel.carte1ShowInfo) {\r\n this.responseModel.carte1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.carte1ShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePaperCartoncinoDescription() {\r\n if (this.responseModel.cartoncinoShowInfo) {\r\n this.responseModel.cartoncinoShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.cartoncinoShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePaperCopertinaDescription() {\r\n if (this.responseModel.carte2ShowInfo) {\r\n this.responseModel.carte2ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.carte2ShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePlastficationInternoDescription() {\r\n if (this.responseModel.plastificazioni1ShowInfo) {\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni1ShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePlastficationCopertinaDescription() {\r\n if (this.responseModel.plastificazioni2ShowInfo) {\r\n this.responseModel.plastificazioni2ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni2ShowInfo = true;\r\n }\r\n }\r\n\r\n showHideRilegatureDescription() {\r\n if (this.responseModel.rilegatureShowInfo) {\r\n this.responseModel.rilegatureShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.rilegatureShowInfo = true;\r\n }\r\n }\r\n\r\n checkValidation() {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.facciateIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.carte1IsValid\r\n && this.responseModel.grammature1IsValid\r\n && this.responseModel.plastificazione1IsValid\r\n && this.responseModel.carte2IsValid\r\n && this.responseModel.grammature2IsValid\r\n && this.responseModel.plastificazione2IsValid\r\n && this.responseModel.copertineIsValid\r\n && this.responseModel.cartoncinoIsValid\r\n && this.responseModel.rilegatureIsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.colori1IsValid\r\n ) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n\r\n checkEmailIsValid() {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n }\r\n\r\n checkFormRichiestaPrevIsValid() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n sendRequestInfo() {\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n if (result == true) {\r\n this.requestInfoSuccess = true;\r\n }\r\n else {\r\n this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n \r\n },\r\n err => {\r\n this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n }\r\n\r\n CheckRegoleEditoria() {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n let oldCarta = this.responseModel.idCarte1;\r\n let oldCartaCopertina = this.responseModel.idCarte2;\r\n let oldFormato = this.responseModel.idFormati;\r\n let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n let oldPlastificazioneCopertina = this.responseModel.idPlastificazioni2;\r\n let oldCopertina = this.responseModel.idCopertine;\r\n let oldRilegatura = this.responseModel.idRilegature;\r\n let lavAccArray = new Array();\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n\r\n\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"EDITORIA\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"EDITORIA\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE_COPERTINA\", \"\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"RILEGATURA\", \"\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", null, null, this.responseModel);\r\n this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"EDITORIA\", null, null, this.responseModel);\r\n\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"EDITORIA\", this.responseModel.idFormati, 0, this.responseModel);\r\n\r\n if (this.responseModel.idCarte1 != null) {\r\n var data = this.responseModel.idCarte1.split(\"_\");\r\n let idCarta = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n }\r\n\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"EDITORIA\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n if (this.responseModel.idCarte2 != null) {\r\n var data = this.responseModel.idCarte2.split(\"_\");\r\n let idCarta = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA_COPERTINA\", \"\", \"\", idCarta, this.responseModel.idGrammature2, this.responseModel);\r\n }\r\n\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE_COPERTINA\", \"EDITORIA\", this.responseModel.idPlastificazioni2, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"COPERTINA\", \"\", this.responseModel.idCopertine, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"RILEGATURA\", \"\", this.responseModel.idRilegature, 0, this.responseModel);\r\n\r\n if (!this.isTaglioCalculated()) {\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", 1, 0, this.responseModel);\r\n }\r\n else {\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"TAGLIO\", \"EDITORIA\", 2, 0, this.responseModel);\r\n }\r\n\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"EDITORIA\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldCarta != this.responseModel.idCarte1) {\r\n this.onCartaInternoFieldChanged(true);\r\n }\r\n if (oldCartaCopertina != this.responseModel.idCarte2) {\r\n this.onCartaCopertinaFieldChanged(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldPlastificazioneCopertina != this.responseModel.idPlastificazioni2) {\r\n this.onPlastificationCopertinaChange(true);\r\n }\r\n if (oldCopertina != this.responseModel.idCopertine) {\r\n this.onCopertineFieldChange(true);\r\n }\r\n if (oldRilegatura != this.responseModel.idRilegature) {\r\n this.onRilegaturaChange(true);\r\n }\r\n\r\n let count = 0;\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n count = 0;\r\n for (let lavorazioneOld of lavAccArray) {\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n } catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n /// Check if all the value is validated\r\n parameterValidation() {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n\r\n //apply all rules\r\n this.CheckRegoleEditoria();\r\n\r\n if (this.pageIsInit) {\r\n this.pageIsInit = false;\r\n }\r\n\r\n this.validationCopie();\r\n\r\n this.validationFacciate();\r\n\r\n this.validationFormati();\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n\r\n this.validationColori();\r\n this.validationCarteInterno();\r\n this.validationGrammatureCarteInterno();\r\n\r\n this.validationPlastificazioneInterno();\r\n\r\n this.validationCopertina();\r\n\r\n if (this.checkIsCopertinaShowed()) {\r\n this.validationCarteCopertina();\r\n this.validationGrammatureCarteCopertina();\r\n this.validationPlastificazioneCopertina();\r\n }\r\n else {\r\n this.responseModel.carte2IsValid = true;\r\n this.responseModel.grammature2IsValid = true;\r\n this.responseModel.plastificazione2IsValid = true;\r\n }\r\n\r\n if (this.checkIsCartoncinoShowed()) {\r\n this.validationCartoncino();\r\n this.validationGrammatureCartoncino();\r\n }\r\n else {\r\n this.responseModel.cartoncinoIsValid = true;\r\n this.responseModel.grammatureCartoncinoIsValid = true;\r\n }\r\n\r\n this.validationRilegatura();\r\n this.validationLavorazioneAccessoria();\r\n\r\n this.countCartaCategories();\r\n this.countCategorieCarteCopertina()\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n }\r\n\r\n countCartaCategories() {\r\n if (this.responseModel.categorieCarte != null) {\r\n this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n countCategorieCarteCopertina() {\r\n if (this.responseModel.categorieCarteCopertina != null) {\r\n this.responseModel.categorieCarteCopertinaCount = this.responseModel.categorieCarteCopertina.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n selectFileCombination() {\r\n this.listaFile = new Array()\r\n for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n if (file.FormatId == this.responseModel.idFormati) {\r\n\r\n\r\n let fileObj = new FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj)\r\n }\r\n }\r\n }\r\n validationCopie() {\r\n let message;\r\n\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n let numCopie = parseInt(this.responseModel.numCopie);\r\n let minCopie = this.responseModel.minimoCopie;\r\n let maxCopie = this.responseModel.massimoCopie;\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.copieMessage = message;\r\n }\r\n\r\n validationFacciate() {\r\n let message;\r\n\r\n if (this.responseModel.tipoFacciate == 'libera') {\r\n let numFacciate = parseInt(this.responseModel.numFacciate);\r\n let minFacciate = this.responseModel.minimoFacciate;\r\n let maxFacciate = this.responseModel.massimoFacciate;\r\n let multiploFacciate = this.responseModel.multiploFacciate;\r\n\r\n //If the weight for the inside currently selected is in the ones defined in the validation rules, then the max and min are read directly from the ones of the rule.\r\n //Else the ones on the wizard are used\r\n //Note: The max and min facciate defined on weight wins over the ones defined on the wizard\r\n let objGrammaturaFacciateValidation = this.checkValidationRulesGrammatureFacciate();\r\n\r\n if (objGrammaturaFacciateValidation != null) {\r\n minFacciate = objGrammaturaFacciateValidation.Facciate != null ? objGrammaturaFacciateValidation.Facciate : 0;\r\n maxFacciate = objGrammaturaFacciateValidation.MassimoFacciate != null ? objGrammaturaFacciateValidation.MassimoFacciate : 0;\r\n }\r\n\r\n if (this.responseModel.numFacciate == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.facciateIsValid = false;\r\n }\r\n else if ((maxFacciate == 0 && (numFacciate == 0 || numFacciate < minFacciate)) || (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0))) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minFacciate;\r\n\r\n if (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0)) {\r\n message += \", \" + this.getLabel('inserisci_valore_multiplo_di');\r\n message += \" \" + multiploFacciate;\r\n }\r\n\r\n this.responseModel.facciateIsValid = false;\r\n }\r\n else if ((maxFacciate > 0 && (numFacciate == 0 || numFacciate < minFacciate || numFacciate > maxFacciate)) || (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0))) {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minFacciate;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxFacciate;\r\n\r\n if (multiploFacciate > 0 && (numFacciate == 0 || numFacciate % multiploFacciate > 0)) {\r\n message += \", \" + this.getLabel('inserisci_valore_multiplo_di');\r\n message += \" \" + multiploFacciate;\r\n }\r\n\r\n this.responseModel.facciateIsValid = false;\r\n }\r\n else {\r\n this.responseModel.facciateIsValid = true;\r\n }\r\n\r\n }\r\n else {\r\n if (this.responseModel.idFacciate == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.facciateIsValid = false;\r\n }\r\n else {\r\n this.responseModel.facciateIsValid = true;\r\n }\r\n\r\n\r\n if (this.responseModel.tipoFacciate === 'fissa' && this.responseModel.facciate != null) {\r\n this.responseModel.facciateCount = this.responseModel.facciate.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.facciateMessage = message;\r\n }\r\n\r\n validationColori() {\r\n let message;\r\n\r\n if (this.responseModel.idColori1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.colori1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.colori1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.colori1 != null) {\r\n this.responseModel.colori1Count = this.responseModel.colori1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n if (this.responseModel.colori2 != null) {\r\n this.responseModel.colori2Count = this.responseModel.colori2.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.colori1Message = message;\r\n }\r\n validationBaseFormati() {\r\n let message;\r\n let base = parseFloat(this.responseModel.baseFormato)\r\n let minBase = this.responseModel.minimoBase;\r\n let maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n }\r\n\r\n validationAltezzaFormati() {\r\n let message;\r\n let altezza = parseFloat(this.responseModel.altezzaFormato)\r\n let minAltezza = this.responseModel.minimoAltezza;\r\n let maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n\r\n this.responseModel.altezzaFormatoMessage = message;\r\n }\r\n\r\n validationFormati() {\r\n let message;\r\n\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.formatiMessage = message;\r\n }\r\n\r\n validationCarteInterno() {\r\n let message;\r\n\r\n if (this.responseModel.idCarte1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.carte1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.carte1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.carte1 != null) {\r\n this.responseModel.carte1Count = this.responseModel.carte1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.carte1Message = message;\r\n }\r\n\r\n validationGrammatureCarteInterno() {\r\n let message;\r\n\r\n if (this.responseModel.idGrammature1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.grammature1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.grammature1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.grammature1 != null) {\r\n this.responseModel.grammature1Count = this.responseModel.grammature1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.grammature1Message = message;\r\n }\r\n\r\n validationCartoncino() {\r\n let message;\r\n\r\n if (this.responseModel.idCartoncino == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.cartoncinoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.cartoncinoIsValid = true;\r\n }\r\n\r\n if (this.responseModel.cartoncini != null) {\r\n this.responseModel.cartonciniCount = this.responseModel.cartoncini.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.cartoncinoMessage = message;\r\n }\r\n\r\n validationGrammatureCartoncino() {\r\n let message;\r\n\r\n if (this.responseModel.idGrammatureCartoncino == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.grammatureCartoncinoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.grammatureCartoncinoIsValid = true;\r\n }\r\n\r\n if (this.responseModel.grammatureCartoncino != null) {\r\n this.responseModel.grammatureCartoncinoCount = this.responseModel.grammatureCartoncino.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.grammatureCartoncinoMessage = message;\r\n }\r\n\r\n validationPlastificazioneInterno() {\r\n let message;\r\n\r\n if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.plastificazione1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.plastificazione1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.plastificazioni1 != null) {\r\n this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.plastificazione1Message = message;\r\n }\r\n\r\n validationPlastificazioneCopertina() {\r\n let message;\r\n\r\n if (this.responseModel.idPlastificazioni2 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.plastificazione2IsValid = false;\r\n }\r\n else {\r\n this.responseModel.plastificazione2IsValid = true;\r\n }\r\n\r\n if (this.responseModel.plastificazioni2 != null) {\r\n this.responseModel.plastificazioni2Count = this.responseModel.plastificazioni2.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.plastificazione2Message = message;\r\n }\r\n\r\n validationCarteCopertina() {\r\n let message;\r\n\r\n if (this.responseModel.idCarte2 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.carte2IsValid = false;\r\n }\r\n else {\r\n this.responseModel.carte2IsValid = true;\r\n }\r\n\r\n if (this.responseModel.carte2 != null) {\r\n this.responseModel.carte2Count = this.responseModel.carte2.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.carte2Message = message;\r\n }\r\n\r\n validationGrammatureCarteCopertina() {\r\n let message;\r\n\r\n if (this.responseModel.idGrammature2 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.grammature2IsValid = false;\r\n }\r\n else {\r\n this.responseModel.grammature2IsValid = true;\r\n }\r\n\r\n if (this.responseModel.grammature2 != null) {\r\n this.responseModel.grammature2Count = this.responseModel.grammature2.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.grammature2Message = message;\r\n }\r\n\r\n validationCopertina() {\r\n let message;\r\n\r\n if (this.responseModel.idCopertine == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copertineIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copertineIsValid = true;\r\n }\r\n\r\n if (this.responseModel.copertine != null) {\r\n this.responseModel.copertineCount = this.responseModel.copertine.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.copertineMessage = message;\r\n }\r\n\r\n validationLavorazioneAccessoria() {\r\n let message: string = \"\";\r\n let valid: boolean = true;\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n let qta = parseInt(lavorazione.value);\r\n let minQta = lavorazione.minQtaInput;\r\n let maxQta = lavorazione.maxQtaInput;\r\n\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.lavorazioniIsValid = valid;\r\n }\r\n\r\n validationRilegatura() {\r\n let message;\r\n\r\n if (this.responseModel.idRilegature == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.rilegatureIsValid = false;\r\n }\r\n else {\r\n this.responseModel.rilegatureIsValid = true;\r\n }\r\n\r\n if (this.responseModel.rilegature != null) {\r\n this.responseModel.rilegatureCount = this.responseModel.rilegature.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.rilegatureMessage = message;\r\n }\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n\r\n let sub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n\r\n this.subManager.add(sub);\r\n\r\n return message;\r\n }\r\n\r\n isCalculationTypeCalcolato() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoQuotigPrev() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListino() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListinoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n addToCartWizardCalcolato(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n\r\n let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n setActive(id) {\r\n $(\".calendar-list\").removeClass(\"hoverActive\");\r\n $($(\".calendar-list\")[id]).addClass(\"hoverActive\");\r\n }\r\n\r\n addToCartWizardListino(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n\r\n let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListinoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n\r\n let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n setPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n //Deselecting the current price and selected the one passed in input\r\n for (let price of this.resultPrice.TablePriceList) {\r\n price.IsSelected = false;\r\n }\r\n\r\n price.IsSelected = true;\r\n\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n }\r\n\r\n setListinoScontisticaPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n\r\n //Check if the selected paper weight for the inside is in the ones defined in the validation rules for the facciate\r\n checkValidationRulesGrammatureFacciate() {\r\n var output = null;\r\n\r\n //Reading current paper weight\r\n var idGrammatura = this.responseModel.idGrammature1;\r\n\r\n for (var i = 0; i < this.responseModel.listaRegoleGrammaturaFacciate.length; i++) {\r\n var item = this.responseModel.listaRegoleGrammaturaFacciate[i];\r\n\r\n if (item.IdGrammatura == idGrammatura) {\r\n output = item;\r\n break;\r\n }\r\n }\r\n\r\n return output;\r\n\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n return ChildComponent;\r\n }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-editoria.component.ts","import { Subscription } from 'rxjs/Subscription';\r\n//Angular\r\nimport { Component, OnInit, ViewContainerRef, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../../../shared/mapping';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n//Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { CustomersCanvasService } from '../../../../../../services/inventory/customerscanvas.service';\r\n\r\n@Component({\r\n selector: \"dy-wizard-etichette-widget\",\r\n template: \"\"\r\n})\r\n\r\n\r\nexport class WizardEtichetteComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private _quotingService: QuotingService,\r\n private authService: AuthService,\r\n private languageService: LanguageService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n @Input() resourceId: number;\r\n autentification = this.authService.GetData();\r\n private userId = this.authService.GetUserId();\r\n lang: string = this.languageService.getLongLang();\r\n\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (!this.isBrowser)\r\n return;\r\n\r\n let sub = this._quotingService.getWizardEtichetteData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, InputresourceId: number) {\r\n\r\n @Component({\r\n template: result.templateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private _quotingService: QuotingService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private routesService: RoutesService,\r\n private translate: TranslateService,\r\n private cartService: ShoppingCartService,\r\n private bootboxService: BootboxService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n public canvasService: CustomersCanvasService\r\n ) {//check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n const canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(\r\n isModalOpened => {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(\r\n isDesignApproved => {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n\r\n if (this.isCalculationTypeCalcolato()) {\r\n this.addToCartWizardCalcolato(1);\r\n }\r\n else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n this.addToCartWizardListino(1);\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n\r\n private pageIsInit: boolean = false;\r\n private pageIsInitAfter: boolean = false;\r\n private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n\r\n private loggedIdUser: UserLogin;\r\n waiting: boolean = false;\r\n carteValue: number = -1;\r\n lang: string = this.languageService.getLongLang();\r\n responseModel: QuotingModel = new QuotingModel();\r\n autentification = this.authService.GetData();\r\n resourceId: number = InputresourceId;\r\n isDataInitialized: boolean = false;\r\n resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n typePriceResult: string;\r\n model = new wizardFormEditoriaModel();\r\n currentRowIndex: number = -1;\r\n currentColumnIndex: number = -1;\r\n requestInfoSuccess: boolean = null;\r\n resultCalculation: boolean = false;\r\n showErrorMessage: boolean = false;\r\n blockquoting: boolean = false;\r\n listaFile: Array;\r\n enableAltezzaLabel: boolean = true;\r\n isCalculatedWizard: boolean = false;\r\n\r\n // sending info to a child component\r\n public parentWidgetData: string = result.CanvasInfo;\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array>();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n this.ExcludingRules.setMacrocategory(\"ETICHETTE\");\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation()\r\n }\r\n }\r\n\r\n openCanvasEditor() {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n\r\n const canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n const isStateId = false;\r\n\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n }\r\n\r\n setCanvasConfig() {\r\n const canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n\r\n return canvasConfigData;\r\n }\r\n\r\n toShowCanvasButton() {\r\n let toShow = false;\r\n let isModuleActive = false;\r\n let isUserLoggedIn = false;\r\n\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n return toShow;\r\n }\r\n\r\n CheckRegoleEtichette() {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n let oldCarta = this.responseModel.idCarte1;\r\n let oldFormato = this.responseModel.idFormati;\r\n let oldPlastificazione = this.responseModel.idPlastificazioni1;\r\n let oldTaglio = this.responseModel.idTagli;\r\n let lavAccArray = new Array();\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"ETICHETTE\", null, null, this.responseModel);\r\n\r\n //Reset regole carta e grammature\r\n this.ExcludingRules.ResetRegole(\"PF\", \"CARTA\", \"\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole taglio\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"FUSTELLATURA\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole plastificazione\r\n this.ExcludingRules.ResetRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"ETICHETTE\", null, null, this.responseModel);\r\n\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"PF\", \"ACCESSORIA\", \"\", \"ETICHETTE\", null, null, this.responseModel);\r\n\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FORMATO\", \"ETICHETTE\", idFormato, 0, this.responseModel);\r\n }\r\n\r\n if (this.responseModel.idCarte1 != null) {\r\n var data = this.responseModel.idCarte1.split(\"_\");\r\n let idCarta = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, 0, this.responseModel);\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"CARTA\", \"\", \"\", idCarta, this.responseModel.idGrammature1, this.responseModel);\r\n\r\n }\r\n\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"PLASTIFICAZIONE\", \"ETICHETTE\", this.responseModel.idPlastificazioni1, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"PF\", \"FINITURA\", \"FUSTELLATURA\", \"\", this.responseModel.idTagli, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"PF\", \"COMMERCIALE\", this.responseModel);\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldCarta != this.responseModel.idCarte1) {\r\n this.onCartaInternoFieldChanged(true);\r\n }\r\n if (oldPlastificazione != this.responseModel.idPlastificazioni1) {\r\n this.onPlastificationInternoChange(true);\r\n }\r\n if (oldTaglio != this.responseModel.idTagli) {\r\n this.onTaglioChange(true);\r\n }\r\n //if the old value id different to the new one i call the method for update description and image\r\n let count = 0;\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n count = 0;\r\n for (let lavorazioneOld of lavAccArray) {\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n parameterValidation() {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n\r\n //apply all rules\r\n this.CheckRegoleEtichette();\r\n\r\n //verify validation for all parameters \r\n this.validationCopie();\r\n\r\n if (this.isLabelField()) {\r\n this.validationSoggetti();\r\n this.validationNumEtichetteLabel();\r\n this.validationDiametroInternoAnimaLabel();\r\n this.validationDiametroMassimoEsternoAnimaLabel();\r\n }\r\n else {\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n }\r\n\r\n\r\n this.validationFormati();\r\n\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.enableOrDisableAltezzaLabelByTipoFormato(this.responseModel.idFormatoTipo)\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n\r\n this.validationColori();\r\n\r\n this.validationCarteInterno();\r\n this.validationGrammatureCarteInterno();\r\n\r\n this.validationPlastificazione();\r\n\r\n this.validationLavorazioneAccessoria();\r\n\r\n this.countCartaCategories();\r\n\r\n this.countTagli();\r\n\r\n this.countFustelle();\r\n\r\n this.countFormatiTipoLabel();\r\n\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n }\r\n\r\n countCartaCategories() {\r\n if (this.responseModel.categorieCarte != null) {\r\n this.responseModel.categorieCarteCount = this.responseModel.categorieCarte.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n countTagli() {\r\n if (this.responseModel.tagli != null) {\r\n this.responseModel.tagliCount = this.responseModel.tagli.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n countFustelle() {\r\n if (this.responseModel.ListafustelleLabel != null) {\r\n this.responseModel.fustelleLabelCount = this.responseModel.ListafustelleLabel.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n countFormatiTipoLabel() {\r\n if (this.responseModel.TipologiaFormatiLabel != null) {\r\n this.responseModel.formatiTipoLabelCount = this.responseModel.TipologiaFormatiLabel.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n selectFileCombination() {\r\n this.listaFile = new Array()\r\n for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n\r\n if (this.responseModel.idFormati != null) {\r\n\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n if (file.FormatId == idFormato) {\r\n\r\n let fileObj = new FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj)\r\n\r\n }\r\n }\r\n }\r\n }\r\n checkZero(val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n }\r\n\r\n setTypePriceResult(type) {\r\n this.typePriceResult = type;\r\n\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n }\r\n setListinoScontisticaPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n setListinoPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n\r\n isRowSelected(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelected(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelected(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n clearSelectedIndex() {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n }\r\n\r\n isRowSelectedListino(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelectedListino(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n /// Create model for passed in input to the calculation method\r\n getCalculationModel() {\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n this.model.idCarte1 = this.responseModel.idCarte1;\r\n\r\n for (let carta of this.responseModel.carte1) {\r\n if (this.model.idCarte1 == carta.chiave) {\r\n this.model.nomeCarte1 = carta.valore\r\n }\r\n }\r\n\r\n this.model.idGrammature1 = this.responseModel.idGrammature1;\r\n\r\n for (let grammatureInterno of this.responseModel.grammature1) {\r\n if (this.model.idGrammature1 == grammatureInterno.chiave) {\r\n this.model.nomeGrammature1 = grammatureInterno.valore\r\n }\r\n }\r\n\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n\r\n this.model.idColori1 = this.responseModel.idColori1;\r\n\r\n if (this.model.idColori1 != \"1\" && this.model.idColori1 != \"2\") {\r\n this.model.stampa1_colori_fronte = this.responseModel.stampa1_colori_fronte;\r\n this.model.stampa1_colori_retro = this.responseModel.stampa1_colori_retro;\r\n }\r\n\r\n this.model.idColori2 = this.responseModel.idColori2;\r\n\r\n this.model.idPlastificazioni1 = this.responseModel.idPlastificazioni1;\r\n\r\n\r\n if (this.responseModel.idTagli != \"-1\") {\r\n this.model.idTagli = this.responseModel.idTagli;\r\n }\r\n\r\n if (this.responseModel.idFustella != \"-1\") {\r\n this.model.idFustella = this.responseModel.idFustella;\r\n }\r\n\r\n if (this.responseModel.idAvvolgimento != \"-1\") {\r\n this.model.idAvvolgimento = this.responseModel.idAvvolgimento;\r\n }\r\n if (this.responseModel.idTipoLavoroLabel != \"-1\") {\r\n this.model.idTipoLavoroLabel = this.responseModel.idTipoLavoroLabel;\r\n }\r\n if (this.responseModel.idFormatoTipo != \"-1\") {\r\n this.model.idFormatoTipo = this.responseModel.idFormatoTipo;\r\n }\r\n this.model.numDiametroInternoAnimaLabel = this.responseModel.numDiametroInternoAnimaLabel;\r\n this.model.numDiametroMassimoEsternoAnimaLabel = this.responseModel.numDiametroMassimoEsternoAnimaLabel;\r\n this.model.numEtichette = this.responseModel.numEtichette;\r\n this.model.subSection = this.responseModel.subSection;\r\n\r\n this.model.lavorazioniAccessorie = new Array();\r\n\r\n for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n\r\n //combo\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n //numeric\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n //text area\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n\r\n this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n let sub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n this.resultPrice = result;\r\n this.isCalculatedWizard = false;\r\n\r\n if (this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n\r\n for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n let price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n let breakFlag = false;\r\n for (let priceRow of tableScontisticaPriceListSliced) {\r\n let slicedPriceRow = priceRow.slice(1);\r\n\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (let price of reverse) {\r\n if (price.Price != -1) {\r\n this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n },\r\n err => {\r\n this.isCalculatedWizard = false;\r\n this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n\r\n this.isDataInitialized = true;\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n\r\n let altezza = $(\"#footer\").outerHeight();\r\n let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n\r\n let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n\r\n let altezzaHead = $(\".header-body\").outerHeight();\r\n let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n checkValidation() {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.carte1IsValid\r\n && this.responseModel.grammature1IsValid\r\n && this.responseModel.plastificazione1IsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.colori1IsValid\r\n ) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n\r\n validationBaseFormati() {\r\n let message;\r\n let base = parseFloat(this.responseModel.baseFormato)\r\n let minBase = this.responseModel.minimoBase;\r\n let maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n }\r\n\r\n validationAltezzaFormati() {\r\n let message;\r\n let altezza = parseFloat(this.responseModel.altezzaFormato)\r\n let minAltezza = this.responseModel.minimoAltezza;\r\n let maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n\r\n this.responseModel.altezzaFormatoMessage = message;\r\n }\r\n\r\n validationSoggetti() {\r\n let message;\r\n let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n\r\n if (this.isLabelField()) {\r\n let minDistEtichette = this.responseModel.minimaDistanzaEtichetteLabel;\r\n let maxDistEtichette = this.responseModel.massimaDistanzaEtichetteLabel;\r\n\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n if (maxDistEtichette == 0) {\r\n if (numSoggetti < minDistEtichette) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minDistEtichette;\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numSoggetti >= minDistEtichette) && (numSoggetti <= maxDistEtichette)) {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minDistEtichette;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxDistEtichette;\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n }\r\n\r\n this.responseModel.soggettiMessage = message;\r\n }\r\n\r\n validationNumEtichetteLabel() {\r\n let message;\r\n let numEtichette = parseInt(this.responseModel.numEtichette);\r\n if (this.responseModel.numEtichette == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.numEtichetteIsValid = false;\r\n }\r\n else if (numEtichette == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.numEtichetteIsValid = false;\r\n }\r\n else {\r\n this.responseModel.numEtichetteIsValid = true;\r\n }\r\n\r\n this.responseModel.numEtichetteMessage = message;\r\n }\r\n\r\n validationDiametroInternoAnimaLabel() {\r\n let message;\r\n let numDiametroInternoAnimaCustomer = this.responseModel.numDiametroInternoAnimaLabel;\r\n let numDiametroInternoAnima = this.responseModel.numDiametroInternoAnimaEditabileLabel;\r\n\r\n if (this.responseModel.numDiametroInternoAnimaLabel == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.DiametroInternoAnimaIsValid = false;\r\n }\r\n else if (numDiametroInternoAnimaCustomer == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.DiametroInternoAnimaIsValid = false;\r\n }\r\n else {\r\n\r\n if (numDiametroInternoAnimaCustomer >= numDiametroInternoAnima) {\r\n this.responseModel.DiametroInternoAnimaIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore_uguale');\r\n message += \" \" + numDiametroInternoAnima;\r\n this.responseModel.DiametroInternoAnimaIsValid = false;\r\n }\r\n }\r\n\r\n this.responseModel.DiametroInternoAnimaMessage = message;\r\n }\r\n validationDiametroMassimoEsternoAnimaLabel() {\r\n let message;\r\n let numDiametroMassimoEsternoCustomer = this.responseModel.numDiametroMassimoEsternoAnimaLabel;\r\n let numDiametroMassimoEsterno = this.responseModel.numDiametroMassimoEsternoAnimaEditabile;\r\n if (this.responseModel.numDiametroMassimoEsternoAnimaLabel == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n }\r\n else if (numDiametroMassimoEsternoCustomer == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n }\r\n else {\r\n\r\n if (numDiametroMassimoEsternoCustomer >= numDiametroMassimoEsterno) {\r\n this.responseModel.DiametroMassimoEsternoAnimaIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore_uguale');\r\n message += \" \" + numDiametroMassimoEsterno;\r\n this.responseModel.DiametroMassimoEsternoAnimaIsValid = false;\r\n }\r\n }\r\n\r\n this.responseModel.DiametroMassimoEsternoAnimaMessage = message;\r\n }\r\n\r\n\r\n validationCopie() {\r\n let message;\r\n\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n let numCopie = parseInt(this.responseModel.numCopie);\r\n let minCopie = this.responseModel.minimoCopie;\r\n let maxCopie = this.responseModel.massimoCopie;\r\n\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.copieMessage = message;\r\n }\r\n\r\n\r\n\r\n validationColori() {\r\n let message;\r\n\r\n if (this.responseModel.idColori1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.colori1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.colori1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.colori1 != null) {\r\n this.responseModel.colori1Count = this.responseModel.colori1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n if (this.responseModel.colori2 != null) {\r\n this.responseModel.colori2Count = this.responseModel.colori2.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.colori1Message = message;\r\n }\r\n\r\n validationFormati() {\r\n let message;\r\n\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.formatiMessage = message;\r\n }\r\n\r\n validationCarteInterno() {\r\n let message;\r\n\r\n if (this.responseModel.idCarte1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.carte1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.carte1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.carte1 != null) {\r\n this.responseModel.carte1Count = this.responseModel.carte1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.carte1Message = message;\r\n }\r\n\r\n validationGrammatureCarteInterno() {\r\n let message;\r\n if (this.isLabelField()) {\r\n this.responseModel.grammature1IsValid = true;\r\n }\r\n else {\r\n if (this.responseModel.idGrammature1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.grammature1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.grammature1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.grammature1 != null) {\r\n this.responseModel.grammature1Count = this.responseModel.grammature1.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n\r\n this.responseModel.grammature1Message = message;\r\n }\r\n\r\n validationPlastificazione() {\r\n let message;\r\n\r\n if (this.responseModel.idPlastificazioni1 == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.plastificazione1IsValid = false;\r\n }\r\n else {\r\n this.responseModel.plastificazione1IsValid = true;\r\n }\r\n\r\n if (this.responseModel.plastificazioni1 != null) {\r\n this.responseModel.plastificazioni1Count = this.responseModel.plastificazioni1.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.plastificazione1Message = message;\r\n }\r\n\r\n validationLavorazioneAccessoria() {\r\n let message: string = \"\";\r\n let valid: boolean = true;\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n let qta = parseInt(lavorazione.value);\r\n let minQta = lavorazione.minQtaInput;\r\n let maxQta = lavorazione.maxQtaInput;\r\n\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.lavorazioniIsValid = valid;\r\n }\r\n\r\n isLabelField() {\r\n let result = false;\r\n if (this.responseModel.subSection == \"Label\") {\r\n result = true;\r\n }\r\n return result\r\n }\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n let sub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n\r\n this.subManager.add(sub);\r\n\r\n return message;\r\n }\r\n\r\n checkIsPlastificazioneInternoIsShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.plastificazioni1 != null && this.responseModel.plastificazioni1.length > 0) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsTaglioIsShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.tagli != null && this.responseModel.tagli.length > 0) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isAttributeFixed(tipoLavorazione) {\r\n let result: boolean = false;\r\n\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n textAreaCheck(event: any) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n let result: boolean = false;\r\n let isVisible: boolean = false;\r\n\r\n for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsTaglioShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.taglioShowed && !this.responseModel.isTaglioVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n onCategoriaCartaInternoFieldChanged() {\r\n let selectedPaper = false;\r\n\r\n for (let carte of this.responseModel.carte1) {\r\n if (this.responseModel.idCategorieCarte1 != \"-1\") {\r\n if (carte.parentId == this.responseModel.idCategorieCarte1) {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n\r\n carte.isVisible = true;\r\n }\r\n else {\r\n carte.isVisible = false;\r\n }\r\n }\r\n else {\r\n if (selectedPaper == false) {\r\n this.responseModel.idCarte1 = carte.chiave;\r\n this.model.idCarte1 = carte.chiave;\r\n this.responseModel.carte1Description = carte.descrizione;\r\n this.responseModel.carte1Image = carte.image;\r\n this.responseModel.carte1HasInfo = carte.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n\r\n this.responseModel.grammature1 = carte.subElements;\r\n this.responseModel.idGrammature1 = carte.wrap_valore;\r\n this.model.idGrammature1 = carte.wrap_valore;\r\n selectedPaper = true;\r\n }\r\n\r\n carte.isVisible = true;\r\n }\r\n }\r\n this.parameterValidation();\r\n }\r\n\r\n onCartaInternoFieldChanged(isrules = false) {\r\n for (let grammature of this.responseModel.carte1) {\r\n if (grammature.chiave == this.responseModel.idCarte1) {\r\n this.responseModel.carte1Description = grammature.descrizione;\r\n this.responseModel.carte1Image = grammature.image;\r\n this.responseModel.carte1HasInfo = grammature.hasInfo;\r\n this.responseModel.carte1ShowInfo = false;\r\n this.responseModel.grammature1 = grammature.subElements;\r\n this.responseModel.idGrammature1 = grammature.wrap_valore;\r\n this.model.idGrammature1 = grammature.wrap_valore;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onCartaInternoVisualFieldChanged(paperId) {\r\n this.responseModel.idCarte1 = paperId;\r\n this.onCartaInternoFieldChanged();\r\n }\r\n\r\n onFormatiChange(isrules = false) {\r\n for (let formato of this.responseModel.formati) {\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onFormatiVisualChange(formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n }\r\n\r\n onStampaInternoVisualChange(stampaInternoValue) {\r\n this.responseModel.idColori1 = stampaInternoValue;\r\n this.parameterValidation();\r\n }\r\n\r\n onStampaRetroVisualChange(stampaCopertinaValue) {\r\n this.responseModel.idColori2 = stampaCopertinaValue;\r\n this.parameterValidation();\r\n }\r\n\r\n onGrammatureInternoVisualFieldChanged(grammatureId) {\r\n this.responseModel.idGrammature1 = grammatureId;\r\n this.parameterValidation();\r\n }\r\n\r\n onPlastificationInternoChange(isrules = false) {\r\n for (let plastification of this.responseModel.plastificazioni1) {\r\n if (plastification.chiave == this.responseModel.idPlastificazioni1) {\r\n this.responseModel.plastificazioni1Description = plastification.descrizione;\r\n this.responseModel.plastificazioni1Image = plastification.image;\r\n this.responseModel.plastificazioni1HasInfo = plastification.hasInfo;\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onPlastificationInternoViasualChange(plastificationId) {\r\n this.responseModel.idPlastificazioni1 = plastificationId;\r\n this.onPlastificationInternoChange();\r\n }\r\n\r\n lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n for (let variante of lavorazione.valori) {\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n }\r\n\r\n onTaglioChange(isrules = false) {\r\n for (let taglio of this.responseModel.tagli) {\r\n if (taglio.chiave == this.responseModel.idTagli) {\r\n this.responseModel.taglioDescription = taglio.descrizione;\r\n this.responseModel.taglioImage = taglio.image;\r\n this.responseModel.taglioHasInfo = taglio.hasInfo;\r\n this.responseModel.taglioShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onTaglioVisualChange(taglioId) {\r\n this.responseModel.idTagli = taglioId;\r\n this.onTaglioChange();\r\n }\r\n\r\n onFormatiTipoLabelChange() {\r\n for (let formatoTipo of this.responseModel.TipologiaFormatiLabel) {\r\n if (formatoTipo.chiave == this.responseModel.idFormatoTipo) {\r\n this.responseModel.formatiTipoImage = formatoTipo.image;\r\n this.responseModel.formatiTipoHasInfo = formatoTipo.hasInfo;\r\n this.responseModel.formatiTipoLabelShowInfo = false;\r\n this.enableOrDisableAltezzaLabelByTipoFormato(formatoTipo.chiave)\r\n }\r\n }\r\n this.parameterValidation();\r\n }\r\n\r\n enableOrDisableAltezzaLabelByTipoFormato(tipoFormato) {\r\n //checking tipo formato for anable or disable height\r\n if (this.responseModel.idFormati == \"0\") {\r\n switch (tipoFormato) {\r\n case \"1\":\r\n this.enableAltezzaLabel = true;\r\n break;\r\n case \"2\":\r\n this.enableAltezzaLabel = false;\r\n this.responseModel.altezzaFormato = this.responseModel.baseFormato;\r\n break;\r\n case \"3\":\r\n this.enableAltezzaLabel = false;\r\n this.responseModel.altezzaFormato = this.responseModel.baseFormato;\r\n break;\r\n case \"4\":\r\n this.enableAltezzaLabel = true;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n onFormatiTipoLabelVisualChange(fotmatoTipoId) {\r\n this.responseModel.idFormatoTipo = fotmatoTipoId;\r\n this.onFormatiTipoLabelChange();\r\n }\r\n\r\n onAvvolgimentiChange() {\r\n for (let avvolgimento of this.responseModel.avvolgimentiLabel) {\r\n if (avvolgimento.chiave == this.responseModel.idAvvolgimento) {\r\n this.responseModel.avvolgimentiImage = avvolgimento.image;\r\n this.responseModel.avvolgimentiHasInfo = avvolgimento.hasInfo;\r\n this.responseModel.avvolgimentiShowInfo = false;\r\n }\r\n }\r\n\r\n this.parameterValidation();\r\n }\r\n\r\n onAvvolgimentiVisualChange(avvolgimentoId) {\r\n this.responseModel.idAvvolgimento = avvolgimentoId;\r\n this.onAvvolgimentiChange();\r\n }\r\n\r\n\r\n showHideTaglioDescription() {\r\n if (this.responseModel.taglioShowInfo) {\r\n this.responseModel.taglioShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.taglioShowInfo = true;\r\n }\r\n }\r\n\r\n showHideLavDescription(lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n }\r\n\r\n showHideFormatDescription() {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n }\r\n showHideFormatiTipoLabelDescription() {\r\n if (this.responseModel.formatiTipoLabelShowInfo) {\r\n this.responseModel.formatiTipoLabelShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiTipoLabelShowInfo = true;\r\n }\r\n }\r\n\r\n showHideAvvolgimentiDescription() {\r\n if (this.responseModel.avvolgimentiShowInfo) {\r\n this.responseModel.avvolgimentiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.avvolgimentiShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePaperInternoDescription() {\r\n if (this.responseModel.carte1ShowInfo) {\r\n this.responseModel.carte1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.carte1ShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePlastficationInternoDescription() {\r\n if (this.responseModel.plastificazioni1ShowInfo) {\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni1ShowInfo = true;\r\n }\r\n }\r\n\r\n isCalculationTypeCalcolato() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoQuotigPrev() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListino() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListinoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n addToCartWizardCalcolato(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListino(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListinoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n setPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n //Deselecting the current price and selected the one passed in input\r\n for (let price of this.resultPrice.TablePriceList) {\r\n price.IsSelected = false;\r\n }\r\n\r\n price.IsSelected = true;\r\n\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n }\r\n\r\n isCustomerLoggedIn() {\r\n return this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n checkEmailIsValid() {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n }\r\n\r\n checkFormRichiestaPrevIsValid() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n\r\n sendRequestInfo() {\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n if (result == true) {\r\n this.requestInfoSuccess = true;\r\n }\r\n else {\r\n this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n\r\n },\r\n err => {\r\n this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n }\r\n\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-etichette.component.ts","//Angular\r\nimport { Component, OnInit, ViewContainerRef, Inject, Compiler, Input } from \"@angular/core\";\r\n\r\n//System\r\nimport { Mappings } from './../../../../../../shared/mapping';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\n//Services\r\nimport { ComponentHelperService } from \"./../../../../../../services/core/component-helper.service\";\r\nimport { QuotingService } from \"./../../../../../../services/document/quoting.service\";\r\nimport { LanguageService } from \"./../../../../../../services/cms/language.service\";\r\nimport { AuthService } from \"./../../../../../../services/core/auth.service\";\r\nimport { TemplateService } from \"./../../../../../../services/settings/template.service\";\r\nimport { BootboxService } from './../../../../../../services/core/bootbox.service';\r\nimport { ShoppingCartService } from \"./../../../../../../services/inventory/shopping-cart.service\";\r\nimport { RoutesService } from \"./../../../../../../services/core/routes.service\";\r\n\r\n///Components\r\nimport { ExcludingComponent } from \"./../../../../../../components/document/widget/quoting/quoting-excluding.component\";\r\n\r\n//Models\r\nimport { QuotingModel } from \"./../../../../../../models/document/quoting-model\";\r\nimport { LavorazioniAccessorieModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { UserLogin } from \"./../../../../../../models/cms/user-login\";\r\nimport { PriceEstimationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { wizardFormEditoriaModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\nimport { FileCombinationModel } from \"./../../../../../../models/document/quoting-submit-model\";\r\n\r\nimport { Subscription } from 'rxjs/Subscription';\r\nimport { CustomersCanvasService } from \"../../../../../../services/inventory/customerscanvas.service\";\r\n\r\n@Component({\r\n selector: \"dy-wizard-stampa-widget\",\r\n template: \"\"\r\n})\r\n\r\n\r\nexport class WizardStampaComponent implements OnInit {\r\n constructor\r\n (\r\n private _compiler: Compiler,\r\n private componentHelper: ComponentHelperService,\r\n private _elementRef: ViewContainerRef,\r\n private _quotingService: QuotingService,\r\n private authService: AuthService,\r\n private languageService: LanguageService,\r\n @Inject('isBrowser') private isBrowser: boolean\r\n ) { }\r\n\r\n @Input() resourceId: number;\r\n autentification = this.authService.GetData();\r\n private userId = this.authService.GetUserId();\r\n lang: string = this.languageService.getLongLang();\r\n\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n if (!this.isBrowser)\r\n return;\r\n\r\n let sub = this._quotingService.getWizardStampaData(\"PREVENTIVATORE_WIZARD\", this.resourceId, this.userId, this.lang).subscribe(result => {\r\n //Creating subcomponent whith the selected template to inject\r\n let subComponent = this.createSubComponent(result, this.resourceId);\r\n\r\n //injecting created component (OK)\r\n this.componentHelper.injectComponent(this._compiler, this._elementRef, subComponent);\r\n });\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n\r\n private createSubComponent(result: any, InputresourceId: number) {\r\n\r\n @Component({\r\n template: result.templateHtml\r\n })\r\n\r\n class ChildComponent implements OnInit {\r\n constructor\r\n (\r\n private _quotingService: QuotingService,\r\n private languageService: LanguageService,\r\n private authService: AuthService,\r\n private translate: TranslateService,\r\n private cartService: ShoppingCartService,\r\n private routesService: RoutesService,\r\n private bootboxService: BootboxService,\r\n @Inject('isBrowser') private isBrowser: boolean,\r\n public canvasService: CustomersCanvasService\r\n ) {\r\n //check if modal is opened or not, so we can stick or unstick quoting div (if it is stick and modal is opened, there is a layout error, so we need to unstick it)\r\n const canvasSub = canvasService.isCanvasModalOpened$\r\n .subscribe(\r\n isModalOpened => {\r\n if (isModalOpened == false) {\r\n $('html').css(\"overflow\", \"visible\");\r\n }\r\n else {\r\n // before open of canvas editor, we scroll to the top and set overflow to hidden because of problem with sticky plugin\r\n window.scrollTo(0, 0);\r\n $('html').css(\"overflow\", \"hidden\");\r\n }\r\n });\r\n\r\n // after canvas product design is aproved from a child component (canvas-widget.component.ts), we want to add a product in a cart\r\n const canvasEditedSub = canvasService.isCanvasProductDesignApproved$\r\n .subscribe(\r\n isDesignApproved => {\r\n if (isDesignApproved) {\r\n $('#customerCanvasModal').modal('hide');\r\n $('html').css(\"overflow\", \"visible\");\r\n // set for product info that it is edited in canvas, so we know if we should pass canvas data to the server or not\r\n cartService.setIfProductIsCanvasEdited(true);\r\n\r\n if (this.isCalculationTypeCalcolato()) {\r\n this.addToCartWizardCalcolato(1);\r\n }\r\n else if (this.isCalculationTypeCalcolatoScontistica()) {\r\n this.addToCartWizardCalcolatoScontistica(1);\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n this.addToCartWizardListino(1);\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n this.addToCartWizardListinoScontistica(1);\r\n }\r\n }\r\n });\r\n\r\n this.subManager.add(canvasSub);\r\n this.subManager.add(canvasEditedSub);\r\n }\r\n\r\n private pageIsInit: boolean = false;\r\n private pageIsInitAfter: boolean = false;\r\n private privacyPageName: string[] = this.routesService.getRoutePath('INFO PRIVACY');\r\n\r\n private loggedIdUser: UserLogin;\r\n waiting: boolean = false;\r\n carteValue: number = -1;\r\n lang: string = this.languageService.getLongLang();\r\n responseModel: QuotingModel = new QuotingModel();\r\n autentification = this.authService.GetData();\r\n resourceId: number = InputresourceId;\r\n isDataInitialized: boolean = false;\r\n resultPrice: PriceEstimationModel = new PriceEstimationModel();\r\n ExcludingRules: ExcludingComponent = new ExcludingComponent();\r\n typePriceResult: string;\r\n model = new wizardFormEditoriaModel();\r\n currentRowIndex: number = -1;\r\n currentColumnIndex: number = -1;\r\n requestInfoSuccess: boolean = null;\r\n resultCalculation: boolean = false;\r\n showErrorMessage: boolean = false;\r\n blockquoting: boolean = false;\r\n listaFile: Array;\r\n\r\n isCalculatedWizard: boolean = false;\r\n\r\n // sending info to a child component\r\n public parentWidgetData: string = result.CanvasInfo;\r\n\r\n subManager = new Subscription();\r\n\r\n ngOnInit() {\r\n var array = [\"1\", \"2\", \"3\"];\r\n this.resultPrice.TablePriceList = new Array();\r\n this.resultPrice.TablePriceList.push(array);\r\n this.resultPrice.TableScontisticaPriceList = new Array>();\r\n this.resultPrice.TableScontisticaPriceList.push(array);\r\n\r\n this.loggedIdUser = this.authService.GetData();\r\n this.responseModel = new QuotingModel();\r\n this.responseModel = result;\r\n this.responseModel.isTaglioVisible = false;\r\n this.typePriceResult = \"no-tax\";\r\n this.responseModel.valueStampaInternoSoloFronte = false;\r\n this.responseModel.valueStampaCopertinaSoloFronte = false;\r\n this.ExcludingRules.setMacrocategory(\"STAMPA_DIRETTA\");\r\n this.responseModel.isStampaBifaccialeNoHide = false;\r\n this.responseModel.isStampaBifaccialeSiHide = false;\r\n if (!this.isDataInitialized) {\r\n //check if the all values is validated\r\n this.parameterValidation()\r\n }\r\n }\r\n\r\n openCanvasEditor() {\r\n if (result.CanvasInfo.TemplateImagesFolderPath) {\r\n $('html').css(\"overflow\", \"hidden\");\r\n\r\n const canvasConfigData = this.setCanvasConfig();\r\n // because here we don't have a state id, it is a new product\r\n const isStateId = false;\r\n\r\n this.canvasService.openCanvasEditor(canvasConfigData, isStateId);\r\n }\r\n }\r\n\r\n setCanvasConfig() {\r\n const canvasConfigData = {\r\n CanvasUrl: result.CanvasInfo.CanvasUrl,\r\n TemplateImagesFolderPath: result.CanvasInfo.TemplateImagesFolderPath,\r\n CustomerCanvasUserName: result.CanvasInfo.CustomerCanvasUserName,\r\n Watermark: result.CanvasInfo.WatermarkText\r\n };\r\n\r\n return canvasConfigData;\r\n }\r\n\r\n toShowCanvasButton() {\r\n let toShow = false;\r\n let isModuleActive = false;\r\n let isUserLoggedIn = false;\r\n\r\n if (result.CanvasInfo && result.CanvasInfo.IsActiveCanvasModule) {\r\n isModuleActive = result.CanvasInfo.IsActiveCanvasModule;\r\n }\r\n\r\n if (this.loggedIdUser != null && this.loggedIdUser.isAuthenticated != null) {\r\n isUserLoggedIn = this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n toShow = isModuleActive && isUserLoggedIn ? true : false;\r\n\r\n return toShow;\r\n }\r\n\r\n CheckRegoleStampa() {\r\n try {\r\n this.blockquoting = false;\r\n //save in the array all parameter value before to apply rules\r\n let oldFormato = this.responseModel.idFormati;\r\n let oldSupporto = this.responseModel.idSupportiRigidi;\r\n let oldTaglio = this.responseModel.idTagli;\r\n let lavAccArray = new Array();\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n let lav: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazione.tipo == \"2\") {\r\n lav.lavorazioneId = lavorazione.id;\r\n lav.valoreLavorazione = lavorazione.valore;\r\n lavAccArray.push(lav);\r\n }\r\n }\r\n\r\n //-----------------------------------------------------------------------------//\r\n //-----------------------------Reset delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"STAMPA_DIRETTA\", null, null, this.responseModel);\r\n\r\n\r\n //Reset regole supporto rigido\r\n this.ExcludingRules.ResetRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole stampa bifacciale\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole stampa bianco coprente\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole taglio\r\n this.ExcludingRules.ResetRegole(\"GF\", \"FINITURA\", \"FUSTELLATURA\", \"\", null, null, this.responseModel);\r\n\r\n //Reset regole accessorie\r\n this.ExcludingRules.ResetRegole(\"GF\", \"ACCESSORIA\", \"\", \"STAMPA_DIRETTA\", null, null, this.responseModel);\r\n\r\n //-----------------------------------------------------------------------------//\r\n //----------------------Applicazione delle regole------------------------------//\r\n //-----------------------------------------------------------------------------//\r\n\r\n\r\n\r\n if (this.responseModel.idFormati != null) {\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FORMATO\", \"STAMPA_DIRETTA\", idFormato, 0, this.responseModel);\r\n }\r\n\r\n if (this.responseModel.tipoBifacciale == \"0\") {\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", \"1\", 0, this.responseModel);\r\n }\r\n else if (this.responseModel.tipoBifacciale == \"1\") {\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"STAMPA_BIFACCIALE\", \"\", \"2\", 0, this.responseModel);\r\n }\r\n\r\n\r\n if (this.responseModel.idBiancoCoprente == \"0\") {\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"1\", 0, this.responseModel);\r\n }\r\n else if (this.responseModel.idBiancoCoprente == \"1\") {\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"2\", 0, this.responseModel);\r\n }\r\n else if (this.responseModel.idBiancoCoprente == \"2\") {\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"BIANCO_COPRENTE\", \"\", \"3\", 0, this.responseModel);\r\n }\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"SUPPORTO_RIGIDO\", \"\", \"\", this.responseModel.idSupportiRigidi, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegole(\"GF\", \"FINITURA\", \"FUSTELLATURA\", \"\", this.responseModel.idTagli, 0, this.responseModel);\r\n\r\n this.ExcludingRules.ApplicaRegoleLavorazioniAccessorie(\"GF\", \"STAMPA_DIRETTA\", this.responseModel);\r\n\r\n //if the old value id different to the new one i call the method for update description and image\r\n if (oldFormato != this.responseModel.idFormati) {\r\n this.onFormatiChange(true);\r\n }\r\n if (oldSupporto != this.responseModel.idSupportiRigidi) {\r\n this.onSuportoChange(true);\r\n }\r\n if (oldTaglio != this.responseModel.idTagli) {\r\n this.onTaglioChange(true);\r\n }\r\n let count = 0;\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n count = 0;\r\n for (let lavorazioneOld of lavAccArray) {\r\n if (count > 0) {\r\n continue;\r\n }\r\n else {\r\n if (lavorazione.tipo == \"2\") {\r\n if (lavorazione.isVisible == true) {\r\n if ((lavorazione.id == lavorazioneOld.lavorazioneId)) {\r\n if ((lavorazione.valore != lavorazioneOld.valoreLavorazione)) {\r\n this.lavorazioniAccessorieComboChange(lavorazione, true);\r\n count++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (e) {\r\n this.blockquoting = true;\r\n this.showErrorMessage = true;\r\n return;\r\n }\r\n }\r\n\r\n parameterValidation() {\r\n this.isCalculatedWizard = false;\r\n this.resultCalculation = false;\r\n this.showErrorMessage = false;\r\n this.requestInfoSuccess = null;\r\n\r\n //apply all rules\r\n this.CheckRegoleStampa();\r\n\r\n //verify validation for all parameters \r\n this.validationCopie();\r\n\r\n if (this.responseModel.soggettiMultipli == true) {\r\n this.validationSoggetti();\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n\r\n this.validationFormati();\r\n\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.validationBaseFormati();\r\n this.validationAltezzaFormati();\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n\r\n this.countTagli();\r\n this.countBiancoCoprente();\r\n\r\n this.validationSupporti();\r\n this.validationLavorazioneAccessoria();\r\n if (this.responseModel.ManageAttachment == \"Combinazioni\") {\r\n this.selectFileCombination();\r\n }\r\n //if all parameters are validated call a method who getting price\r\n if (this.checkValidation()) {\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n this.getCalculationModel();\r\n }\r\n else {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n this.showErrorMessage = true;\r\n }\r\n }\r\n\r\n countTagli() {\r\n if (this.responseModel.tagli != null) {\r\n this.responseModel.tagliCount = this.responseModel.tagli.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n countBiancoCoprente() {\r\n if (this.responseModel.biancoCoprente != null) {\r\n this.responseModel.biancoCoprenteCount = this.responseModel.biancoCoprente.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n selectFileCombination() {\r\n\r\n this.listaFile = new Array()\r\n for (let file of this.responseModel.FilesCombinazioniObj.listaFilesCombinazioni) {\r\n\r\n if (this.responseModel.idFormati != null) {\r\n\r\n var data = this.responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n if (file.FormatId == idFormato) {\r\n\r\n let fileObj = new FileCombinationModel();\r\n fileObj.PathFile = file.PathFile;\r\n if (file.NomeFile == null || file.NomeFile == \"\") {\r\n fileObj.NomeFile = file.FileName;\r\n }\r\n else {\r\n fileObj.NomeFile = file.NomeFile;\r\n }\r\n fileObj.PathIstruzioni = file.PathIstruzioni;\r\n if (file.NomeIstruzioni == null || file.NomeIstruzioni == \"\") {\r\n fileObj.NomeIstruzioni = file.FileIstructionName;\r\n }\r\n else {\r\n fileObj.NomeIstruzioni = file.NomeIstruzioni;\r\n }\r\n this.listaFile.push(fileObj)\r\n }\r\n }\r\n }\r\n }\r\n checkZero(val) {\r\n if (val == \"\" || val == null) {\r\n return \"0\";\r\n }\r\n else {\r\n return val;\r\n }\r\n }\r\n\r\n setTypePriceResult(type) {\r\n this.typePriceResult = type;\r\n if (type == \"tax\") {\r\n $(\"#btnNoIva\").removeClass(\"active\");\r\n $(\"#btnIva\").addClass(\"active\");\r\n }\r\n else {\r\n $(\"#btnNoIva\").addClass(\"active\");\r\n $(\"#btnIva\").removeClass(\"active\");\r\n }\r\n }\r\n setListinoScontisticaPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n setListinoPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n this.setSelectedIndex(price.RowIndex, price.ColumnIndex);\r\n this.setPriceResult(price);\r\n }\r\n isRowSelected(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelected(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex + 1) == this.currentRowIndex && (columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelected(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex + 1) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndex(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n clearSelectedIndex() {\r\n this.currentRowIndex = -1;\r\n this.currentColumnIndex = -1;\r\n }\r\n\r\n isRowSelectedListino(rowIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCellSelectedListino(rowIndex: number, columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((rowIndex) == this.currentRowIndex && (columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isColumnSelectedListino(columnIndex: number) {\r\n let result: boolean = false;\r\n\r\n if ((columnIndex) == this.currentColumnIndex) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n setSelectedIndexListino(rowIndex: number, columnIndex: number) {\r\n this.currentRowIndex = rowIndex;\r\n this.currentColumnIndex = columnIndex;\r\n }\r\n\r\n // Create model for passed in input to the calculation method\r\n getCalculationModel() {\r\n this.model.macrocategoryWizardId = this.responseModel.idGruppo;\r\n this.model.tipoCopie = this.responseModel.tipoCopie;\r\n\r\n if (this.responseModel.tipoCopie != 'libera') {\r\n this.model.idCopie = this.responseModel.idCopie;\r\n }\r\n else {\r\n this.model.numCopie = this.responseModel.numCopie;\r\n }\r\n\r\n this.model.soggettiMultipli = this.responseModel.soggettiMultipli;\r\n this.model.numSoggetti = this.responseModel.numSoggetti;\r\n\r\n this.model.StrCustomerId = this.authService.GetUserId();\r\n this.model.wizardId = this.resourceId;\r\n this.model.idFormati = this.responseModel.idFormati;\r\n\r\n if (this.responseModel.idFormati == \"0\") {\r\n this.model.baseFormato = this.responseModel.baseFormato;\r\n this.model.altezzaFormato = this.responseModel.altezzaFormato;\r\n }\r\n\r\n this.model.idSupportiRigidi = this.responseModel.idSupportiRigidi;\r\n\r\n if (this.responseModel.stampaBifacciale == 1) {\r\n this.model.tipoBifacciale = this.responseModel.tipoBifacciale;\r\n }\r\n else {\r\n this.model.tipoBifacciale = \"0\";\r\n }\r\n\r\n if (this.responseModel.biancoCoprente != null && this.responseModel.biancoCoprente.length > 0) {\r\n this.model.idBiancoCoprente = this.responseModel.idBiancoCoprente;\r\n }\r\n else {\r\n this.model.idBiancoCoprente = \"0\";\r\n }\r\n\r\n if (this.responseModel.idTagli != \"-1\") {\r\n this.model.idTagli = this.responseModel.idTagli;\r\n }\r\n\r\n this.model.lavorazioniAccessorie = new Array();\r\n\r\n for (let lavorazioneAccessoria of this.responseModel.lavorazioniAccessorie) {\r\n let lavorazione: LavorazioniAccessorieModel = new LavorazioniAccessorieModel();\r\n if (lavorazioneAccessoria.isVisible == true) {\r\n //checkbox\r\n if (parseInt(lavorazioneAccessoria.tipo) == 0) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.lavorazioneCheckValue.toString() == 'true') {\r\n lavorazione.valoreLavorazione = \"1\";\r\n }\r\n else {\r\n lavorazione.valoreLavorazione = \"0\";\r\n }\r\n }\r\n //combo\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 2) {\r\n if (lavorazioneAccessoria.valore != \"-1\") {\r\n if (lavorazioneAccessoria.valore != \"0\") {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n //numeric\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 1) {\r\n if (lavorazioneAccessoria.value != null) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n if (lavorazioneAccessoria.value != \"0\") {\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n }\r\n }\r\n //text area\r\n else if (parseInt(lavorazioneAccessoria.tipo) == 6) {\r\n lavorazione.lavorazioneId = lavorazioneAccessoria.id;\r\n lavorazione.valoreLavorazione = lavorazioneAccessoria.value;\r\n }\r\n if (lavorazione.lavorazioneId != null) {\r\n this.model.lavorazioniAccessorie.push(lavorazione);\r\n }\r\n }\r\n }\r\n\r\n this.model.lavorazioniAccessorie.sort((a, b) => 0 - (a > b ? -1 : 1));\r\n\r\n if (this.responseModel.calculationType != \"calcolato_richiesta_preventivo\") {\r\n let sub = this._quotingService.getCalculatedWizard(this.model).subscribe(result => {\r\n this.resultPrice = result;\r\n this.isCalculatedWizard = true;\r\n\r\n if (this.isCalculationTypeCalcolatoScontistica()) {\r\n var scontisticaTable = this.resultPrice.TablePriceList;\r\n if (scontisticaTable != null && scontisticaTable.length > 0) {\r\n //Selecting the last available day result. (The cheapest)\r\n\r\n for (let i = scontisticaTable.length - 1; i >= 0; i--) {\r\n let price = scontisticaTable[i];\r\n if (price.Price != -1) {\r\n this.setPriceResult(price);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListinoScontistica()) {\r\n //Selecting first element\r\n let tableScontisticaPriceListSliced = this.resultPrice.TableScontisticaPriceList.slice(1);\r\n let breakFlag = false;\r\n for (let priceRow of tableScontisticaPriceListSliced) {\r\n let slicedPriceRow = priceRow.slice(1);\r\n\r\n //reverse the obj for select the last data and first price available\r\n var reverse = slicedPriceRow.reverse();\r\n for (let price of reverse) {\r\n if (price.Price != -1) {\r\n this.setListinoScontisticaPriceResult(price);\r\n breakFlag = true;\r\n break;\r\n }\r\n }\r\n\r\n if (breakFlag == true) {\r\n break;\r\n }\r\n }\r\n }\r\n else if (this.isCalculationTypeListino()) {\r\n let tableScontisticaPriceListSliced = this.resultPrice.TablePriceList;\r\n if (tableScontisticaPriceListSliced.length > 0) {\r\n let slicedPriceRow = tableScontisticaPriceListSliced[0];\r\n if (slicedPriceRow.Price != -1) {\r\n this.setListinoPriceResult(slicedPriceRow);\r\n }\r\n }\r\n }\r\n\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n },\r\n err => {\r\n this.isCalculatedWizard = true;\r\n this.showErrorMessage = true;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n else {\r\n this.resultCalculation = true;\r\n this.showErrorMessage = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n }\r\n\r\n this.isDataInitialized = true;\r\n\r\n }\r\n\r\n ngAfterViewInit() {\r\n if (!this.isBrowser || this.pageIsInit) {\r\n return;\r\n }\r\n\r\n $('#quotingFormLoader').hide();\r\n var $wrapper = $('#listWizard');\r\n\r\n $wrapper.find('.sortable-div ').sort(function (a, b) {\r\n return +a.dataset.order - +b.dataset.order;\r\n }).appendTo($wrapper);\r\n\r\n let altezza = $(\"#footer\").outerHeight();\r\n let margintop = parseInt($(\"#footer\").css('margin-top'));\r\n let paddingntop = parseInt($(\"#footer\").css('padding-top'));\r\n altezza += margintop;\r\n altezza += paddingntop;\r\n\r\n let altezza1 = $(\".footerplus\").outerHeight() || 0;\r\n let margintop1 = parseInt($(\".footerplus\").css('margin-top')) || 0;\r\n let paddingntop1 = parseInt($(\".footerplus\").css('padding-top')) || 0;\r\n altezza += altezza1;\r\n altezza += margintop1;\r\n altezza += paddingntop1;\r\n\r\n let altezzaHead = $(\".header-body\").outerHeight();\r\n let margintopHead = parseInt($(\".header-body\").css('margin-bottom'));\r\n let paddingntopHead = parseInt($(\".header-body\").css('padding-bottom'));\r\n altezzaHead += margintopHead;\r\n altezzaHead += paddingntopHead;\r\n\r\n $(\"#quotingInformationTab\").sticky({ topSpacing: altezzaHead, bottomSpacing: altezza });\r\n $(\"#quotingInformationTab-sticky-wrapper\").height(0);\r\n\r\n this.pageIsInit = true;\r\n }\r\n\r\n checkValidation() {\r\n if (this.responseModel.copieIsValid\r\n && this.responseModel.formatiIsValid\r\n && this.responseModel.lavorazioniIsValid\r\n && this.responseModel.baseFormatoIsValid\r\n && this.responseModel.altezzaFormatoIsValid\r\n && this.responseModel.soggettiIsValid\r\n && this.responseModel.supportoIsValid\r\n ) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n\r\n validationBaseFormati() {\r\n let message;\r\n let base = parseFloat(this.responseModel.baseFormato)\r\n let minBase = this.responseModel.minimoBase;\r\n let maxBase = this.responseModel.massimoBase;\r\n if (minBase > 0 || maxBase > 0) {\r\n if (minBase > 0 && maxBase == 0) {\r\n if ((base >= minBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase == 0 && maxBase > 0) {\r\n if ((base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n else if (minBase > 0 && maxBase > 0) {\r\n if ((base >= minBase) && (base <= maxBase)) {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minBase;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxBase;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (base <= 0 || this.responseModel.baseFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.baseFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.baseFormatoIsValid = true;\r\n }\r\n }\r\n this.responseModel.baseFormatoMessage = message;\r\n }\r\n\r\n validationAltezzaFormati() {\r\n let message;\r\n let altezza = parseFloat(this.responseModel.altezzaFormato)\r\n let minAltezza = this.responseModel.minimoAltezza;\r\n let maxAltezza = this.responseModel.massimoAltezza;\r\n if (minAltezza > 0 || maxAltezza > 0) {\r\n if (minAltezza > 0 && maxAltezza == 0) {\r\n if ((altezza >= minAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza == 0 && maxAltezza > 0) {\r\n if ((altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n else if (minAltezza > 0 && maxAltezza > 0) {\r\n if ((altezza >= minAltezza) && (altezza <= maxAltezza)) {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minAltezza;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxAltezza;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (altezza <= 0 || this.responseModel.altezzaFormato == null) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + 0;\r\n this.responseModel.altezzaFormatoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.altezzaFormatoIsValid = true;\r\n }\r\n }\r\n\r\n this.responseModel.altezzaFormatoMessage = message;\r\n }\r\n\r\n validationSoggetti() {\r\n let message;\r\n let numSoggetti = parseInt(this.responseModel.numSoggetti);\r\n if (this.responseModel.numSoggetti == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else if (numSoggetti == 0) {\r\n message = this.getLabel('inserisci_valore_maggiore_0');\r\n this.responseModel.soggettiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.soggettiIsValid = true;\r\n }\r\n\r\n this.responseModel.soggettiMessage = message;\r\n }\r\n\r\n validationCopie() {\r\n let message;\r\n\r\n if (this.responseModel.tipoCopie == 'libera') {\r\n let numCopie = parseInt(this.responseModel.numCopie);\r\n let minCopie = this.responseModel.minimoCopie;\r\n let maxCopie = this.responseModel.massimoCopie;\r\n if (this.responseModel.numCopie == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else if (maxCopie == 0) {\r\n if (numCopie < minCopie) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n }\r\n else {\r\n if ((numCopie >= minCopie) && (numCopie <= maxCopie)) {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minCopie;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxCopie;\r\n this.responseModel.copieIsValid = false;\r\n }\r\n }\r\n }\r\n else {\r\n if (this.responseModel.idCopie == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.copieIsValid = false;\r\n }\r\n else {\r\n this.responseModel.copieIsValid = true;\r\n }\r\n\r\n if (this.responseModel.tipoCopie === 'fissa' && this.responseModel.copie != null) {\r\n this.responseModel.copieCount = this.responseModel.copie.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.copieMessage = message;\r\n }\r\n\r\n validationFormati() {\r\n let message;\r\n\r\n if (this.responseModel.idFormati == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.formatiIsValid = false;\r\n }\r\n else {\r\n this.responseModel.formatiIsValid = true;\r\n }\r\n\r\n if (this.responseModel.formati != null) {\r\n this.responseModel.formatiCount = this.responseModel.formati.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.formatiMessage = message;\r\n }\r\n\r\n validationSupporti() {\r\n let message;\r\n\r\n if (this.responseModel.idSupportiRigidi == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n this.responseModel.supportoIsValid = false;\r\n }\r\n else {\r\n this.responseModel.supportoIsValid = true;\r\n }\r\n\r\n if (this.responseModel.supportiRigidi != null) {\r\n this.responseModel.supportiRigidiCount = this.responseModel.supportiRigidi.filter(x => x.isVisible == true).length;\r\n }\r\n\r\n this.responseModel.supportoMessage = message;\r\n }\r\n\r\n validationLavorazioneAccessoria() {\r\n let message: string = \"\";\r\n let valid: boolean = true;\r\n\r\n for (let lavorazione of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazione.tipo == \"2\" && lavorazione.isVisible) {\r\n if (lavorazione.obbligatorio == true) {\r\n if (lavorazione.valore == \"-1\") {\r\n message = this.getLabel('mandatory_field');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n //check min qta and max qta for input field\r\n if (lavorazione.tipo == \"1\" && lavorazione.isVisible) {\r\n let qta = parseInt(lavorazione.value);\r\n let minQta = lavorazione.minQtaInput;\r\n let maxQta = lavorazione.maxQtaInput;\r\n\r\n if (lavorazione.value == null) {\r\n message = this.getLabel('inserisci_valore_valido');\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else if (maxQta == 0) {\r\n if (qta < minQta) {\r\n message = this.getLabel('inserisci_valore_maggiore');\r\n message += \" \" + minQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n else {\r\n lavorazione.isValid = true;\r\n }\r\n }\r\n else {\r\n if ((qta >= minQta) && (qta <= maxQta)) {\r\n lavorazione.isValid = true;\r\n }\r\n else {\r\n message = this.getLabel('inserisci_valore_compreso_tra');\r\n message += \" \" + minQta;\r\n message += \" \" + this.getLabel('inserisci_valore_compreso_e');\r\n message += \" \" + maxQta;\r\n lavorazione.isValid = false;\r\n valid = false;\r\n }\r\n }\r\n lavorazione.lavorazioneMessage = message;\r\n }\r\n if (lavorazione.valori != null) {\r\n lavorazione.valoriCount = lavorazione.valori.filter(x => x.isVisible == true).length;\r\n }\r\n }\r\n\r\n this.responseModel.lavorazioniIsValid = valid;\r\n }\r\n\r\n getLabel(label) {\r\n let message;\r\n\r\n\r\n let sub = this.translate.get(label, this.translate).subscribe((res: string) => {\r\n message = res;\r\n });\r\n\r\n this.subManager.add(sub);\r\n\r\n return message;\r\n }\r\n\r\n\r\n isAttributeFixed(tipoLavorazione) {\r\n let result: boolean = false;\r\n\r\n if (tipoLavorazione == 'fisso') {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaCheckShowed(tipo, tipoSelezione, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 0 && isVisible && tipoSelezione != \"nascosto\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaNumericShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 1 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaTextAreaShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 6 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n textAreaCheck(event: any) {\r\n if (event.keyCode == 124 || event.keyCode == 38 || event.keyCode == 36 || event.keyCode == 59) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaComboShowed(tipo, selectedValue, lavId) {\r\n let result: boolean = false;\r\n let isVisible: boolean = false;\r\n\r\n for (let lavorazioniAccessorie of this.responseModel.lavorazioniAccessorie) {\r\n if (lavorazioniAccessorie.id == lavId) {\r\n isVisible = lavorazioniAccessorie.isVisible;\r\n }\r\n }\r\n\r\n if (tipo == 2 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n checkIsLavorazioneAccessoriaDescrittivoShowed(tipo, isVisible) {\r\n let result: boolean = false;\r\n\r\n if (tipo == 5 && isVisible) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n onFormatiChange(isrules = false) {\r\n for (let formato of this.responseModel.formati) {\r\n if (formato.chiave == this.responseModel.idFormati) {\r\n this.responseModel.formatoDescription = formato.descrizione;\r\n this.responseModel.formatoImage = formato.image;\r\n this.responseModel.formatiHasInfo = formato.hasInfo;\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onFormatiVisualChange(formatId) {\r\n this.responseModel.idFormati = formatId;\r\n this.onFormatiChange();\r\n }\r\n\r\n onSuportoChange(isrules = false) {\r\n for (let supporto of this.responseModel.supportiRigidi) {\r\n if (supporto.chiave == this.responseModel.idSupportiRigidi) {\r\n this.responseModel.supportoDescription = supporto.descrizione;\r\n this.responseModel.supportoImage = supporto.image;\r\n this.responseModel.supportoHasInfo = supporto.hasInfo;\r\n this.responseModel.supportoShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onSuportoVisualChange(supportoId) {\r\n this.responseModel.idSupportiRigidi = supportoId;\r\n this.onSuportoChange();\r\n }\r\n\r\n onTaglioChange(isrules = false) {\r\n for (let taglio of this.responseModel.tagli) {\r\n if (taglio.chiave == this.responseModel.idTagli) {\r\n this.responseModel.taglioDescription = taglio.descrizione;\r\n this.responseModel.taglioImage = taglio.image;\r\n this.responseModel.taglioHasInfo = taglio.hasInfo;\r\n this.responseModel.taglioShowInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n onTaglioVisualChange(taglioId) {\r\n this.responseModel.idTagli = taglioId;\r\n this.onTaglioChange();\r\n }\r\n\r\n\r\n lavorazioniAccessorieComboChange(lavorazione, isrules = false) {\r\n for (let variante of lavorazione.valori) {\r\n if (lavorazione.valore == variante.chiave) {\r\n lavorazione.description = variante.descrizione;\r\n lavorazione.image = variante.image;\r\n lavorazione.hasInfo = variante.hasInfo;\r\n lavorazione.showInfo = false;\r\n }\r\n }\r\n\r\n if (isrules == false) {\r\n this.parameterValidation();\r\n }\r\n }\r\n\r\n lavorazioniAccessorieComboVisualChange(lavorazioneId, lavorazione) {\r\n lavorazione.valore = lavorazioneId;\r\n this.lavorazioniAccessorieComboChange(lavorazione);\r\n }\r\n\r\n checkIsBifaccialeShowed() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.stampaBifacciale == 1 &&\r\n (this.responseModel.isStampaBifaccialeNoHide == false || this.responseModel.isStampaBifaccialeSiHide == false)) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n\r\n showHideLavDescription(lavorazione) {\r\n if (lavorazione.showInfo) {\r\n lavorazione.showInfo = false;\r\n }\r\n else {\r\n lavorazione.showInfo = true;\r\n }\r\n }\r\n\r\n showHideFormatDescription() {\r\n if (this.responseModel.formatiShowInfo) {\r\n this.responseModel.formatiShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.formatiShowInfo = true;\r\n }\r\n }\r\n\r\n showHideSupportoDescription() {\r\n if (this.responseModel.supportoShowInfo) {\r\n this.responseModel.supportoShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.supportoShowInfo = true;\r\n }\r\n }\r\n\r\n showHidePlastficationInternoDescription() {\r\n if (this.responseModel.plastificazioni1ShowInfo) {\r\n this.responseModel.plastificazioni1ShowInfo = false;\r\n }\r\n else {\r\n this.responseModel.plastificazioni1ShowInfo = true;\r\n }\r\n }\r\n\r\n isCalculationTypeCalcolato() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeCalcolatoQuotigPrev() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListino() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n isCalculationTypeListinoScontistica() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"listino_scontistica\") {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n addToCartWizardCalcolato(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardCalcolatoToCart(wizardId, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardCalcolatoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardCalcolatoScontisticaToCart(wizardId, this.resultPrice.QuantityID, this.resultPrice.RowId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n this.getCalculationModel();\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListino(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardListinoToCart(this.resultPrice.RowId, this.resultPrice.QuantityID).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n addToCartWizardListinoScontistica(quantityId: number) {\r\n let wizardId = this.resourceId;\r\n\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this.cartService.addWizardListinoScontisticaToCart(this.resultPrice.RowId, this.resultPrice.QuantityID, this.resultPrice.DataId).subscribe(result => {\r\n this.cartService.updateCart(result);\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"productAddedToCart\");\r\n this.resultCalculation = true;\r\n },\r\n err => {\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.bootboxService.i18nAlert(\"errorMex\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n\r\n setPriceResult(price: any) {\r\n if (price.Price == -1) {\r\n return;\r\n }\r\n\r\n //Deselecting the current price and selected the one passed in input\r\n for (let price of this.resultPrice.TablePriceList) {\r\n price.IsSelected = false;\r\n }\r\n\r\n price.IsSelected = true;\r\n\r\n this.resultPrice.Currency = price.Currency;\r\n this.resultPrice.Imponibile = price.StrDiscountedPrice;\r\n this.resultPrice.DataId = price.DayId;\r\n this.resultPrice.DayName = price.DayName;\r\n this.resultPrice.DayNumber = price.DayNumber;\r\n this.resultPrice.QuantityID = price.QuantityId;\r\n this.resultPrice.Quantity = price.Quantity;\r\n\r\n this.resultPrice.UnitPrice = price.StrUnitPrice;\r\n this.resultPrice.Iva = price.StrIva;\r\n this.resultPrice.Total = price.StrDiscountedPriceWithTax;\r\n this.resultPrice.TotalAmount = price.Total;\r\n this.resultPrice.Weight = price.StrWeight;\r\n this.resultPrice.WeightUm = price.StrWeightUm;\r\n this.resultPrice.PrezzoOriginalestato = price.PrezzoOriginalestato;\r\n this.resultPrice.PrezzoOriginaleimporto = price.PrezzoOriginaleimporto;\r\n }\r\n\r\n isCustomerLoggedIn() {\r\n return this.loggedIdUser.isAuthenticated;\r\n }\r\n\r\n checkEmailIsValid() {\r\n var EMAIL_REGEXP = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n\r\n if (this.model.richiestaEmail == \"\" || !EMAIL_REGEXP.test(this.model.richiestaEmail)) {\r\n this.model.isRichiestaEmailValid = false;\r\n }\r\n else {\r\n this.model.isRichiestaEmailValid = true;\r\n }\r\n }\r\n\r\n checkFormRichiestaPrevIsValid() {\r\n let result: boolean = false;\r\n\r\n if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && !this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaName != \"\"\r\n && this.model.richiestaSubName != \"\"\r\n && this.model.isRichiestaEmailValid\r\n && this.model.richiestaTelephone != \"\"\r\n && this.model.richiestaJobname != \"\"\r\n && this.model.richiestaCondizioni) {\r\n result = true;\r\n }\r\n }\r\n else if (this.responseModel.calculationType == \"calcolato_richiesta_preventivo\" && this.isCustomerLoggedIn()) {\r\n if (this.model.richiestaJobname != \"\") {\r\n result = true;\r\n }\r\n }\r\n\r\n return result;\r\n }\r\n\r\n sendRequestInfo() {\r\n if (this.checkFormRichiestaPrevIsValid()) {\r\n this.resultCalculation = false;\r\n $('#quotingFormCalculationLoader').addClass(\"overBlock\");\r\n let sub = this._quotingService.sendRequestInfo(this.model).subscribe(result => {\r\n if (result == true) {\r\n this.requestInfoSuccess = true;\r\n }\r\n else {\r\n this.requestInfoSuccess = false;\r\n }\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n\r\n },\r\n err => {\r\n this.requestInfoSuccess = false;\r\n $('#quotingFormCalculationLoader').removeClass(\"overBlock\");\r\n this.resultCalculation = true;\r\n }\r\n );\r\n\r\n this.subManager.add(sub);\r\n }\r\n }\r\n ngAfterViewChecked() {\r\n if (!this.isBrowser || this.pageIsInitAfter) {\r\n return;\r\n }\r\n layoutTheme.initToggle();\r\n this.pageIsInitAfter = true;\r\n }\r\n ngOnDestroy() {\r\n //Called once, before the instance is destroyed.\r\n //Add 'implements OnDestroy' to the class.\r\n this.subManager.unsubscribe();\r\n }\r\n }\r\n\r\n return ChildComponent;\r\n }\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/wizard/form/wizard-form-stampa.component.ts","import { NgModule } from '@angular/core';\r\n\r\nimport { SharedModule } from '../../../../shared/shared.module';\r\nimport { CategoryComponent } from './category.component';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n SharedModule\r\n ],\r\n declarations: [\r\n CategoryComponent\r\n ]\r\n})\r\n\r\nexport class InventoryCategoryModule { }\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/category/sys/inventory-category.module.ts","import { NgModule } from '@angular/core';\r\n\r\nimport { SharedModule } from '../../../../shared/shared.module';\r\nimport { OtherProductComponent } from './other-product.component';\r\nimport { ProductPageListComponent } from './product-page-list.component';\r\nimport { PromotionsComponent } from './promotions.component';\r\nimport { ProductDetailsComponent } from './product-details.component';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n SharedModule\r\n ],\r\n declarations: [\r\n OtherProductComponent,\r\n ProductPageListComponent,\r\n PromotionsComponent,\r\n ProductDetailsComponent\r\n ]\r\n})\r\nexport class InventoryProductModule { }\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/inventory/product/sys/inventory-product.module.ts","import { NgModule } from '@angular/core';\r\n\r\nimport { SharedModule } from '../../../../shared/shared.module';\r\nimport { RegisterComponent } from './register.component';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n SharedModule\r\n ],\r\n declarations: [\r\n RegisterComponent\r\n ]\r\n})\r\n\r\nexport class SettingsModule { }\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/settings/user/sys/settings.module.ts","export class Breadcrumbs{\r\n BreadcrumbName: string;\r\n BreadcrumbLink: string;\r\n Level: number;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/cms/breadcrumbs.ts","export class InfoRequest {\r\n public Email: string;\r\n public Address: string;\r\n public Message: string;\r\n public RefererName: string;\r\n public Telephone: string;\r\n public City: string;\r\n public Where: string;\r\n public Company: string;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/cms/info-request.ts","export class QuotingConstants {\r\n public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO: string = \"calcolato\";\r\n public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_SCONTISTICA: string = \"calcolato_scontistica\";\r\n public static readonly WIZARD_CALCULATION_TYPE_LISTINO: string = \"listino\";\r\n public static readonly WIZARD_CALCULATION_TYPE_LISTINO_SCONTISTICA: string = \"listino_scontistica\";\r\n public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_RICHIESTA_PREVENTIVO: string = \"calcolato_richiesta_preventivo\";\r\n public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO: string = \"calcolato_listino_standard\";\r\n public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_SCONTISTICA: string = \"calcolato_listino_scontistica\";\r\n public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI: string = \"calcolato_listino_fornitori\";\r\n public static readonly WIZARD_CALCULATION_TYPE_CALCOLATO_LISTINO_FORNITORI_SCONTISTICA: string = \"calcolato_listino_fornitori_scontistica\";\r\n ;\r\n \r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/constants/quoting-constants.ts","export class SharedConstants {\r\n public static readonly OTHER_PRODUCTS_TYPE: string = \"ALTRO_PRODOTTO\";\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/constants/shared-constants.ts","import { Inject, Injectable } from '@angular/core';\r\nimport { DOCUMENT } from '@angular/platform-browser';\r\n\r\nimport { CookieOptions } from './cookie-options';\r\nimport { CookieOptionsArgs } from './cookie-options-args';\r\nimport { CookieService } from './cookie.service';\r\n\r\n@Injectable()\r\nexport class CookieBrowserService implements CookieService {\r\n private defaultOptions: CookieOptions;\r\n\r\n constructor(@Inject(DOCUMENT) private document: any) {\r\n }\r\n\r\n public setOptions(options: CookieOptionsArgs) {\r\n this.defaultOptions = new CookieOptions(options);\r\n }\r\n\r\n public get(key: string): string {\r\n return (this.cookieReader())[key];\r\n }\r\n\r\n public getObject(key: string): {[key: string]: string} {\r\n let value = this.get(key);\r\n return value ? JSON.parse(value) : value;\r\n }\r\n\r\n public getAll(): {[key: string]: string} {\r\n return this.cookieReader();\r\n }\r\n\r\n public put(key: string, value: string, options?: CookieOptionsArgs): void {\r\n this.cookieWriter()(key, value, options);\r\n }\r\n\r\n public putObject(key: string, value: Object, options?: CookieOptionsArgs) {\r\n this.put(key, JSON.stringify(value), options);\r\n }\r\n\r\n public remove(key: string, options?: CookieOptionsArgs): void {\r\n this.cookieWriter()(key, undefined, options);\r\n }\r\n\r\n public removeAll(): void {\r\n let cookies = this.getAll();\r\n Object.keys(cookies).forEach(key => {\r\n this.remove(key);\r\n });\r\n }\r\n\r\n private cookieReader(): Object {\r\n let rawDocument = this.document;\r\n let lastCookies = {};\r\n let lastCookieString = '';\r\n let that = this;\r\n\r\n let cookieArray: string[], cookie: string, i: number, index: number, name: string;\r\n let currentCookieString = rawDocument.cookie || '';\r\n if (currentCookieString !== lastCookieString) {\r\n lastCookieString = currentCookieString;\r\n cookieArray = lastCookieString.split('; ');\r\n lastCookies = {};\r\n for (i = 0; i < cookieArray.length; i++) {\r\n cookie = cookieArray[i];\r\n index = cookie.indexOf('=');\r\n if (index > 0) {\r\n name = that.safeDecodeURIComponent(cookie.substring(0, index));\r\n if (this.isBlank((lastCookies)[name])) {\r\n (lastCookies)[name] = that.safeDecodeURIComponent(cookie.substring(index + 1));\r\n }\r\n }\r\n }\r\n }\r\n return lastCookies;\r\n }\r\n\r\n private cookieWriter() {\r\n let that = this;\r\n let rawDocument = this.document;\r\n\r\n return function (name: string, value: string, options?: CookieOptionsArgs) {\r\n rawDocument.cookie = that.buildCookieString(name, value, options);\r\n };\r\n }\r\n\r\n private safeDecodeURIComponent(str: string) {\r\n try {\r\n return decodeURIComponent(str);\r\n } catch (e) {\r\n return str;\r\n }\r\n }\r\n\r\n private buildCookieString(name: string, value: string, options?: CookieOptionsArgs): string {\r\n let cookiePath = '/';\r\n let path: string, expires: any;\r\n let defaultOpts = this.defaultOptions || new CookieOptions({path: cookiePath});\r\n let opts: CookieOptions = this.mergeOptions(defaultOpts, options);\r\n expires = opts.expires;\r\n if (this.isBlank(value)) {\r\n expires = 'Thu, 01 Jan 1970 00:00:00 GMT';\r\n value = '';\r\n }\r\n if (this.isString(expires)) {\r\n expires = new Date(expires);\r\n }\r\n\r\n let str = encodeURIComponent(name) + '=' + encodeURIComponent(value);\r\n str += opts.path ? ';path=' + opts.path : '';\r\n str += opts.domain ? ';domain=' + opts.domain : '';\r\n str += expires ? ';expires=' + expires.toUTCString() : '';\r\n str += opts.secure ? ';secure' : '';\r\n\r\n let cookieLength = str.length + 1;\r\n if (cookieLength > 4096) {\r\n console.log(`Cookie \\'${name}\\' possibly not set or overflowed because it was too \r\n large (${cookieLength} > 4096 bytes)!`);\r\n }\r\n return str;\r\n }\r\n\r\n private mergeOptions(defaultOpts: CookieOptions, providedOpts?: CookieOptionsArgs): CookieOptions {\r\n let newOpts = defaultOpts;\r\n if (this.isPresent(providedOpts)) {\r\n return newOpts.merge(new CookieOptions(providedOpts));\r\n }\r\n return newOpts;\r\n }\r\n\r\n private isBlank(obj: any): boolean {\r\n return obj === undefined || obj === null;\r\n }\r\n\r\n private isPresent(obj: any): boolean {\r\n return obj !== undefined && obj !== null;\r\n }\r\n\r\n private isString(obj: any): obj is string {\r\n return typeof obj === 'string';\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cookie/cookie-browser.service.ts","import { Injectable, Inject } from '@angular/core';\r\n\r\nimport { CookieService } from './cookie.service';\r\nimport { CookieOptionsArgs } from './cookie-options-args';\r\nimport { CookieOptions } from './cookie-options';\r\n\r\n@Injectable()\r\nexport class CookieNodeService implements CookieService {\r\n private defaultOptions: CookieOptions;\r\n\r\n private get cookies(): {[key: string]: string} {\r\n return this.req.cookies;\r\n }\r\n\r\n constructor(@Inject('req') private req: any,\r\n @Inject('res') private res: any) {\r\n }\r\n\r\n public setOptions(options: CookieOptionsArgs) {\r\n this.defaultOptions = Object.assign(options);\r\n }\r\n\r\n public get(key: string): string {\r\n return this.cookies[key];\r\n }\r\n\r\n public getObject(key: string): {[key: string]: string} {\r\n let value = this.get(key);\r\n let obj = value ? JSON.parse(value) : value\r\n return obj;\r\n }\r\n\r\n public getAll(): {[key: string]: string} {\r\n return this.cookies;\r\n }\r\n\r\n public put(key: string, value: string, options?: CookieOptionsArgs): void {\r\n options = this.generateOptions();\r\n this.res.cookie(key, value, options);\r\n }\r\n\r\n public putObject(key: string, value: {[key: string]: string}, options?: CookieOptionsArgs): void {\r\n this.put(key, JSON.stringify(value), options);\r\n }\r\n\r\n public remove(key: string, options?: CookieOptionsArgs): void {\r\n options = this.generateOptions();\r\n this.res.clearCookie(key, options);\r\n }\r\n\r\n public removeAll(): void {\r\n this.res.clearCookie();\r\n }\r\n\r\n private generateOptions(options?: CookieOptionsArgs) {\r\n return Object.assign({}, options, {path: '/'}, this.defaultOptions);\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cookie/cookie-node.service.ts","import { Injectable } from '@angular/core';\r\nimport { BaseRequestOptions, Headers } from '@angular/http';\r\n\r\n@Injectable()\r\nexport class DefaultRequestOptions extends BaseRequestOptions {\r\n headers: Headers = new Headers({\r\n 'Content-Type': 'application/json; charset=utf-8'\r\n });\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/default-request-options.ts","import { Injectable, Inject } from '@angular/core';\r\n\r\n\r\n@Injectable()\r\nexport class LoadingOverlayService {\r\n\r\n constructor(@Inject('isBrowser') private isBrowser: boolean) {\r\n }\r\n\r\n showPageLoadingOverlay() {\r\n if(this.isBrowser)\r\n {\r\n jQuery('body').addClass('loading-overlay-showing'); \r\n }\r\n }\r\n\r\n hidePageLoadingOverlay() {\r\n if(this.isBrowser)\r\n {\r\n jQuery('body').removeClass('loading-overlay-showing'); \r\n }\r\n } \r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/loading-overlay.service.ts","import { Injectable } from \"@angular/core\";\r\nimport { UserLogin } from \"./../../models/cms/user-login\";\r\n\r\n@Injectable()\r\nexport class LocalStorageService {\r\n Write(key: string, value: any) {\r\n if (value) {\r\n value = JSON.stringify(value);\r\n }\r\n localStorage.setItem(key, value);\r\n }\r\n \r\n Read(key: string){\r\n let value: string = localStorage.getItem(key);\r\n\r\n if (value && value != \"undefined\" && value != \"null\") {\r\n let userLoginParsed = Helper.toInstance(new UserLogin(), JSON.parse(value));\r\n return userLoginParsed;\r\n }\r\n return null;\r\n }\r\n Remove(key: string) {\r\n localStorage.removeItem(key);\r\n }\r\n}\r\nclass Helper {\r\n static toInstance(obj: T, json: string): T {\r\n var jsonObj = JSON.parse(json);\r\n\r\n if (typeof obj[\"fromJSON\"] === \"function\") {\r\n obj[\"fromJSON\"](jsonObj);\r\n }\r\n else {\r\n for (var propName in jsonObj) {\r\n obj[propName] = jsonObj[propName]\r\n }\r\n }\r\n return obj;\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/local-storage.ts","import { Injectable, Inject } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\nimport { Location } from '@angular/common';\r\nimport { TranslateService } from '@ngx-translate/core';\r\n\r\nimport { RoutesService } from './routes.service';\r\nimport { CookieService } from './cookie';\r\nimport { CacheService } from './cache.service';\r\n\r\n@Injectable()\r\nexport class RoutesBrowserService extends RoutesService {\r\n\r\n constructor(protected router: Router,\r\n protected translate: TranslateService,\r\n @Inject('CookieService') protected cookie: CookieService,\r\n protected location: Location,\r\n protected cache: CacheService) {\r\n super(router, translate, cookie, location, true, cache);\r\n\r\n this.browserLangs = RoutesBrowserService.getBrowserLangs();\r\n }\r\n\r\n public loadRoutes() {\r\n let lang = this.getLang();\r\n let requestUrl = `/assets/i18n-routes/${lang}.json`;\r\n let rawRoutes = this.cache.get(requestUrl);\r\n let routes = this.getRoutesWithComponents(rawRoutes);\r\n this.router.resetConfig(routes);\r\n this.cache.set(requestUrl, rawRoutes);\r\n this.cookie.put(RoutesService.COOKIE_LANG_KEY, lang);\r\n }\r\n\r\n private static getBrowserLangs(): string[] {\r\n let browserLangs = window.navigator['languages'] || null;\r\n browserLangs = browserLangs ||\r\n (window.navigator.language && [window.navigator.language]) ||\r\n (window.navigator['browserLanguage'] && [window.navigator['browserLanguage']]) ||\r\n (window.navigator['userLanguage'] && [window.navigator['userLanguage']]);\r\n return browserLangs.map((lang) => {\r\n if (lang.indexOf('-') !== -1) {\r\n return lang.split('-')[0];\r\n }\r\n if (lang.indexOf('_') !== -1) {\r\n return lang.split('_')[0];\r\n }\r\n return lang;\r\n });\r\n }\r\n\r\n public getRoutes()\r\n {\r\n let lang = this.getLang();\r\n let requestUrl = `/assets/i18n-routes/${lang}.json`;\r\n let rawRoutes = this.cache.get(requestUrl);\r\n\r\n return rawRoutes;\r\n }\r\n\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/routes-browser.service.ts","export * from './translate-static-loader.service';\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/multi-language/browser/index.ts","import { ApplicationService } from '../../core/application.service';\r\nimport { Observable } from 'rxjs';\r\nimport { ApiService } from '../../core/api.service';\r\nimport 'rxjs/add/operator/finally';\r\n\r\nexport class TranslateStaticLoader {\r\n private observable$: Observable;\r\n\r\n constructor(private http: ApiService, private application: ApplicationService) {\r\n }\r\n\r\n public getTranslation(lang: string) {\r\n if (!this.observable$) {\r\n let appConfig = this.application.getConfig();\r\n let templateName = appConfig.template;\r\n this.observable$ = this.http\r\n .get(`/template/b2c/${templateName}/translations/${lang}.json`)\r\n .finally(() => this.observable$ = null);\r\n }\r\n return this.observable$\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/multi-language/browser/translate-static-loader.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../../services/core/cache.service';\r\nimport { ApiService } from '../../services/core/api.service';\r\n\r\nexport function hashCodeString(str: string): string {\r\n let hash = 0;\r\n if (str.length === 0) {\r\n return hash + '';\r\n }\r\n for (let i = 0; i < str.length; i++) {\r\n let char = str.charCodeAt(i);\r\n hash = ((hash << 5) - hash) + char;\r\n hash = hash & hash; // Convert to 32bit integer\r\n }\r\n return hash + '';\r\n}\r\n\r\n// domain/feature service\r\n@Injectable()\r\nexport class ModelService {\r\n // This is only one example of one Model depending on your domain\r\n constructor(public _api: ApiService, public _cache: CacheService) {\r\n\r\n }\r\n\r\n /**\r\n * whatever domain/feature method name\r\n */\r\n get(url) {\r\n // you want to return the cache if there is a response in it.\r\n // This would cache the first response so if your API isn't idempotent\r\n // you probably want to remove the item from the cache after you use it. LRU of 10\r\n // you can use also hashCodeString here\r\n let key = url;\r\n\r\n if (this._cache.has(key)) {\r\n return Observable.of(this._cache.get(key));\r\n }\r\n // you probably shouldn't .share() and you should write the correct logic\r\n return this._api.get(url)\r\n .do(json => {\r\n this._cache.set(key, json);\r\n })\r\n .share();\r\n }\r\n // don't cache here since we're creating\r\n create() {\r\n // TODO\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/shared/model/model.service.ts","module.exports = \"
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\"\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/+app/app.component.html\n// module id = 638\n// module chunks = 0","import { Regola } from \"./../../../../models/document/quoting-model\";\r\nimport { LavorazioniComponents } from \"./../../../../models/document/quoting-model\";\r\n\r\nexport class ExcludingComponent {\r\n components: LavorazioniComponents = new LavorazioniComponents();\r\n\r\n // get name of model item from sezione value\r\n private Macrocategory: string;\r\n\r\n getMacrocategory() {\r\n return this.Macrocategory;\r\n }\r\n\r\n setMacrocategory(macrocategory) {\r\n this.Macrocategory = macrocategory;\r\n }\r\n\r\n getModelItemName(sezione) {\r\n switch (sezione) {\r\n case \"formato\":\r\n {\r\n return \"formato\";\r\n }\r\n\r\n case \"copertina\":\r\n {\r\n return \"\";\r\n }\r\n\r\n case \"fustellatura\":\r\n {\r\n return \"\";\r\n }\r\n\r\n case \"plastificazione\":\r\n {\r\n return \"plastificazioni1\";\r\n }\r\n\r\n case \"plastificazione_copertina\":\r\n {\r\n return \"plastificazioni2\";\r\n }\r\n\r\n case \"rilegatura\":\r\n {\r\n return \"rilegature\";\r\n }\r\n\r\n case \"taglio\":\r\n {\r\n return \"tagli\";\r\n }\r\n\r\n default:\r\n {\r\n return \"\";\r\n }\r\n }\r\n }\r\n\r\n //remove all excluding rules from model\r\n removeSelectRules(model) {\r\n for (var key in model) {\r\n if (model[key] != null) {\r\n if (this.getLowerCase(key) == \"lavorazioniaccessorie\") // if lavorazione then remove this whay\r\n {\r\n for (var lavorazioneKey in model[key]) // for each key in lavorazione model we set that visible is true\r\n {\r\n model[key][lavorazioneKey].isVisible = true;\r\n\r\n for (var subKey in model[key][lavorazioneKey].valori) // also for each item in valori(drop down) \r\n {\r\n try {\r\n model[key][lavorazioneKey].valori[subKey].isVisible = true;\r\n }\r\n catch (Exception) { }\r\n }\r\n }\r\n }\r\n\r\n else {\r\n for (var subKey in model[key]) // set all keys to visible\r\n {\r\n try {\r\n if (Array.isArray(model[key])) {\r\n model[key][subKey].isVisible = true;\r\n }\r\n\r\n model.tipoTaglio = true;\r\n }\r\n\r\n catch (Exception) { }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n return model;\r\n }\r\n\r\n // remove excluding rules from one component\r\n // if is lavorazione we need to remove rull from model.lavorazione not from model\r\n\r\n removeRuleFromComponent(model, component, lavorazione = false) {\r\n if (model != null && model != undefined) {\r\n if (!lavorazione) {\r\n for (var key in model[component]) {\r\n try {\r\n model[component][key].isVisible = true;\r\n }\r\n\r\n catch (Exception) { }\r\n }\r\n }\r\n\r\n else {\r\n for (var subKey in model.lavorazioniAccessorie) {\r\n for (var valoriSubKey in model.lavorazioniAccessorie[subKey].valori) {\r\n try {\r\n model.lavorazioniAccessorie[subKey].valori[valoriSubKey].isVisible = true;\r\n }\r\n\r\n catch (Exception) { }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return model;\r\n }\r\n\r\n // remove excluding rules list\r\n removeSelectRuleFromList(model, regoles) {\r\n for (var regoleKey in regoles) {\r\n switch (this.getLowerCase(regoles[regoleKey].Categoria_2)) {\r\n case \"accessoria\":\r\n {\r\n var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Id_Elemento_2));\r\n model = this.removeRuleFromComponent(model, component, true);\r\n break;\r\n }\r\n\r\n case \"finitura\":\r\n {\r\n var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Sezione_2));\r\n model = this.removeRuleFromComponent(model, component);\r\n break;\r\n }\r\n\r\n case \"carte\":\r\n {\r\n var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Categoria_2));\r\n model = this.removeRuleFromComponent(model, component);\r\n break;\r\n }\r\n\r\n case \"carte_copertina\":\r\n {\r\n var component = this.getModelItemName(this.getLowerCase(regoles[regoleKey].Categoria_2));\r\n model = this.removeRuleFromComponent(model, component);\r\n break;\r\n }\r\n\r\n default: { }\r\n }\r\n }\r\n\r\n return model;\r\n }\r\n\r\n // return rules list for certain category\r\n filter(list, field, value) {\r\n var returnList = new Array();\r\n\r\n for (var key in list) {\r\n var text = \"\";\r\n try {\r\n text = this.getLowerCase(list[key][field]);\r\n }\r\n catch (exception) { }\r\n\r\n if (text == this.getLowerCase(value)) {\r\n returnList.push(list[key]);\r\n }\r\n }\r\n\r\n return returnList;\r\n }\r\n\r\n // return excluding rules for custom categoria and sezione\r\n getRegole(regolesList, categoria, sezione) {\r\n var allRegoles = regolesList;\r\n var regoles = null;\r\n\r\n if (allRegoles != null && allRegoles != undefined && allRegoles.length > 0) // check if we have regoles\r\n {\r\n var categoryRegoles = this.filter(allRegoles, \"Categoria_1\", categoria); //get regoles for certain cattegory\r\n if (categoryRegoles != null && categoryRegoles != undefined && categoryRegoles.length > 0) {\r\n var regoles = null;\r\n\r\n //get regoles for certain cattegory\r\n switch (this.getLowerCase(categoria)) {\r\n case \"finiture\":\r\n {\r\n regoles = this.filter(categoryRegoles, \"Sezione_1\", sezione);\r\n\r\n for (var regolesKey in regoles) {\r\n var sezioneInput = this.getModelItemName(this.getLowerCase(regoles[regolesKey].Sezione_2)); //return name for current rules \r\n }\r\n break;\r\n }\r\n case \"accessoria\":\r\n {\r\n regoles = this.filter(categoryRegoles, \"Id_Elemento_1\", sezione);\r\n\r\n for (var regolesKey in regoles) {\r\n var sezioneInput = this.getModelItemName(this.getLowerCase(regoles[regolesKey].Sezione_2));\r\n }\r\n\r\n break;\r\n }\r\n\r\n default:\r\n {\r\n regoles = categoryRegoles;\r\n }\r\n }\r\n\r\n if (sezione == \"\") {\r\n regoles = categoryRegoles;\r\n }\r\n else { }\r\n }\r\n }\r\n\r\n return regoles;\r\n }\r\n\r\n getLavorazioneValue(lavorazione, tipo, id) //get value for current state if we get fisso for example than check box is checkd\r\n {\r\n try {\r\n var tipoNum = parseInt(tipo);\r\n switch (tipoNum) {\r\n case this.components.checkBox:\r\n {\r\n if (lavorazione.value == null || lavorazione.value == undefined) {\r\n switch (lavorazione.tipoSelezione) {\r\n case \"non_selezionato\":\r\n {\r\n lavorazione.value = false;\r\n return lavorazione.value;\r\n }\r\n\r\n case \"selezionato\":\r\n {\r\n lavorazione.value = true;\r\n return lavorazione.value;\r\n }\r\n\r\n case \"fisso\":\r\n {\r\n lavorazione.value = true;\r\n return lavorazione.value;\r\n }\r\n\r\n\r\n case \"nascosto\":\r\n {\r\n lavorazione.value = true;\r\n return lavorazione.value;\r\n }\r\n\r\n default:\r\n {\r\n lavorazione.value = false;\r\n return lavorazione.value;\r\n }\r\n }\r\n }\r\n else {\r\n return !lavorazione.value;\r\n }\r\n };\r\n\r\n case this.components.selectBox:\r\n { };\r\n\r\n case this.components.inputBox:\r\n { }\r\n\r\n default:\r\n {\r\n return null;\r\n }\r\n }\r\n }\r\n\r\n catch (exception) { }\r\n }\r\n\r\n // hidding field for finiture category\r\n\r\n //regole - because we need element to hide.\r\n hideFinituraValue(model, component, regole, macro) {\r\n switch (this.getLowerCase(macro)) {\r\n case \"editoria\":\r\n {\r\n for (var key in model[component]) {\r\n if (model[component][key].chiave == regole.Id_Elemento_2) {\r\n model[component][key].isVisible = false;\r\n }\r\n }\r\n\r\n if (component == \"taglio\") {\r\n model[component] = false;\r\n model.tipoTaglio = false;\r\n }\r\n }\r\n }\r\n\r\n return model;\r\n }\r\n\r\n //not finished, method that hode lavorazine\r\n hideLavorazioneValue(model, component, regole, macro) {\r\n switch (this.getLowerCase(macro)) {\r\n case \"editoria\":\r\n {\r\n for (var key in model.lavorazioniAccessorie) {\r\n try {\r\n if (model.lavorazioniAccessorie[key] != null) {\r\n if (model.lavorazioniAccessorie[key].id == component) {\r\n if (parseInt(model.lavorazioniAccessorie[key].tipo) == this.components.selectBox) {\r\n for (var subKey in model.lavorazioniAccessorie[key].valori) {\r\n if (model.lavorazioniAccessorie[key].valori[subKey].chiave == regole.Id_Elemento_Sottochiave_2) {\r\n model.lavorazioniAccessorie[key].valori[subKey].isVisible = false;\r\n model.lavorazioniAccessorie[key].valori[subKey].chiave = 0;\r\n }\r\n }\r\n }\r\n\r\n else if (model.lavorazioniAccessorie[key].tipo == this.components.checkBox) {\r\n model.lavorazioniAccessorie[key].value = false;\r\n model.lavorazioniAccessorie[key].isVisible = false;\r\n }\r\n\r\n else if (model.lavorazioniAccessorie[key].tipo == this.components.inputBox) {\r\n model.lavorazioniAccessorie[key].value = \"\";\r\n model.lavorazioniAccessorie[key].isVisible = false;;\r\n }\r\n }\r\n }\r\n }\r\n catch (Exception) { }\r\n }\r\n }\r\n }\r\n\r\n return model;\r\n }\r\n\r\n /// hidding option from regole id_element2\r\n hideSelectValue(model, regole, macro, elemento) // switch that determine witch hiden method need to use , for all hide group we need method\r\n {\r\n switch (this.getLowerCase(regole.Categoria_2)) {\r\n case \"carta\":\r\n case \"carta copertina\": { }\r\n case \"finitura\":\r\n {\r\n var sezioneInput = this.getModelItemName(this.getLowerCase(regole.Sezione_2));\r\n model = this.hideFinituraValue(model, sezioneInput, regole, macro);\r\n }\r\n\r\n case \"accessoria\":\r\n {\r\n if (this.getLowerCase(regole.Categoria_1) == \"accessoria\") {\r\n for (var key in model.lavorazioniAccessorie) {\r\n if (model.lavorazioniAccessorie[key].tipo == this.components.checkBox && model.lavorazioniAccessorie[key].id == regole.Id_Elemento_1) {\r\n if ((model.lavorazioniAccessorie[key].value == false && regole.Id_Elemento_Sottochiave_1 == 2) || (model.lavorazioniAccessorie[key].value == true && regole.Id_Elemento_Sottochiave_1 == 1) || regole.Id_Elemento_Sottochiave_1 == 0) {\r\n model = this.hideLavorazioneValue(model, this.getLowerCase(regole.Id_Elemento_2), regole, macro);\r\n }\r\n }\r\n\r\n else if (model.lavorazioniAccessorie[key].tipo != this.components.checkBox) { }\r\n }\r\n }\r\n\r\n else {\r\n model = this.hideLavorazioneValue(model, this.getLowerCase(regole.Id_Elemento_2), regole, macro);\r\n }\r\n }\r\n\r\n case \"busta\": { }\r\n default: { }\r\n }\r\n\r\n return model;\r\n }\r\n\r\n //method to get lower case in implement method we get error for null etc\r\n getLowerCase(inputString) {\r\n var outString = \"\";\r\n\r\n try {\r\n outString = inputString.toLowerCase();\r\n }\r\n\r\n catch (Exception) {\r\n outString = inputString;\r\n }\r\n\r\n return outString;\r\n }\r\n\r\n // Get excluding rules for certain component, and from category_1 choise witch\r\n setSelectRules(model, rulesList, categoria, sezione, elemento, sotoelemento, macro) {\r\n var regoleList = this.getRegole(rulesList, categoria, sezione);\r\n\r\n if (regoleList) // != null && regoles != undefined && regoles.length > 0\r\n {\r\n var regole = null;\r\n if (this.getLowerCase(categoria) == \"accessoria\") {\r\n if (elemento == true) { // return value before \r\n elemento = 1;\r\n }\r\n\r\n else {\r\n elemento = 0;\r\n }\r\n\r\n regole = regoleList;\r\n\r\n if (!regole) {\r\n regole = this.filter(regoleList, \"Id_Elemento_Sottochiave_1\", \"\");\r\n }\r\n\r\n }\r\n\r\n else {\r\n regole = this.filter(regoleList, \"Id_Elemento_1\", elemento);\r\n if (!regole) {\r\n regole = this.filter(regoleList, \"Id_Elemento_1\", \"\");\r\n }\r\n }\r\n\r\n if (regole) {\r\n for (var regoleKey in regole) {\r\n model = this.hideSelectValue(model, regole[regoleKey], macro, elemento);\r\n }\r\n }\r\n\r\n else { }\r\n }\r\n\r\n else { }\r\n\r\n return model;\r\n }\r\n\r\n /// \"PF\" \r\n /// \"FINITURA\"\r\n /// \"FORMATO\"\r\n /// \"EDITORIA\"\r\n /// null \r\n /// null\r\n ResetRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct = []) {\r\n let regoleToReset = this.FindRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel);\r\n let flagReset;\r\n\r\n for (let regola of regoleToReset) {\r\n if (this.CheckMacroCategoria(regola, this.Macrocategory)) {\r\n flagReset = true;\r\n this.ApplicaRegola(regola, flagReset, responseModel, responseModelOtherProduct);\r\n }\r\n }\r\n }\r\n\r\n ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct = []) {\r\n //console.log(\"ApplicaRegole\");\r\n let regoleToApply = this.FindRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel);\r\n let flagReset;\r\n\r\n for (let regola of regoleToApply) {\r\n //console.log(regola)\r\n if (this.CheckMacroCategoria(regola, this.Macrocategory)) {\r\n flagReset = false;\r\n this.ApplicaRegola(regola, flagReset, responseModel, responseModelOtherProduct);\r\n }\r\n }\r\n }\r\n\r\n\r\n ApplicaRegola(regola, flagReset, responseModel, responseModelOtherProduct = []) {\r\n let hideOrShow;\r\n\r\n if (flagReset == false) {\r\n hideOrShow = \"hide\";\r\n }\r\n\r\n else {\r\n hideOrShow = \"show\";\r\n }\r\n\r\n if (regola.Tipo_Regola == \"ESCLUDE\") {\r\n if (regola.Categoria_2 == \"CARTA\") {\r\n //In questo caso è stata esclusa una carta e/o grammatura\r\n var idElemento = regola.Id_Elemento_2;\r\n var idSottoElemento = regola.Id_Elemento_Sottochiave_2;\r\n\r\n //Se la sottochiave non è valorizzata bisogna escludere l'intera carta, \r\n //altrimenti una singola grammatura (solo per la relativa carta)\r\n if (idSottoElemento == null || idSottoElemento == 0) {\r\n var attributo = regola.Categoria_2;\r\n this.hideOrShowComboItem(\"CARTA\", idElemento, hideOrShow, responseModel);\r\n }\r\n\r\n else {\r\n if (responseModel.idCarte1 != null) {\r\n var data = responseModel.idCarte1.split(\"_\");\r\n let idCarta = data[0];\r\n //Se la carta scelta è quella della regola, allora viene nascosta la grammatura\r\n\r\n if (idCarta == idElemento) {\r\n this.hideOrShowComboItem(\"GRAMMATURA_CARTA\", idSottoElemento, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n }\r\n\r\n else if (regola.Categoria_2 == \"CARTA_COPERTINA\") {\r\n //In questo caso è stata esclusa una carta e/o grammatura\r\n var idElemento = regola.Id_Elemento_2;\r\n var idSottoElemento = regola.Id_Elemento_Sottochiave_2;\r\n\r\n //Se la sottochiave non è valorizzata bisogna escludere l'intera carta, \r\n //altrimenti una singola grammatura (solo per la relativa carta)\r\n if (idSottoElemento == null || idSottoElemento == 0) {\r\n var attributo = regola.Categoria_2;\r\n this.hideOrShowComboItem(\"CARTA_COPERTINA\", idElemento, hideOrShow, responseModel);\r\n }\r\n\r\n else {\r\n if (responseModel.idCarte2 != null) {\r\n var data = responseModel.idCarte2.split(\"_\");\r\n let idCarta = data[0];\r\n //Se la carta scelta è quella della regola, allora viene nascosta la grammatura\r\n if (idCarta == idElemento) {\r\n this.hideOrShowComboItem(\"GRAMMATURA_CARTA_COPERTINA\", idSottoElemento, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n }\r\n\r\n else if (regola.Categoria_2 == \"FINITURA\") {\r\n let sezione = regola.Sezione_2;\r\n let idElemento = regola.Id_Elemento_2;\r\n\r\n if (sezione == \"TAGLIO\") {\r\n this.hideOrShowAttribute(\"TAGLIO\", hideOrShow, responseModel);\r\n }\r\n\r\n else if (sezione == \"STAMPA_BIFACCIALE\") {\r\n this.hideOrShowComboItem(sezione, idElemento, hideOrShow, responseModel);\r\n }\r\n\r\n else if (sezione == \"BIANCO_COPRENTE\") {\r\n \r\n if (idElemento == \"1\") {\r\n this.hideOrShowComboItem(sezione, \"0\", hideOrShow, responseModel);\r\n }\r\n\r\n else if (idElemento == \"2\") {\r\n this.hideOrShowComboItem(sezione, \"1\", hideOrShow, responseModel);\r\n }\r\n\r\n else if (idElemento == \"3\") {\r\n this.hideOrShowComboItem(sezione, \"2\", hideOrShow, responseModel);\r\n }\r\n }\r\n\r\n else {\r\n this.hideOrShowComboItem(sezione, idElemento, hideOrShow, responseModel);\r\n }\r\n }\r\n\r\n else if (regola.Categoria_2 == \"SUPPORTO_RIGIDO\") {\r\n //In questo caso è stato escluso un supporto rigido\r\n var idElemento = regola.Id_Elemento_2;\r\n\r\n this.hideOrShowComboItem(\"SUPPORTO_RIGIDO\", idElemento, hideOrShow, responseModel);\r\n }\r\n\r\n else if (regola.Categoria_2 == \"MATERIALE_FLESSIBILE\") {\r\n //In questo caso è stato escluso un supporto rigido\r\n var idElemento = regola.Id_Elemento_2;\r\n this.hideOrShowComboItem(\"MATERIALE_FLESSIBILE\", idElemento, hideOrShow, responseModel);\r\n }\r\n\r\n else if (regola.Categoria_2 == \"ACCESSORIA\") {\r\n var idLavorazione = regola.Id_Elemento_2;\r\n var idVariante = regola.Id_Elemento_Sottochiave_2;\r\n this.hideOrShowLavorazioneAccessoria(idLavorazione, idVariante, hideOrShow, responseModel, responseModelOtherProduct);\r\n }\r\n }\r\n }\r\n\r\n hideOrShowAttribute(attributo, hideOrShow, responseModel) {\r\n if (attributo == \"TAGLIO\") {\r\n if (hideOrShow == \"hide\") {\r\n responseModel.isTaglioVisible = true;\r\n }\r\n\r\n else if (hideOrShow == \"show\") {\r\n responseModel.isTaglioVisible = false;\r\n }\r\n }\r\n }\r\n\r\n hideOrShowComboItem(attributo, id, hideOrShow, responseModel) {\r\n //console.log(\"hideOrShowComboItem\")\r\n //console.log(this.Macrocategory)\r\n //console.log(id)\r\n //console.log(hideOrShow)\r\n //console.log(attributo)\r\n //console.log(\"finehideOrShowComboItem\")\r\n\r\n if (this.Macrocategory == \"EDITORIA\") {\r\n if (attributo == \"CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"CARTA_COPERTINA\") {\r\n this.hideOrShowRadComboItem(responseModel.carte2, \"CARTA_COPERTINA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"GRAMMATURA_CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n this.hideOrShowRadComboItem(responseModel.grammature2, \"GRAMMATURA_CARTA_COPERTINA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"PLASTIFICAZIONE\") {\r\n //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.plastificazioni2, \"PLASTIFICAZIONE_COPERTINA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.plastificazioni2, \"PLASTIFICAZIONE_COPERTINA\", id, hideOrShow, responseModel);\r\n }\r\n\r\n }\r\n else if (attributo == \"FORMATO\") {\r\n this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"COPERTINA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.copertine, \"COPERTINA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.copertine, \"COPERTINA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"RILEGATURA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.rilegature, \"RILEGATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.rilegature, \"RILEGATURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n else if (this.Macrocategory == \"COMMERCIALE\") {\r\n if (attributo == \"CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n }\r\n\r\n else if (attributo == \"GRAMMATURA_CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"PLASTIFICAZIONE\") {\r\n //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"FORMATO\") {\r\n this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"PIEGATURA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.piegature, \"PIEGATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.piegature, \"PIEGATURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n else if (this.Macrocategory == \"ETICHETTE\") {\r\n if (attributo == \"CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.carte1, \"CARTA\", id, hideOrShow, responseModel);\r\n }\r\n\r\n else if (attributo == \"GRAMMATURA_CARTA\") {\r\n this.hideOrShowRadComboItem(responseModel.grammature1, \"GRAMMATURA_CARTA\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"PLASTIFICAZIONE\") {\r\n //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"FORMATO\") {\r\n this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"FUSTELLATURA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.tagli, \"FUSTELLATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.tagli, \"FUSTELLATURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n else if (this.Macrocategory == \"ADESIVI\" || this.Macrocategory == \"MANIFESTI\" || this.Macrocategory == \"PANNELLI\" || this.Macrocategory == \"STAMPA_DIRETTA\") {\r\n if (attributo == \"PLASTIFICAZIONE\") {\r\n //Se l'id dell'elemento non è settato vengono nascoste tutte le plastificazioni\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.plastificazioni1, \"PLASTIFICAZIONE\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"FORMATO\") {\r\n this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"SUPPORTO_RIGIDO\") {\r\n this.hideOrShowRadComboItem(responseModel.supportiRigidi, \"SUPPORTO_RIGIDO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"MATERIALE_FLESSIBILE\") {\r\n this.hideOrShowRadComboItem(responseModel.materialiFlessibili, \"MATERIALE_FLESSIBILE\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"BIANCO_COPRENTE\") {\r\n //Se l'id dell'elemento non è settato vengono nascoste tutto il bianco coprente\r\n this.hideOrShowRadComboItem(responseModel.biancoCoprente, \"BIANCO_COPRENTE\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"STAMPA_BIFACCIALE\") {\r\n if (hideOrShow == \"hide\") {\r\n if (id == \"1\") {\r\n responseModel.isStampaBifaccialeNoHide = true;\r\n responseModel.tipoBifacciale=\"1\";\r\n }\r\n else {\r\n responseModel.isStampaBifaccialeSiHide = true;\r\n responseModel.tipoBifacciale=\"0\";\r\n }\r\n }\r\n else {\r\n responseModel.isStampaBifaccialeNoHide = false;\r\n responseModel.isStampaBifaccialeSiHide = false;\r\n }\r\n \r\n }\r\n else if (attributo == \"FUSTELLATURA\") {\r\n //Se l'id dell'elemento non è settato vengono nascosti tutti gli elementi tranne quello di default\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.tagli, \"FUSTELLATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.tagli, \"FUSTELLATURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n else if (this.Macrocategory == \"BANDIERE\" || this.Macrocategory == \"BANNER\") {\r\n if (attributo == \"FORMATO\") {\r\n this.hideOrShowRadComboItem(responseModel.formati, \"FORMATO\", id, hideOrShow, responseModel);\r\n }\r\n else if (attributo == \"OCCHIELLATURA\") {\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.occhielli, \"OCCHIELLATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.occhielli, \"OCCHIELLATURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"ASOLA\") {\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.asole, \"ASOLA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.asole, \"ASOLA\", id, hideOrShow, responseModel);\r\n }\r\n\r\n }\r\n else if (attributo == \"CUCITURA\") {\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.cuciture, \"CUCITURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.cuciture, \"CUCITURA\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n else if (attributo == \"ELETTROSALDATURA\") {\r\n if (id == \"0\") {\r\n this.hideOrShowAllRadComboItems(responseModel.elettrosaldature, \"ELETTROSALDATURA\", hideOrShow, responseModel);\r\n }\r\n else {\r\n this.hideOrShowRadComboItem(responseModel.elettrosaldature, \"ELETTROSALDATURA\", id, hideOrShow, responseModel);\r\n }\r\n\r\n }\r\n else if (attributo == \"MATERIALE_FLESSIBILE\") {\r\n this.hideOrShowRadComboItem(responseModel.materialiFlessibili, \"MATERIALE_FLESSIBILE\", id, hideOrShow, responseModel);\r\n }\r\n }\r\n }\r\n\r\n hideOrShowAllRadComboItems(parameterList, tipo, hideOrShow, responseModel) {\r\n var emptyValue;\r\n\r\n if (tipo == \"COPERTINA\") {\r\n emptyValue = \"0\";\r\n }\r\n else {\r\n emptyValue = \"-1\"\r\n }\r\n\r\n let selected = false;\r\n\r\n for (let parameter of parameterList) {\r\n if (hideOrShow == \"show\") {\r\n parameter.isVisible = true;\r\n if (selected == false) {\r\n if (tipo == \"RILEGATURA\") {\r\n if (responseModel.idRilegature == \"-1\") {\r\n responseModel.idRilegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n if (responseModel.idPiegature == \"-1\") {\r\n responseModel.idPiegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n if (responseModel.idOcchielli == \"-1\") {\r\n responseModel.idOcchielli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n if (responseModel.idCuciture == \"-1\") {\r\n responseModel.idCuciture = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n if (responseModel.idElettrosaldature == \"-1\") {\r\n responseModel.idElettrosaldature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n if (responseModel.idAsole == \"-1\") {\r\n responseModel.idAsole = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n if (responseModel.idTagli == \"-1\") {\r\n responseModel.idTagli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n if (responseModel.idPlastificazioni1 == \"-1\") {\r\n responseModel.idPlastificazioni1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n if (responseModel.idPlastificazioni2 == \"-1\") {\r\n responseModel.idPlastificazioni2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (responseModel.idCopertine == \"-1\") {\r\n responseModel.idCopertine = parameter.chiave;\r\n }\r\n }\r\n\r\n selected = true;\r\n }\r\n }\r\n else if (hideOrShow == \"hide\") {\r\n if (parameter.chiave != emptyValue) {\r\n parameter.isVisible = false;\r\n }\r\n else {\r\n if (selected == false && parameter.isVisible == true) {\r\n if (tipo == \"RILEGATURA\") {\r\n if (responseModel.idRilegature == emptyValue) {\r\n responseModel.idRilegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n if (responseModel.idPiegature == emptyValue) {\r\n responseModel.idPiegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n if (responseModel.idOcchielli == emptyValue) {\r\n responseModel.idOcchielli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n if (responseModel.idCuciture == emptyValue) {\r\n responseModel.idCuciture = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n if (responseModel.idElettrosaldature == emptyValue) {\r\n responseModel.idElettrosaldature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n if (responseModel.idAsole == emptyValue) {\r\n responseModel.idAsole = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n if (responseModel.idTagli == emptyValue) {\r\n responseModel.idTagli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n if (responseModel.idPlastificazioni1 == emptyValue) {\r\n responseModel.idPlastificazioni1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n if (responseModel.idPlastificazioni2 == emptyValue) {\r\n responseModel.idPlastificazioni2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (responseModel.idCopertine == emptyValue) {\r\n responseModel.idCopertine = parameter.chiave;\r\n }\r\n }\r\n\r\n selected = true;\r\n }\r\n }\r\n }\r\n if (selected == false) {\r\n if (tipo == \"RILEGATURA\") {\r\n responseModel.idRilegature = \"-1\";\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n responseModel.idPiegature = \"-1\";\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n responseModel.idTagli = \"-1\";\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n responseModel.idOcchielli = \"-1\";\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n responseModel.idCuciture = \"-1\";\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n responseModel.idElettrosaldature = \"-1\";\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n responseModel.idAsole = \"-1\";\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n responseModel.idPlastificazioni1 = \"-1\";\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n responseModel.idPlastificazioni2 = \"-1\";\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n responseModel.idCopertine = \"-1\";\r\n }\r\n }\r\n }\r\n }\r\n\r\n hideOrShowRadComboItem(parameterList, tipo, id, hideOrShow, responseModel) {\r\n //Recupero delle info sulla combo\r\n let selected = false;\r\n for (let parameter of parameterList) {\r\n //Se l'elemento non è il valore 'Scegli' (-1) o vuoto, non bisogna considerarlo\r\n //Tranne per la copertina, dove -1 corrisponde all'autocopertinato, che può essere escluso\r\n if (tipo != \"COPERTINA\" && (parameter.chiave == \"-1\" || parameter.chiave == null)) {\r\n continue;\r\n }\r\n else {\r\n var idElemento;\r\n\r\n if (tipo == \"CARTA\"\r\n || tipo == \"CARTA_COPERTINA\"\r\n || (this.Macrocategory == \"ETICHETTE\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"STAMPA_DIRETTA\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"PANNELLI\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"BANDIERE\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"MANIFESTI\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"BANNER\" && tipo == \"FORMATO\")\r\n || (this.Macrocategory == \"ADESIVI\" && tipo == \"FORMATO\")) {\r\n var data = parameter.chiave.split(\"_\");\r\n idElemento = data[0];\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (parameter.chiave == \"0\") //Caso dell'autocopertinato\r\n {\r\n //Il value dell'option della combo per l'autocopertina è il valore vuoto,\r\n //inveCe per le regole il valore dell'autocopertinato è -1, quindi occorre una conversione\r\n idElemento = \"-1\";\r\n }\r\n else {\r\n idElemento = parameter.chiave;\r\n }\r\n }\r\n else {\r\n idElemento = parameter.chiave;\r\n }\r\n\r\n if (hideOrShow == \"show\") {\r\n if (idElemento == id) {\r\n parameter.isVisible = true;\r\n if (selected == false) {\r\n if (tipo == \"RILEGATURA\") {\r\n if (responseModel.idRilegature == \"-1\") {\r\n responseModel.idRilegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n if (responseModel.idMaterialiFlessibili == \"-1\") {\r\n responseModel.idMaterialiFlessibili = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n if (responseModel.idSupportiRigidi == \"-1\") {\r\n responseModel.idSupportiRigidi = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n if (responseModel.idOcchielli == \"-1\") {\r\n responseModel.idOcchielli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n if (responseModel.idCuciture == \"-1\") {\r\n responseModel.idCuciture = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n if (responseModel.idElettrosaldature == \"-1\") {\r\n responseModel.idElettrosaldature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n if (responseModel.idAsole == \"-1\") {\r\n responseModel.idAsole = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n if (responseModel.idPiegature == \"-1\") {\r\n responseModel.idPiegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n if (responseModel.idTagli == \"-1\") {\r\n responseModel.idTagli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA\") {\r\n var data = responseModel.idCarte1.split(\"_\");\r\n let idCarta = data[0];\r\n\r\n if (idCarta == \"-1\") {\r\n responseModel.idCarte1 = parameter.chiave;\r\n responseModel.grammature1 = parameter.subElements;\r\n responseModel.idGrammature1 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA\") {\r\n if (responseModel.idGrammature1 == \"-1\") {\r\n responseModel.idGrammature1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA_COPERTINA\") {\r\n var data = responseModel.idCarte2.split(\"_\");\r\n let idCarta = data[0];\r\n\r\n if (idCarta == \"-1\") {\r\n responseModel.idCarte2 = parameter.chiave;\r\n responseModel.grammature2 = parameter.subElements;\r\n responseModel.idGrammature2 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n if (responseModel.idGrammature2 == \"-1\") {\r\n responseModel.idGrammature2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FORMATO\") {\r\n if (responseModel.idFormati == \"-1\") {\r\n responseModel.idFormati = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n if (responseModel.idPlastificazioni1 == \"-1\") {\r\n responseModel.idPlastificazioni1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n if (responseModel.idPlastificazioni2 == \"-1\") {\r\n responseModel.idPlastificazioni2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (responseModel.idCopertine == \"-1\") {\r\n responseModel.idCopertine = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"BIANCO_COPRENTE\") {\r\n if (responseModel.idBiancoCoprente == \"-1\") {\r\n responseModel.idBiancoCoprente = parameter.chiave;\r\n }\r\n }\r\n selected = true;\r\n }\r\n }\r\n else {\r\n if (selected == false) {\r\n if (tipo == \"RILEGATURA\") {\r\n if (responseModel.idRilegature == \"-1\") {\r\n responseModel.idRilegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n if (responseModel.idMaterialiFlessibili == \"-1\") {\r\n responseModel.idMaterialiFlessibili = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n if (responseModel.idSupportiRigidi == \"-1\") {\r\n responseModel.idSupportiRigidi = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n if (responseModel.idOcchielli == \"-1\") {\r\n responseModel.idOcchielli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n if (responseModel.idCuciture == \"-1\") {\r\n responseModel.idCuciture = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n if (responseModel.idElettrosaldature == \"-1\") {\r\n responseModel.idElettrosaldature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n if (responseModel.idAsole == \"-1\") {\r\n responseModel.idAsole = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n if (responseModel.idPiegature == \"-1\") {\r\n responseModel.idPiegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n if (responseModel.idTagli == \"-1\") {\r\n responseModel.idTagli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA\") {\r\n var data = responseModel.idCarte1.split(\"_\");\r\n let idCarta = data[0];\r\n\r\n if (idCarta == \"-1\") {\r\n responseModel.idCarte1 = parameter.chiave;\r\n responseModel.grammature1 = parameter.subElements;\r\n responseModel.idGrammature1 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA\") {\r\n if (responseModel.idGrammature1 == \"-1\") {\r\n responseModel.idGrammature1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA_COPERTINA\") {\r\n var data = responseModel.idCarte2.split(\"_\");\r\n let idCarta = data[0];\r\n\r\n if (idCarta == \"-1\") {\r\n responseModel.idCarte2 = parameter.chiave;\r\n responseModel.grammature2 = parameter.subElements;\r\n responseModel.idGrammature2 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n if (responseModel.idGrammature2 == \"-1\") {\r\n responseModel.idGrammature2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FORMATO\") {\r\n if (responseModel.idFormati == \"-1\") {\r\n responseModel.idFormati = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n if (responseModel.idPlastificazioni1 == \"-1\") {\r\n responseModel.idPlastificazioni1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n if (responseModel.idPlastificazioni2 == \"-1\") {\r\n responseModel.idPlastificazioni2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (responseModel.idCopertine == \"-1\") {\r\n responseModel.idCopertine = parameter.chiave;\r\n }\r\n }\r\n\r\n selected = true;\r\n }\r\n }\r\n }\r\n else if (hideOrShow == \"hide\") {\r\n if (idElemento == id) {\r\n parameter.isVisible = false;\r\n }\r\n else {\r\n if (selected == false && parameter.isVisible == true) {\r\n if (tipo == \"RILEGATURA\") {\r\n if (responseModel.idRilegature == id) {\r\n responseModel.idRilegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n if (responseModel.idMaterialiFlessibili == id) {\r\n responseModel.idMaterialiFlessibili = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n if (responseModel.idSupportiRigidi == id) {\r\n responseModel.idSupportiRigidi = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n if (responseModel.idOcchielli == id) {\r\n responseModel.idOcchielli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n if (responseModel.idCuciture == id) {\r\n responseModel.idCuciture = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n if (responseModel.idElettrosaldature == id) {\r\n responseModel.idElettrosaldature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n if (responseModel.idAsole == id) {\r\n responseModel.idAsole = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n if (responseModel.idPiegature == id) {\r\n responseModel.idPiegature = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n if (responseModel.idTagli == id) {\r\n responseModel.idTagli = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA\") {\r\n var data = responseModel.idCarte1.split(\"_\");\r\n let idCarta = data[0];\r\n\r\n if (idCarta == id) {\r\n responseModel.idCarte1 = parameter.chiave;\r\n responseModel.grammature1 = parameter.subElements;\r\n responseModel.idGrammature1 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA\") {\r\n if (responseModel.idGrammature1 == id) {\r\n responseModel.idGrammature1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"CARTA_COPERTINA\") {\r\n var data = responseModel.idCarte2.split(\"_\");\r\n let idCarta = data[0];\r\n\r\n if (idCarta == id) {\r\n responseModel.idCarte2 = parameter.chiave;\r\n responseModel.grammature2 = parameter.subElements;\r\n responseModel.idGrammature2 = parameter.wrap_valore;\r\n }\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n if (responseModel.idGrammature2 == id) {\r\n responseModel.idGrammature2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"FORMATO\") {\r\n if (this.Macrocategory == \"ETICHETTE\"\r\n || this.Macrocategory == \"ADESIVI\"\r\n || this.Macrocategory == \"PANNELLI\"\r\n || this.Macrocategory == \"MANIFESTI\"\r\n || this.Macrocategory == \"STAMPA_DIRETTA\"\r\n || this.Macrocategory == \"BANDIERE\"\r\n || this.Macrocategory == \"BANNER\") {\r\n var data = responseModel.idFormati.split(\"_\");\r\n let idFormato = data[0];\r\n if (idFormato == id) {\r\n responseModel.idFormati = parameter.chiave;\r\n }\r\n }\r\n else {\r\n if (responseModel.idFormati == id) {\r\n responseModel.idFormati = parameter.chiave;\r\n }\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n if (responseModel.idPlastificazioni1 == id) {\r\n responseModel.idPlastificazioni1 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n if (responseModel.idPlastificazioni2 == id) {\r\n responseModel.idPlastificazioni2 = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n if (responseModel.idCopertine == id) {\r\n responseModel.idCopertine = parameter.chiave;\r\n }\r\n }\r\n else if (tipo == \"BIANCO_COPRENTE\") {\r\n if (responseModel.idBiancoCoprente == id) {\r\n responseModel.idBiancoCoprente = parameter.chiave;\r\n }\r\n }\r\n selected = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (selected == false) {\r\n if (tipo == \"RILEGATURA\") {\r\n responseModel.idRilegature = \"-1\";\r\n }\r\n else if (tipo == \"MATERIALE_FLESSIBILE\") {\r\n responseModel.idMaterialiFlessibili = \"-1\";\r\n }\r\n else if (tipo == \"SUPPORTO_RIGIDO\") {\r\n responseModel.idSupportiRigidi = \"-1\";\r\n }\r\n else if (tipo == \"OCCHIELLATURA\") {\r\n responseModel.idOcchielli = \"-1\";\r\n }\r\n else if (tipo == \"CUCITURA\") {\r\n responseModel.idCuciture = \"-1\";\r\n }\r\n else if (tipo == \"ELETTROSALDATURA\") {\r\n responseModel.idElettrosaldature = \"-1\";\r\n }\r\n else if (tipo == \"ASOLA\") {\r\n responseModel.idAsole = \"-1\";\r\n }\r\n else if (tipo == \"PIEGATURA\") {\r\n responseModel.idPiegature = \"-1\";\r\n }\r\n else if (tipo == \"FUSTELLATURA\") {\r\n responseModel.idTagli = \"-1\";\r\n }\r\n else if (tipo == \"CARTA\") {\r\n responseModel.idCarte1 = \"-1\";\r\n responseModel.grammature1 = new Array();\r\n responseModel.idGrammature1 = \"-1\";\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA\") {\r\n responseModel.idGrammature1 = \"-1\";\r\n }\r\n else if (tipo == \"CARTA_COPERTINA\") {\r\n responseModel.idCarte2 = \"-1\";\r\n responseModel.grammature2 = new Array();\r\n responseModel.idGrammature2 = \"-1\";\r\n }\r\n else if (tipo == \"GRAMMATURA_CARTA_COPERTINA\") {\r\n responseModel.idGrammature2 = \"-1\";\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE\") {\r\n responseModel.idPlastificazioni1 = \"-1\";\r\n }\r\n else if (tipo == \"PLASTIFICAZIONE_COPERTINA\") {\r\n responseModel.idPlastificazioni2 = \"-1\";\r\n }\r\n else if (tipo == \"FORMATO\") {\r\n responseModel.idFormati = \"-1\";\r\n }\r\n else if (tipo == \"COPERTINA\") {\r\n responseModel.idCopertine = \"-1\";\r\n }\r\n else if (tipo == \"BIANCO_COPRENTE\") {\r\n responseModel.idBiancoCoprente = \"0\";\r\n }\r\n }\r\n }\r\n\r\n /// \"PF\" \r\n /// \"FINITURA\"\r\n /// \"FORMATO\"\r\n /// \"EDITORIA\"\r\n /// null \r\n /// null\r\n FindRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel) {\r\n let regole = new Array();\r\n\r\n for (let regola of responseModel.listaRegole) {\r\n //console.log(\"FindRegole(\" + tipo + \",\" + categoria + \",\" + sezione + \",\" + macroCategoria + \",\" + elemento + \",\" + sottoElemento + \")\");\r\n\r\n if (regola.Tipo == tipo\r\n && regola.Categoria_1 == categoria && regola.Sezione_1 == sezione\r\n && regola.Macro_Categoria_1 == macroCategoria) //Elementi primari\r\n {\r\n //console.log(\"regola (\" + regola.Tipo + \",\" + regola.Categoria_1 + \",\" + regola.Sezione_1 + \",\" + regola.Macro_Categoria_1 + \",\" + regola.Id_Elemento_1 + \",\" + regola.Id_Elemento_Sottochiave_1 + \")\");\r\n if (elemento != null && regola.Id_Elemento_1 == elemento) {\r\n if (sottoElemento != null && regola.Id_Elemento_Sottochiave_1 == sottoElemento) {\r\n regole.push(regola);\r\n }\r\n else if (sottoElemento == null || regola.Id_Elemento_Sottochiave_1 == 0) { //-- If Sotto-Elemento\tis set to nessuna in regole, to remove entire element\r\n regole.push(regola);\r\n }\r\n }\r\n else if (elemento == null) //se non è stato indicato un id, vengono prese tutte le regole per la sezione in oggetto\r\n {\r\n regole.push(regola);\r\n }\r\n }\r\n\r\n }\r\n //console.log(regole.length);\r\n return regole\r\n }\r\n\r\n CheckMacroCategoria(regola, macroCategoria) {\r\n var result = false;\r\n\r\n if (regola.Macro_Categoria_2 == null || regola.Macro_Categoria_2 == \"\") {\r\n result = true;\r\n }\r\n else if (regola.Macro_Categoria_2 != null && regola.Macro_Categoria_2.toUpperCase() == macroCategoria.toUpperCase()) {\r\n result = true;\r\n }\r\n\r\n return result;\r\n }\r\n\r\n ApplicaRegoleLavorazioniAccessorie(tipo, macroCategoria, responseModel, responseModelOtherProduct = []) {\r\n let categoria: string = \"ACCESSORIA\";\r\n let sezione: string = \"\";\r\n let elemento: string;\r\n let sottoElemento: string;\r\n\r\n //Lettura della lista delle lavorazioni accessorie\r\n //Vengono applicate le regole per ogni lavorazione accessoria\r\n for (let lavorazioneAccessoria of responseModel.lavorazioniAccessorie) {\r\n elemento = lavorazioneAccessoria.id;\r\n\r\n let tipoLavorazioneAccessoria;\r\n\r\n if (lavorazioneAccessoria.tipo == \"0\") {\r\n tipoLavorazioneAccessoria = \"check\";\r\n }\r\n else if (lavorazioneAccessoria.tipo == \"2\") {\r\n tipoLavorazioneAccessoria = \"select\";\r\n }\r\n else if (lavorazioneAccessoria.tipo == \"6\") {\r\n tipoLavorazioneAccessoria = \"textarea\";\r\n }\r\n\r\n //Per le lavorazioni di tipo combo bisogna leggere il valore della select\r\n //Invece se si tratta di una check bisogna vedere se è checkata o meno.\r\n if (tipoLavorazioneAccessoria == \"check\") //check\r\n {\r\n sottoElemento = null;\r\n //se la lavorazione è stata checkata allora vengono applicate le eventuali regole associate\r\n if (lavorazioneAccessoria.lavorazioneCheckValue == false || lavorazioneAccessoria.lavorazioneCheckValue == \"false\" || lavorazioneAccessoria.tipoSelezione == 'nascosto') {\r\n sottoElemento = \"1\"; //Corrispone a No nella regola\r\n }\r\n else if (lavorazioneAccessoria.lavorazioneCheckValue) {\r\n sottoElemento = \"2\"; //Corrispone a Si nella regola\r\n }\r\n\r\n this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n }\r\n else if (tipoLavorazioneAccessoria == \"select\") //combo\r\n {\r\n sottoElemento = this.getComboValue(\"ACCESSORIA\", lavorazioneAccessoria.valore, lavorazioneAccessoria);\r\n\r\n this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n }\r\n else if (tipoLavorazioneAccessoria = \"textarea\") {\r\n sottoElemento = '0';\r\n this.ApplicaRegole(tipo, categoria, sezione, macroCategoria, elemento, sottoElemento, responseModel, responseModelOtherProduct);\r\n }\r\n }\r\n }\r\n getComboValue(attributo, id, lavorazioneAccessoria) {\r\n var value = \"\";\r\n\r\n //Controllo prima se si tratta di una lavorazione accessoria, dato che la loro gestione è uguale per tutte le macrocategorie\r\n if (attributo == \"ACCESSORIA\") {\r\n //Lettura di tutta la lista delle lavorazioni accessorie\r\n for (let varianti of lavorazioneAccessoria.valori) {\r\n //console.log(varianti)\r\n var item = varianti;\r\n var display = varianti.isVisible;\r\n\r\n //Lettura dell'id della lavorazione corrente\r\n var idLav = item.chiave;\r\n var tipoLavorazione = lavorazioneAccessoria.tipo;\r\n var idLavAcc = lavorazioneAccessoria.valore;\r\n\r\n if (id == idLav) {\r\n //Se la riga non è mostrata viene considerata come non selezionata\r\n if (display == false) {\r\n value = \"-1\";\r\n }\r\n else {\r\n //Lettura del valore selezionato nella select\r\n value = idLav;\r\n break;\r\n }\r\n }\r\n }\r\n return value;\r\n }\r\n }\r\n\r\n hideOrShowLavorazioneAccessoria(idLavorazione, idVariante, hideOrShow, responseModel, responseModelOtherProduct = []) {\r\n for (let lavorazioneAccessoria of responseModel.lavorazioniAccessorie) {\r\n var tipoLavorazione = lavorazioneAccessoria.tipo;\r\n var idLavAcc = lavorazioneAccessoria.id;\r\n\r\n if (idLavAcc == idLavorazione) {\r\n if (tipoLavorazione == \"2\") {\r\n let comboItemNumber = -1;\r\n\r\n if (idVariante == null || idVariante == 0) {\r\n if (hideOrShow == \"hide\") {\r\n lavorazioneAccessoria.isVisible = false;\r\n }\r\n else if (hideOrShow == \"show\") {\r\n lavorazioneAccessoria.isVisible = true;\r\n }\r\n }\r\n else {\r\n let selected = false;\r\n for (let variante of lavorazioneAccessoria.valori) {\r\n if (hideOrShow == \"hide\") {\r\n if (variante.chiave == idVariante) {\r\n variante.isVisible = false;\r\n //-- If type is combobox and we want to hide just one combo option, we will send it's id\r\n comboItemNumber = idVariante;\r\n }\r\n }\r\n else if (hideOrShow == \"show\") {\r\n variante.isVisible = true;\r\n\r\n if (selected == false) {\r\n if (lavorazioneAccessoria.valore == \"-1\") {\r\n lavorazioneAccessoria.valore = variante.chiave;\r\n }\r\n selected = true;\r\n }\r\n }\r\n }\r\n let firstVariableVisible = 0;\r\n for (let variante of lavorazioneAccessoria.valori) {\r\n if (firstVariableVisible == 0) {\r\n if (variante.isVisible == true) {\r\n firstVariableVisible = variante.chiave;\r\n }\r\n }\r\n if (lavorazioneAccessoria.valore == variante.chiave) {\r\n if (variante.isVisible == true) {\r\n selected = true;\r\n }\r\n }\r\n }\r\n if (selected == false && firstVariableVisible == 0) {\r\n lavorazioneAccessoria.valore = \"-1\";\r\n }\r\n else if (selected == false) {\r\n lavorazioneAccessoria.valore = firstVariableVisible;\r\n }\r\n }\r\n\r\n this.reflectChangesOnOtherProducts(responseModelOtherProduct, hideOrShow, lavorazioneAccessoria, comboItemNumber);\r\n }\r\n else {\r\n if (hideOrShow == \"hide\") {\r\n lavorazioneAccessoria.isVisible = false;\r\n }\r\n else if (hideOrShow == \"show\") {\r\n lavorazioneAccessoria.isVisible = true;\r\n }\r\n\r\n this.reflectChangesOnOtherProducts(responseModelOtherProduct, hideOrShow, lavorazioneAccessoria);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /*-- In other products we don't use lavorazzioniAccessorie object but gruppi,\r\n so for every change on one object we need to reflect it on the another one */\r\n reflectChangesOnOtherProducts(responseModelOtherProduct, hideOrShow, lavorazioneAccessoria, comboItemNumber = -1) {\r\n if (responseModelOtherProduct === undefined || responseModelOtherProduct.length == 0)\r\n return;\r\n\r\n var idLavorazione = lavorazioneAccessoria.id;\r\n\r\n let isFoundElement = false;\r\n //-- From gruppi obect get all varianti and convert it to Lavorazioni Accessorie model\r\n for (let group of responseModelOtherProduct) {\r\n for (let variante of group.varianti) {\r\n if (variante.id == idLavorazione) {\r\n if (variante.tipo != '2' || comboItemNumber == -1) {\r\n variante.isVisible = hideOrShow == \"hide\" ? false : true;\r\n //-- If item from select we want to hide was selected before rule is applied on it, we are changing it's value\r\n if (!variante.isVisible && (lavorazioneAccessoria.valore || lavorazioneAccessoria.valore == 0)) {\r\n variante.intFormValue = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n else {\r\n if (variante.valori) {\r\n var comboOption = variante.valori.filter(x => x.chiave == comboItemNumber);\r\n if (comboOption) {\r\n comboOption.isVisible = hideOrShow == \"hide\" ? false : true;\r\n\r\n //-- If selected element need to be hidden because of regola, we are selecting first visible element\r\n if(!comboOption.isVisible)\r\n {\r\n // let value = lavorazioneAccessoria.valori.filter(x => x.isVisible == true)[0].chiave;\r\n // if(variante.intFormValue)\r\n variante.intFormValue = lavorazioneAccessoria.valore;\r\n }\r\n }\r\n }\r\n }\r\n\r\n isFoundElement = true;\r\n break;\r\n }\r\n\r\n }\r\n //-- If variante is found, break both loops, because we don't need to look for any other variante\r\n if (isFoundElement) break;\r\n }\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/components/document/widget/quoting/quoting-excluding.component.ts","export class UserLogin {\r\n constructor() {\r\n // this.id = 0;\r\n this.username = \"\";\r\n this.isAuthenticated = false;\r\n }\r\n\r\n // id: number;\r\n username: string;\r\n isAuthenticated: boolean;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/cms/user-login.ts","import { Http, Headers, URLSearchParams, RequestOptions } from \"@angular/http\";\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { HttpParam } from \"./../../models/core/http-param\";\r\n\r\n//Models\r\nimport { ClientAreaUserProfile } from \"./../../models/settings/client-area\";\r\nimport { ClientAreaDetails } from \"./../../models/settings/client-area\";\r\nimport { ClientAreaUserAddress } from \"./../../models/settings/client-area\";\r\nimport { ClientAreaOrderDetails } from \"./../../models/settings/client-area\";\r\nimport { ClientAreaOrderProcessFile } from \"./../../models/settings/client-area\";\r\nimport { LanguageService } from \"../cms/language.service\";\r\nimport { CurrencyService } from \"../cms/currency.service\";\r\nimport { ShoppingCartService } from \"../inventory/shopping-cart.service\";\r\n\r\n@Injectable()\r\nexport class ClientAreaService {\r\n constructor(\r\n public _api: ApiService, \r\n public _cache: CacheService,\r\n private languageService: LanguageService,\r\n private currencyService: CurrencyService,\r\n private mappings: Mappings,\r\n private ShoppingCartService: ShoppingCartService) {\r\n }\r\n\r\n getDetailsClientArea(id: string) {\r\n\r\n let cartId = this.ShoppingCartService.getCartId();\r\n let lang = this.languageService.getLongLang();\r\n let url = this.mappings.Web_Api_Get_Client_Area_Details.replace('{id}', id.toString()).replace('{lang}', lang).replace('{cartid}', cartId);\r\n let key = url;\r\n\r\n return this._api.getUniversalCached(url);\r\n }\r\n\r\n getUserAreaProfile(userId: string) {\r\n\r\n let lang = this.languageService.getLongLang();\r\n let cartId = this.ShoppingCartService.getCartId();\r\n\r\n let url = this.mappings.Web_Api_Get_Client_Area_User_Profile.replace('{userId}', userId).replace('{lang}', lang).replace('{cartid}', cartId);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n \r\nupdateUserPassword(param: any) {\r\n\r\n param.Language = this.languageService.getLongLang();\r\n\r\n return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Password, param)\r\n .do(result => result)\r\n .share();\r\n }\r\n\r\n updateUserProfile(collection: any) {\r\n\r\n return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Profile, collection)\r\n .do(result => result)\r\n .share();\r\n }\r\n\r\n addNewAddress(param: any) {\r\n\r\n return this._api.post(this.mappings.Web_Api_Post_Client_Area_Add_New_Address, param)\r\n .do(result => result)\r\n .share();\r\n }\r\n\r\n updateAddresses(addresses: ClientAreaUserAddress[], userId: string, defaultAddress: number) {\r\n var param = {\r\n Addresses: addresses,\r\n UserId: userId,\r\n DefaultAddress: defaultAddress\r\n }\r\n return this._api.post(this.mappings.Web_Api_Post_Client_Area_Update_User_Address, param)\r\n .do(result => result)\r\n .share();\r\n }\r\n\r\n removeAddress(param: any) {\r\n return this._api.post(this.mappings.Web_Api_Post_Client_Area_Remove_Address, param)\r\n .do(result => result)\r\n .share();\r\n }\r\n\r\n getClientAreaOrderDetails(userId: string, orderId: number) {\r\n let cartId = this.ShoppingCartService.getCartId();\r\n let lang: string = this.languageService.getLongLang();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Get_Client_Area_Order_Details.replace('{userId}', userId).replace('{orderId}', orderId.toString()).replace('{lang}', lang).replace('{currency}', curr).replace(\"{cartid}\", cartId);\r\n let key = url;\r\n\r\n return this._api.getUniversalCached(url);\r\n }\r\n\r\n getClientAreaOrdersList(userId: number, dateFrom: Date, dateTo: Date, orderNumber: string, orderStatus: string) {\r\n\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url = this.mappings.Web_Api_Get_Client_Area_Order_List.replace('{userId}', userId.toString()).replace('{dateFrom}', dateFrom.toTimeString()).replace('{dateTo}', dateTo.toTimeString()).replace('{orderNumber}', orderNumber).replace('{orderStatus}', orderStatus).replace('{currency}', curr);\r\n let key = url;\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getClientAreaOrdersList1(userId: string, dateFrom: string, dateTo: string, orderNumber: string, orderStatus: string) {\r\n\r\n let cartId = this.ShoppingCartService.getCartId();\r\n let curr = this.currencyService.getCurrency();\r\n let lang: string = this.languageService.getLongLang();\r\n \r\n let url = this.mappings.Web_Api_Get_Client_Area_Order_List.replace('{userId}', userId).replace('{dateFrom}', dateFrom).replace('{dateTo}', dateTo).replace('{orderNumber}', orderNumber).replace('{orderStatus}', orderStatus).replace('{lang}', lang).replace('{currency}', curr).replace('{cartid}', cartId);\r\n let key = url;\r\n\r\n return this._api.getUniversalCached(url);\r\n }\r\n\r\n getClientAreaInvoicesList(userId: string, orderNumber: string, invoiceNumber: string, documentType: string) {\r\n\r\n let curr = this.currencyService.getCurrency();\r\n let lang: string = this.languageService.getLongLang();\r\n let cartId = this.ShoppingCartService.getCartId();\r\n \r\n let url = this.mappings.Web_Api_Get_Client_Area_Invoices.replace('{userId}', userId).replace('{orderNumber}', orderNumber).replace('{invoiceNumber}', invoiceNumber).replace('{documentType}', documentType).replace('{lang}', lang).replace('{currency}', curr).replace('{cartid}', cartId);\r\n let key = url;\r\n\r\n return this._api.getUniversalCached(url);\r\n }\r\n\r\n postClientAreaSendProcessOrderMessageint(userId: string, orderId: number, orderRowId: number, orderNumber: string, sendTo: string, messageObject: string, message: string, lang: string) {\r\n let url = this.mappings.Web_Api_Get_Client_Area_Order_Send_Message;\r\n\r\n var params = {\r\n UserId: userId,\r\n OrderId: orderId,\r\n OrderRowId: orderRowId,\r\n OrderNumber: orderNumber,\r\n SendTo: sendTo,\r\n MessageObject: messageObject,\r\n Message: message,\r\n Lang: lang\r\n }\r\n \r\n return this._api.post(url, params);\r\n }\r\n\r\n getProcessOrderFiles(processId: number, orderId: number) {\r\n\r\n let url = this.mappings.Web_Api_Get_Client_Area_Proccess_Order_File;\r\n var params = {\r\n ProcessId: processId,\r\n OrderId: orderId\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n\r\n cancelOrders(userId:string, orderId:number) {\r\n let url = this.mappings.Web_Api_Post_Cancel_Order.replace('{userId}', userId).replace('{orderId}', orderId.toString());\r\n return this._api.post(url);\r\n }\r\n\r\n updateBonificoPaymentDetails(orderId: number, numeroCro: string, numeroTrn: string) {\r\n let url = this.mappings.Web_Api_Get_Client_Area_Update_Bonifico_Payment\r\n var params = {\r\n IdOrder: orderId,\r\n numeroCro: numeroCro,\r\n numeroTrn: numeroTrn\r\n }\r\n return this._api.post(url,params);\r\n }\r\n\r\n getBonificoUploadedFiles(orderId) {\r\n let url = this.mappings.Web_Api_Post_Get_Bonifico_Uploaded_Files;\r\n var params = {\r\n OrderId: orderId\r\n }\r\n\r\n return this._api.post(url, params);\r\n }\r\n}\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/settings/client-area.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings } from '../../shared/mapping';\r\nimport { LanguageService } from \"../cms/language.service\";\r\nimport { AuthService } from \"../core/auth.service\";\r\nimport { ShoppingCartService } from \"../inventory/shopping-cart.service\";\r\n\r\nimport { UserLogin } from \"./../../models/cms/user-login\";\r\nimport { CurrencyService } from \"./currency.service\";\r\n\r\n\r\n@Injectable()\r\nexport class CmsComponentService \r\n{\r\n constructor\r\n (\r\n public _api: ApiService,\r\n private mappings: Mappings,\r\n private language: LanguageService,\r\n private authService: AuthService,\r\n private cartService: ShoppingCartService,\r\n private currencyService: CurrencyService,\r\n ) {}\r\n\r\n getHeaderData() \r\n {\r\n //reading language\r\n let longLang: string = this.language.getLongLang();\r\n\r\n //reading userId\r\n let userId:string = this.authService.getCurrentUserId();\r\n\r\n let curr = this.currencyService.getCurrency();\r\n\r\n //reading cartId\r\n let cartId: string = this.cartService.getCartId();\r\n cartId = encodeURIComponent(cartId);\r\n \r\n let url: string = this.mappings.Web_Api_Get_Header_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', userId)\r\n .replace('{cartid}', cartId)\r\n .replace('{currency}', curr);\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n\r\n getSideMenuData() \r\n {\r\n //Reading language\r\n let longLang: string = this.language.getLongLang();\r\n\r\n let url: string = this.mappings.Web_Api_Get_Side_Menu_Data\r\n .replace('{lang}', longLang);\r\n\r\n //Sending request to the server\r\n return this._api.get(url);\r\n }\r\n\r\n getHomePageDataOptimized() \r\n {\r\n //Reading language\r\n let longLang: string = this.language.getLongLang();\r\n\r\n //reading userId\r\n let userId:string = this.authService.getCurrentUserId();\r\n\r\n //reading cartId\r\n let cartId: string = this.cartService.getCartId();\r\n\r\n //reading currency\r\n let curr = this.currencyService.getCurrency();\r\n \r\n cartId = encodeURIComponent(cartId); \r\n\r\n let url: string = this.mappings.Web_Api_Get_Home_Page_Data_Optimized\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', userId)\r\n .replace('{cartid}', cartId)\r\n .replace('{currency}', curr);\r\n\r\n //Sending request to the server\r\n return this._api.get(url);\r\n }\r\n\r\n getproductHilightpromo() \r\n {\r\n //Reading language\r\n let longLang: string = this.language.getLongLang();\r\n\r\n let url: string = this.mappings.Web_Api_Get_Home_HilightPromoProduct\r\n .replace('{lang}', longLang);\r\n\r\n //Sending request to the server\r\n return this._api.get(url);\r\n }\r\n\r\n getSeoData() \r\n {\r\n //Reading language\r\n let longLang: string = this.language.getLongLang();\r\n let url: string = this.mappings.Web_Api_Get_Seo_Data.replace('{lang}', longLang);\r\n\r\n //Sending request to the server\r\n return this._api.get(url);\r\n }\r\n \r\n\r\n getSliderData(type: string, id: string) \r\n {\r\n //Reading language\r\n let longLang: string = this.language.getLongLang();\r\n\r\n let url: string = this.mappings.Web_Api_Get_Slider_Data\r\n .replace('{lang}', longLang)\r\n .replace('{id}', id)\r\n .replace('{type}', type);\r\n\r\n //Sending request to the server\r\n return this._api.get(url);\r\n }\r\n\r\n getFooterData() \r\n {\r\n //reading language\r\n let longLang: string = this.language.getLongLang();\r\n\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url: string = this.mappings.Web_Api_Get_Footer_Data\r\n .replace('{lang}', longLang)\r\n .replace('{currency}', curr);\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getShoppingCartData() \r\n {\r\n //reading language\r\n let longLang: string = this.language.getLongLang();\r\n\r\n //reading userId\r\n let userInfo: UserLogin = this.authService.GetData();\r\n let userId;\r\n if (userInfo != null) \r\n {\r\n userId = this.authService.GetUserId();\r\n }\r\n\r\n //reading cartId\r\n let cartId: string = this.cartService.getCartId();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url: string = this.mappings.Web_Api_Get_Shopping_Cart_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', userId.toString())\r\n .replace('{cartid}', cartId)\r\n .replace('{currency}', curr);\r\n\r\n return this._api.getUniversalCached(url);\r\n }\r\n\r\n\r\n getShoppingCartCashData() \r\n {\r\n //reading language\r\n let longLang: string = this.language.getLongLang();\r\n\r\n //reading userId\r\n let userInfo: UserLogin = this.authService.GetData();\r\n let userId;\r\n\r\n if (userInfo != null) \r\n {\r\n userId = this.authService.GetUserId();\r\n }\r\n\r\n //reading cartId\r\n let cartId: string = this.cartService.getCartId();\r\n let curr = this.currencyService.getCurrency();\r\n\r\n let url: string = this.mappings.Web_Api_Get_Shopping_Cart_Cash_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', userId.toString())\r\n .replace('{cartid}', cartId.toString())\r\n .replace('{currency}', curr);\r\n\r\n return this._api.getUniversalCached(url);\r\n }\r\n\r\n getShoppingCartSubmittedData(orderId: string) \r\n {\r\n //reading language\r\n let longLang: string = this.language.getLongLang();\r\n\r\n //reading userId\r\n let userInfo: UserLogin = this.authService.GetData();\r\n let userId;\r\n\r\n if (userInfo != null) \r\n {\r\n userId = this.authService.GetUserId();\r\n }\r\n\r\n let curr = this.currencyService.getCurrency();\r\n let cartId = this.cartService.getCartId();\r\n let url: string = this.mappings.Web_Api_Get_Shopping_Cart_Submitted_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}', userId.toString())\r\n .replace('{orderid}', orderId.toString())\r\n .replace('{currency}', curr)\r\n .replace(\"{cartid}\", cartId);\r\n\r\n return this._api.getUniversalCached(url);\r\n }\r\n\r\n getOtherProductData(productId: string, userId: string) \r\n {\r\n //reading language\r\n let longLang: string = this.language.getLongLang();\r\n \r\n let url: string = this.mappings.Web_Api_Get_Other_Product_Form_Data\r\n .replace('{lang}', longLang)\r\n .replace('{productid}', productId)\r\n .replace('{userId}', userId)\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getOfflinePageData() \r\n {\r\n //Reading language\r\n let longLang: string = this.language.getLongLang();\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n\r\n let url: string = this.mappings.Web_Api_Get_Offline_Page_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}',customerId)\r\n \t .replace('{cartid}', cartId);\r\n\r\n //Sending request to the server\r\n return this._api.get(url);\r\n }\r\n\r\n getLoginPageData()\r\n {\r\n //Reading language\r\n let longLang: string = this.language.getLongLang();\r\n let customerId = this.authService.GetUserId();\r\n let cartId = this.cartService.getCartId();\r\n \r\n let url: string = this.mappings.Web_Api_Get_Login_Page_Data\r\n .replace('{lang}', longLang)\r\n .replace('{userid}',customerId)\r\n \t .replace('{cartid}', cartId);\r\n\r\n //Sending request to the server\r\n return this._api.get(url);\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/cms-component.service.ts","import { Injectable } from '@angular/core';\r\nimport { Observable } from 'rxjs/Observable';\r\nimport 'rxjs/add/observable/of';\r\nimport 'rxjs/add/operator/do';\r\nimport 'rxjs/add/operator/share';\r\n\r\nimport { CacheService } from '../core/cache.service';\r\nimport { ApiService } from '../core/api.service';\r\nimport { Mappings} from '../../shared/mapping';\r\nimport { LanguageService } from \"./language.service\";\r\n\r\n@Injectable()\r\nexport class NewsletterService \r\n{\r\n constructor\r\n (\r\n public _api: ApiService, \r\n public _cache: CacheService,\r\n private languageService: LanguageService,\r\n private mappings: Mappings\r\n ) {}\r\n\r\n //getting language\r\n lang = this.languageService.getLongLang();\r\n\r\n newsletterSubscribe(email: string) \r\n {\r\n let url = this.mappings.Web_Api_Post_Newsletter_Subscribe.replace('{email}', email).replace('{lang}', this.lang);\r\n\r\n return this._api.get(url);\r\n }\r\n\r\n getNewsletterPageData()\r\n {\r\n let url = this.mappings.Web_Api_Get_Newsletter_Page_Data.replace('{lang}', this.lang);\r\n\r\n return this._api.get(url);\r\n }\r\n \r\n getNewsletterConfirmationPageData()\r\n {\r\n let url = this.mappings.Web_Api_Get_Newsletter_Confirmation_Page_Data.replace('{lang}', this.lang);\r\n\r\n return this._api.get(url)\r\n }\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/cms/newsletter.service.ts","export * from './cookie.service';\r\nexport * from './cookie-browser.service';\r\nexport * from './cookie-node.service';\r\nexport * from './cookie-options';\r\nexport * from './cookie-options-args';\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/services/core/cookie/index.ts","import { TrustpilotService } from './../services/cms/trustpilot.service';\r\nimport { NgModule, ModuleWithProviders } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RouterModule } from '@angular/router';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\nimport { ApiService } from '../services/core/api.service';\r\nimport { ModelService } from './model/model.service';\r\n\r\nimport { ComponentHelperService } from '../services/core/component-helper.service';\r\nimport { TemplateService } from '../services/settings/template.service';\r\nimport { CmsContentService } from '../services/cms/cms-content.service';\r\nimport { CompanyService } from '../services/core/company.service';\r\nimport { ArticleService } from '../services/cms/article.service';\r\nimport { CmsMenuListService } from '../services/cms/cms-menu-list.service';\r\nimport { FaqListService } from '../services/cms/faq.service';\r\nimport { NewsletterService } from '../services/cms/newsletter.service';\r\nimport { SliderService } from '../services/cms/slider.service';\r\nimport { InfoRequestService } from '../services/cms/info-request.service';\r\nimport { LoginService } from '../services/cms/login.service';\r\nimport { RecoverPasswordService } from '../services/cms/recover-password.service';\r\nimport { RegisterService } from '../services/cms/register.service';\r\nimport { LocalStorageService } from '../services/core/local-storage';\r\nimport { QuotingService } from '../services/document/quoting.service';\r\nimport { CategoryService } from '../services/inventory/category.service';\r\nimport { ProductService } from '../services/inventory/product.service';\r\nimport { ShoppingCartService } from '../services/inventory/shopping-cart.service';\r\nimport { ClientAreaService } from '../services/settings/client-area.service';\r\nimport { AuthService } from '../services/core/auth.service';\r\nimport { LanguageService } from '../services/cms/language.service';\r\nimport { ConfigurationService } from '../services/core/configuration.service';\r\nimport { CmsComponentService } from '../services/cms/cms-component.service';\r\nimport { SeoService } from '../services/core/seo.service';\r\nimport { PrivacyPolicyService } from '../services/core/privacy-policy.service';\r\nimport { CookiePolicyService } from '../services/core/cookie-policy.service';\r\nimport { PurchaseConditionService } from '../services/core/purchase-condition.service';\r\nimport { BootboxService } from '../services/core/bootbox.service';\r\nimport { LoadingOverlayService } from '../services/core/loading-overlay.service';\r\nimport { ScriptService } from '../services/cms/script.service';\r\nimport { HelperService } from '../services/core/helper.service';\r\nimport { OrderPaymentService } from \"../services/cms/order-payment.service\";\r\nimport { CurrencyService } from \"../services/cms/currency.service\";\r\nimport { MessagesService } from \"../services/core/messages.service\";\r\nimport { ApplicationService } from '../services/core/application.service';\r\nimport { SearchService } from '../services/inventory/search.service';\r\nimport { BreadcrumbsService } from '../services/cms/breadcrumbs.service';\r\nimport { ValidationService } from '../services/core/validation.service';\r\nimport { CheckIfExistService } from '../services/cms/check-existence.service';\r\n\r\n//Components \r\nimport { HeaderComponent } from '../components/cms/header/widget/header.component';\r\nimport { FooterComponent } from '../components/cms/footer/widget/footer.component';\r\nimport { ArticleCategoryComponent } from '../components/cms/article/sys/article-category.component';\r\nimport { BlogPageComponent } from '../components/cms/article/sys/blog-page.component';\r\nimport { ArticleComponent } from '../components/cms/article/sys/news-page.component';\r\nimport { NewsListComponent } from '../components/cms/article/widget/news-list.component';\r\nimport { SideBarMenuComponent } from '../components/cms/homepage/widget/side-bar-menu.component';\r\nimport { NewsletterComponent } from '../components/cms/footer/widget/newsletter.component';\r\nimport { QuotingMainComponent } from '../components/document/widget/quoting/quoting-main.component';\r\nimport { WizardCommercialeComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-commerciale.component';\r\nimport { WizardEditoriaComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-editoria.component';\r\nimport { WizardAdesiviComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-adesivi.component';\r\nimport { WizardBannerComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-banner.component';\r\nimport { WizardBusteComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-buste.component';\r\nimport { WizardEtichetteComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-etichette.component';\r\nimport { WizardStampaComponent } from '../components/document/widget/quoting/wizard/form/wizard-form-stampa.component';\r\nimport { OtherProductFormComponent } from '../components/document/widget/quoting/other-product-form.component';\r\nimport { QuotingOrderTotalsComponent } from '../components/document/widget/quoting-result/wizard/widget/quoting-order-totals.component';\r\nimport { RegisterComponent } from '../components/settings/user/sys/register.component';\r\nimport { CookiePolicyComponent } from '../components/cms/page/sys/cookie-policy.component';\r\nimport { FaqComponent } from '../components/cms/page/sys/faq.component';\r\nimport { InfoRequestComponent } from '../components/cms/page/sys/info-request.component';\r\nimport { PrivacyPolicyComponent } from '../components/cms/page/sys/privacy-policy.component';\r\nimport { PurchaseConditionComponent } from '../components/cms/page/sys/purchase-condition.component';\r\nimport { CartEmptyPageComponent } from '../components/core/sys/cart-empty-page.component';\r\nimport { ClientAreaOrderListComponent } from '../components/document/sys/client-area-order-list.component';\r\nimport { OtherProductComponent } from '../components/inventory/product/sys/other-product.component';\r\nimport { PromotionsComponent } from '../components/inventory/product/sys/promotions.component';\r\nimport { UserLoginComponent } from '../components/settings/user/sys/user-login.component';\r\nimport { UserPasswordComponent } from '../components/settings/user/sys/user-password.component';\r\nimport { CartComponent } from '../components/inventory/shopping-cart/sys/cart.component';\r\nimport { ClientAreaHomeComponent } from '../components/settings/client-area/sys/client-area-home.component';\r\nimport { ClientAreaProfileComponent } from '../components/settings/client-area/sys/client-area-profile.component';\r\nimport { CartCashComponent } from '../components/inventory/shopping-cart/sys/cart-cash.component';\r\nimport { CartSubmittedComponent } from '../components/inventory/shopping-cart/sys/cart-submitted.component';\r\nimport { SliderWidgetComponent } from '../components/core/widget/slider-widget.component';\r\nimport { ClientAreaOrderDetailsComponent } from '../components/settings/client-area/sys/client-area-order-details.component';\r\nimport { OfflinePageComponent } from '../components/core/sys/offline-page.component';\r\nimport { NotFoundPageComponent } from '../components/core/sys/not-found-page.component';\r\nimport { RegistrationConfirmationComponent } from \"../components/settings/user/sys/registration-confirmation.component\";\r\nimport { PaymentConfirmationComponent } from \"../components/settings/client-area/sys/payment-confirmation.component\";\r\nimport { PaymentUnicreditConfirmationComponent } from \"../components/settings/client-area/sys/payment-unicredit-confirmation.component\";\r\nimport { PaymentNexiConfirmationComponent } from \"../components/settings/client-area/sys/payment-nexi-confirmation.component\";\r\nimport { Ng2TableModule} from 'ng2-table/ng2-table';\r\nimport { Mappings } from './mapping';\r\nimport { DatepickerModule } from 'angular2-material-datepicker';\r\nimport { Ng2Bs3ModalModule } from 'ng2-bs3-modal/ng2-bs3-modal';\r\nimport { CryptoService } from '../services/core/crypto.service';\r\nimport { SearchComponent } from '../components/cms/header/widget/search.component';\r\nimport { ClientAreaInvoicesComponent } from '../components/settings/client-area/sys/client-area-invoices.component';\r\nimport { NewsletterPageComponent } from './../components/cms/page/sys/newsletter-page.component';\r\nimport { NewsletterConfirmationPageComponent } from './../components/cms/page/sys/newsletter-confirmation-page.component';\r\nimport { RegistrationConfirmationPageComponent } from './../components/settings/user/sys/registration-complete.component';\r\nimport { CustomersCanvasService } from './../services/inventory/customerscanvas.service';\r\nimport { CanvasWidgetComponent } from '../components/core/widget/canvas-widget.components';\r\nimport { PaypalService } from '../services/core/paypal.service';\r\nimport { QuickRegistrationComponent } from '../components/settings/user/sys/quick-registration.component';\r\nimport { TrustpilotWidgetComponent } from '../components/core/widget/trustpilot-widget.component';\r\nimport { HeaderService } from '../services/cms/header.service';\r\n\r\nconst MODULES = [\r\n // Do NOT include UniversalModule, HttpModule, or JsonpModule here\r\n CommonModule,\r\n RouterModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n TranslateModule,\r\n Ng2TableModule,\r\n DatepickerModule,\r\n Ng2Bs3ModalModule,\r\n ];\r\n\r\nconst PIPES = [\r\n // put pipes here\r\n];\r\n\r\nconst COMPONENTS = [\r\n // put shared components here\r\n HeaderComponent,\r\n FooterComponent,\r\n ArticleCategoryComponent,\r\n BlogPageComponent,\r\n ArticleComponent,\r\n NewsListComponent,\r\n SideBarMenuComponent,\r\n NewsletterComponent,\r\n QuotingMainComponent,\r\n WizardCommercialeComponent,\r\n WizardEditoriaComponent,\r\n WizardAdesiviComponent,\r\n WizardBannerComponent,\r\n WizardBusteComponent,\r\n WizardEtichetteComponent,\r\n WizardStampaComponent,\r\n OtherProductFormComponent,\r\n QuotingOrderTotalsComponent,\r\n CookiePolicyComponent,\r\n FaqComponent,\r\n InfoRequestComponent,\r\n PrivacyPolicyComponent,\r\n PurchaseConditionComponent,\r\n CartEmptyPageComponent,\r\n ClientAreaOrderListComponent,\r\n ClientAreaInvoicesComponent,\r\n UserLoginComponent,\r\n UserPasswordComponent,\r\n CartComponent,\r\n ClientAreaHomeComponent,\r\n ClientAreaProfileComponent,\r\n CartCashComponent,\r\n CartSubmittedComponent,\r\n SliderWidgetComponent,\r\n ClientAreaOrderDetailsComponent,\r\n RegistrationConfirmationComponent,\r\n PaymentConfirmationComponent,\r\n PaymentUnicreditConfirmationComponent,\r\n PaymentNexiConfirmationComponent,\r\n OfflinePageComponent,\r\n NotFoundPageComponent,\r\n SearchComponent,\r\n NewsletterPageComponent,\r\n NewsletterConfirmationPageComponent,\r\n RegistrationConfirmationPageComponent,\r\n CanvasWidgetComponent,\r\n QuickRegistrationComponent,\r\n TrustpilotWidgetComponent\r\n];\r\n\r\nconst PROVIDERS = [\r\n ModelService,\r\n ApiService,\r\n ComponentHelperService,\r\n TemplateService,\r\n CmsContentService,\r\n CompanyService,\r\n ArticleService,\r\n CmsMenuListService,\r\n FaqListService,\r\n NewsletterService,\r\n SliderService,\r\n InfoRequestService,\r\n LoginService,\r\n RecoverPasswordService,\r\n RegisterService,\r\n LocalStorageService,\r\n QuotingService,\r\n CategoryService,\r\n ProductService,\r\n ShoppingCartService,\r\n ClientAreaService,\r\n AuthService,\r\n LanguageService,\r\n ConfigurationService,\r\n ApplicationService,\r\n Mappings,\r\n CmsComponentService,\r\n SeoService,\r\n PrivacyPolicyService,\r\n CookiePolicyService,\r\n PurchaseConditionService,\r\n BootboxService,\r\n LoadingOverlayService,\r\n MessagesService,\r\n CheckIfExistService,\r\n OrderPaymentService,\r\n ScriptService,\r\n HelperService,\r\n CurrencyService,\r\n CryptoService,\r\n SearchService,\r\n BreadcrumbsService,\r\n ValidationService,\r\n CustomersCanvasService,\r\n PaypalService,\r\n TrustpilotService,\r\n HeaderService\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n ...MODULES\r\n ],\r\n declarations: [\r\n ...PIPES,\r\n ...COMPONENTS\r\n ],\r\n exports: [\r\n ...MODULES,\r\n ...PIPES,\r\n ...COMPONENTS\r\n ]\r\n})\r\nexport class SharedModule {\r\n static forRoot(): ModuleWithProviders {\r\n return {\r\n ngModule: SharedModule,\r\n providers: [\r\n ...PROVIDERS\r\n ]\r\n };\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/shared/shared.module.ts","// the polyfills must be the first thing imported\r\nimport 'angular2-universal-polyfills';\r\nimport 'ts-helpers';\r\nimport './__workaround.browser'; // temporary until 2.1.1 things are patched in Core\r\n\r\n// Angular 2\r\nimport { enableProdMode } from '@angular/core';\r\nimport { platformUniversalDynamic } from 'angular2-universal/browser';\r\nimport { bootloader } from '@angularclass/bootloader';\r\n\r\nimport { load as loadWebFont } from 'webfontloader';\r\n\r\n// enable prod for faster renders\r\nenableProdMode();\r\n\r\nimport { MainModule } from './browser.module';\r\n\r\nexport const platformRef = platformUniversalDynamic();\r\n\r\n// on document ready bootstrap Angular 2\r\nexport function main() {\r\n // Load fonts async\r\n // https://github.com/typekit/webfontloader#configuration\r\n loadWebFont({\r\n google: {\r\n families: ['Droid Sans']\r\n }\r\n });\r\n\r\n return platformRef.bootstrapModule(MainModule);\r\n}\r\n\r\n// support async tag or hmr\r\nbootloader(main);\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/client.prod.ts","//Angular\r\nimport { Injectable } from '@angular/core';\r\nimport { ApplicationService } from '../services/core/application.service';\r\n\r\n@Injectable()\r\nexport class Mappings {\r\n /* base urls */\r\n public Web_Api_Base_Url: string = this.application.config.apiUrl;\r\n\r\n /* Google key for map */\r\n public Google_Maps_Key = \"AIzaSyBXymPQfgG39aceYOuzkdVynFoFRf3lMKc\";\r\n\r\n constructor(private application: ApplicationService) {\r\n }\r\n\r\n /* web api urls */\r\n static Web_Api_Get_Token_Url: string = \"/token\";\r\n public Web_Api_Get_Token_Url: string = this.Web_Api_Base_Url + \"/token\";\r\n public Web_Api_Menu_GetCmsPageByUrl = this.Web_Api_Base_Url + \"/menu/getcmspagebyurl/{customerid}/{lang}/{cartid}/{url}\";\r\n public Web_Api_Menu_GetCmsPageById = this.Web_Api_Base_Url + \"/menu/getcmsmenu/{customerid}/{lang}/{id}/{cartid}\";\r\n public Web_Api_Get_Template_Url = this.Web_Api_Base_Url + \"/template/getTemplateHtml/{type}/{lang}\";\r\n public Web_Api_Get_Default_Company = this.Web_Api_Base_Url + \"/company/getdefault\";\r\n public Web_Api_Get_Article_List = this.Web_Api_Base_Url + \"/article/getarticlelist/{category}/{listtype}/{lang}\";\r\n public Web_Api_Get_News_Details = this.Web_Api_Base_Url + \"/article/getarticledetailsbyid/{lang}/{id}/{userid}/{cartid}\";\r\n public Web_Api_Get_Article_By_Url = this.Web_Api_Base_Url + \"/article/getarticledetailsbyseourl/{lang}/{userid}/{cartid}/{seoUrl}\";\r\n public Web_Api_Get_Article_Category_By_Id = this.Web_Api_Base_Url + \"/article/getcategorybyid/{categoryId}/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid}\";\r\n public Web_Api_Get_Article_Category_By_Url = this.Web_Api_Base_Url + \"/article/getcategorybyurl/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid/{categoryUrl}}\";\r\n public Web_Api_Get_Article_List_Category = this.Web_Api_Base_Url + \"/article/getarticlelistcategory/{lang}\";\r\n public Web_Api_Get_Article_By_Category_Id = this.Web_Api_Base_Url + \"/article/getarticledetailsbycategoryid/{categoryId}/{lang}/{startRowIndex}/{maxRows}\";\r\n public Web_Api_Get_Blog_Data = this.Web_Api_Base_Url + \"/article/getblogdata/{lang}/{startRowIndex}/{maxRows}/{userid}/{cartid}\";\r\n public Web_Api_Get_Cms_Menu_List = this.Web_Api_Base_Url + \"/menu/getcmsmenus/{id}/{lang}\";\r\n public Web_Api_Get_FaqData = this.Web_Api_Base_Url + \"/article/getfaqdata/{lang}/{userid}/{cartid}\";\r\n public Web_Api_Post_Newsletter_Subscribe = this.Web_Api_Base_Url + \"/newsletter/subscribe/{email}/{lang}\";\r\n public Web_Api_Get_Newsletter_Page_Data = this.Web_Api_Base_Url + \"/newsletter/pagedata/{lang}\";\r\n public Web_Api_Get_Newsletter_Confirmation_Page_Data = this.Web_Api_Base_Url + \"/newsletter/confirmationpage/{lang}\"; \r\n public Web_Api_Get_Wizard_Data_Address = this.Web_Api_Base_Url + \"/quoting/getwizarddata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n public Web_Api_Get_Category_Details = this.Web_Api_Base_Url + \"/inventory/getcategory/{categoryId}/{lang}/{customerid}/{currency}/{cartid}\";\r\n public Web_Api_Get_Catalog_Categories_Data = this.Web_Api_Base_Url + \"/inventory/getcatalogcategoriesdata/{lang}/{currency}/{userid}/{cartid}\";\r\n public Web_Api_Get_Catalog_Categories_Price_Data = this.Web_Api_Base_Url + \"/inventory/getcategorypricedata/{categoryId}/{customerid}/{lang}/{currency}\"; \r\n public Web_Api_Get_Category_By_Url = this.Web_Api_Base_Url + \"/inventory/getcategorybyseourl/{lang}/{customerid}/{currency}/{cartid}/{seoUrl}\";\r\n public Web_Api_Post_Send_Category_Info_Request = this.Web_Api_Base_Url + \"/inventory/getcategoryinfo\";\r\n public Web_Api_Get_Product_Details = this.Web_Api_Base_Url + \"/inventory/getproduct/{productType}/{productId}/{lang}/{customerid}/{currency}/{cartid}\";\r\n public Web_Api_Get_Price_Data = this.Web_Api_Base_Url + \"/inventory/getproductpricedata/{productId}/{lang}/{customerid}/{currency}\"; \r\n public Web_Api_Get_Products_In_Promotion_Data = this.Web_Api_Base_Url + \"/inventory/getproductsinpromotiondata/{lang}/{currency}/{userid}/{cartid}\";\r\n public Web_Api_Get_Product_By_Url = this.Web_Api_Base_Url + \"/inventory/getproductbyseourl/{lang}/{customerid}/{currency}/{cartid}/{seoUrl}\";\r\n public Web_Api_Post_Send_Info_Request = this.Web_Api_Base_Url + \"/info/contactrequest\";\r\n public Web_Api_Post_Send_Login_Request = this.Web_Api_Base_Url + \"/account/login\";\r\n public Web_Api_Post_User_Authentification = this.Web_Api_Base_Url + \"/account/authentificateuser\";\r\n public Web_Api_Recover_Password = this.Web_Api_Base_Url + \"/account/passwordrequest\";\r\n public Web_Api_Get_Recover_Password_Data = this.Web_Api_Base_Url + \"/account/getrecoverpassworddata/{lang}/{userid}/{cartid}\";\r\n public Web_Api_Post_Register = this.Web_Api_Base_Url + \"/account/register\";\r\n public Web_Api_Get_Register_Data = this.Web_Api_Base_Url + \"/account/registerdata/{lang}/{userid}/{cartid}\";\r\n public Web_Api_Get_Registration_Complete_Page_Data = this.Web_Api_Base_Url + \"/registration/confirmationpage/{lang}/{userid}/{cartid}\";\r\n public Web_Api_Post_Confirm_Registration = this.Web_Api_Base_Url + \"/account/activate/{id}\";\r\n public Web_Api_Get_Save_Cart = this.Web_Api_Base_Url + \"/cart/postsavecartinfo/{userId}/{cartId}/{paymentId}/{shipmentId}\";\r\n public Web_Api_Set_Cart_Voucher = this.Web_Api_Base_Url + \"/cart/setvoucher\";\r\n public Web_Api_Set_Job_Name = this.Web_Api_Base_Url + \"/cart/setcartjobname\";\r\n public Web_Api_Set_Cart_Address = this.Web_Api_Base_Url + \"/cart/setcartaddress\";\r\n public Web_Api_Post_Cart_Confirm_Order = this.Web_Api_Base_Url + \"/cart/confirmorder\";\r\n public Web_Api_Get_Cart_Payment_Shipment = this.Web_Api_Base_Url + \"/cart/getcartpaymentshipment/{userId}/{cartId}/{lang}/{currency}\";\r\n public Web_Api_Get_Client_Area_Details = this.Web_Api_Base_Url + \"/clientarea/getdetails/{id}/{lang}/{cartid}\";\r\n public Web_Api_Get_Client_Area_User_Profile = this.Web_Api_Base_Url + \"/clientarea/getuserprofile/{userId}/{lang}/{cartid}\";\r\n public Web_Api_Post_Client_Area_Add_New_Address = this.Web_Api_Base_Url + \"/clientarea/adduseraddress\";\r\n public Web_Api_Post_Client_Area_Update_User_Password = this.Web_Api_Base_Url + \"/clientarea/updateuserpassword\";\r\n public Web_Api_Post_Client_Area_Update_User_Profile = this.Web_Api_Base_Url + \"/clientarea/updateuserprofile\";\r\n public Web_Api_Post_Client_Area_Update_User_Address = this.Web_Api_Base_Url + \"/clientarea/updateuseraddresses\";\r\n public Web_Api_Post_Client_Area_Remove_Address = this.Web_Api_Base_Url + \"/clientarea/removeuseraddress\";\r\n public Web_Api_Get_Client_Area_Order_Details = this.Web_Api_Base_Url + \"/clientarea/getorderdetails/{userId}/{orderId}/{lang}/{currency}/{cartid}\";\r\n public Web_Api_Get_Client_Area_Order_List = this.Web_Api_Base_Url + \"/clientarea/getorderlist/{userId}/{dateFrom}/{dateTo}/{orderNumber}/{orderStatus}/{lang}/{currency}/{cartid}\";\r\n public Web_Api_Get_Client_Area_Invoices = this.Web_Api_Base_Url + \"/clientarea/getinvoiceslist/{userId}/{orderNumber}/{invoiceNumber}/{documentType}/{lang}/{currency}/{cartid}\";\r\n public Web_Api_Get_Client_Area_Order_Send_Message = this.Web_Api_Base_Url + \"/clientarea/postsendprocessordermessage\";\r\n public Web_Api_Get_Client_Area_Proccess_Order_File = this.Web_Api_Base_Url + \"/clientarea/getorderprocessfiles\";\r\n public Web_Api_Get_Client_Area_Update_Bonifico_Payment = this.Web_Api_Base_Url + \"/clientarea/updatebonificopaymentdetails\";\r\n public Web_Api_Get_Configuration = this.Web_Api_Base_Url + \"/config/getconfiguration/{lang}\";\r\n public Web_Api_Get_Routes = this.Web_Api_Base_Url + \"/config/getroutes/{lang}\";\r\n public Web_Api_Get_Header_Data = this.Web_Api_Base_Url + \"/cms/getheaderdata/{lang}/{userid}/{cartid}/{currency}\";\r\n public Web_Api_Get_Footer_Data = this.Web_Api_Base_Url + \"/cms/getfooterdata/{lang}/{currency}\";\r\n public Web_Api_Get_Side_Menu_Data = this.Web_Api_Base_Url + \"/cms/getsidemenudata/{lang}\";\r\n public Web_Api_Get_Home_Page_Data = this.Web_Api_Base_Url + \"/cms/gethomepagedata/{lang}\";\r\n public Web_Api_Get_Home_Page_Data_Optimized = this.Web_Api_Base_Url + \"/cms/gethomepagedataoptimized/{lang}/{userid}/{cartid}/{currency}\";\r\n public Web_Api_Get_Home_HilightPromoProduct = this.Web_Api_Base_Url + \"/cms/getproducthilightpromo/{lang}\";\r\n public Web_Api_Get_Info_Request_Data = this.Web_Api_Base_Url + \"/cms/getinforequestdata/{lang}/{userid}/{cartid}\";\r\n public Web_Api_Get_Privacy_Policy_Data = this.Web_Api_Base_Url + \"/privacypolicy/getprivacypolicydata/{lang}/{userid}/{cartid}\";\r\n public Web_Api_Get_Cookie_Policy_Data = this.Web_Api_Base_Url + \"/cookiepolicy/getcookiepolicydata/{lang}/{cartid}/{userid}\";\r\n public Web_Api_Get_Purchase_Condition_Data = this.Web_Api_Base_Url + \"/puchasecondition/puchaseconditiondata/{lang}/{userid}/{cartid}\";\r\n public Web_Api_Get_Slider_Data = this.Web_Api_Base_Url + \"/slider/getsliderdata/{lang}/{id}/{type}\";\r\n public Web_Api_Get_Seo_Data = this.Web_Api_Base_Url + \"/cms/gethomepageseodata/{lang}\";\r\n public Web_Api_Get_Shopping_Cart_Data = this.Web_Api_Base_Url + \"/cms/getcartdata/{userid}/{cartid}/{lang}/{currency}\";\r\n public Web_Api_Get_Shopping_Cart_Cash_Data = this.Web_Api_Base_Url + \"/cms/getcartcashdata/{userid}/{cartid}/{lang}/{currency}\";\r\n public Web_Api_Get_Shopping_Cart_Submitted_Data = this.Web_Api_Base_Url + \"/cms/getcartsubmitteddata/{userid}/{orderid}/{lang}/{currency}/{cartid}\";\r\n public Web_Api_Get_Client_Area_Messages = this.Web_Api_Base_Url + \"/clientarea/setmessagesasread\";\r\n public Web_Api_Add_Static_Product_To_Cart = this.Web_Api_Base_Url + \"/cart/addstaticproducttocart\";\r\n public Web_Api_Add_Static_Product_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addstaticproductscontisticatocart\";\r\n public Web_Api_Add_Matrix_Product_To_Cart = this.Web_Api_Base_Url + \"/cart/addmatrixproducttocart\";\r\n public Web_Api_Get_Offline_Page_Data = this.Web_Api_Base_Url + \"/cms/getofflinepagedata/{lang}/{userid}/{cartid}\";\r\n public Web_Api_Get_Login_Page_Data = this.Web_Api_Base_Url + \"/cms/loginpage/{lang}/{userid}/{cartid}\";\r\n public Web_Api_Set_Cart_Payment = this.Web_Api_Base_Url + \"/cart/setcartpayment\";\r\n public Web_Api_Empty_Cart_Page = this.Web_Api_Base_Url + \"/cart/emptycartpage/{lang}/{userid}/{cartid}\";\r\n public Web_Api_Set_Cart_Shipment = this.Web_Api_Base_Url + \"/cart/setcartshipping\";\r\n public Web_Api_Remove_From_Cart = this.Web_Api_Base_Url + \"/cart/removefromcart\";\r\n public Web_Api_Post_Cancel_Order = this.Web_Api_Base_Url + \"/clientarea/postcancelorder/{userId}/{orderId}\";\r\n public Web_Api_Post_Get_Bonifico_Uploaded_Files = this.Web_Api_Base_Url + \"/clientarea/getorderbonificofiles\";\r\n public Web_Api_Add_Wizard_Calcolato_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardcalcolatoproducttocart\";\r\n public Web_Api_Add_Wizard_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardcalcolatoscontisticaproducttocart\";\r\n public Web_Api_Add_Wizard_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinostandardproducttocart\";\r\n public Web_Api_Add_Wizard_Listino_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinoscontisticaproducttocart\";\r\n public Web_Api_Update_Prev_Canvas_Info = this.Web_Api_Base_Url + \"/cart/updateprevcanvasinfo\";\r\n public Web_Api_Add_Other_Product_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinotocart\";\r\n public Web_Api_Add_Other_Product_Listino_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinoscontisticatocart\";\r\n public Web_Api_Add_Other_Product_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductcalcolatoscontisticatocart\";\r\n public Web_Api_Add_Other_Product_Listino_Calcolato_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinocalcolatotocart\";\r\n public Web_Api_Add_Other_Product_Listino_Calcolato_Scontistica_To_Cart = this.Web_Api_Base_Url + \"/cart/addotherproductlistinocalcolatoscontisticatocart\";\r\n public Web_Api_Get_Other_Product_Form_Data = this.Web_Api_Base_Url + \"/quoting/getotherproductformdata/{lang}/{productid}/{userId}\";\r\n public Web_Api_Get_Script = this.Web_Api_Base_Url + \"/cms/getscript/{rowid}/{type}/{lang}\";\r\n public Web_Api_Get_Wizard_Editoria_Data = this.Web_Api_Base_Url + \"/quoting/getwizardeditoriadata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n public Web_Api_Get_Wizard_Commerciale_Data = this.Web_Api_Base_Url + \"/quoting/getwizardcommercialedata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n public Web_Api_Check_If_Param_Exists_In_Db = this.Web_Api_Base_Url + \"/account/checkifexists/{type}/{value}\";\r\n public Web_Api_Set_Order_As_Payed = this.Web_Api_Base_Url + \"/clientarea/setorderaspaid\";\r\n public Web_Api_Get_Head_Foot_Data = this.Web_Api_Base_Url + \"/template/getheadfootdata/{lang}\";\r\n public Web_Api_Get_Wizard_Etichette_Data = this.Web_Api_Base_Url + \"/quoting/getwizardetichettedata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n public Web_Api_Post_Get_Wizard_Price_Estimation = this.Web_Api_Base_Url + \"/quoting/getwizardpriceestimation\";\r\n public Web_Api_Post_Send_Request_Info_Wizard = this.Web_Api_Base_Url + \"/quoting/sendrequestinfo\";\r\n public Web_Api_Get_Wizard_Buste_Data = this.Web_Api_Base_Url + \"/quoting/getwizardbustedata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n public Web_Api_Get_Wizard_Adesivi_Data = this.Web_Api_Base_Url + \"/quoting/getwizardadesividata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n public Web_Api_Get_Wizard_Banner_Data = this.Web_Api_Base_Url + \"/quoting/getwizardbannerdata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n public Web_Api_Get_Wizard_Stampa_Data = this.Web_Api_Base_Url + \"/quoting/getwizardstampadata/{modelType}/{resourceId}/{userId}/{lang}\";\r\n public Web_Api_Post_Get_Ap_Price_Estimation = this.Web_Api_Base_Url + \"/quoting/getappriceestimation\";\r\n public Web_Api_Add_Wizard_Buste_Listino_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinobustetocart\";\r\n public Web_Api_Add_Wizard_Buste_Listino_Buste_To_Cart = this.Web_Api_Base_Url + \"/cart/addwizardlistinoscontisticabustetocart\";\r\n public Web_Api_Check_Is_Order_Payed_Unicredit = this.Web_Api_Base_Url + \"/pagonline/verifyunicreditpayment/{orderId}\";\r\n public Web_Api_Get_Product_And_Categories = this.Web_Api_Base_Url + \"/article/getsearchresults/{startRowIndex}/{maxRows}/{lang}/{query}\";\r\n public Web_Api_Get_Script_Head = this.Web_Api_Base_Url + \"/cms/getscripthead/{rowid}/{type}/{lang}\";\r\n public Web_Api_Get_Information_ThankYouPage_Paypal_Url = this.Web_Api_Base_Url + \"/template/getthankyoupagepaypalinfo/{type}/{orderid}/{lang}/{cartid}/{userid}\";\r\n public Web_Api_Get_Information_ThankYouPage_PagOnline_Url = this.Web_Api_Base_Url + \"/pagonline/getthankyoupagepagonlineinfo/{type}/{orderid}/{lang}/{cartid}/{userid}\";\r\n public Web_Api_Get_Information_ThankYouPage_Nexi_Url = this.Web_Api_Base_Url + \"/nexi/getthankyoupagenexiinfo/{type}/{orderid}/{messaggio}/{data}/{orario}/{lang}/{cartid}/{userid}\";\r\n public Web_Api_Get_Template_Url_Page_Not_Found = this.Web_Api_Base_Url + \"/template/getcomponenttemplatepagenotfound/{type}/{lang}/{userid}/{cartid}\";\r\n public Web_Api_Delete_Customers_Canvas_State = \"/api/users/{userId}/states/{stateId}\";\r\n public Web_Api_Create_Paypal_Payment = this.Web_Api_Base_Url + \"/paypal/createpaypalpayment\";\r\n public Web_Api_Execute_Paypal_Payment = this.Web_Api_Base_Url + \"/paypal/executepaypalpayment\";\r\n public Web_Api_Get_Trustpilot_Data = this.Web_Api_Base_Url + \"/gettrustpilotdata/{type}/{lang}\";\r\n public Web_Api_Get_DefaultCurrency = this.Web_Api_Base_Url + \"/config/getdefaultcurrency\";\r\n \r\n public Canvas_Web_Api_Base_Url = \"https://h.customerscanvas.com/Users/{apiKey}/SimplePolygraphy\";\r\n public Paypal_JS_Lirary_Url = \"https://www.paypalobjects.com/api/checkout.js\";\r\n\r\n /* constants */\r\n public Auth_User_Cookie: string = \"Auth_User\";\r\n public WscPrinter_Lang: string = \"WscPrinter_Lang\";\r\n public Default_Lang: string = \"it\";\r\n\r\n /* images */\r\n public Offers_Image_Url: string = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/OFFERTE.jpg\";\r\n public Products_Image_Url: string = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/prodotti.jpg\";\r\n public WizardCheck_Image_Url: string = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/Wizard_Check-icon.png\";\r\n public WizardAlert_Image_Url: string = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/Wizard_Alert-icon.png\";\r\n public UserLoginImg_Url: string = \"http://wscprinter.dynamicsoft.it/angular/global_app/writefolder/img/customer.jpg\";\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/shared/mapping.ts","export class CartInfo {\r\n Id:number;\r\n JobsPrice: string;\r\n TotalAmountBeforeTaxes: string;\r\n Vat: string; \r\n TotalAmountAfterTaxes: string;\r\n \r\n Payment: string;\r\n Shipment: string;\r\n Voucher: string;\r\n VoucherID: string;\r\n Imballo: string;\r\n\r\n Tax: string;\r\n Currency: string;\r\n Products: CartProductModel[];\r\n\r\n CurrentAddress: CartAddressModel;\r\n Addresses: Array;\r\n Payments: Array;\r\n Shipments: Array;\r\n}\r\nexport class CartProductModel {\r\n Id: number;\r\n Delivery: string;\r\n Name: string;\r\n Quantity: number;\r\n\r\n TotalPriceAfterTax: string;\r\n TotalVat: string;\r\n TotalPriceBeforeTax: string;\r\n Description: string;\r\n Image: string;\r\n JobName: string;\r\n isCanvasEdited: boolean;\r\n CanvasStateId: string;\r\n}\r\nexport class CartAddressModel {\r\n Id: number;\r\n Recipient: string;\r\n Address: string;\r\n City: string;\r\n Province: string;\r\n ZipCode: string;\r\n Phone: string;\r\n Mobile: string;\r\n Default: boolean;\r\n Name: string;\r\n CustomerID: string;\r\n Language: string;\r\n AddressNumber: string;\r\n}\r\nexport class CartPaymentModel {\r\n Id: number;\r\n Name: string;\r\n Amount: number;\r\n Description: string;\r\n Selected: boolean;\r\n}\r\nexport class CartShipmentModel {\r\n Id: number;\r\n Name: string;\r\n Amount: number;\r\n Description: string;\r\n Selected: boolean;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/core/cart.ts","export class ClientAreaDetails {\r\n ClientCode: number;\r\n ClientDal: Date;\r\n ClientCategory: string\r\n ClientTopology: string;\r\n AssociatedList: string;\r\n LastOrderNumber: string;\r\n LastOrderDate: Date;\r\n OrdersQueued: number;\r\n OrdersProcessing: number;\r\n CurrentOrders: number;\r\n OrdersCancelled: number;\r\n LastQuoteNumber: string;\r\n LastQuoteDate: Date;\r\n QuotesOnHold: number;\r\n ConfirmedQuotes: number\r\n EstimatedSentOrders: number;\r\n NewNoteOrdersCount: number;\r\n OrderNoteList: ClientAreaOrderNote[];\r\n FormattedDateOrder: string;\r\n FormattedDateQuote: string;\r\n HeaderData: any;\r\n FooterData: any;\r\n}\r\n\r\nexport class ClientAreaOrderNote {\r\n OrderId: number;\r\n UserCreated: string;\r\n DateCreated: string;\r\n OrderName: string;\r\n NoteDescription: string;\r\n}\r\n\r\nexport class ClientAreaUserProfile {\r\n CompanyName: string;\r\n Piva: string;\r\n TaxCode: string;\r\n ContactFirstName: string;\r\n ContactLastName: string;\r\n Address: string;\r\n City: string;\r\n AreaCode: string;\r\n ZipCode: string;\r\n ContactPhone: string;\r\n ContactMobile: string;\r\n UserGroup: number;\r\n DefaultAddressId: number;\r\n Password: string;\r\n Addresses: ClientAreaUserAddress[];\r\n ClientCategory: string;\r\n HeaderData: any;\r\n FooterData: any;\r\n}\r\n\r\nexport class ClientAreaUserAddress {\r\n AddressId: number;\r\n Recipient: string;\r\n Address: string;\r\n City: string;\r\n Province: string;\r\n ZipCode: string;\r\n Phone: string;\r\n Mobile: string;\r\n DefaultAddress: number;\r\n}\r\nexport class ClientAreaOrderDetails {\r\n OrderId: number;\r\n OrderNumber: string;\r\n Status: number;\r\n Price: number;\r\n StringPrice: string;\r\n Payment: number;\r\n Shipment: number;\r\n FileVerification: boolean;\r\n Jobname: string;\r\n OrderDate: Date;\r\n ShippingDeliveryDate: Date;\r\n UserCreated: string;\r\n ReferenceAndQuote: number;\r\n TotalProcesses: number;\r\n Voucher: string;\r\n Processes: number;\r\n AdditionalMode: number;\r\n ShipmentCost: number;\r\n TaxCost: number;\r\n Vat: number;\r\n TotalCost: number;\r\n Name: string;\r\n Piva: string;\r\n TaxCode: string;\r\n Address: string;\r\n ZipCode: string;\r\n City: string;\r\n ContactPhone: string;\r\n Email: string;\r\n ShipingType: string;\r\n Recipient: string;\r\n ShippingAddress: string;\r\n ShipingZipCode: string;\r\n ShipingProvince: string;\r\n ShipingCity: string;\r\n ShipingTelephone: string;\r\n ShipingMobile: string;\r\n PaymentType: string;\r\n PaymentDescription: string;\r\n TotalWeight: number;\r\n CompanyName: string;\r\n OrderNoteList: ClientAreaOrderNote[];\r\n ProcessingOrderList: ClientAreaProcessingOrders[];\r\n OrderProcessMessageList: ClientAreaOrderProcessMessages[];\r\n PdfUrl: string;\r\n Currency: any;\r\n CurrencyCode: string;\r\n GatewayAccount: string;\r\n PaymentDoneUrl: string;\r\n TrackingUrl: string;\r\n GatewayUrl: string;\r\n PaymentStatus: number;\r\n StrTotalBeforeTax: string;\r\n BonificoCro: string;\r\n BonificoTrn: string;\r\n IsNewPaypalIntegration: boolean;\r\n UsePaypalProduction: boolean;\r\n PaypalButtonStyle: PaypalButtonStyleModel;\r\n HeaderData: any;\r\n FooterData: any;\r\n NexiModel: any;\r\n}\r\n\r\nexport class PaypalButtonStyleModel {\r\n PaypalButtonColor: string;\r\n PaypalButtonHeight: string;\r\n PaypalButtonLabel: string;\r\n PaypalButtonShape: string;\r\n PaypalButtonSize: string;\r\n PaypalButtonTagline: boolean;\r\n}\r\n\r\nexport class ClientAreaProcessingOrders {\r\n Id: number;\r\n Jobname: string;\r\n RefererName: string;\r\n Status: number;\r\n FileVerification: boolean;\r\n Details: string;\r\n FileUploadUrl: string;\r\n FileUploadSecuredUrl: any;\r\n PreflightUploadUrl: any;\r\n PreflightUploadSecuredUrl: any;\r\n FileProvider: string;\r\n Files: ClientAreaOrderProcessFile[];\r\n}\r\nexport class ClientAreaOrderProcessMessages {\r\n CreatedBy: string;\r\n Subject: string;\r\n Description: string;\r\n From: number;\r\n StringDateCreated: string;\r\n}\r\n\r\nexport class ClientAreaOrderProcessFile {\r\n FileName: string;\r\n Size: string;\r\n UploadDate: Date;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/../~/angular2-template-loader!./src/+app/models/settings/client-area.ts"],"sourceRoot":""}