@tilde-nlp/ngx-translate 2.1.13 → 2.1.15

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.
Files changed (25) hide show
  1. package/esm2020/lib/factories/file-api-service.factory.mjs +4 -4
  2. package/esm2020/lib/factories/text-api-service.factory.mjs +2 -2
  3. package/esm2020/lib/i18n/en.mjs +3 -2
  4. package/esm2020/lib/modules/tld-common/models/services/text-api/translate-paragraph-request-params.model.mjs +1 -1
  5. package/esm2020/lib/modules/tld-document/services/api-v2/file-api-v2.service.mjs +9 -4
  6. package/esm2020/lib/modules/tld-term/services/models/combined-collection-tooltip-key.enum.mjs +2 -1
  7. package/esm2020/lib/modules/tld-term/services/models/combined-collection.model.mjs +4 -2
  8. package/esm2020/lib/modules/tld-term/tld-term-collection-list/tld-term-collection-list.component.mjs +3 -3
  9. package/esm2020/lib/modules/tld-text/models/translate-paragraph-params.model.mjs +1 -1
  10. package/esm2020/lib/modules/tld-text/services/api-v2/tld-translate-text-api-v2.service.mjs +9 -4
  11. package/fesm2015/tilde-nlp-ngx-translate.mjs +28 -14
  12. package/fesm2015/tilde-nlp-ngx-translate.mjs.map +1 -1
  13. package/fesm2020/tilde-nlp-ngx-translate.mjs +26 -14
  14. package/fesm2020/tilde-nlp-ngx-translate.mjs.map +1 -1
  15. package/lib/factories/file-api-service.factory.d.ts +1 -1
  16. package/lib/i18n/en.d.ts +1 -0
  17. package/lib/modules/tld-document/services/api-v2/file-api-v2.service.d.ts +3 -1
  18. package/lib/modules/tld-term/services/models/combined-collection-tooltip-key.enum.d.ts +2 -1
  19. package/lib/modules/tld-term/services/models/combined-collection.model.d.ts +2 -0
  20. package/lib/modules/tld-text/models/translate-paragraph-params.model.d.ts +1 -0
  21. package/lib/modules/tld-text/services/api-v2/tld-translate-text-api-v2.service.d.ts +3 -1
  22. package/package.json +1 -1
  23. package/src/assets/webcomponent/tld-translate.js +1 -1
  24. package/tilde-nlp-ngx-translate-2.1.15.tgz +0 -0
  25. package/tilde-nlp-ngx-translate-2.1.13.tgz +0 -0
@@ -760,8 +760,9 @@ const i18n_en = {
760
760
  },
761
761
  "TOOLTIPS": {
762
762
  "EDIT": "Edit glossary in terminology portal",
763
- "IMPORTING": "Updating glossary, terms will be availble shortly.",
763
+ "IMPORTING": "Importing glossary",
764
764
  "NO_ENTRIES": "Term collection cannot be used: no terms in source language",
765
+ "DEFAULT_COLLECTION": "These terms are now in use. You can manage them through Default glossary management. ",
765
766
  "SYNC": "Update the term collection",
766
767
  "SYNCING": "Term collection is synced, the latest version of the collection will be used",
767
768
  "ATTACH_TO_SYSTEM_ERROR": "An error has occured while importing the term collection"
@@ -5688,6 +5689,7 @@ var EngineTermCollectionSubStatus;
5688
5689
  var CombinedCollectionTooltipKey;
5689
5690
  (function (CombinedCollectionTooltipKey) {
5690
5691
  CombinedCollectionTooltipKey["NO_ENTRIES"] = "NO_ENTRIES";
5692
+ CombinedCollectionTooltipKey["DEFAULT_COLLECTION"] = "DEFAULT_COLLECTION";
5691
5693
  })(CombinedCollectionTooltipKey || (CombinedCollectionTooltipKey = {}));
5692
5694
 
5693
5695
  var MtCollectionStatus;
@@ -5794,6 +5796,7 @@ class CombinedCollection {
5794
5796
  get termCount() {
5795
5797
  return this.mtCollection?.termCount;
5796
5798
  }
5799
+ get isTermPortalCollection() { return this._isTermPortalCollection; }
5797
5800
  get isImporting() { return this._isImporting; }
5798
5801
  /**
5799
5802
  * Updates collection with values from new collection.
@@ -5807,6 +5810,7 @@ class CombinedCollection {
5807
5810
  if (collection?.mtCollection) {
5808
5811
  this.mtCollection = collection.mtCollection;
5809
5812
  }
5813
+ this._isTermPortalCollection = (this.termCollection || this.mtCollection.termId) ? true : false;
5810
5814
  if (initialRefresh) {
5811
5815
  this.updateEditables(this.mtCollection?.default, this.mtCollection?.scope ?? EngineTermCollectionScope.GLOBAL, this.mtCollection?.order);
5812
5816
  }
@@ -5873,7 +5877,7 @@ class CombinedCollection {
5873
5877
  }
5874
5878
  updateTooltipKey() {
5875
5879
  if (this.default) {
5876
- this.termTooltipKey = null;
5880
+ this.termTooltipKey = CombinedCollectionTooltipKey.DEFAULT_COLLECTION;
5877
5881
  }
5878
5882
  else if (this.termCollection?.entryCount === 0) {
5879
5883
  this.termTooltipKey = CombinedCollectionTooltipKey.NO_ENTRIES;
@@ -6475,10 +6479,10 @@ class TldTermCollectionListComponent {
6475
6479
  }
6476
6480
  }
6477
6481
  TldTermCollectionListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TldTermCollectionListComponent, deps: [{ token: TerminologyService }, { token: TldTranslateConfigService }, { token: TldSystemService }, { token: TermApiService }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
6478
- TldTermCollectionListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TldTermCollectionListComponent, selector: "tld-term-collection-list", ngImport: i0, template: "<header class=\"tld-collection-list-header\">\r\n <h1 class=\"text-l-semi-bold\">\r\n <span>{{localizationKey + 'TITLE' | translate}}</span>\r\n </h1>\r\n <ng-container *ngIf=\"hasAnyCollections\">\r\n <p class=\"term-window-description text-s\">\r\n <span>{{localizationKey + 'DESCRIPTION' | translate}}</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasAnyCollections\">\r\n <p class=\"term-window-description text-s\" fxHide.lt-sm>{{localizationKey + 'DESCRIPTION_EMPTY' | translate:\r\n {srcLang:\r\n sourceLangTranslated, trgLang: targetLangTranslated} }}</p>\r\n <p class=\"term-window-description text-s\" fxHide.gt-xs>{{localizationKey + 'DESCRIPTION_EMPTY_MOBILE' | translate:\r\n {appName: appName} }}</p>\r\n </ng-container>\r\n</header>\r\n<div *ngIf=\"hasAnyCollections\" class=\"tld-collection-list-body\">\r\n <mat-radio-group [attr.aria-label]=\"localizationKey + 'ARIA_LABELS.RADIO_GROUP' | translate\" [(ngModel)]=\"selected\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <mat-radio-button [value]=\"null\">\r\n <span class=\"text-m-semi-bold\">\r\n {{localizationKey + 'SELECTED_NONE' | translate}}\r\n </span>\r\n </mat-radio-button>\r\n </div>\r\n <div class=\"collection\" fxLayout=\"row\" fxLayoutAlign=\"start center\" *ngFor=\"let collection of collections | async\"\r\n [matTooltip]=\"collection.termTooltipKey? (tooltipLocalizationKey + collection.termTooltipKey | translate) : ''\">\r\n <mat-radio-button [value]=\"collection\" fxFlex\r\n [class.mat-radio-checked]=\"collection.default || collection===selected\"\r\n [disabled]=\"collection.termId !== null && collection.termEntries<=0 || collection.default\"\r\n fxLayoutAlign=\"center center\">\r\n <div>\r\n <span class=\"collection-label text-m-semi-bold\"\r\n [matTooltip]=\"collection.termTooltipKey? '' : collection.name\">\r\n {{collection.name}}\r\n </span>\r\n <span class=\"default-badge\" *ngIf=\"collection.default\">{{localizationKey + 'DEFAULT' | translate}}</span>\r\n </div>\r\n <span *ngIf=\"collection.termCount\" class=\"collection-label-block text-s\">\r\n {{ localizationKey + ('TERMS_IN_USE') | translate: { termCount: collection.termCount } }}\r\n </span>\r\n <span *ngIf=\"collection.lastUpdated\" class=\"collection-label-block text-s\">\r\n {{ localizationKey + ('LAST_UPDATED') | translate: { date: collection.lastUpdated | dateAgo } }}\r\n </span>\r\n </mat-radio-button>\r\n\r\n <span *ngIf=\" collection.mtStatus === collectionErrorStatus\" color=\"accent\" class=\"material-icons\">\r\n error\r\n </span>\r\n\r\n <mat-spinner [matTooltip]=\"tooltipLocalizationKey + 'IMPORTING' | translate\" color=\"accent\" diameter=\"20\" *ngIf=\"collection.isImporting\"></mat-spinner>\r\n <ng-container *ngIf=\"hasEditPermissions\">\r\n <button mat-button *ngIf=\"collection.syncButtonVisible\" (click)=\"attach(collection)\" color=\"primary\"\r\n [matTooltip]=\"tooltipLocalizationKey + 'SYNC' | translate\" [disabled]=\"collection.isImporting\">\r\n {{localizationKey + (collectionErrorStatus === collection.mtStatus? 'SYNC_ERROR': 'SYNC') | translate}}\r\n </button>\r\n <a mat-icon-button target=\"_blank\"\r\n [matTooltip]=\"collection.termTooltipKey? '' : (tooltipLocalizationKey + 'EDIT' | translate)\"\r\n [attr.href]=\"getEditLink(collection)\" *ngIf=\"collection.termCollection\" fxHide.lt-sm>\r\n <mat-icon class=\"material-icons\">edit</mat-icon>\r\n </a>\r\n </ng-container>\r\n </div>\r\n </mat-radio-group>\r\n</div>\r\n", styles: [".tld-collection-list-body,.tld-collection-list-header{padding:1em .75em}.collection-label{max-width:215px;overflow:hidden;text-overflow:ellipsis}.collection-label-block{display:block}.default-badge{background-color:#9aa5b1;color:var(--base-100);font-size:10px;border-radius:12px;padding:4px 8px;line-height:16px;display:inline-block}:host ::ng-deep .mat-radio-button{overflow:hidden;padding:5px 0}:host ::ng-deep .mat-radio-button .mat-radio-ripple{display:none}:host ::ng-deep .mat-radio-button .mat-radio-label-content{overflow:hidden}.collection{min-height:70px;border-top:1px solid #cbd2d9}\n"], dependencies: [{ kind: "directive", type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i11$1.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i11$1.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { 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: i4.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: i5.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { kind: "component", type: i14.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: i12.DateAgoPipe, name: "dateAgo" }] });
6482
+ TldTermCollectionListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TldTermCollectionListComponent, selector: "tld-term-collection-list", ngImport: i0, template: "<header class=\"tld-collection-list-header\">\r\n <h1 class=\"text-l-semi-bold\">\r\n <span>{{localizationKey + 'TITLE' | translate}}</span>\r\n </h1>\r\n <ng-container *ngIf=\"hasAnyCollections\">\r\n <p class=\"term-window-description text-s\">\r\n <span>{{localizationKey + 'DESCRIPTION' | translate}}</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasAnyCollections\">\r\n <p class=\"term-window-description text-s\" fxHide.lt-sm>{{localizationKey + 'DESCRIPTION_EMPTY' | translate:\r\n {srcLang:\r\n sourceLangTranslated, trgLang: targetLangTranslated} }}</p>\r\n <p class=\"term-window-description text-s\" fxHide.gt-xs>{{localizationKey + 'DESCRIPTION_EMPTY_MOBILE' | translate:\r\n {appName: appName} }}</p>\r\n </ng-container>\r\n</header>\r\n<div *ngIf=\"hasAnyCollections\" class=\"tld-collection-list-body\">\r\n <mat-radio-group [attr.aria-label]=\"localizationKey + 'ARIA_LABELS.RADIO_GROUP' | translate\" [(ngModel)]=\"selected\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <mat-radio-button [value]=\"null\">\r\n <span class=\"text-m-semi-bold\">\r\n {{localizationKey + 'SELECTED_NONE' | translate}}\r\n </span>\r\n </mat-radio-button>\r\n </div>\r\n <div class=\"collection\" fxLayout=\"row\" fxLayoutAlign=\"start center\" *ngFor=\"let collection of collections | async\"\r\n [matTooltip]=\"collection.termTooltipKey? (tooltipLocalizationKey + collection.termTooltipKey | translate) : ''\">\r\n <mat-radio-button [value]=\"collection\" fxFlex\r\n [class.mat-radio-checked]=\"collection.default || collection===selected\"\r\n [disabled]=\"collection.termId !== null && collection.termEntries<=0 || collection.default\"\r\n fxLayoutAlign=\"center center\">\r\n <div>\r\n <span class=\"collection-label text-m-semi-bold\"\r\n [matTooltip]=\"collection.termTooltipKey? '' : collection.name\">\r\n {{collection.name}}\r\n </span>\r\n <span class=\"default-badge\" *ngIf=\"collection.default\">{{localizationKey + 'DEFAULT' | translate}}</span>\r\n </div>\r\n <span *ngIf=\"collection.termCount\" class=\"collection-label-block text-s\">\r\n {{ localizationKey + ('TERMS_IN_USE') | translate: { termCount: collection.termCount } }}\r\n </span>\r\n <span *ngIf=\"collection.lastUpdated\" class=\"collection-label-block text-s\">\r\n {{ localizationKey + ('LAST_UPDATED') | translate: { date: collection.lastUpdated | dateAgo } }}\r\n </span>\r\n <span class=\"collection-label-block text-s\" fxLayout=\"row\" fxLayoutAlign=\"center center\" fxLayoutGap=\"0.5rem\"\r\n *ngIf=\"collection.isImporting\">\r\n <mat-spinner color=\"accent\" diameter=\"20\">\r\n </mat-spinner>\r\n <span>\r\n {{tooltipLocalizationKey + 'IMPORTING' | translate}}\r\n </span>\r\n </span>\r\n </mat-radio-button>\r\n\r\n <span *ngIf=\" collection.mtStatus === collectionErrorStatus\" color=\"accent\" class=\"material-icons\">\r\n error\r\n </span>\r\n <ng-container *ngIf=\"hasEditPermissions\">\r\n <button mat-button *ngIf=\"collection.syncButtonVisible\" (click)=\"attach(collection)\" color=\"primary\"\r\n [matTooltip]=\"tooltipLocalizationKey + 'SYNC' | translate\" [disabled]=\"collection.isImporting\">\r\n {{localizationKey + (collectionErrorStatus === collection.mtStatus? 'SYNC_ERROR': 'SYNC') | translate}}\r\n </button>\r\n <a mat-icon-button target=\"_blank\"\r\n [matTooltip]=\"collection.termTooltipKey? '' : (tooltipLocalizationKey + 'EDIT' | translate)\"\r\n [attr.href]=\"getEditLink(collection)\" *ngIf=\"collection.termCollection\" fxHide.lt-sm>\r\n <mat-icon class=\"material-icons\">edit</mat-icon>\r\n </a>\r\n </ng-container>\r\n </div>\r\n </mat-radio-group>\r\n</div>\r\n", styles: [".tld-collection-list-body,.tld-collection-list-header{padding:1em .75em}.collection-label{max-width:215px;overflow:hidden;text-overflow:ellipsis}.collection-label-block{display:block}.default-badge{background-color:#9aa5b1;color:var(--base-100);font-size:10px;border-radius:12px;padding:4px 8px;line-height:16px;display:inline-block}:host ::ng-deep .mat-radio-button{overflow:hidden;padding:5px 0}:host ::ng-deep .mat-radio-button .mat-radio-ripple{display:none}:host ::ng-deep .mat-radio-button .mat-radio-label-content{overflow:hidden}.collection{min-height:70px;border-top:1px solid #cbd2d9}mat-spinner{display:inline-block}\n"], dependencies: [{ kind: "directive", type: i4$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4$1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i11$1.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i11$1.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { 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.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: 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: i4.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: i5.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }, { kind: "component", type: i14.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "diameter", "strokeWidth", "mode", "value"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }, { kind: "pipe", type: i12.DateAgoPipe, name: "dateAgo" }] });
6479
6483
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TldTermCollectionListComponent, decorators: [{
6480
6484
  type: Component,
6481
- args: [{ selector: 'tld-term-collection-list', template: "<header class=\"tld-collection-list-header\">\r\n <h1 class=\"text-l-semi-bold\">\r\n <span>{{localizationKey + 'TITLE' | translate}}</span>\r\n </h1>\r\n <ng-container *ngIf=\"hasAnyCollections\">\r\n <p class=\"term-window-description text-s\">\r\n <span>{{localizationKey + 'DESCRIPTION' | translate}}</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasAnyCollections\">\r\n <p class=\"term-window-description text-s\" fxHide.lt-sm>{{localizationKey + 'DESCRIPTION_EMPTY' | translate:\r\n {srcLang:\r\n sourceLangTranslated, trgLang: targetLangTranslated} }}</p>\r\n <p class=\"term-window-description text-s\" fxHide.gt-xs>{{localizationKey + 'DESCRIPTION_EMPTY_MOBILE' | translate:\r\n {appName: appName} }}</p>\r\n </ng-container>\r\n</header>\r\n<div *ngIf=\"hasAnyCollections\" class=\"tld-collection-list-body\">\r\n <mat-radio-group [attr.aria-label]=\"localizationKey + 'ARIA_LABELS.RADIO_GROUP' | translate\" [(ngModel)]=\"selected\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <mat-radio-button [value]=\"null\">\r\n <span class=\"text-m-semi-bold\">\r\n {{localizationKey + 'SELECTED_NONE' | translate}}\r\n </span>\r\n </mat-radio-button>\r\n </div>\r\n <div class=\"collection\" fxLayout=\"row\" fxLayoutAlign=\"start center\" *ngFor=\"let collection of collections | async\"\r\n [matTooltip]=\"collection.termTooltipKey? (tooltipLocalizationKey + collection.termTooltipKey | translate) : ''\">\r\n <mat-radio-button [value]=\"collection\" fxFlex\r\n [class.mat-radio-checked]=\"collection.default || collection===selected\"\r\n [disabled]=\"collection.termId !== null && collection.termEntries<=0 || collection.default\"\r\n fxLayoutAlign=\"center center\">\r\n <div>\r\n <span class=\"collection-label text-m-semi-bold\"\r\n [matTooltip]=\"collection.termTooltipKey? '' : collection.name\">\r\n {{collection.name}}\r\n </span>\r\n <span class=\"default-badge\" *ngIf=\"collection.default\">{{localizationKey + 'DEFAULT' | translate}}</span>\r\n </div>\r\n <span *ngIf=\"collection.termCount\" class=\"collection-label-block text-s\">\r\n {{ localizationKey + ('TERMS_IN_USE') | translate: { termCount: collection.termCount } }}\r\n </span>\r\n <span *ngIf=\"collection.lastUpdated\" class=\"collection-label-block text-s\">\r\n {{ localizationKey + ('LAST_UPDATED') | translate: { date: collection.lastUpdated | dateAgo } }}\r\n </span>\r\n </mat-radio-button>\r\n\r\n <span *ngIf=\" collection.mtStatus === collectionErrorStatus\" color=\"accent\" class=\"material-icons\">\r\n error\r\n </span>\r\n\r\n <mat-spinner [matTooltip]=\"tooltipLocalizationKey + 'IMPORTING' | translate\" color=\"accent\" diameter=\"20\" *ngIf=\"collection.isImporting\"></mat-spinner>\r\n <ng-container *ngIf=\"hasEditPermissions\">\r\n <button mat-button *ngIf=\"collection.syncButtonVisible\" (click)=\"attach(collection)\" color=\"primary\"\r\n [matTooltip]=\"tooltipLocalizationKey + 'SYNC' | translate\" [disabled]=\"collection.isImporting\">\r\n {{localizationKey + (collectionErrorStatus === collection.mtStatus? 'SYNC_ERROR': 'SYNC') | translate}}\r\n </button>\r\n <a mat-icon-button target=\"_blank\"\r\n [matTooltip]=\"collection.termTooltipKey? '' : (tooltipLocalizationKey + 'EDIT' | translate)\"\r\n [attr.href]=\"getEditLink(collection)\" *ngIf=\"collection.termCollection\" fxHide.lt-sm>\r\n <mat-icon class=\"material-icons\">edit</mat-icon>\r\n </a>\r\n </ng-container>\r\n </div>\r\n </mat-radio-group>\r\n</div>\r\n", styles: [".tld-collection-list-body,.tld-collection-list-header{padding:1em .75em}.collection-label{max-width:215px;overflow:hidden;text-overflow:ellipsis}.collection-label-block{display:block}.default-badge{background-color:#9aa5b1;color:var(--base-100);font-size:10px;border-radius:12px;padding:4px 8px;line-height:16px;display:inline-block}:host ::ng-deep .mat-radio-button{overflow:hidden;padding:5px 0}:host ::ng-deep .mat-radio-button .mat-radio-ripple{display:none}:host ::ng-deep .mat-radio-button .mat-radio-label-content{overflow:hidden}.collection{min-height:70px;border-top:1px solid #cbd2d9}\n"] }]
6485
+ args: [{ selector: 'tld-term-collection-list', template: "<header class=\"tld-collection-list-header\">\r\n <h1 class=\"text-l-semi-bold\">\r\n <span>{{localizationKey + 'TITLE' | translate}}</span>\r\n </h1>\r\n <ng-container *ngIf=\"hasAnyCollections\">\r\n <p class=\"term-window-description text-s\">\r\n <span>{{localizationKey + 'DESCRIPTION' | translate}}</span>\r\n </p>\r\n </ng-container>\r\n <ng-container *ngIf=\"!hasAnyCollections\">\r\n <p class=\"term-window-description text-s\" fxHide.lt-sm>{{localizationKey + 'DESCRIPTION_EMPTY' | translate:\r\n {srcLang:\r\n sourceLangTranslated, trgLang: targetLangTranslated} }}</p>\r\n <p class=\"term-window-description text-s\" fxHide.gt-xs>{{localizationKey + 'DESCRIPTION_EMPTY_MOBILE' | translate:\r\n {appName: appName} }}</p>\r\n </ng-container>\r\n</header>\r\n<div *ngIf=\"hasAnyCollections\" class=\"tld-collection-list-body\">\r\n <mat-radio-group [attr.aria-label]=\"localizationKey + 'ARIA_LABELS.RADIO_GROUP' | translate\" [(ngModel)]=\"selected\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <mat-radio-button [value]=\"null\">\r\n <span class=\"text-m-semi-bold\">\r\n {{localizationKey + 'SELECTED_NONE' | translate}}\r\n </span>\r\n </mat-radio-button>\r\n </div>\r\n <div class=\"collection\" fxLayout=\"row\" fxLayoutAlign=\"start center\" *ngFor=\"let collection of collections | async\"\r\n [matTooltip]=\"collection.termTooltipKey? (tooltipLocalizationKey + collection.termTooltipKey | translate) : ''\">\r\n <mat-radio-button [value]=\"collection\" fxFlex\r\n [class.mat-radio-checked]=\"collection.default || collection===selected\"\r\n [disabled]=\"collection.termId !== null && collection.termEntries<=0 || collection.default\"\r\n fxLayoutAlign=\"center center\">\r\n <div>\r\n <span class=\"collection-label text-m-semi-bold\"\r\n [matTooltip]=\"collection.termTooltipKey? '' : collection.name\">\r\n {{collection.name}}\r\n </span>\r\n <span class=\"default-badge\" *ngIf=\"collection.default\">{{localizationKey + 'DEFAULT' | translate}}</span>\r\n </div>\r\n <span *ngIf=\"collection.termCount\" class=\"collection-label-block text-s\">\r\n {{ localizationKey + ('TERMS_IN_USE') | translate: { termCount: collection.termCount } }}\r\n </span>\r\n <span *ngIf=\"collection.lastUpdated\" class=\"collection-label-block text-s\">\r\n {{ localizationKey + ('LAST_UPDATED') | translate: { date: collection.lastUpdated | dateAgo } }}\r\n </span>\r\n <span class=\"collection-label-block text-s\" fxLayout=\"row\" fxLayoutAlign=\"center center\" fxLayoutGap=\"0.5rem\"\r\n *ngIf=\"collection.isImporting\">\r\n <mat-spinner color=\"accent\" diameter=\"20\">\r\n </mat-spinner>\r\n <span>\r\n {{tooltipLocalizationKey + 'IMPORTING' | translate}}\r\n </span>\r\n </span>\r\n </mat-radio-button>\r\n\r\n <span *ngIf=\" collection.mtStatus === collectionErrorStatus\" color=\"accent\" class=\"material-icons\">\r\n error\r\n </span>\r\n <ng-container *ngIf=\"hasEditPermissions\">\r\n <button mat-button *ngIf=\"collection.syncButtonVisible\" (click)=\"attach(collection)\" color=\"primary\"\r\n [matTooltip]=\"tooltipLocalizationKey + 'SYNC' | translate\" [disabled]=\"collection.isImporting\">\r\n {{localizationKey + (collectionErrorStatus === collection.mtStatus? 'SYNC_ERROR': 'SYNC') | translate}}\r\n </button>\r\n <a mat-icon-button target=\"_blank\"\r\n [matTooltip]=\"collection.termTooltipKey? '' : (tooltipLocalizationKey + 'EDIT' | translate)\"\r\n [attr.href]=\"getEditLink(collection)\" *ngIf=\"collection.termCollection\" fxHide.lt-sm>\r\n <mat-icon class=\"material-icons\">edit</mat-icon>\r\n </a>\r\n </ng-container>\r\n </div>\r\n </mat-radio-group>\r\n</div>\r\n", styles: [".tld-collection-list-body,.tld-collection-list-header{padding:1em .75em}.collection-label{max-width:215px;overflow:hidden;text-overflow:ellipsis}.collection-label-block{display:block}.default-badge{background-color:#9aa5b1;color:var(--base-100);font-size:10px;border-radius:12px;padding:4px 8px;line-height:16px;display:inline-block}:host ::ng-deep .mat-radio-button{overflow:hidden;padding:5px 0}:host ::ng-deep .mat-radio-button .mat-radio-ripple{display:none}:host ::ng-deep .mat-radio-button .mat-radio-label-content{overflow:hidden}.collection{min-height:70px;border-top:1px solid #cbd2d9}mat-spinner{display:inline-block}\n"] }]
6482
6486
  }], ctorParameters: function () { return [{ type: TerminologyService }, { type: TldTranslateConfigService }, { type: TldSystemService }, { type: TermApiService }, { type: i1$1.TranslateService }]; } });
6483
6487
 
6484
6488
  class WtwLinkParamsService {
@@ -10556,9 +10560,10 @@ var FileV2Category;
10556
10560
  })(FileV2Category || (FileV2Category = {}));
10557
10561
 
10558
10562
  class FileApiV2Service {
10559
- constructor(http, config) {
10563
+ constructor(http, config, terminologyService) {
10560
10564
  this.http = http;
10561
10565
  this.config = config;
10566
+ this.terminologyService = terminologyService;
10562
10567
  }
10563
10568
  get url() {
10564
10569
  return this.config.apiV2Config.fileTranslationUrl;
@@ -10577,6 +10582,9 @@ class FileApiV2Service {
10577
10582
  formData.append("fileName", properties.file.originalFileName);
10578
10583
  formData.append("srcLang", properties.system.sourceLanguage);
10579
10584
  formData.append("trgLang", properties.system.targetLanguage);
10585
+ if (this.terminologyService.selected) {
10586
+ formData.append("termCollections", JSON.stringify([this.terminologyService.selected.mtCollection?.id]));
10587
+ }
10580
10588
  if (properties.system.domain) {
10581
10589
  formData.append("domain", properties.system.domain);
10582
10590
  }
@@ -10625,21 +10633,21 @@ class FileApiV2Service {
10625
10633
  }));
10626
10634
  }
10627
10635
  }
10628
- FileApiV2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileApiV2Service, deps: [{ token: i1$3.HttpClient }, { token: TldTranslateConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
10636
+ FileApiV2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileApiV2Service, deps: [{ token: i1$3.HttpClient }, { token: TldTranslateConfigService }, { token: TerminologyService }], target: i0.ɵɵFactoryTarget.Injectable });
10629
10637
  FileApiV2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileApiV2Service, providedIn: 'root' });
10630
10638
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FileApiV2Service, decorators: [{
10631
10639
  type: Injectable,
10632
10640
  args: [{
10633
10641
  providedIn: 'root'
10634
10642
  }]
10635
- }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: TldTranslateConfigService }]; } });
10643
+ }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: TldTranslateConfigService }, { type: TerminologyService }]; } });
10636
10644
 
10637
- function fileApiServiceFactory(version, config, http, collectionsService, alerts) {
10645
+ function fileApiServiceFactory(version, config, http, terminologyService, alerts) {
10638
10646
  if (version === TranslationApiVersion.V2) {
10639
- return new FileApiV2Service(http, config);
10647
+ return new FileApiV2Service(http, config, terminologyService);
10640
10648
  }
10641
10649
  else {
10642
- return new TldTranslateFileApiService(http, config, collectionsService, alerts);
10650
+ return new TldTranslateFileApiService(http, config, terminologyService, alerts);
10643
10651
  }
10644
10652
  }
10645
10653
 
@@ -10765,9 +10773,10 @@ function systemServiceFactory(version, config, http) {
10765
10773
  }
10766
10774
 
10767
10775
  class TldTranslateTextApiV2Service {
10768
- constructor(http, config) {
10776
+ constructor(http, config, treminologyService) {
10769
10777
  this.http = http;
10770
10778
  this.config = config;
10779
+ this.treminologyService = treminologyService;
10771
10780
  }
10772
10781
  translateParagraph(params) {
10773
10782
  const requestParams = {
@@ -10776,6 +10785,9 @@ class TldTranslateTextApiV2Service {
10776
10785
  text: [params.text],
10777
10786
  trgLang: params.system.targetLanguage
10778
10787
  };
10788
+ if (this.treminologyService.selected) {
10789
+ requestParams.termCollections = [this.treminologyService.selected.mtCollection?.id];
10790
+ }
10779
10791
  const sourceText = params.text;
10780
10792
  const sourceTree = {
10781
10793
  text: Common.escapeHtmlString(sourceText),
@@ -10856,14 +10868,14 @@ class TldTranslateTextApiV2Service {
10856
10868
  });
10857
10869
  }
10858
10870
  }
10859
- TldTranslateTextApiV2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TldTranslateTextApiV2Service, deps: [{ token: i1$3.HttpClient }, { token: TldTranslateConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
10871
+ TldTranslateTextApiV2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TldTranslateTextApiV2Service, deps: [{ token: i1$3.HttpClient }, { token: TldTranslateConfigService }, { token: TerminologyService }], target: i0.ɵɵFactoryTarget.Injectable });
10860
10872
  TldTranslateTextApiV2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TldTranslateTextApiV2Service, providedIn: 'root' });
10861
10873
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TldTranslateTextApiV2Service, decorators: [{
10862
10874
  type: Injectable,
10863
10875
  args: [{
10864
10876
  providedIn: 'root'
10865
10877
  }]
10866
- }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: TldTranslateConfigService }]; } });
10878
+ }], ctorParameters: function () { return [{ type: i1$3.HttpClient }, { type: TldTranslateConfigService }, { type: TerminologyService }]; } });
10867
10879
 
10868
10880
  class TldTranslateTextApiService {
10869
10881
  constructor(terminologyService, http, config, alerts) {
@@ -11045,7 +11057,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
11045
11057
 
11046
11058
  function textApiServiceFactory(version, config, http, terminologyService, alerts) {
11047
11059
  if (version === TranslationApiVersion.V2) {
11048
- return new TldTranslateTextApiV2Service(http, config);
11060
+ return new TldTranslateTextApiV2Service(http, config, terminologyService);
11049
11061
  }
11050
11062
  else {
11051
11063
  return new TldTranslateTextApiService(terminologyService, http, config, alerts);