You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
6.6 KiB

{"ast":null,"code":"import { englishLanguageConstants } from 'src/constants/language/englishLanguageConstants';\nimport { hindiLanguageConstants } from 'src/constants/language/hindiLanguageConstants';\nimport { marathiLanguageConstants } from 'src/constants/language/marathiLanguageConstants';\nimport * as i0 from \"@angular/core\";\nimport * as i1 from \"../footer/footer.service\";\nimport * as i2 from \"src/constants/language/TranslationContentService\";\nimport * as i3 from \"@angular/common\";\n\nfunction HeaderComponent_p_10_Template(rf, ctx) {\n if (rf & 1) {\n const _r3 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"p\", 9);\n i0.ɵɵlistener(\"click\", function HeaderComponent_p_10_Template_p_click_0_listener() {\n i0.ɵɵrestoreView(_r3);\n const ctx_r2 = i0.ɵɵnextContext();\n return ctx_r2.openDropDown();\n });\n i0.ɵɵtext(1);\n i0.ɵɵelement(2, \"img\", 10);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate1(\"| \", ctx_r0.currentLanguage, \" \");\n }\n}\n\nfunction HeaderComponent_div_11_li_2_Template(rf, ctx) {\n if (rf & 1) {\n const _r7 = i0.ɵɵgetCurrentView();\n\n i0.ɵɵelementStart(0, \"li\", 14);\n i0.ɵɵlistener(\"click\", function HeaderComponent_div_11_li_2_Template_li_click_0_listener() {\n const restoredCtx = i0.ɵɵrestoreView(_r7);\n const item_r5 = restoredCtx.$implicit;\n const ctx_r6 = i0.ɵɵnextContext(2);\n return ctx_r6.selectLanguge(item_r5);\n });\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const item_r5 = ctx.$implicit;\n i0.ɵɵadvance(1);\n i0.ɵɵtextInterpolate(item_r5);\n }\n}\n\nfunction HeaderComponent_div_11_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 11);\n i0.ɵɵelementStart(1, \"ul\", 12);\n i0.ɵɵtemplate(2, HeaderComponent_div_11_li_2_Template, 2, 1, \"li\", 13);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"ngForOf\", ctx_r1.languages);\n }\n}\n\nexport let HeaderComponent = /*#__PURE__*/(() => {\n class HeaderComponent {\n constructor(footerService, translationContentService) {\n this.footerService = footerService;\n this.translationContentService = translationContentService;\n this.showEnglish = false;\n this.selectedScreen = '';\n this.languages = ['English', 'Hindi', 'Marathi'];\n this.showDropDownValues = false;\n this.currentLanguage = 'English';\n }\n\n ngOnInit() {\n this.footerService.getSelectedScreen().subscribe(item => {\n this.selectedScreen = item;\n\n if (this.selectedScreen === 'home') {\n this.showEnglish = true;\n } else {\n this.showEnglish = false;\n }\n });\n this.translationContentService.setContent(englishLanguageConstants);\n }\n\n onChange(deviceValue) {\n console.log(deviceValue);\n }\n\n openDropDown() {\n this.showDropDownValues = !this.showDropDownValues;\n }\n\n selectLanguge(item) {\n //console.log(item);\n this.currentLanguage = item;\n this.showDropDownValues = !this.showDropDownValues;\n console.log(this.currentLanguage);\n\n if (this.currentLanguage === 'Hindi') {\n this.translationContentService.setContent(hindiLanguageConstants);\n } else if (this.currentLanguage === 'Marathi') {\n this.translationContentService.setContent(marathiLanguageConstants);\n } else {\n this.translationContentService.setContent(englishLanguageConstants);\n }\n }\n\n }\n\n HeaderComponent.ɵfac = function HeaderComponent_Factory(t) {\n return new (t || HeaderComponent)(i0.ɵɵdirectiveInject(i1.FooterService), i0.ɵɵdirectiveInject(i2.TranslationContentService));\n };\n\n HeaderComponent.ɵcmp = /*@__PURE__*/i0.ɵɵdefineComponent({\n type: HeaderComponent,\n selectors: [[\"app-header\"]],\n decls: 14,\n vars: 2,\n consts: [[\"id\", \"header\"], [1, \"card-flex-row\", \"multi-tabs\"], [1, \"tab\", \"font-header-small\"], [1, \"tab-counter\", \"hot\", \"font-body-xsmall-bold\"], [1, \"txt-content\"], [3, \"click\", 4, \"ngIf\"], [\"class\", \"dropdownParent\", 4, \"ngIf\"], [1, \"flex-0dot5\", \"icon\"], [\"src\", \"assets/images/notification.png\", 1, \"icon\"], [3, \"click\"], [\"src\", \"assets/svg/arrow-down.svg\", 1, \"bike-card-arrow-dropdown\"], [1, \"dropdownParent\"], [1, \"dropdown\"], [\"class\", \"txt-content\", 3, \"click\", 4, \"ngFor\", \"ngForOf\"], [1, \"txt-content\", 3, \"click\"]],\n template: function HeaderComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"header\", 0);\n i0.ɵɵelementStart(1, \"div\", 1);\n i0.ɵɵelementStart(2, \"div\", 2);\n i0.ɵɵelementStart(3, \"span\", 3);\n i0.ɵɵtext(4, \"SA\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(5, \"div\");\n i0.ɵɵelementStart(6, \"p\", 4);\n i0.ɵɵtext(7, \"Hello, Subham\");\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(8, \"p\", 4);\n i0.ɵɵtext(9, \"(113547)| Helpline\");\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(10, HeaderComponent_p_10_Template, 3, 1, \"p\", 5);\n i0.ɵɵtemplate(11, HeaderComponent_div_11_Template, 3, 1, \"div\", 6);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(12, \"div\", 7);\n i0.ɵɵelement(13, \"img\", 8);\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n i0.ɵɵelementEnd();\n }\n\n if (rf & 2) {\n i0.ɵɵadvance(10);\n i0.ɵɵproperty(\"ngIf\", ctx.showEnglish);\n i0.ɵɵadvance(1);\n i0.ɵɵproperty(\"ngIf\", ctx.showDropDownValues);\n }\n },\n directives: [i3.NgIf, i3.NgForOf],\n styles: [\"var[_ngcontent-%COMP%] resource[_ngcontent-%COMP%]{}(function()[_ngcontent-%COMP%] {var __webpack_modules__ = ({561: (function() {throw new Error('Module build failed (from ./node_modules/sass-loader/dist/cjs.js):nSassError: expected \\\":\\\".n \\\\2577n52 \\\\2502 $clr-blackn \\\\2502 ^n \\\\2575n src/styles/variables/colors.scss 52:11 @importn src/styles/variables/index.scss 2:9 @importn src/styles.scss 1:9 @importn src/app/shared/header/header.component.scss 1:9 root stylesheet');})}); var __webpack_exports__ = {}; __webpack_modules__[561](); resource = __webpack_exports__;})()[_ngcontent-%COMP%]{}\"]\n });\n return HeaderComponent;\n})();","map":null,"metadata":{},"sourceType":"module"}