{"version":3,"file":"ajf-core-text.mjs","sources":["../../../projects/core/text/src/text.ts","../../../projects/core/text/src/text.html","../../../projects/core/text/src/text-module.ts","../../../projects/core/text/src/public_api.ts","../../../projects/core/text/src/ajf-core-text.ts"],"sourcesContent":["/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {TranslocoService} from '@ajf/core/transloco';\nimport {\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  Input,\n  ViewEncapsulation,\n} from '@angular/core';\nimport {DomSanitizer, SafeHtml} from '@angular/platform-browser';\n\n/**\n * this component manages the report text\n *\n * @export\n */\n@Component({\n  selector: 'ajf-text',\n  templateUrl: 'text.html',\n  styleUrls: ['text.scss'],\n  encapsulation: ViewEncapsulation.None,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AjfTextComponent {\n  /**\n   * @memberOf TextComponent\n   */\n  private _htmlText: SafeHtml | undefined;\n  @Input()\n  set htmlText(htmlText: string) {\n    // type checking and length checking for instant method\n    const htmlTextToBeTranslate: string =\n      htmlText != null && typeof htmlText === 'string' && htmlText.trim().length > 0\n        ? this._ts.translate(htmlText)\n        : htmlText;\n    this._htmlText = this._domSanitizer.bypassSecurityTrustHtml(htmlTextToBeTranslate);\n    this._cdr.markForCheck();\n  }\n\n  get innerHTML(): SafeHtml | undefined {\n    return this._htmlText;\n  }\n\n  constructor(\n    private _cdr: ChangeDetectorRef,\n    private _domSanitizer: DomSanitizer,\n    private _ts: TranslocoService,\n  ) {}\n}\n","<div class=\"ajf-text-container\" *ngIf=\"innerHTML\" [innerHTML]=\"innerHTML\"></div>\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {AjfTranslocoModule} from '@ajf/core/transloco';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\n\nimport {AjfTextComponent} from './text';\n\n@NgModule({\n  imports: [CommonModule, AjfTranslocoModule],\n  declarations: [AjfTextComponent],\n  exports: [AjfTextComponent],\n})\nexport class AjfTextModule {}\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport * from './text-module';\nexport * from './text';\n","/**\n * Generated bundle index. Do not edit.\n */\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