{ "version": 3, "sources": ["src/app/components/system-banner/system-banner.model.ts", "src/app/shared/services/markdown-converter.service.ts", "src/app/components/system-banner/system-banner.component.ts", "src/app/components/system-banner/system-banner.component.html"], "sourcesContent": ["/**\n * Copyright (c) 2020-2023 by Bosch.IO GmbH\n *\n * http://www.bosch.io\n * All rights reserved,\n * also regarding any disposal, exploitation, reproduction,\n * editing, distribution, as well as in the event of\n * applications for industrial property rights.\n *\n * This software is the confidential and proprietary information\n * of Bosch.IO GmbH. You shall not disclose\n * such Confidential Information and shall use it only in\n * accordance with the terms of the license agreement you\n * entered into with Bosch.IO.\n */\nexport enum IBannerType {\n 'WARNING' = 'WARNING',\n 'INFO' = 'INFO',\n}\n", "/**\n * Copyright (c) 2020-2023 by Bosch.IO GmbH\n *\n * http://www.bosch.io\n * All rights reserved,\n * also regarding any disposal, exploitation, reproduction,\n * editing, distribution, as well as in the event of\n * applications for industrial property rights.\n *\n * This software is the confidential and proprietary information\n * of Bosch.IO GmbH. You shall not disclose\n * such Confidential Information and shall use it only in\n * accordance with the terms of the license agreement you\n * entered into with Bosch.IO.\n */\nimport { Injectable, SecurityContext } from '@angular/core';\nimport { DomSanitizer } from '@angular/platform-browser';\nimport { marked } from 'marked';\n@Injectable({\n providedIn: 'root',\n})\nexport class MarkdownConverterService {\n constructor(private sanitizer: DomSanitizer) {}\n\n async convertTextToHTML(message: string) {\n const html = await marked(message, {\n async: true,\n gfm: false,\n });\n return this.sanitizer.sanitize(SecurityContext.HTML, html) as string;\n }\n}\n", "/**\n * Copyright (c) 2020-2023 by Bosch.IO GmbH\n *\n * http://www.bosch.io\n * All rights reserved,\n * also regarding any disposal, exploitation, reproduction,\n * editing, distribution, as well as in the event of\n * applications for industrial property rights.\n *\n * This software is the confidential and proprietary information\n * of Bosch.IO GmbH. You shall not disclose\n * such Confidential Information and shall use it only in\n * accordance with the terms of the license agreement you\n * entered into with Bosch.IO.\n */\nimport { CommonModule } from '@angular/common';\nimport {\n Component,\n EventEmitter,\n Input,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MarkdownConverterService } from '../../shared/services/markdown-converter.service';\nimport { IBannerType } from './system-banner.model';\n\n@Component({\n selector: 'app-system-banner',\n standalone: true,\n imports: [CommonModule, FlexLayoutModule],\n templateUrl: './system-banner.component.html',\n styleUrls: ['./system-banner.component.scss'],\n})\nexport class SystemBannerComponent implements OnChanges, OnInit {\n readonly bannerType = IBannerType;\n @Input() message!: string;\n @Input() type!: IBannerType;\n @Input() showCloseButton: boolean = true;\n\n @Output() closed = new EventEmitter();\n _html!: string;\n\n constructor(private markdownConverterService: MarkdownConverterService) {}\n ngOnInit() {\n this.transformTextToHTML(this.message);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (\n 'message' in changes &&\n changes['message'].previousValue !== changes['message'].currentValue\n ) {\n this.transformTextToHTML(changes['message'].currentValue);\n }\n }\n\n async transformTextToHTML(message: string) {\n this._html = await this.markdownConverterService.convertTextToHTML(message);\n }\n\n closeBanner() {\n this.closed.emit(true);\n }\n}\n", "\n \n \n \n \n \n \n \n\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA,IAAYA,cAAZ,yBAAYA,cAAW;AACrBA,EAAAA,aAAA,SAAA,IAAA;AACAA,EAAAA,aAAA,MAAA,IAAA;AAAe,SAFLA;AAGZ,EAHYA,eAAW,CAAA,CAAA;;;ACMvB,IAAaC,2BAAwB,uBAAA;AAA/B,QAAOA,4BAAP,MAAOA,0BAAwB;IACnCC,YAAoBC,WAAuB;AAAvB,WAAAA,YAAAA;IAA0B;IAExCC,kBAAkBC,SAAe;;AACrC,cAAMC,OAAO,MAAMC,OAAOF,SAAS;UACjCG,OAAO;UACPC,KAAK;SACN;AACD,eAAO,KAAKN,UAAUO,SAASC,gBAAgBC,MAAMN,IAAI;MAC3D;;;;qBATWL,2BAAwBY,mBAAAC,YAAA,CAAA;EAAA;;WAA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A;AAWCvD,QAAAI,oBAAA,CAAA;AAAAJ,QAAAK,qBAAA,QAAA6C,IAAA3C,KAAA;AAUAP,QAAAI,oBAAA,CAAA;AAAAJ,QAAAK,qBAAA,QAAA6C,IAAA5B,eAAA;;;mBDCOkC,cAAYC,MAAEC,gBAAgB;IAAAC,QAAA,CAAA,g0CAAA;EAAA,CAAA;AAIpC,MAAO1C,yBAAP;SAAOA;AAAqB,GAAA;", "names": ["IBannerType", "MarkdownConverterService", "constructor", "sanitizer", "convertTextToHTML", "message", "html", "marked", "async", "gfm", "sanitize", "SecurityContext", "HTML", "\u0275\u0275inject", "DomSanitizer", "factory", "\u0275fac", "providedIn", "i0", "\u0275\u0275elementStart", "\u0275\u0275element", "\u0275\u0275elementEnd", "\u0275\u0275advance", "\u0275\u0275property", "ctx_r0", "_html", "\u0275\u0275sanitizeHtml", "\u0275\u0275listener", "SystemBannerComponent_button_3_Template_button_click_0_listener", "\u0275\u0275restoreView", "_r3", "ctx_r2", "\u0275\u0275nextContext", "\u0275\u0275resetView", "closeBanner", "SystemBannerComponent", "constructor", "markdownConverterService", "bannerType", "IBannerType", "showCloseButton", "closed", "EventEmitter", "ngOnInit", "transformTextToHTML", "message", "ngOnChanges", "changes", "previousValue", "currentValue", "convertTextToHTML", "emit", "\u0275\u0275directiveInject", "MarkdownConverterService", "selectors", "inputs", "type", "outputs", "standalone", "features", "\u0275\u0275NgOnChangesFeature", "\u0275\u0275StandaloneFeature", "decls", "vars", "consts", "template", "SystemBannerComponent_Template", "rf", "ctx", "\u0275\u0275template", "SystemBannerComponent_div_2_Template", "SystemBannerComponent_button_3_Template", "\u0275\u0275classMap", "WARNING", "CommonModule", "NgIf", "FlexLayoutModule", "styles"] }