@tilde-nlp/ngx-translate 2.0.1 → 2.0.3
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.
- package/esm2020/lib/components/shared/extension-dialog/extension-dialog.component.mjs +3 -3
- package/esm2020/lib/modules/tld-document/services/tld-translate-file.service.mjs +6 -2
- package/fesm2015/tilde-nlp-ngx-translate.mjs +76 -73
- package/fesm2015/tilde-nlp-ngx-translate.mjs.map +1 -1
- package/fesm2020/tilde-nlp-ngx-translate.mjs +76 -73
- package/fesm2020/tilde-nlp-ngx-translate.mjs.map +1 -1
- package/package.json +1 -1
- package/src/assets/webcomponent/tld-translate.js +1 -1
- package/tilde-nlp-ngx-translate-2.0.3.tgz +0 -0
- package/tilde-nlp-ngx-translate-2.0.1.tgz +0 -0
|
@@ -4850,6 +4850,76 @@ var FileConversionTypes;
|
|
|
4850
4850
|
FileConversionTypes["IMAGE"] = "IMAGE";
|
|
4851
4851
|
})(FileConversionTypes || (FileConversionTypes = {}));
|
|
4852
4852
|
|
|
4853
|
+
var FileTypeIcons;
|
|
4854
|
+
(function (FileTypeIcons) {
|
|
4855
|
+
FileTypeIcons["WORD"] = "file_type_word";
|
|
4856
|
+
FileTypeIcons["WEB"] = "file_type_web";
|
|
4857
|
+
FileTypeIcons["OTHER"] = "file_type_other";
|
|
4858
|
+
FileTypeIcons["POWERPOINT"] = "file_type_powerpoint";
|
|
4859
|
+
FileTypeIcons["EXCEL"] = "file_type_excel";
|
|
4860
|
+
FileTypeIcons["OFFICE_OTHER"] = "file_type_office_other";
|
|
4861
|
+
FileTypeIcons["PDF"] = "file_type_pdf";
|
|
4862
|
+
FileTypeIcons["SCANNED"] = "file_type_scanned";
|
|
4863
|
+
FileTypeIcons["INTERCHANGE"] = "file_type_interchange";
|
|
4864
|
+
})(FileTypeIcons || (FileTypeIcons = {}));
|
|
4865
|
+
|
|
4866
|
+
var FileCategories;
|
|
4867
|
+
(function (FileCategories) {
|
|
4868
|
+
FileCategories["OFFICE"] = "OFFICE";
|
|
4869
|
+
FileCategories["SCANNED"] = "SCANNED";
|
|
4870
|
+
FileCategories["INTERCHANGE"] = "INTERCHANGE";
|
|
4871
|
+
FileCategories["WEB"] = "WEB";
|
|
4872
|
+
FileCategories["OTHER"] = "OTHER";
|
|
4873
|
+
})(FileCategories || (FileCategories = {}));
|
|
4874
|
+
|
|
4875
|
+
var FileTypes;
|
|
4876
|
+
(function (FileTypes) {
|
|
4877
|
+
FileTypes["WORD"] = "WORD";
|
|
4878
|
+
FileTypes["WEB"] = "WEB";
|
|
4879
|
+
FileTypes["OTHER"] = "OTHER";
|
|
4880
|
+
FileTypes["POWERPOINT"] = "POWERPOINT";
|
|
4881
|
+
FileTypes["EXCEL"] = "EXCEL";
|
|
4882
|
+
FileTypes["OFFICE_OTHER"] = "OFFICE_OTHER";
|
|
4883
|
+
FileTypes["PDF"] = "PDF";
|
|
4884
|
+
FileTypes["SCANNED"] = "SCANNED";
|
|
4885
|
+
FileTypes["INTERCHANGE"] = "INTERCHANGE";
|
|
4886
|
+
})(FileTypes || (FileTypes = {}));
|
|
4887
|
+
|
|
4888
|
+
var FileExtensions;
|
|
4889
|
+
(function (FileExtensions) {
|
|
4890
|
+
FileExtensions["DOC"] = "doc";
|
|
4891
|
+
FileExtensions["DOCX"] = "docx";
|
|
4892
|
+
FileExtensions["XLSX"] = "xlsx";
|
|
4893
|
+
FileExtensions["PPTX"] = "pptx";
|
|
4894
|
+
FileExtensions["ODT"] = "odt";
|
|
4895
|
+
FileExtensions["ODP"] = "odp";
|
|
4896
|
+
FileExtensions["ODS"] = "ods";
|
|
4897
|
+
FileExtensions["TXT"] = "txt";
|
|
4898
|
+
FileExtensions["RTF"] = "rtf";
|
|
4899
|
+
FileExtensions["PAGES"] = "pages";
|
|
4900
|
+
FileExtensions["SXW"] = "sxw";
|
|
4901
|
+
FileExtensions["JPG"] = "jpg";
|
|
4902
|
+
FileExtensions["JPEG"] = "jpeg";
|
|
4903
|
+
FileExtensions["PNG"] = "png";
|
|
4904
|
+
FileExtensions["BMP"] = "bmp";
|
|
4905
|
+
FileExtensions["PDF"] = "pdf";
|
|
4906
|
+
FileExtensions["SDLXLIFF"] = "sdlxliff";
|
|
4907
|
+
FileExtensions["SDLXLF"] = "sdlxlf";
|
|
4908
|
+
FileExtensions["TTX"] = "ttx";
|
|
4909
|
+
FileExtensions["TMX"] = "tmx";
|
|
4910
|
+
FileExtensions["XLF"] = "xlf";
|
|
4911
|
+
FileExtensions["XLIF"] = "xlif";
|
|
4912
|
+
FileExtensions["HTML"] = "html";
|
|
4913
|
+
FileExtensions["HTM"] = "htm";
|
|
4914
|
+
FileExtensions["JSON"] = "json";
|
|
4915
|
+
FileExtensions["XHTML"] = "xhtml";
|
|
4916
|
+
FileExtensions["XHT"] = "xht";
|
|
4917
|
+
FileExtensions["XLIFF"] = "xliff";
|
|
4918
|
+
FileExtensions["TEX"] = "tex";
|
|
4919
|
+
FileExtensions["TTL"] = "ttl";
|
|
4920
|
+
FileExtensions["SRT"] = "srt";
|
|
4921
|
+
})(FileExtensions || (FileExtensions = {}));
|
|
4922
|
+
|
|
4853
4923
|
class TldTranslateFileService {
|
|
4854
4924
|
constructor(fileApi, alerts, sanitizer, config, tldSystem) {
|
|
4855
4925
|
this.fileApi = fileApi;
|
|
@@ -5137,8 +5207,11 @@ class TldTranslateFileService {
|
|
|
5137
5207
|
translationFile.filePreviewProgress = data.percentDone;
|
|
5138
5208
|
}
|
|
5139
5209
|
translatedDocPreview(translationFile) {
|
|
5210
|
+
// show preview for original extension if exists, if not, then preview for docx, if not then try with original filename.
|
|
5211
|
+
const fileName = translationFile.availableExtensions.find(ext => ext.extension === FileExtensions.DOCX)?.fileName
|
|
5212
|
+
?? translationFile.originalFileName;
|
|
5140
5213
|
const params = {
|
|
5141
|
-
fileName:
|
|
5214
|
+
fileName: fileName,
|
|
5142
5215
|
translationDocId: translationFile.id
|
|
5143
5216
|
};
|
|
5144
5217
|
this.fileApi.translatedDocumentPreview(params)
|
|
@@ -6447,76 +6520,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
6447
6520
|
}]
|
|
6448
6521
|
}] });
|
|
6449
6522
|
|
|
6450
|
-
var FileTypeIcons;
|
|
6451
|
-
(function (FileTypeIcons) {
|
|
6452
|
-
FileTypeIcons["WORD"] = "file_type_word";
|
|
6453
|
-
FileTypeIcons["WEB"] = "file_type_web";
|
|
6454
|
-
FileTypeIcons["OTHER"] = "file_type_other";
|
|
6455
|
-
FileTypeIcons["POWERPOINT"] = "file_type_powerpoint";
|
|
6456
|
-
FileTypeIcons["EXCEL"] = "file_type_excel";
|
|
6457
|
-
FileTypeIcons["OFFICE_OTHER"] = "file_type_office_other";
|
|
6458
|
-
FileTypeIcons["PDF"] = "file_type_pdf";
|
|
6459
|
-
FileTypeIcons["SCANNED"] = "file_type_scanned";
|
|
6460
|
-
FileTypeIcons["INTERCHANGE"] = "file_type_interchange";
|
|
6461
|
-
})(FileTypeIcons || (FileTypeIcons = {}));
|
|
6462
|
-
|
|
6463
|
-
var FileCategories;
|
|
6464
|
-
(function (FileCategories) {
|
|
6465
|
-
FileCategories["OFFICE"] = "OFFICE";
|
|
6466
|
-
FileCategories["SCANNED"] = "SCANNED";
|
|
6467
|
-
FileCategories["INTERCHANGE"] = "INTERCHANGE";
|
|
6468
|
-
FileCategories["WEB"] = "WEB";
|
|
6469
|
-
FileCategories["OTHER"] = "OTHER";
|
|
6470
|
-
})(FileCategories || (FileCategories = {}));
|
|
6471
|
-
|
|
6472
|
-
var FileTypes;
|
|
6473
|
-
(function (FileTypes) {
|
|
6474
|
-
FileTypes["WORD"] = "WORD";
|
|
6475
|
-
FileTypes["WEB"] = "WEB";
|
|
6476
|
-
FileTypes["OTHER"] = "OTHER";
|
|
6477
|
-
FileTypes["POWERPOINT"] = "POWERPOINT";
|
|
6478
|
-
FileTypes["EXCEL"] = "EXCEL";
|
|
6479
|
-
FileTypes["OFFICE_OTHER"] = "OFFICE_OTHER";
|
|
6480
|
-
FileTypes["PDF"] = "PDF";
|
|
6481
|
-
FileTypes["SCANNED"] = "SCANNED";
|
|
6482
|
-
FileTypes["INTERCHANGE"] = "INTERCHANGE";
|
|
6483
|
-
})(FileTypes || (FileTypes = {}));
|
|
6484
|
-
|
|
6485
|
-
var FileExtensions;
|
|
6486
|
-
(function (FileExtensions) {
|
|
6487
|
-
FileExtensions["DOC"] = "doc";
|
|
6488
|
-
FileExtensions["DOCX"] = "docx";
|
|
6489
|
-
FileExtensions["XLSX"] = "xlsx";
|
|
6490
|
-
FileExtensions["PPTX"] = "pptx";
|
|
6491
|
-
FileExtensions["ODT"] = "odt";
|
|
6492
|
-
FileExtensions["ODP"] = "odp";
|
|
6493
|
-
FileExtensions["ODS"] = "ods";
|
|
6494
|
-
FileExtensions["TXT"] = "txt";
|
|
6495
|
-
FileExtensions["RTF"] = "rtf";
|
|
6496
|
-
FileExtensions["PAGES"] = "pages";
|
|
6497
|
-
FileExtensions["SXW"] = "sxw";
|
|
6498
|
-
FileExtensions["JPG"] = "jpg";
|
|
6499
|
-
FileExtensions["JPEG"] = "jpeg";
|
|
6500
|
-
FileExtensions["PNG"] = "png";
|
|
6501
|
-
FileExtensions["BMP"] = "bmp";
|
|
6502
|
-
FileExtensions["PDF"] = "pdf";
|
|
6503
|
-
FileExtensions["SDLXLIFF"] = "sdlxliff";
|
|
6504
|
-
FileExtensions["SDLXLF"] = "sdlxlf";
|
|
6505
|
-
FileExtensions["TTX"] = "ttx";
|
|
6506
|
-
FileExtensions["TMX"] = "tmx";
|
|
6507
|
-
FileExtensions["XLF"] = "xlf";
|
|
6508
|
-
FileExtensions["XLIF"] = "xlif";
|
|
6509
|
-
FileExtensions["HTML"] = "html";
|
|
6510
|
-
FileExtensions["HTM"] = "htm";
|
|
6511
|
-
FileExtensions["JSON"] = "json";
|
|
6512
|
-
FileExtensions["XHTML"] = "xhtml";
|
|
6513
|
-
FileExtensions["XHT"] = "xht";
|
|
6514
|
-
FileExtensions["XLIFF"] = "xliff";
|
|
6515
|
-
FileExtensions["TEX"] = "tex";
|
|
6516
|
-
FileExtensions["TTL"] = "ttl";
|
|
6517
|
-
FileExtensions["SRT"] = "srt";
|
|
6518
|
-
})(FileExtensions || (FileExtensions = {}));
|
|
6519
|
-
|
|
6520
6523
|
class ExtensionDialogComponent {
|
|
6521
6524
|
constructor(data) {
|
|
6522
6525
|
this.data = data;
|
|
@@ -6630,10 +6633,10 @@ class ExtensionDialogComponent {
|
|
|
6630
6633
|
}
|
|
6631
6634
|
}
|
|
6632
6635
|
ExtensionDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ExtensionDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
6633
|
-
ExtensionDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ExtensionDialogComponent, selector: "app-extension-dialog", ngImport: i0, template: "<div mat-dialog-content>\r\n <tld-close-button mat-dialog-close></tld-close-button>\r\n\r\n <header>\r\n <h1>{{'EXTENSION_POPUP.TITLE' | translate}}</h1>\r\n <p class=\"description\">{{'EXTENSION_POPUP.DESCRIPTION' | translate}}</p>\r\n </header>\r\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\" [ngClass.lt-md]=\"'small-screen'\">\r\n
|
|
6636
|
+
ExtensionDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ExtensionDialogComponent, selector: "app-extension-dialog", ngImport: i0, template: "<div mat-dialog-content>\r\n <tld-close-button mat-dialog-close></tld-close-button>\r\n\r\n <header>\r\n <h1>{{'EXTENSION_POPUP.TITLE' | translate}}</h1>\r\n <p class=\"description\">{{'EXTENSION_POPUP.DESCRIPTION' | translate}}</p>\r\n </header>\r\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\" [ngClass.lt-md]=\"'small-screen'\">\r\n <ng-container *ngFor=\"let category of config.elements\">\r\n <div *ngIf=\"category.anyVisible\" class=\"category\">\r\n <h2 class=\"category-title\">\r\n {{ 'EXTENSION_POPUP.' + category.category | translate }}\r\n </h2>\r\n <div fxLayout=\"row\">\r\n <div *ngFor=\"let column of category.columns\" class=\"extension-column\">\r\n <ul *ngIf=\"column.anyVisible\">\r\n <ng-container *ngFor=\"let extension of column.extensions\">\r\n <li *ngIf=\"extension.visible\" fxLayoutAlign=\"start center\">\r\n <mat-icon svgIcon=\"{{ extension.icon }}\" aria-hidden=\"false\"[attr.aria-label]=\"extension.extension\"></mat-icon>\r\n <span>{{ extension.extension }}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", styles: ["[mat-dialog-content]{position:relative}[mat-dialog-content] tld-close-button{position:absolute;right:1em;top:0}[mat-dialog-content] header{margin-bottom:1.5em;text-align:center}[mat-dialog-content] header h1{font-size:20px;font-weight:500;margin:0 0 .5em}[mat-dialog-content] header p{margin:0}[mat-dialog-content] ul{list-style-type:none;margin:0;padding:0}[mat-dialog-content] ul li+li{margin-top:.5em}[mat-dialog-content] .category-title{border-bottom:1px solid var(--base-70);font-size:.875em;font-weight:500;text-align:center;padding-bottom:.5em;line-height:1.25em}[mat-dialog-content] .extension-column{font-size:.875em;line-height:1.25em}[mat-dialog-content] .extension-column+.extension-column{margin-left:1em}[mat-dialog-content] :not(.small-screen) .category+.category{margin-left:3em}[mat-dialog-content] mat-icon{width:20px;height:20px}[mat-dialog-content] .description{font-size:.875em}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4.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: i4.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: i5$1.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: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i12.CloseButtonComponent, selector: "tld-close-button", inputs: ["ariaCode", "disabled", "tooltip"], outputs: ["tldClick"] }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
|
|
6634
6637
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ExtensionDialogComponent, decorators: [{
|
|
6635
6638
|
type: Component,
|
|
6636
|
-
args: [{ selector: 'app-extension-dialog', template: "<div mat-dialog-content>\r\n <tld-close-button mat-dialog-close></tld-close-button>\r\n\r\n <header>\r\n <h1>{{'EXTENSION_POPUP.TITLE' | translate}}</h1>\r\n <p class=\"description\">{{'EXTENSION_POPUP.DESCRIPTION' | translate}}</p>\r\n </header>\r\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\" [ngClass.lt-md]=\"'small-screen'\">\r\n
|
|
6639
|
+
args: [{ selector: 'app-extension-dialog', template: "<div mat-dialog-content>\r\n <tld-close-button mat-dialog-close></tld-close-button>\r\n\r\n <header>\r\n <h1>{{'EXTENSION_POPUP.TITLE' | translate}}</h1>\r\n <p class=\"description\">{{'EXTENSION_POPUP.DESCRIPTION' | translate}}</p>\r\n </header>\r\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\" [ngClass.lt-md]=\"'small-screen'\">\r\n <ng-container *ngFor=\"let category of config.elements\">\r\n <div *ngIf=\"category.anyVisible\" class=\"category\">\r\n <h2 class=\"category-title\">\r\n {{ 'EXTENSION_POPUP.' + category.category | translate }}\r\n </h2>\r\n <div fxLayout=\"row\">\r\n <div *ngFor=\"let column of category.columns\" class=\"extension-column\">\r\n <ul *ngIf=\"column.anyVisible\">\r\n <ng-container *ngFor=\"let extension of column.extensions\">\r\n <li *ngIf=\"extension.visible\" fxLayoutAlign=\"start center\">\r\n <mat-icon svgIcon=\"{{ extension.icon }}\" aria-hidden=\"false\"[attr.aria-label]=\"extension.extension\"></mat-icon>\r\n <span>{{ extension.extension }}</span>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n", styles: ["[mat-dialog-content]{position:relative}[mat-dialog-content] tld-close-button{position:absolute;right:1em;top:0}[mat-dialog-content] header{margin-bottom:1.5em;text-align:center}[mat-dialog-content] header h1{font-size:20px;font-weight:500;margin:0 0 .5em}[mat-dialog-content] header p{margin:0}[mat-dialog-content] ul{list-style-type:none;margin:0;padding:0}[mat-dialog-content] ul li+li{margin-top:.5em}[mat-dialog-content] .category-title{border-bottom:1px solid var(--base-70);font-size:.875em;font-weight:500;text-align:center;padding-bottom:.5em;line-height:1.25em}[mat-dialog-content] .extension-column{font-size:.875em;line-height:1.25em}[mat-dialog-content] .extension-column+.extension-column{margin-left:1em}[mat-dialog-content] :not(.small-screen) .category+.category{margin-left:3em}[mat-dialog-content] mat-icon{width:20px;height:20px}[mat-dialog-content] .description{font-size:.875em}\n"] }]
|
|
6637
6640
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
6638
6641
|
type: Inject,
|
|
6639
6642
|
args: [MAT_DIALOG_DATA]
|