@tilde-nlp/ngx-translate 2.1.39 → 2.1.41

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.
@@ -3562,6 +3562,7 @@ class TldTranslateConfigService {
3562
3562
  this._textConfig.progressIndicatorTimeoutMiliSeconds = text?.progressIndicatorTimeoutMiliSeconds ?? 2000;
3563
3563
  this._textConfig.progressIndicatorTitleVisibleForVendors = text?.progressIndicatorTitleVisibleForVendors ?? ["ETranslation"];
3564
3564
  this._textConfig.progressIndicatorVisible = text?.progressIndicatorVisible ?? false;
3565
+ this._textConfig.showTranslateButton = text?.showTranslateButton ?? true;
3565
3566
  this._audioConfig.audioTextInput = audio?.audioTextInput ?? false;
3566
3567
  // Not setting default url because there is no service provided by Tilde and this is not used by default in website project.
3567
3568
  this._audioConfig.audioApiUrl = audio?.audioApiUrl;
@@ -6021,11 +6022,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
6021
6022
  }], ctorParameters: function () { return [{ type: TldTranslateConfigService }, { type: i1$3.HttpClient }]; } });
6022
6023
 
6023
6024
  class TerminologyService {
6024
- constructor(config, termApi, alerts, button, mtApi) {
6025
+ constructor(config, termApi, alerts, mtApi) {
6025
6026
  this.config = config;
6026
6027
  this.termApi = termApi;
6027
6028
  this.alerts = alerts;
6028
- this.button = button;
6029
6029
  this.mtApi = mtApi;
6030
6030
  this._selected = null;
6031
6031
  this.onDataUpdate = new Subject();
@@ -6034,7 +6034,6 @@ class TerminologyService {
6034
6034
  get selected() { return this._selected; }
6035
6035
  set selected(val) {
6036
6036
  this._selected = val;
6037
- this.button.actionButtonClicked();
6038
6037
  this.storeSelectedInLocalStorage();
6039
6038
  if (!this._selected) {
6040
6039
  return;
@@ -6317,14 +6316,14 @@ class TerminologyService {
6317
6316
  this.onDataUpdate.next(this.collections);
6318
6317
  }
6319
6318
  }
6320
- TerminologyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TerminologyService, deps: [{ token: TldTranslateConfigService }, { token: TermApiService }, { token: TldAlertService }, { token: TldTranslateButtonService }, { token: MT_TERM_API_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
6319
+ TerminologyService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TerminologyService, deps: [{ token: TldTranslateConfigService }, { token: TermApiService }, { token: TldAlertService }, { token: MT_TERM_API_TOKEN }], target: i0.ɵɵFactoryTarget.Injectable });
6321
6320
  TerminologyService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TerminologyService, providedIn: 'root' });
6322
6321
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TerminologyService, decorators: [{
6323
6322
  type: Injectable,
6324
6323
  args: [{
6325
6324
  providedIn: 'root'
6326
6325
  }]
6327
- }], ctorParameters: function () { return [{ type: TldTranslateConfigService }, { type: TermApiService }, { type: TldAlertService }, { type: TldTranslateButtonService }, { type: undefined, decorators: [{
6326
+ }], ctorParameters: function () { return [{ type: TldTranslateConfigService }, { type: TermApiService }, { type: TldAlertService }, { type: undefined, decorators: [{
6328
6327
  type: Inject,
6329
6328
  args: [MT_TERM_API_TOKEN]
6330
6329
  }] }]; } });
@@ -10367,7 +10366,7 @@ class TldTranslateComponent {
10367
10366
  || this.translateTextService.isDictating;
10368
10367
  }
10369
10368
  get showTranslateButton() {
10370
- return !this.translateFileService.multipleFileUploadActive;
10369
+ return this.configService.textConfig.showTranslateButton && !this.translateFileService.multipleFileUploadActive;
10371
10370
  }
10372
10371
  // this param is necessary to remove max height if multiple file component is active, since there shouldn't be max height in that case.
10373
10372
  get isMultipleFilesActive() {