@tilde-nlp/ngx-translate 9.1.49 → 9.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,7 +3,7 @@ import { Optional, Inject, Injectable, inject, signal, Pipe, Component, EventEmi
|
|
|
3
3
|
import * as i5$1 from '@tilde-nlp/ngx-services';
|
|
4
4
|
import { LLMProviders, ResourceService, ResourceType, TextToSpeechService, QuotaType, LLMService, LLMWritingStyle, LLMRephraseUseCase, LLMSummaryUseCase } from '@tilde-nlp/ngx-services';
|
|
5
5
|
import * as i4 from '@tilde-nlp/ngx-common';
|
|
6
|
-
import { SystemService, AlertService, LAST_USED_SYSTEM_LOCAL_STORAGE_KEY, SortHelper, OpenCloseButtonComponent, CloseButtonModule, SortTranslationsModule, OpenCloseButtonModule, LanguageTranslateModule, SortLanguageListPipe, InlineMessageIconPosition, InlineMessageType, InlineMessageModule, AuthHeadersHelper, ConversionHelper, FileExtensionHelper, FileExtensions, NotificationMessageType, FileUploadModule, HtmlHelper, PlausibleHelper, LLMActions, ResolutionHelper,
|
|
6
|
+
import { SystemService, AlertService, LAST_USED_SYSTEM_LOCAL_STORAGE_KEY, SortHelper, OpenCloseButtonComponent, CloseButtonModule, SortTranslationsModule, OpenCloseButtonModule, LanguageTranslateModule, SortLanguageListPipe, InlineMessageIconPosition, InlineMessageType, InlineMessageModule, AuthHeadersHelper, ConversionHelper, FileExtensionHelper, FileExtensions, NotificationMessageType, FileUploadModule, HtmlHelper, PlausibleHelper, LLMActions, ResolutionHelper, ExtensionDialogModule, NewFeatureDialogWrapperComponent, SortTranslationsPipe, FilterWithHighlightPipe, DomainTranslatePipe, FilterWithHighlightModule, ClickOutsideModule, TerminologyModule, SortDomainsPipe, NotificationMessageModule, CompanyProductModule, StatusDisplayModule, ALERT_CONFIGURATION_TOKEN } from '@tilde-nlp/ngx-common';
|
|
7
7
|
import { ReplaySubject, Subject, BehaviorSubject, of, timer, throwError, forkJoin, finalize, takeUntil as takeUntil$1 } from 'rxjs';
|
|
8
8
|
import * as i1 from '@ngx-translate/core';
|
|
9
9
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
@@ -43,9 +43,8 @@ import * as i1$3 from '@angular/cdk/overlay';
|
|
|
43
43
|
import * as i4$3 from '@angular/material/input';
|
|
44
44
|
import { MatInputModule } from '@angular/material/input';
|
|
45
45
|
import { marked } from 'marked';
|
|
46
|
-
import * as i9 from 'keycloak-angular';
|
|
47
|
-
import { KeycloakAngularModule } from 'keycloak-angular';
|
|
48
46
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
47
|
+
import { KeycloakAngularModule } from 'keycloak-angular';
|
|
49
48
|
import * as i5$2 from '@angular/material/expansion';
|
|
50
49
|
import { MatExpansionModule } from '@angular/material/expansion';
|
|
51
50
|
import * as $ from 'jquery';
|
|
@@ -5192,9 +5191,10 @@ class TldTranslateConfigService {
|
|
|
5192
5191
|
tildeopen: ['DOMAINS.TILDEOPEN'],
|
|
5193
5192
|
beta: ['DOMAINS.BETA'],
|
|
5194
5193
|
};
|
|
5195
|
-
this._llmConfig.isEnabled = llm?.isEnabled ?? false;
|
|
5196
5194
|
this._llmConfig.apiUrl = llm?.apiUrl ?? 'https://translate.tilde.ai/api/language';
|
|
5197
5195
|
this._llmConfig.summarizeProvider = llm?.summarizeProvider ?? LLMProviders.TILDEOPEN;
|
|
5196
|
+
this._llmConfig.disableSummarization = llm?.disableSummarization ?? true;
|
|
5197
|
+
this._llmConfig.disableRephrasing = llm?.disableRephrasing ?? true;
|
|
5198
5198
|
// Not setting default url because there is no service provided by Tilde and this is not used by default in website project.
|
|
5199
5199
|
this._audioConfig.audioApiUrl = audio?.audioApiUrl;
|
|
5200
5200
|
this._audioConfig.audioMaxSizeBytes = audio?.audioMaxSizeBytes ?? 10000000;
|
|
@@ -8980,7 +8980,6 @@ class TldTranslateTextComponent {
|
|
|
8980
8980
|
voiceInputService;
|
|
8981
8981
|
fileService;
|
|
8982
8982
|
llmService;
|
|
8983
|
-
keycloak;
|
|
8984
8983
|
sourceComponent;
|
|
8985
8984
|
dictateComponent;
|
|
8986
8985
|
filePreviewProgress;
|
|
@@ -9035,7 +9034,9 @@ class TldTranslateTextComponent {
|
|
|
9035
9034
|
;
|
|
9036
9035
|
get uploadIconName() { return this.config.coreConfig.uploadIconName; }
|
|
9037
9036
|
;
|
|
9038
|
-
get
|
|
9037
|
+
get isSummarizationDisabled() { return this.config.llmConfig.disableSummarization; }
|
|
9038
|
+
;
|
|
9039
|
+
get isRephrasingDisabled() { return this.config.llmConfig.disableRephrasing; }
|
|
9039
9040
|
;
|
|
9040
9041
|
audioInputVisible = computed(() => { return this.config.speechConfig.onlineAsr?.enabled && this.onlineAsrSystemId(); }, ...(ngDevMode ? [{ debugName: "audioInputVisible" }] : []));
|
|
9041
9042
|
targetSentenceSelect = true;
|
|
@@ -9093,7 +9094,7 @@ class TldTranslateTextComponent {
|
|
|
9093
9094
|
rephraseFeatureLocalStorageKey;
|
|
9094
9095
|
isMobile;
|
|
9095
9096
|
destroy$ = new Subject();
|
|
9096
|
-
constructor(translateTextService, clipboard, alerts, config, tldScrollService, tldSystem, audioService, voiceInputService, fileService, llmService
|
|
9097
|
+
constructor(translateTextService, clipboard, alerts, config, tldScrollService, tldSystem, audioService, voiceInputService, fileService, llmService) {
|
|
9097
9098
|
this.translateTextService = translateTextService;
|
|
9098
9099
|
this.clipboard = clipboard;
|
|
9099
9100
|
this.alerts = alerts;
|
|
@@ -9104,12 +9105,9 @@ class TldTranslateTextComponent {
|
|
|
9104
9105
|
this.voiceInputService = voiceInputService;
|
|
9105
9106
|
this.fileService = fileService;
|
|
9106
9107
|
this.llmService = llmService;
|
|
9107
|
-
this.keycloak = keycloak;
|
|
9108
9108
|
}
|
|
9109
9109
|
ngOnInit() {
|
|
9110
9110
|
this.isMobile = ResolutionHelper.isMobileRes();
|
|
9111
|
-
this.summarizeFeatureLocalStorageKey = this.keycloak.getKeycloakInstance()?.tokenParsed ? `summarizeFeatureDialogShown_${HashHelper.hashString(this.keycloak.getKeycloakInstance().tokenParsed.email)}` : 'summarizeFeatureDialogShown';
|
|
9112
|
-
this.rephraseFeatureLocalStorageKey = this.keycloak.getKeycloakInstance()?.tokenParsed ? `rephraseFeatureDialogShown_${HashHelper.hashString(this.keycloak.getKeycloakInstance().tokenParsed.email)}` : 'rephraseFeatureDialogShown';
|
|
9113
9111
|
this.translateTextService.listenOnChanges();
|
|
9114
9112
|
this.translateTextService.sourceChange.subscribe(() => {
|
|
9115
9113
|
this.clearSummarize();
|
|
@@ -9284,13 +9282,13 @@ class TldTranslateTextComponent {
|
|
|
9284
9282
|
this.summarizedText = null;
|
|
9285
9283
|
this.markedSummarizedText = null;
|
|
9286
9284
|
}
|
|
9287
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TldTranslateTextComponent, deps: [{ token: TldTranslateTextService }, { token: i2$2.Clipboard }, { token: i4.AlertService }, { token: TldTranslateConfigService }, { token: TldScrollService }, { token: TldTranslateSystemManagementService }, { token: AudioRecordService }, { token: TldVoiceInputService }, { token: TldTranslateFileService }, { token: i5$1.LLMService }
|
|
9288
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TldTranslateTextComponent, isStandalone: false, selector: "tld-translate-text", inputs: { filePreviewProgress: "filePreviewProgress" }, outputs: { onFileChange: "onFileChange" }, viewQueries: [{ propertyName: "sourceComponent", first: true, predicate: ["sourceComponent"], descendants: true }, { propertyName: "dictateComponent", first: true, predicate: ["dictate"], descendants: true }], ngImport: i0, template: "<!-- NOTE. tld-source-and-target-wrapper uses multiple content projections, so might seem confusing first, but elements are displayed at their places based on tld-source-and-target-wrapper component\r\nhttps://angular.io/guide/content-projection#multi-slot-content-projection\r\n-->\r\n<tld-source-and-target-wrapper\r\n\t[textToSpeechSourceSettings]=\"textToSpeechSourceSettings\"\r\n\t[clearSourceVisible]=\"source?.length > 0\"\r\n\t(onSourceClear)=\"clearSource()\"\r\n\t[clearDisabled]=\"textareaDisabled\"\r\n\t[clearSourceTooltip]=\"'TLD_TRANSLATE.CLEAR_SOURCE_TOOLTIP'\"\r\n\t[ngClass]=\"{ 'highlight-active': highlight, 'empty-target': isEmptyTarget }\"\r\n>\r\n\t<div sourceMain class=\"source-main\" fxLayout=\"column\">\r\n\t\t<tld-translate-source [textareaDisabled]=\"textareaDisabled\" #sourceComponent fxFlex [sourceParagraphs]=\"sourceParagraphs\"></tld-translate-source>\r\n\t</div>\r\n\t<ng-container dictation *ngIf=\"audioInputVisible()\">\r\n\t\t<tld-dictate\r\n\t\t\t#dictate\r\n\t\t\t[configuration]=\"dictateConfig\"\r\n\t\t\t[ngClass]=\"{ 'full-width': !fileUpload }\"\r\n\t\t\t(isDictating)=\"dictateStartStop($event)\"\r\n\t\t\t(result)=\"dictateResult($event)\"\r\n\t\t\t(partialResult)=\"dictatePartialResult($event)\"\r\n\t\t\t(onError)=\"dictateError($event)\"\r\n\t\t\t[systemId]=\"onlineAsrSystemId()\"\r\n\t\t>\r\n\t\t</tld-dictate>\r\n\t</ng-container>\r\n\r\n\t<button compactUpload mat-icon-button [matTooltip]=\"'TOOLTIPS.UPLOAD' | translate\" [attr.aria-label]=\"'TOOLTIPS.UPLOAD' | translate\" [disabled]=\"fileUploadDisabled\" (click)=\"openFileUpload()\">\r\n\t\t<mat-icon [svgIcon]=\"'upload'\"></mat-icon>\r\n\t</button>\r\n\r\n\t<ng-container sourceActions>\r\n\t\t<div fxLayoutAlign=\"start center\" [class.basic-padding]=\"fileUpload\" fxLayoutGap=\"1em\">\r\n\t\t\t<div [class.hidden]=\"!fileUpload\" class=\"file-upload-wrapper\">\r\n\t\t\t\t<lib-file-upload\r\n\t\t\t\t\t(fileChange)=\"fileChange($event)\"\r\n\t\t\t\t\t[accept]=\"allowedFileTypes\"\r\n\t\t\t\t\t[maxSize]=\"maxFileUploadSize\"\r\n\t\t\t\t\t[uploadIconName]=\"uploadIconName\"\r\n\t\t\t\t\t[extendedAcceptList]=\"extendedFileTypes\"\r\n\t\t\t\t\t[multiple]=\"multipleFiles\"\r\n\t\t\t\t\t(errorEvent)=\"fileUploadError($event)\"\r\n\t\t\t\t\t[filePreviewProgress]=\"filePreviewProgress\"\r\n\t\t\t\t\t[disabled]=\"fileUploadDisabled\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"upload-file-text\">\r\n\t\t\t\t\t\t<span class=\"info\">\r\n\t\t\t\t\t\t\t<span [innerHTML]=\"'FILE_UPLOAD.TRANSLATE_TEXT_UPLOAD' | translate\" class=\"accent-color\"></span>\r\n\t\t\t\t\t\t\t<span> </span>\r\n\t\t\t\t\t\t\t<span [innerHTML]=\"'FILE_UPLOAD.' + (multipleFiles ? 'FILES' : 'FILE') | translate\" class=\"accent-color\"></span>\r\n\t\t\t\t\t\t</span>\r\n\r\n\t\t\t\t\t\t<span class=\"file-upload-extensions text-m\">\r\n\t\t\t\t\t\t\t(<span>{{ visibleExtensions }}.</span>;\r\n\t\t\t\t\t\t\t<span *ngIf=\"maxSizeMB\" class=\"file-upload-max-size\" [innerHTML]=\"'FILE_UPLOAD.LIMITS_MB' | translate : { maxSizeMB: maxSizeMB }\"></span>)\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t</lib-file-upload>\r\n\t\t\t\t<lib-open-extension-dialog *ngIf=\"showExtensionPopup\" [extensions]=\"allowedTypesWithoutDots\"> </lib-open-extension-dialog>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-container>\r\n\r\n\t<div targetMain class=\"target-main\">\r\n\t\t<ng-container *ngIf=\"isEmptyTarget; else translatedTextBlock\">\r\n\t\t\t<p *ngIf=\"showTargetPlaceholder\" class=\"description-text target-empty\" [innerHtml]=\"'TLD_TRANSLATE.TARGET_DESCRIPTION' | translate\"></p>\r\n\t\t</ng-container>\r\n\t</div>\r\n\r\n\t<ng-container targetActions>\r\n\t\t<div class=\"tld-translate-target-footer basic-padding\" *ngIf=\"showProgressIndicator\">\r\n\t\t\t<progress-indicator (onClose)=\"closeProgressIndicator()\" *ngIf=\"showProgressIndicator\"></progress-indicator>\r\n\t\t</div>\r\n\t</ng-container>\r\n</tld-source-and-target-wrapper>\r\n\r\n<!-- templates used for else blocks in target container -->\r\n<ng-template #translatedTextBlock>\r\n\t<div [class.translated-source-overflow]=\"targetWrapperOverflow\" class=\"translated-source\">\r\n\t\t<ng-container *ngIf=\"!urlToTranslate\">\r\n\t\t\t<div class=\"target-wrapper-action-buttons\">\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"firstParagraphTranslated\"\r\n\t\t\t\t\tclass=\"tld-copy-translation\"\r\n\t\t\t\t\t(click)=\"copy()\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.COPY' | translate\"\r\n\t\t\t\t\t[attr.aria-describedby]=\"copyMessageId\"\r\n\t\t\t\t\t[attr.Id]=\"copyButtonId\"\r\n\t\t\t\t\t(keydown.Tab)=\"switchFocusFromCopy($event)\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.COPY' | translate\"> content_copy </span>\r\n\t\t\t\t</button>\r\n\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"firstParagraphTranslated || translationError\"\r\n\t\t\t\t\tclass=\"tld-refresh-translation\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.REFRESH' | translate\"\r\n\t\t\t\t\t(click)=\"refresh()\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.REFRESH' | translate\"> refresh </span>\r\n\t\t\t\t</button>\r\n\r\n\t\t\t\t<div [matTooltip]=\"'TLD_TRANSLATE.REPHRASE.TOOLTIP' | translate\">\r\n\t\t\t\t\t@if (isLlmEnabled && firstParagraphTranslated) {\r\n\t\t\t\t\t\t<button\r\n\t\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\t\tclass=\"tld-rephrase\"\r\n\t\t\t\t\t\t\t[disabled]=\"isTranslating || isSummarazing\"\r\n\t\t\t\t\t\t\t(click)=\"showRephraseOptions()\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<mat-icon [svgIcon]=\"'rephrase'\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.REPHRASE' | translate\"></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div [matTooltip]=\"(isTextSummarizable ? 'TOOLTIPS.CREATE_SUMMARY' : 'TLD_TRANSLATE.SUMMARY.DISABLED') | translate\">\r\n\t\t\t\t\t@if (isLlmEnabled && firstParagraphTranslated) {\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tclass=\"tld-create-summary\"\r\n\t\t\t\t\t\t[disabled]=\"isTranslating || isSummarazing || !isTextSummarizable\"\r\n\t\t\t\t\t\t(click)=\"createSummary()\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon [svgIcon]=\"'summarize'\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.CREATE_SUMMARY' | translate\"></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t\t<tld-text-to-speech *ngIf=\"textToSpeechTargetSettings && firstParagraphTranslated\" [settings]=\"textToSpeechTargetSettings\"> </tld-text-to-speech>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"highlight-tree-wrapper\">\r\n\t\t\t\t<tld-highlight-tree *ngFor=\"let paragraph of targetParagraphs\" [highlight]=\"highlight\" [tree]=\"paragraph\"> </tld-highlight-tree>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div *ngIf=\"isSummarazing || summarizedText\" class=\"summary-wrapper\">\r\n\t\t\t\t<p class=\"summary-title\">{{ \"TLD_TRANSLATE.SUMMARY.TITLE\" | translate }}</p>\r\n\r\n\t\t\t\t<p *ngIf=\"isSummarazing\" class=\"creating-progress\">{{ \"TLD_TRANSLATE.SUMMARY.CREATING\" | translate }}<span class=\"dot-loading\">...</span></p>\r\n\r\n\t\t\t\t<p [innerHTML]=\"markedSummarizedText\"></p>\r\n\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"summarizedText\"\r\n\t\t\t\t\t[ngClass.lt-sm]=\"'summary-mobile'\"\r\n\t\t\t\t\tclass=\"summary-copy-btn\"\r\n\t\t\t\t\t(click)=\"copySummarizedText()\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.COPY' | translate\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.COPY' | translate\"> content_copy </span>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div *ngIf=\"isRephraseActive\" class=\"rephrase-wrapper\">\r\n\t\t\t\t<tld-rephrase [text]=\"translatedText\" [disabled]=\"isTranslating\" [language]=\"targetLanguage\"></tld-rephrase>\r\n\t\t\t</div>\t\r\n\r\n\t\t\t<div *ngIf=\"firstParagraphTranslated && dictionaryEntry\" class=\"dictionary-wrapper\">\r\n\t\t\t\t<tld-dictionary [dictionary]=\"dictionaryEntry\"></tld-dictionary>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\r\n\t\t<div *ngIf=\"urlToTranslate\" class=\"target-url-container\">\r\n\t\t\t<a [attr.href]=\"translateUrlRedirect\" target=\"_blank\" fxLayoutAlign=\"start center\" class=\"go-to-webtranslate\">\r\n\t\t\t\t{{ urlToTranslate }}\r\n\t\t\t\t<span class=\"material-icons\" color=\"accent\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.OPEN_IN_NEW'\"> open_in_new </span>\r\n\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>\r\n", styles: [".hidden{display:none}.go-to-webtranslate{word-break:break-all;display:inline}.basic-padding,.target-empty,.target-translated-text{padding:18px}.source-container{border-right:1px solid #cbd2d9;padding:0;overflow:auto}.target-description{margin-top:0}.translated-source,.highlight-tree-wrapper{min-height:210px}.translated-source{position:relative;overflow-y:auto;overflow-x:hidden;flex:1 1 0!important;padding:18px 48px 18px 18px!important}.translated-source.selectable-sentence{cursor:pointer}::ng-deep .target-highlight .tld-highlight-container{padding:18px}.target-wrapper-action-buttons{position:absolute;top:3px;right:3px}.target-wrapper-action-buttons .tld-copy-translation,.target-wrapper-action-buttons .tld-refresh-translation,.target-wrapper-action-buttons tld-text-to-speech{display:block}.target-empty,.target-translated-text{margin:0}tld-dictionary{overflow-y:auto;flex:1 1 0!important}.source-main,.target-main{height:100%}.upload-file-text{color:var(--base-40);font-size:.875rem;display:inline-block;text-align:left}.file-upload-wrapper{width:100%}.file-upload-wrapper .file-upload-extensions{font-weight:400}.file-upload-max-size{white-space:nowrap}.dictionary-wrapper{margin-top:2rem;border-top:1px solid var(--base-70)}.rephrase-wrapper,.summary-wrapper{position:relative;margin-top:8px;padding-top:12px;border-top:1px solid var(--base-70)}.summary-title{font-size:1rem;margin-bottom:.5rem;font-weight:600}.creating-progress{color:var(--base-40)}:host ::ng-deep .dot-loading{clip-path:inset(0 100% 0 0);animation:loading 1.5s steps(4) infinite}.summary-copy-btn{position:absolute;right:-45px;top:20px}.summary-mobile{right:-46px}@keyframes loading{to{clip-path:inset(0 -34% 0 0)}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SourceAndTargetWrapperComponent, selector: "tld-source-and-target-wrapper", inputs: ["clearSourceVisible", "clearSourceTooltip", "clearDisabled", "textToSpeechSourceSettings"], outputs: ["onSourceClear"] }, { kind: "component", type: TldDictateComponent, selector: "tld-dictate", inputs: ["configuration", "systemId"], outputs: ["result", "partialResult", "isDictating", "onError"] }, { kind: "component", type: i4.OpenExtensionDialogComponent, selector: "lib-open-extension-dialog", inputs: ["extensions"] }, { kind: "component", type: TextToSpeechComponent, selector: "tld-text-to-speech", inputs: ["settings"] }, { kind: "component", type: i4.FileUploadComponent, selector: "lib-file-upload", inputs: ["accept", "useCompactUpload", "maxSize", "multiple", "filePreviewProgress", "allowEmpty", "disabled", "dragZoneLabel", "uploadIconName", "uploadButtonLabel", "openExtensionPopupLabel", "minSupportedFormatCount", "hideDefaultLimitsLabel", "extendedAcceptList"], outputs: ["fileChange", "errorEvent"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i6.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: RephraseComponent, selector: "tld-rephrase", inputs: ["text", "language", "disabled"] }, { kind: "component", type: TldTranslateSourceComponent, selector: "tld-translate-source", inputs: ["textareaDisabled", "sourceParagraphs"] }, { kind: "component", type: TldDictionaryComponent, selector: "tld-dictionary", inputs: ["dictionary"] }, { kind: "component", type: HighlightTreeComponent, selector: "tld-highlight-tree", inputs: ["tree", "isSource", "highlight"] }, { kind: "component", type: ProgressIndicatorComponent, selector: "progress-indicator", outputs: ["onClose"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
9285
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TldTranslateTextComponent, deps: [{ token: TldTranslateTextService }, { token: i2$2.Clipboard }, { token: i4.AlertService }, { token: TldTranslateConfigService }, { token: TldScrollService }, { token: TldTranslateSystemManagementService }, { token: AudioRecordService }, { token: TldVoiceInputService }, { token: TldTranslateFileService }, { token: i5$1.LLMService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9286
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: TldTranslateTextComponent, isStandalone: false, selector: "tld-translate-text", inputs: { filePreviewProgress: "filePreviewProgress" }, outputs: { onFileChange: "onFileChange" }, viewQueries: [{ propertyName: "sourceComponent", first: true, predicate: ["sourceComponent"], descendants: true }, { propertyName: "dictateComponent", first: true, predicate: ["dictate"], descendants: true }], ngImport: i0, template: "<!-- NOTE. tld-source-and-target-wrapper uses multiple content projections, so might seem confusing first, but elements are displayed at their places based on tld-source-and-target-wrapper component\r\nhttps://angular.io/guide/content-projection#multi-slot-content-projection\r\n-->\r\n<tld-source-and-target-wrapper\r\n\t[textToSpeechSourceSettings]=\"textToSpeechSourceSettings\"\r\n\t[clearSourceVisible]=\"source?.length > 0\"\r\n\t(onSourceClear)=\"clearSource()\"\r\n\t[clearDisabled]=\"textareaDisabled\"\r\n\t[clearSourceTooltip]=\"'TLD_TRANSLATE.CLEAR_SOURCE_TOOLTIP'\"\r\n\t[ngClass]=\"{ 'highlight-active': highlight, 'empty-target': isEmptyTarget }\"\r\n>\r\n\t<div sourceMain class=\"source-main\" fxLayout=\"column\">\r\n\t\t<tld-translate-source [textareaDisabled]=\"textareaDisabled\" #sourceComponent fxFlex [sourceParagraphs]=\"sourceParagraphs\"></tld-translate-source>\r\n\t</div>\r\n\t<ng-container dictation *ngIf=\"audioInputVisible()\">\r\n\t\t<tld-dictate\r\n\t\t\t#dictate\r\n\t\t\t[configuration]=\"dictateConfig\"\r\n\t\t\t[ngClass]=\"{ 'full-width': !fileUpload }\"\r\n\t\t\t(isDictating)=\"dictateStartStop($event)\"\r\n\t\t\t(result)=\"dictateResult($event)\"\r\n\t\t\t(partialResult)=\"dictatePartialResult($event)\"\r\n\t\t\t(onError)=\"dictateError($event)\"\r\n\t\t\t[systemId]=\"onlineAsrSystemId()\"\r\n\t\t>\r\n\t\t</tld-dictate>\r\n\t</ng-container>\r\n\r\n\t<button compactUpload mat-icon-button [matTooltip]=\"'TOOLTIPS.UPLOAD' | translate\" [attr.aria-label]=\"'TOOLTIPS.UPLOAD' | translate\" [disabled]=\"fileUploadDisabled\" (click)=\"openFileUpload()\">\r\n\t\t<mat-icon [svgIcon]=\"'upload'\"></mat-icon>\r\n\t</button>\r\n\r\n\t<ng-container sourceActions>\r\n\t\t<div fxLayoutAlign=\"start center\" [class.basic-padding]=\"fileUpload\" fxLayoutGap=\"1em\">\r\n\t\t\t<div [class.hidden]=\"!fileUpload\" class=\"file-upload-wrapper\">\r\n\t\t\t\t<lib-file-upload\r\n\t\t\t\t\t(fileChange)=\"fileChange($event)\"\r\n\t\t\t\t\t[accept]=\"allowedFileTypes\"\r\n\t\t\t\t\t[maxSize]=\"maxFileUploadSize\"\r\n\t\t\t\t\t[uploadIconName]=\"uploadIconName\"\r\n\t\t\t\t\t[extendedAcceptList]=\"extendedFileTypes\"\r\n\t\t\t\t\t[multiple]=\"multipleFiles\"\r\n\t\t\t\t\t(errorEvent)=\"fileUploadError($event)\"\r\n\t\t\t\t\t[filePreviewProgress]=\"filePreviewProgress\"\r\n\t\t\t\t\t[disabled]=\"fileUploadDisabled\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"upload-file-text\">\r\n\t\t\t\t\t\t<span class=\"info\">\r\n\t\t\t\t\t\t\t<span [innerHTML]=\"'FILE_UPLOAD.TRANSLATE_TEXT_UPLOAD' | translate\" class=\"accent-color\"></span>\r\n\t\t\t\t\t\t\t<span> </span>\r\n\t\t\t\t\t\t\t<span [innerHTML]=\"'FILE_UPLOAD.' + (multipleFiles ? 'FILES' : 'FILE') | translate\" class=\"accent-color\"></span>\r\n\t\t\t\t\t\t</span>\r\n\r\n\t\t\t\t\t\t<span class=\"file-upload-extensions text-m\">\r\n\t\t\t\t\t\t\t(<span>{{ visibleExtensions }}.</span>;\r\n\t\t\t\t\t\t\t<span *ngIf=\"maxSizeMB\" class=\"file-upload-max-size\" [innerHTML]=\"'FILE_UPLOAD.LIMITS_MB' | translate : { maxSizeMB: maxSizeMB }\"></span>)\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t</lib-file-upload>\r\n\t\t\t\t<lib-open-extension-dialog *ngIf=\"showExtensionPopup\" [extensions]=\"allowedTypesWithoutDots\"> </lib-open-extension-dialog>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-container>\r\n\r\n\t<div targetMain class=\"target-main\">\r\n\t\t<ng-container *ngIf=\"isEmptyTarget; else translatedTextBlock\">\r\n\t\t\t<p *ngIf=\"showTargetPlaceholder\" class=\"description-text target-empty\" [innerHtml]=\"'TLD_TRANSLATE.TARGET_DESCRIPTION' | translate\"></p>\r\n\t\t</ng-container>\r\n\t</div>\r\n\r\n\t<ng-container targetActions>\r\n\t\t<div class=\"tld-translate-target-footer basic-padding\" *ngIf=\"showProgressIndicator\">\r\n\t\t\t<progress-indicator (onClose)=\"closeProgressIndicator()\" *ngIf=\"showProgressIndicator\"></progress-indicator>\r\n\t\t</div>\r\n\t</ng-container>\r\n</tld-source-and-target-wrapper>\r\n\r\n<!-- templates used for else blocks in target container -->\r\n<ng-template #translatedTextBlock>\r\n\t<div [class.translated-source-overflow]=\"targetWrapperOverflow\" class=\"translated-source\">\r\n\t\t<ng-container *ngIf=\"!urlToTranslate\">\r\n\t\t\t<div class=\"target-wrapper-action-buttons\">\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"firstParagraphTranslated\"\r\n\t\t\t\t\tclass=\"tld-copy-translation\"\r\n\t\t\t\t\t(click)=\"copy()\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.COPY' | translate\"\r\n\t\t\t\t\t[attr.aria-describedby]=\"copyMessageId\"\r\n\t\t\t\t\t[attr.Id]=\"copyButtonId\"\r\n\t\t\t\t\t(keydown.Tab)=\"switchFocusFromCopy($event)\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.COPY' | translate\"> content_copy </span>\r\n\t\t\t\t</button>\r\n\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"firstParagraphTranslated || translationError\"\r\n\t\t\t\t\tclass=\"tld-refresh-translation\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.REFRESH' | translate\"\r\n\t\t\t\t\t(click)=\"refresh()\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.REFRESH' | translate\"> refresh </span>\r\n\t\t\t\t</button>\r\n\r\n\t\t\t\t<div [matTooltip]=\"'TLD_TRANSLATE.REPHRASE.TOOLTIP' | translate\">\r\n\t\t\t\t\t@if (!isRephrasingDisabled && firstParagraphTranslated) {\r\n\t\t\t\t\t\t<button\r\n\t\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\t\tclass=\"tld-rephrase\"\r\n\t\t\t\t\t\t\t[disabled]=\"isTranslating || isSummarazing\"\r\n\t\t\t\t\t\t\t(click)=\"showRephraseOptions()\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<mat-icon [svgIcon]=\"'rephrase'\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.REPHRASE' | translate\"></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div [matTooltip]=\"(isTextSummarizable ? 'TOOLTIPS.CREATE_SUMMARY' : 'TLD_TRANSLATE.SUMMARY.DISABLED') | translate\">\r\n\t\t\t\t\t@if (!isSummarizationDisabled && firstParagraphTranslated) {\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tclass=\"tld-create-summary\"\r\n\t\t\t\t\t\t[disabled]=\"isTranslating || isSummarazing || !isTextSummarizable\"\r\n\t\t\t\t\t\t(click)=\"createSummary()\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon [svgIcon]=\"'summarize'\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.CREATE_SUMMARY' | translate\"></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t\t<tld-text-to-speech *ngIf=\"textToSpeechTargetSettings && firstParagraphTranslated\" [settings]=\"textToSpeechTargetSettings\"> </tld-text-to-speech>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"highlight-tree-wrapper\">\r\n\t\t\t\t<tld-highlight-tree *ngFor=\"let paragraph of targetParagraphs\" [highlight]=\"highlight\" [tree]=\"paragraph\"> </tld-highlight-tree>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div *ngIf=\"isSummarazing || summarizedText\" class=\"summary-wrapper\">\r\n\t\t\t\t<p class=\"summary-title\">{{ \"TLD_TRANSLATE.SUMMARY.TITLE\" | translate }}</p>\r\n\r\n\t\t\t\t<p *ngIf=\"isSummarazing\" class=\"creating-progress\">{{ \"TLD_TRANSLATE.SUMMARY.CREATING\" | translate }}<span class=\"dot-loading\">...</span></p>\r\n\r\n\t\t\t\t<p [innerHTML]=\"markedSummarizedText\"></p>\r\n\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"summarizedText\"\r\n\t\t\t\t\t[ngClass.lt-sm]=\"'summary-mobile'\"\r\n\t\t\t\t\tclass=\"summary-copy-btn\"\r\n\t\t\t\t\t(click)=\"copySummarizedText()\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.COPY' | translate\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.COPY' | translate\"> content_copy </span>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div *ngIf=\"isRephraseActive\" class=\"rephrase-wrapper\">\r\n\t\t\t\t<tld-rephrase [text]=\"translatedText\" [disabled]=\"isTranslating\" [language]=\"targetLanguage\"></tld-rephrase>\r\n\t\t\t</div>\t\r\n\r\n\t\t\t<div *ngIf=\"firstParagraphTranslated && dictionaryEntry\" class=\"dictionary-wrapper\">\r\n\t\t\t\t<tld-dictionary [dictionary]=\"dictionaryEntry\"></tld-dictionary>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\r\n\t\t<div *ngIf=\"urlToTranslate\" class=\"target-url-container\">\r\n\t\t\t<a [attr.href]=\"translateUrlRedirect\" target=\"_blank\" fxLayoutAlign=\"start center\" class=\"go-to-webtranslate\">\r\n\t\t\t\t{{ urlToTranslate }}\r\n\t\t\t\t<span class=\"material-icons\" color=\"accent\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.OPEN_IN_NEW'\"> open_in_new </span>\r\n\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>\r\n", styles: [".hidden{display:none}.go-to-webtranslate{word-break:break-all;display:inline}.basic-padding,.target-empty,.target-translated-text{padding:18px}.source-container{border-right:1px solid #cbd2d9;padding:0;overflow:auto}.target-description{margin-top:0}.translated-source,.highlight-tree-wrapper{min-height:210px}.translated-source{position:relative;overflow-y:auto;overflow-x:hidden;flex:1 1 0!important;padding:18px 48px 18px 18px!important}.translated-source.selectable-sentence{cursor:pointer}::ng-deep .target-highlight .tld-highlight-container{padding:18px}.target-wrapper-action-buttons{position:absolute;top:3px;right:3px}.target-wrapper-action-buttons .tld-copy-translation,.target-wrapper-action-buttons .tld-refresh-translation,.target-wrapper-action-buttons tld-text-to-speech{display:block}.target-empty,.target-translated-text{margin:0}tld-dictionary{overflow-y:auto;flex:1 1 0!important}.source-main,.target-main{height:100%}.upload-file-text{color:var(--base-40);font-size:.875rem;display:inline-block;text-align:left}.file-upload-wrapper{width:100%}.file-upload-wrapper .file-upload-extensions{font-weight:400}.file-upload-max-size{white-space:nowrap}.dictionary-wrapper{margin-top:2rem;border-top:1px solid var(--base-70)}.rephrase-wrapper,.summary-wrapper{position:relative;margin-top:8px;padding-top:12px;border-top:1px solid var(--base-70)}.summary-title{font-size:1rem;margin-bottom:.5rem;font-weight:600}.creating-progress{color:var(--base-40)}:host ::ng-deep .dot-loading{clip-path:inset(0 100% 0 0);animation:loading 1.5s steps(4) infinite}.summary-copy-btn{position:absolute;right:-45px;top:20px}.summary-mobile{right:-46px}@keyframes loading{to{clip-path:inset(0 -34% 0 0)}}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SourceAndTargetWrapperComponent, selector: "tld-source-and-target-wrapper", inputs: ["clearSourceVisible", "clearSourceTooltip", "clearDisabled", "textToSpeechSourceSettings"], outputs: ["onSourceClear"] }, { kind: "component", type: TldDictateComponent, selector: "tld-dictate", inputs: ["configuration", "systemId"], outputs: ["result", "partialResult", "isDictating", "onError"] }, { kind: "component", type: i4.OpenExtensionDialogComponent, selector: "lib-open-extension-dialog", inputs: ["extensions"] }, { kind: "component", type: TextToSpeechComponent, selector: "tld-text-to-speech", inputs: ["settings"] }, { kind: "component", type: i4.FileUploadComponent, selector: "lib-file-upload", inputs: ["accept", "useCompactUpload", "maxSize", "multiple", "filePreviewProgress", "allowEmpty", "disabled", "dragZoneLabel", "uploadIconName", "uploadButtonLabel", "openExtensionPopupLabel", "minSupportedFormatCount", "hideDefaultLimitsLabel", "extendedAcceptList"], outputs: ["fileChange", "errorEvent"] }, { kind: "component", type: i8.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: i3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i6.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: RephraseComponent, selector: "tld-rephrase", inputs: ["text", "language", "disabled"] }, { kind: "component", type: TldTranslateSourceComponent, selector: "tld-translate-source", inputs: ["textareaDisabled", "sourceParagraphs"] }, { kind: "component", type: TldDictionaryComponent, selector: "tld-dictionary", inputs: ["dictionary"] }, { kind: "component", type: HighlightTreeComponent, selector: "tld-highlight-tree", inputs: ["tree", "isSource", "highlight"] }, { kind: "component", type: ProgressIndicatorComponent, selector: "progress-indicator", outputs: ["onClose"] }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }] });
|
|
9289
9287
|
}
|
|
9290
9288
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: TldTranslateTextComponent, decorators: [{
|
|
9291
9289
|
type: Component,
|
|
9292
|
-
args: [{ selector: 'tld-translate-text', standalone: false, template: "<!-- NOTE. tld-source-and-target-wrapper uses multiple content projections, so might seem confusing first, but elements are displayed at their places based on tld-source-and-target-wrapper component\r\nhttps://angular.io/guide/content-projection#multi-slot-content-projection\r\n-->\r\n<tld-source-and-target-wrapper\r\n\t[textToSpeechSourceSettings]=\"textToSpeechSourceSettings\"\r\n\t[clearSourceVisible]=\"source?.length > 0\"\r\n\t(onSourceClear)=\"clearSource()\"\r\n\t[clearDisabled]=\"textareaDisabled\"\r\n\t[clearSourceTooltip]=\"'TLD_TRANSLATE.CLEAR_SOURCE_TOOLTIP'\"\r\n\t[ngClass]=\"{ 'highlight-active': highlight, 'empty-target': isEmptyTarget }\"\r\n>\r\n\t<div sourceMain class=\"source-main\" fxLayout=\"column\">\r\n\t\t<tld-translate-source [textareaDisabled]=\"textareaDisabled\" #sourceComponent fxFlex [sourceParagraphs]=\"sourceParagraphs\"></tld-translate-source>\r\n\t</div>\r\n\t<ng-container dictation *ngIf=\"audioInputVisible()\">\r\n\t\t<tld-dictate\r\n\t\t\t#dictate\r\n\t\t\t[configuration]=\"dictateConfig\"\r\n\t\t\t[ngClass]=\"{ 'full-width': !fileUpload }\"\r\n\t\t\t(isDictating)=\"dictateStartStop($event)\"\r\n\t\t\t(result)=\"dictateResult($event)\"\r\n\t\t\t(partialResult)=\"dictatePartialResult($event)\"\r\n\t\t\t(onError)=\"dictateError($event)\"\r\n\t\t\t[systemId]=\"onlineAsrSystemId()\"\r\n\t\t>\r\n\t\t</tld-dictate>\r\n\t</ng-container>\r\n\r\n\t<button compactUpload mat-icon-button [matTooltip]=\"'TOOLTIPS.UPLOAD' | translate\" [attr.aria-label]=\"'TOOLTIPS.UPLOAD' | translate\" [disabled]=\"fileUploadDisabled\" (click)=\"openFileUpload()\">\r\n\t\t<mat-icon [svgIcon]=\"'upload'\"></mat-icon>\r\n\t</button>\r\n\r\n\t<ng-container sourceActions>\r\n\t\t<div fxLayoutAlign=\"start center\" [class.basic-padding]=\"fileUpload\" fxLayoutGap=\"1em\">\r\n\t\t\t<div [class.hidden]=\"!fileUpload\" class=\"file-upload-wrapper\">\r\n\t\t\t\t<lib-file-upload\r\n\t\t\t\t\t(fileChange)=\"fileChange($event)\"\r\n\t\t\t\t\t[accept]=\"allowedFileTypes\"\r\n\t\t\t\t\t[maxSize]=\"maxFileUploadSize\"\r\n\t\t\t\t\t[uploadIconName]=\"uploadIconName\"\r\n\t\t\t\t\t[extendedAcceptList]=\"extendedFileTypes\"\r\n\t\t\t\t\t[multiple]=\"multipleFiles\"\r\n\t\t\t\t\t(errorEvent)=\"fileUploadError($event)\"\r\n\t\t\t\t\t[filePreviewProgress]=\"filePreviewProgress\"\r\n\t\t\t\t\t[disabled]=\"fileUploadDisabled\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"upload-file-text\">\r\n\t\t\t\t\t\t<span class=\"info\">\r\n\t\t\t\t\t\t\t<span [innerHTML]=\"'FILE_UPLOAD.TRANSLATE_TEXT_UPLOAD' | translate\" class=\"accent-color\"></span>\r\n\t\t\t\t\t\t\t<span> </span>\r\n\t\t\t\t\t\t\t<span [innerHTML]=\"'FILE_UPLOAD.' + (multipleFiles ? 'FILES' : 'FILE') | translate\" class=\"accent-color\"></span>\r\n\t\t\t\t\t\t</span>\r\n\r\n\t\t\t\t\t\t<span class=\"file-upload-extensions text-m\">\r\n\t\t\t\t\t\t\t(<span>{{ visibleExtensions }}.</span>;\r\n\t\t\t\t\t\t\t<span *ngIf=\"maxSizeMB\" class=\"file-upload-max-size\" [innerHTML]=\"'FILE_UPLOAD.LIMITS_MB' | translate : { maxSizeMB: maxSizeMB }\"></span>)\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t</lib-file-upload>\r\n\t\t\t\t<lib-open-extension-dialog *ngIf=\"showExtensionPopup\" [extensions]=\"allowedTypesWithoutDots\"> </lib-open-extension-dialog>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-container>\r\n\r\n\t<div targetMain class=\"target-main\">\r\n\t\t<ng-container *ngIf=\"isEmptyTarget; else translatedTextBlock\">\r\n\t\t\t<p *ngIf=\"showTargetPlaceholder\" class=\"description-text target-empty\" [innerHtml]=\"'TLD_TRANSLATE.TARGET_DESCRIPTION' | translate\"></p>\r\n\t\t</ng-container>\r\n\t</div>\r\n\r\n\t<ng-container targetActions>\r\n\t\t<div class=\"tld-translate-target-footer basic-padding\" *ngIf=\"showProgressIndicator\">\r\n\t\t\t<progress-indicator (onClose)=\"closeProgressIndicator()\" *ngIf=\"showProgressIndicator\"></progress-indicator>\r\n\t\t</div>\r\n\t</ng-container>\r\n</tld-source-and-target-wrapper>\r\n\r\n<!-- templates used for else blocks in target container -->\r\n<ng-template #translatedTextBlock>\r\n\t<div [class.translated-source-overflow]=\"targetWrapperOverflow\" class=\"translated-source\">\r\n\t\t<ng-container *ngIf=\"!urlToTranslate\">\r\n\t\t\t<div class=\"target-wrapper-action-buttons\">\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"firstParagraphTranslated\"\r\n\t\t\t\t\tclass=\"tld-copy-translation\"\r\n\t\t\t\t\t(click)=\"copy()\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.COPY' | translate\"\r\n\t\t\t\t\t[attr.aria-describedby]=\"copyMessageId\"\r\n\t\t\t\t\t[attr.Id]=\"copyButtonId\"\r\n\t\t\t\t\t(keydown.Tab)=\"switchFocusFromCopy($event)\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.COPY' | translate\"> content_copy </span>\r\n\t\t\t\t</button>\r\n\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"firstParagraphTranslated || translationError\"\r\n\t\t\t\t\tclass=\"tld-refresh-translation\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.REFRESH' | translate\"\r\n\t\t\t\t\t(click)=\"refresh()\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.REFRESH' | translate\"> refresh </span>\r\n\t\t\t\t</button>\r\n\r\n\t\t\t\t<div [matTooltip]=\"'TLD_TRANSLATE.REPHRASE.TOOLTIP' | translate\">\r\n\t\t\t\t\t@if (isLlmEnabled && firstParagraphTranslated) {\r\n\t\t\t\t\t\t<button\r\n\t\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\t\tclass=\"tld-rephrase\"\r\n\t\t\t\t\t\t\t[disabled]=\"isTranslating || isSummarazing\"\r\n\t\t\t\t\t\t\t(click)=\"showRephraseOptions()\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<mat-icon [svgIcon]=\"'rephrase'\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.REPHRASE' | translate\"></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div [matTooltip]=\"(isTextSummarizable ? 'TOOLTIPS.CREATE_SUMMARY' : 'TLD_TRANSLATE.SUMMARY.DISABLED') | translate\">\r\n\t\t\t\t\t@if (isLlmEnabled && firstParagraphTranslated) {\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tclass=\"tld-create-summary\"\r\n\t\t\t\t\t\t[disabled]=\"isTranslating || isSummarazing || !isTextSummarizable\"\r\n\t\t\t\t\t\t(click)=\"createSummary()\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon [svgIcon]=\"'summarize'\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.CREATE_SUMMARY' | translate\"></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t\t<tld-text-to-speech *ngIf=\"textToSpeechTargetSettings && firstParagraphTranslated\" [settings]=\"textToSpeechTargetSettings\"> </tld-text-to-speech>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"highlight-tree-wrapper\">\r\n\t\t\t\t<tld-highlight-tree *ngFor=\"let paragraph of targetParagraphs\" [highlight]=\"highlight\" [tree]=\"paragraph\"> </tld-highlight-tree>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div *ngIf=\"isSummarazing || summarizedText\" class=\"summary-wrapper\">\r\n\t\t\t\t<p class=\"summary-title\">{{ \"TLD_TRANSLATE.SUMMARY.TITLE\" | translate }}</p>\r\n\r\n\t\t\t\t<p *ngIf=\"isSummarazing\" class=\"creating-progress\">{{ \"TLD_TRANSLATE.SUMMARY.CREATING\" | translate }}<span class=\"dot-loading\">...</span></p>\r\n\r\n\t\t\t\t<p [innerHTML]=\"markedSummarizedText\"></p>\r\n\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"summarizedText\"\r\n\t\t\t\t\t[ngClass.lt-sm]=\"'summary-mobile'\"\r\n\t\t\t\t\tclass=\"summary-copy-btn\"\r\n\t\t\t\t\t(click)=\"copySummarizedText()\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.COPY' | translate\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.COPY' | translate\"> content_copy </span>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div *ngIf=\"isRephraseActive\" class=\"rephrase-wrapper\">\r\n\t\t\t\t<tld-rephrase [text]=\"translatedText\" [disabled]=\"isTranslating\" [language]=\"targetLanguage\"></tld-rephrase>\r\n\t\t\t</div>\t\r\n\r\n\t\t\t<div *ngIf=\"firstParagraphTranslated && dictionaryEntry\" class=\"dictionary-wrapper\">\r\n\t\t\t\t<tld-dictionary [dictionary]=\"dictionaryEntry\"></tld-dictionary>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\r\n\t\t<div *ngIf=\"urlToTranslate\" class=\"target-url-container\">\r\n\t\t\t<a [attr.href]=\"translateUrlRedirect\" target=\"_blank\" fxLayoutAlign=\"start center\" class=\"go-to-webtranslate\">\r\n\t\t\t\t{{ urlToTranslate }}\r\n\t\t\t\t<span class=\"material-icons\" color=\"accent\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.OPEN_IN_NEW'\"> open_in_new </span>\r\n\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>\r\n", styles: [".hidden{display:none}.go-to-webtranslate{word-break:break-all;display:inline}.basic-padding,.target-empty,.target-translated-text{padding:18px}.source-container{border-right:1px solid #cbd2d9;padding:0;overflow:auto}.target-description{margin-top:0}.translated-source,.highlight-tree-wrapper{min-height:210px}.translated-source{position:relative;overflow-y:auto;overflow-x:hidden;flex:1 1 0!important;padding:18px 48px 18px 18px!important}.translated-source.selectable-sentence{cursor:pointer}::ng-deep .target-highlight .tld-highlight-container{padding:18px}.target-wrapper-action-buttons{position:absolute;top:3px;right:3px}.target-wrapper-action-buttons .tld-copy-translation,.target-wrapper-action-buttons .tld-refresh-translation,.target-wrapper-action-buttons tld-text-to-speech{display:block}.target-empty,.target-translated-text{margin:0}tld-dictionary{overflow-y:auto;flex:1 1 0!important}.source-main,.target-main{height:100%}.upload-file-text{color:var(--base-40);font-size:.875rem;display:inline-block;text-align:left}.file-upload-wrapper{width:100%}.file-upload-wrapper .file-upload-extensions{font-weight:400}.file-upload-max-size{white-space:nowrap}.dictionary-wrapper{margin-top:2rem;border-top:1px solid var(--base-70)}.rephrase-wrapper,.summary-wrapper{position:relative;margin-top:8px;padding-top:12px;border-top:1px solid var(--base-70)}.summary-title{font-size:1rem;margin-bottom:.5rem;font-weight:600}.creating-progress{color:var(--base-40)}:host ::ng-deep .dot-loading{clip-path:inset(0 100% 0 0);animation:loading 1.5s steps(4) infinite}.summary-copy-btn{position:absolute;right:-45px;top:20px}.summary-mobile{right:-46px}@keyframes loading{to{clip-path:inset(0 -34% 0 0)}}\n"] }]
|
|
9293
|
-
}], ctorParameters: () => [{ type: TldTranslateTextService }, { type: i2$2.Clipboard }, { type: i4.AlertService }, { type: TldTranslateConfigService }, { type: TldScrollService }, { type: TldTranslateSystemManagementService }, { type: AudioRecordService }, { type: TldVoiceInputService }, { type: TldTranslateFileService }, { type: i5$1.LLMService }
|
|
9290
|
+
args: [{ selector: 'tld-translate-text', standalone: false, template: "<!-- NOTE. tld-source-and-target-wrapper uses multiple content projections, so might seem confusing first, but elements are displayed at their places based on tld-source-and-target-wrapper component\r\nhttps://angular.io/guide/content-projection#multi-slot-content-projection\r\n-->\r\n<tld-source-and-target-wrapper\r\n\t[textToSpeechSourceSettings]=\"textToSpeechSourceSettings\"\r\n\t[clearSourceVisible]=\"source?.length > 0\"\r\n\t(onSourceClear)=\"clearSource()\"\r\n\t[clearDisabled]=\"textareaDisabled\"\r\n\t[clearSourceTooltip]=\"'TLD_TRANSLATE.CLEAR_SOURCE_TOOLTIP'\"\r\n\t[ngClass]=\"{ 'highlight-active': highlight, 'empty-target': isEmptyTarget }\"\r\n>\r\n\t<div sourceMain class=\"source-main\" fxLayout=\"column\">\r\n\t\t<tld-translate-source [textareaDisabled]=\"textareaDisabled\" #sourceComponent fxFlex [sourceParagraphs]=\"sourceParagraphs\"></tld-translate-source>\r\n\t</div>\r\n\t<ng-container dictation *ngIf=\"audioInputVisible()\">\r\n\t\t<tld-dictate\r\n\t\t\t#dictate\r\n\t\t\t[configuration]=\"dictateConfig\"\r\n\t\t\t[ngClass]=\"{ 'full-width': !fileUpload }\"\r\n\t\t\t(isDictating)=\"dictateStartStop($event)\"\r\n\t\t\t(result)=\"dictateResult($event)\"\r\n\t\t\t(partialResult)=\"dictatePartialResult($event)\"\r\n\t\t\t(onError)=\"dictateError($event)\"\r\n\t\t\t[systemId]=\"onlineAsrSystemId()\"\r\n\t\t>\r\n\t\t</tld-dictate>\r\n\t</ng-container>\r\n\r\n\t<button compactUpload mat-icon-button [matTooltip]=\"'TOOLTIPS.UPLOAD' | translate\" [attr.aria-label]=\"'TOOLTIPS.UPLOAD' | translate\" [disabled]=\"fileUploadDisabled\" (click)=\"openFileUpload()\">\r\n\t\t<mat-icon [svgIcon]=\"'upload'\"></mat-icon>\r\n\t</button>\r\n\r\n\t<ng-container sourceActions>\r\n\t\t<div fxLayoutAlign=\"start center\" [class.basic-padding]=\"fileUpload\" fxLayoutGap=\"1em\">\r\n\t\t\t<div [class.hidden]=\"!fileUpload\" class=\"file-upload-wrapper\">\r\n\t\t\t\t<lib-file-upload\r\n\t\t\t\t\t(fileChange)=\"fileChange($event)\"\r\n\t\t\t\t\t[accept]=\"allowedFileTypes\"\r\n\t\t\t\t\t[maxSize]=\"maxFileUploadSize\"\r\n\t\t\t\t\t[uploadIconName]=\"uploadIconName\"\r\n\t\t\t\t\t[extendedAcceptList]=\"extendedFileTypes\"\r\n\t\t\t\t\t[multiple]=\"multipleFiles\"\r\n\t\t\t\t\t(errorEvent)=\"fileUploadError($event)\"\r\n\t\t\t\t\t[filePreviewProgress]=\"filePreviewProgress\"\r\n\t\t\t\t\t[disabled]=\"fileUploadDisabled\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"upload-file-text\">\r\n\t\t\t\t\t\t<span class=\"info\">\r\n\t\t\t\t\t\t\t<span [innerHTML]=\"'FILE_UPLOAD.TRANSLATE_TEXT_UPLOAD' | translate\" class=\"accent-color\"></span>\r\n\t\t\t\t\t\t\t<span> </span>\r\n\t\t\t\t\t\t\t<span [innerHTML]=\"'FILE_UPLOAD.' + (multipleFiles ? 'FILES' : 'FILE') | translate\" class=\"accent-color\"></span>\r\n\t\t\t\t\t\t</span>\r\n\r\n\t\t\t\t\t\t<span class=\"file-upload-extensions text-m\">\r\n\t\t\t\t\t\t\t(<span>{{ visibleExtensions }}.</span>;\r\n\t\t\t\t\t\t\t<span *ngIf=\"maxSizeMB\" class=\"file-upload-max-size\" [innerHTML]=\"'FILE_UPLOAD.LIMITS_MB' | translate : { maxSizeMB: maxSizeMB }\"></span>)\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t</lib-file-upload>\r\n\t\t\t\t<lib-open-extension-dialog *ngIf=\"showExtensionPopup\" [extensions]=\"allowedTypesWithoutDots\"> </lib-open-extension-dialog>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</ng-container>\r\n\r\n\t<div targetMain class=\"target-main\">\r\n\t\t<ng-container *ngIf=\"isEmptyTarget; else translatedTextBlock\">\r\n\t\t\t<p *ngIf=\"showTargetPlaceholder\" class=\"description-text target-empty\" [innerHtml]=\"'TLD_TRANSLATE.TARGET_DESCRIPTION' | translate\"></p>\r\n\t\t</ng-container>\r\n\t</div>\r\n\r\n\t<ng-container targetActions>\r\n\t\t<div class=\"tld-translate-target-footer basic-padding\" *ngIf=\"showProgressIndicator\">\r\n\t\t\t<progress-indicator (onClose)=\"closeProgressIndicator()\" *ngIf=\"showProgressIndicator\"></progress-indicator>\r\n\t\t</div>\r\n\t</ng-container>\r\n</tld-source-and-target-wrapper>\r\n\r\n<!-- templates used for else blocks in target container -->\r\n<ng-template #translatedTextBlock>\r\n\t<div [class.translated-source-overflow]=\"targetWrapperOverflow\" class=\"translated-source\">\r\n\t\t<ng-container *ngIf=\"!urlToTranslate\">\r\n\t\t\t<div class=\"target-wrapper-action-buttons\">\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"firstParagraphTranslated\"\r\n\t\t\t\t\tclass=\"tld-copy-translation\"\r\n\t\t\t\t\t(click)=\"copy()\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.COPY' | translate\"\r\n\t\t\t\t\t[attr.aria-describedby]=\"copyMessageId\"\r\n\t\t\t\t\t[attr.Id]=\"copyButtonId\"\r\n\t\t\t\t\t(keydown.Tab)=\"switchFocusFromCopy($event)\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.COPY' | translate\"> content_copy </span>\r\n\t\t\t\t</button>\r\n\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"firstParagraphTranslated || translationError\"\r\n\t\t\t\t\tclass=\"tld-refresh-translation\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.REFRESH' | translate\"\r\n\t\t\t\t\t(click)=\"refresh()\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.REFRESH' | translate\"> refresh </span>\r\n\t\t\t\t</button>\r\n\r\n\t\t\t\t<div [matTooltip]=\"'TLD_TRANSLATE.REPHRASE.TOOLTIP' | translate\">\r\n\t\t\t\t\t@if (!isRephrasingDisabled && firstParagraphTranslated) {\r\n\t\t\t\t\t\t<button\r\n\t\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\t\tclass=\"tld-rephrase\"\r\n\t\t\t\t\t\t\t[disabled]=\"isTranslating || isSummarazing\"\r\n\t\t\t\t\t\t\t(click)=\"showRephraseOptions()\"\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<mat-icon [svgIcon]=\"'rephrase'\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.REPHRASE' | translate\"></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<div [matTooltip]=\"(isTextSummarizable ? 'TOOLTIPS.CREATE_SUMMARY' : 'TLD_TRANSLATE.SUMMARY.DISABLED') | translate\">\r\n\t\t\t\t\t@if (!isSummarizationDisabled && firstParagraphTranslated) {\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tclass=\"tld-create-summary\"\r\n\t\t\t\t\t\t[disabled]=\"isTranslating || isSummarazing || !isTextSummarizable\"\r\n\t\t\t\t\t\t(click)=\"createSummary()\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon [svgIcon]=\"'summarize'\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.CREATE_SUMMARY' | translate\"></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t}\r\n\t\t\t\t</div>\r\n\t\t\t\t<tld-text-to-speech *ngIf=\"textToSpeechTargetSettings && firstParagraphTranslated\" [settings]=\"textToSpeechTargetSettings\"> </tld-text-to-speech>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"highlight-tree-wrapper\">\r\n\t\t\t\t<tld-highlight-tree *ngFor=\"let paragraph of targetParagraphs\" [highlight]=\"highlight\" [tree]=\"paragraph\"> </tld-highlight-tree>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div *ngIf=\"isSummarazing || summarizedText\" class=\"summary-wrapper\">\r\n\t\t\t\t<p class=\"summary-title\">{{ \"TLD_TRANSLATE.SUMMARY.TITLE\" | translate }}</p>\r\n\r\n\t\t\t\t<p *ngIf=\"isSummarazing\" class=\"creating-progress\">{{ \"TLD_TRANSLATE.SUMMARY.CREATING\" | translate }}<span class=\"dot-loading\">...</span></p>\r\n\r\n\t\t\t\t<p [innerHTML]=\"markedSummarizedText\"></p>\r\n\r\n\t\t\t\t<button\r\n\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t*ngIf=\"summarizedText\"\r\n\t\t\t\t\t[ngClass.lt-sm]=\"'summary-mobile'\"\r\n\t\t\t\t\tclass=\"summary-copy-btn\"\r\n\t\t\t\t\t(click)=\"copySummarizedText()\"\r\n\t\t\t\t\t[matTooltip]=\"'TOOLTIPS.COPY' | translate\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"material-icons\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.COPY' | translate\"> content_copy </span>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div *ngIf=\"isRephraseActive\" class=\"rephrase-wrapper\">\r\n\t\t\t\t<tld-rephrase [text]=\"translatedText\" [disabled]=\"isTranslating\" [language]=\"targetLanguage\"></tld-rephrase>\r\n\t\t\t</div>\t\r\n\r\n\t\t\t<div *ngIf=\"firstParagraphTranslated && dictionaryEntry\" class=\"dictionary-wrapper\">\r\n\t\t\t\t<tld-dictionary [dictionary]=\"dictionaryEntry\"></tld-dictionary>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\r\n\t\t<div *ngIf=\"urlToTranslate\" class=\"target-url-container\">\r\n\t\t\t<a [attr.href]=\"translateUrlRedirect\" target=\"_blank\" fxLayoutAlign=\"start center\" class=\"go-to-webtranslate\">\r\n\t\t\t\t{{ urlToTranslate }}\r\n\t\t\t\t<span class=\"material-icons\" color=\"accent\" aria-hidden=\"false\" [attr.aria-label]=\"'ARIA_LABELS.OPEN_IN_NEW'\"> open_in_new </span>\r\n\t\t\t</a>\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>\r\n", styles: [".hidden{display:none}.go-to-webtranslate{word-break:break-all;display:inline}.basic-padding,.target-empty,.target-translated-text{padding:18px}.source-container{border-right:1px solid #cbd2d9;padding:0;overflow:auto}.target-description{margin-top:0}.translated-source,.highlight-tree-wrapper{min-height:210px}.translated-source{position:relative;overflow-y:auto;overflow-x:hidden;flex:1 1 0!important;padding:18px 48px 18px 18px!important}.translated-source.selectable-sentence{cursor:pointer}::ng-deep .target-highlight .tld-highlight-container{padding:18px}.target-wrapper-action-buttons{position:absolute;top:3px;right:3px}.target-wrapper-action-buttons .tld-copy-translation,.target-wrapper-action-buttons .tld-refresh-translation,.target-wrapper-action-buttons tld-text-to-speech{display:block}.target-empty,.target-translated-text{margin:0}tld-dictionary{overflow-y:auto;flex:1 1 0!important}.source-main,.target-main{height:100%}.upload-file-text{color:var(--base-40);font-size:.875rem;display:inline-block;text-align:left}.file-upload-wrapper{width:100%}.file-upload-wrapper .file-upload-extensions{font-weight:400}.file-upload-max-size{white-space:nowrap}.dictionary-wrapper{margin-top:2rem;border-top:1px solid var(--base-70)}.rephrase-wrapper,.summary-wrapper{position:relative;margin-top:8px;padding-top:12px;border-top:1px solid var(--base-70)}.summary-title{font-size:1rem;margin-bottom:.5rem;font-weight:600}.creating-progress{color:var(--base-40)}:host ::ng-deep .dot-loading{clip-path:inset(0 100% 0 0);animation:loading 1.5s steps(4) infinite}.summary-copy-btn{position:absolute;right:-45px;top:20px}.summary-mobile{right:-46px}@keyframes loading{to{clip-path:inset(0 -34% 0 0)}}\n"] }]
|
|
9291
|
+
}], ctorParameters: () => [{ type: TldTranslateTextService }, { type: i2$2.Clipboard }, { type: i4.AlertService }, { type: TldTranslateConfigService }, { type: TldScrollService }, { type: TldTranslateSystemManagementService }, { type: AudioRecordService }, { type: TldVoiceInputService }, { type: TldTranslateFileService }, { type: i5$1.LLMService }], propDecorators: { sourceComponent: [{
|
|
9294
9292
|
type: ViewChild,
|
|
9295
9293
|
args: ["sourceComponent"]
|
|
9296
9294
|
}], dictateComponent: [{
|