@tilde-nlp/ngx-common 8.1.77 → 8.1.78

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.
@@ -832,7 +832,7 @@ const SCREEN_SIZE = {
832
832
  * Local storage key which stores last used configuration of language direction in Machine Translation.
833
833
  * By overwriting this value with langugeId (sourceLanguage-targetLanguage-domain-vendor-engineId), this system is going to be preselected.
834
834
  */
835
- const LAST_USED_SYSTEM_LOCAL_STORAGE_KEY = 'lastUsedSystem';
835
+ const LAST_USED_SYSTEM_LOCAL_STORAGE_KEY = 'lastSystemUsed';
836
836
 
837
837
  var ERROR_CODES;
838
838
  (function (ERROR_CODES) {
@@ -1004,6 +1004,7 @@ class TerminologyConfigService {
1004
1004
  }
1005
1005
  initConfigs(configuration) {
1006
1006
  const config = configuration ?? {};
1007
+ this._termConfig.apiUrl = config?.apiUrl;
1007
1008
  this._termConfig.collectionNameMinLength = config?.collectionNameMinLength ?? 8;
1008
1009
  this._termConfig.collectionNameMaxLength = config?.collectionNameMaxLength ?? 300;
1009
1010
  this._termConfig.xApiKey = config?.xApiKey;
@@ -4975,6 +4976,9 @@ class CombinedCollection {
4975
4976
 
4976
4977
  class TerminologyCollectionService {
4977
4978
  get url() {
4979
+ if (this.config.termConfig.apiUrl) {
4980
+ return `${this.config.termConfig.apiUrl}/collection`;
4981
+ }
4978
4982
  return `${this.config.termConfig.terminologyPortalUrl}/api/termservice/collection`;
4979
4983
  }
4980
4984
  constructor(config, http) {