@tilde-nlp/ngx-common 6.1.74 → 6.1.75

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.
@@ -5435,11 +5435,11 @@ class TerminologyService {
5435
5435
  this.engines[engineId].isAnyImporting = true;
5436
5436
  }
5437
5437
  const existing = CombinedCollection.findExistingCollectionFromList(this.engines[engineId].collections, collection);
5438
- // If term api doesn't have engine languages, collection should not be shown (if it is not already imported somehow);
5438
+ // Displaying collection if one of the engine languages is included.
5439
5439
  if (!existing && collection.source === EngineTermCollectionSource.TILDE_TERM) {
5440
5440
  let hasLanguages = true;
5441
5441
  for (let i = 0; i < this.engines[engineId].engineLanguages.length; i++) {
5442
- if (!collection.termCollection?.languages?.find((lang) => lang.id === this.engines[engineId].engineLanguages[i])) {
5442
+ if (!collection.termCollection?.languages?.find((lang) => this.engines[engineId].engineLanguages.includes(lang.id))) {
5443
5443
  hasLanguages = false;
5444
5444
  break;
5445
5445
  }
@@ -5515,18 +5515,18 @@ class TerminologyService {
5515
5515
  const _c0$6 = a0 => ({ termCount: a0 });
5516
5516
  const _c1$3 = a0 => ({ date: a0 });
5517
5517
  function TerminologyCollectionCardComponent_ng_container_0_span_6_Template(rf, ctx) { if (rf & 1) {
5518
- i0.ɵɵelementStart(0, "span", 12);
5518
+ i0.ɵɵelementStart(0, "span", 15);
5519
5519
  i0.ɵɵtext(1);
5520
5520
  i0.ɵɵelementEnd();
5521
5521
  } if (rf & 2) {
5522
- let tmp_2_0;
5522
+ let tmp_3_0;
5523
5523
  const ctx_r1 = i0.ɵɵnextContext(2);
5524
- i0.ɵɵproperty("matTooltip", (tmp_2_0 = ctx_r1.collection.name) !== null && tmp_2_0 !== undefined ? tmp_2_0 : "");
5524
+ i0.ɵɵproperty("matTooltip", (tmp_3_0 = ctx_r1.collection.name) !== null && tmp_3_0 !== undefined ? tmp_3_0 : "");
5525
5525
  i0.ɵɵadvance();
5526
5526
  i0.ɵɵtextInterpolate1(" ", ctx_r1.collection.name, " ");
5527
5527
  } }
5528
5528
  function TerminologyCollectionCardComponent_ng_container_0_span_7_Template(rf, ctx) { if (rf & 1) {
5529
- i0.ɵɵelementStart(0, "span", 13);
5529
+ i0.ɵɵelementStart(0, "span", 16);
5530
5530
  i0.ɵɵtext(1);
5531
5531
  i0.ɵɵelementEnd();
5532
5532
  } if (rf & 2) {
@@ -5535,7 +5535,7 @@ function TerminologyCollectionCardComponent_ng_container_0_span_7_Template(rf, c
5535
5535
  i0.ɵɵtextInterpolate1(" ", ctx_r1.collection.name, " ");
5536
5536
  } }
5537
5537
  function TerminologyCollectionCardComponent_ng_container_0_span_8_Template(rf, ctx) { if (rf & 1) {
5538
- i0.ɵɵelementStart(0, "span", 14);
5538
+ i0.ɵɵelementStart(0, "span", 17);
5539
5539
  i0.ɵɵtext(1);
5540
5540
  i0.ɵɵpipe(2, "translate");
5541
5541
  i0.ɵɵelementEnd();
@@ -5544,8 +5544,40 @@ function TerminologyCollectionCardComponent_ng_container_0_span_8_Template(rf, c
5544
5544
  i0.ɵɵadvance();
5545
5545
  i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r1.localizationKey + "DEFAULT"));
5546
5546
  } }
5547
- function TerminologyCollectionCardComponent_ng_container_0_span_9_Template(rf, ctx) { if (rf & 1) {
5548
- i0.ɵɵelementStart(0, "span", 15);
5547
+ function TerminologyCollectionCardComponent_ng_container_0_ng_container_10_span_1_Template(rf, ctx) { if (rf & 1) {
5548
+ i0.ɵɵelementStart(0, "span");
5549
+ i0.ɵɵtext(1);
5550
+ i0.ɵɵelementEnd();
5551
+ } if (rf & 2) {
5552
+ const lang_r3 = ctx.$implicit;
5553
+ i0.ɵɵadvance();
5554
+ i0.ɵɵtextInterpolate(lang_r3.id);
5555
+ } }
5556
+ function TerminologyCollectionCardComponent_ng_container_0_ng_container_10_Template(rf, ctx) { if (rf & 1) {
5557
+ i0.ɵɵelementContainerStart(0);
5558
+ i0.ɵɵtemplate(1, TerminologyCollectionCardComponent_ng_container_0_ng_container_10_span_1_Template, 2, 1, "span", 18);
5559
+ i0.ɵɵelementContainerEnd();
5560
+ } if (rf & 2) {
5561
+ const ctx_r1 = i0.ɵɵnextContext(2);
5562
+ i0.ɵɵadvance();
5563
+ i0.ɵɵproperty("ngForOf", ctx_r1.collection.termCollection.languages);
5564
+ } }
5565
+ function TerminologyCollectionCardComponent_ng_container_0_ng_template_11_Template(rf, ctx) { if (rf & 1) {
5566
+ i0.ɵɵelementStart(0, "span");
5567
+ i0.ɵɵtext(1);
5568
+ i0.ɵɵelementEnd();
5569
+ i0.ɵɵelementStart(2, "span");
5570
+ i0.ɵɵtext(3);
5571
+ i0.ɵɵelementEnd();
5572
+ } if (rf & 2) {
5573
+ const ctx_r1 = i0.ɵɵnextContext(2);
5574
+ i0.ɵɵadvance();
5575
+ i0.ɵɵtextInterpolate(ctx_r1.sourceLanguageCode);
5576
+ i0.ɵɵadvance(2);
5577
+ i0.ɵɵtextInterpolate(ctx_r1.targetLanguageCode);
5578
+ } }
5579
+ function TerminologyCollectionCardComponent_ng_container_0_span_13_Template(rf, ctx) { if (rf & 1) {
5580
+ i0.ɵɵelementStart(0, "span", 19);
5549
5581
  i0.ɵɵtext(1);
5550
5582
  i0.ɵɵpipe(2, "translate");
5551
5583
  i0.ɵɵelementEnd();
@@ -5554,8 +5586,8 @@ function TerminologyCollectionCardComponent_ng_container_0_span_9_Template(rf, c
5554
5586
  i0.ɵɵadvance();
5555
5587
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, ctx_r1.localizationKey + "TERMS_IN_USE", i0.ɵɵpureFunction1(4, _c0$6, ctx_r1.collection.termCount)), " ");
5556
5588
  } }
5557
- function TerminologyCollectionCardComponent_ng_container_0_span_10_Template(rf, ctx) { if (rf & 1) {
5558
- i0.ɵɵelementStart(0, "span", 15);
5589
+ function TerminologyCollectionCardComponent_ng_container_0_span_14_Template(rf, ctx) { if (rf & 1) {
5590
+ i0.ɵɵelementStart(0, "span", 19);
5559
5591
  i0.ɵɵtext(1);
5560
5592
  i0.ɵɵpipe(2, "dateAgo");
5561
5593
  i0.ɵɵpipe(3, "translate");
@@ -5565,7 +5597,7 @@ function TerminologyCollectionCardComponent_ng_container_0_span_10_Template(rf,
5565
5597
  i0.ɵɵadvance();
5566
5598
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(3, 3, ctx_r1.localizationKey + "LAST_UPDATED", i0.ɵɵpureFunction1(6, _c1$3, i0.ɵɵpipeBind1(2, 1, ctx_r1.collection.lastUpdated))), " ");
5567
5599
  } }
5568
- function TerminologyCollectionCardComponent_ng_container_0_div_12_span_3_Template(rf, ctx) { if (rf & 1) {
5600
+ function TerminologyCollectionCardComponent_ng_container_0_div_16_span_3_Template(rf, ctx) { if (rf & 1) {
5569
5601
  i0.ɵɵelementStart(0, "span");
5570
5602
  i0.ɵɵtext(1);
5571
5603
  i0.ɵɵpipe(2, "uppercase");
@@ -5576,20 +5608,20 @@ function TerminologyCollectionCardComponent_ng_container_0_div_12_span_3_Templat
5576
5608
  i0.ɵɵadvance();
5577
5609
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 3, ctx_r1.localizationKey + "ERRORS." + i0.ɵɵpipeBind1(2, 1, ctx_r1.collection.mtCollection == null ? null : ctx_r1.collection.mtCollection.subStatus)), " ");
5578
5610
  } }
5579
- function TerminologyCollectionCardComponent_ng_container_0_div_12_Template(rf, ctx) { if (rf & 1) {
5580
- i0.ɵɵelementStart(0, "div", 16)(1, "span", 17);
5611
+ function TerminologyCollectionCardComponent_ng_container_0_div_16_Template(rf, ctx) { if (rf & 1) {
5612
+ i0.ɵɵelementStart(0, "div", 20)(1, "span", 21);
5581
5613
  i0.ɵɵtext(2, " error ");
5582
5614
  i0.ɵɵelementEnd();
5583
- i0.ɵɵtemplate(3, TerminologyCollectionCardComponent_ng_container_0_div_12_span_3_Template, 4, 5, "span", 0);
5615
+ i0.ɵɵtemplate(3, TerminologyCollectionCardComponent_ng_container_0_div_16_span_3_Template, 4, 5, "span", 1);
5584
5616
  i0.ɵɵelementEnd();
5585
5617
  } if (rf & 2) {
5586
5618
  const ctx_r1 = i0.ɵɵnextContext(2);
5587
5619
  i0.ɵɵadvance(3);
5588
5620
  i0.ɵɵproperty("ngIf", (ctx_r1.collection.mtCollection == null ? null : ctx_r1.collection.mtCollection.subStatus) === ctx_r1.collectionImportingErrorSubStatus);
5589
5621
  } }
5590
- function TerminologyCollectionCardComponent_ng_container_0_span_13_Template(rf, ctx) { if (rf & 1) {
5591
- i0.ɵɵelementStart(0, "span", 18);
5592
- i0.ɵɵelement(1, "mat-spinner", 19);
5622
+ function TerminologyCollectionCardComponent_ng_container_0_span_17_Template(rf, ctx) { if (rf & 1) {
5623
+ i0.ɵɵelementStart(0, "span", 22);
5624
+ i0.ɵɵelement(1, "mat-spinner", 23);
5593
5625
  i0.ɵɵelementStart(2, "span");
5594
5626
  i0.ɵɵtext(3);
5595
5627
  i0.ɵɵpipe(4, "translate");
@@ -5599,12 +5631,12 @@ function TerminologyCollectionCardComponent_ng_container_0_span_13_Template(rf,
5599
5631
  i0.ɵɵadvance(3);
5600
5632
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 1, ctx_r1.tooltipLocalizationKey + "IMPORTING"), " ");
5601
5633
  } }
5602
- function TerminologyCollectionCardComponent_ng_container_0_button_14_Template(rf, ctx) { if (rf & 1) {
5603
- const _r3 = i0.ɵɵgetCurrentView();
5604
- i0.ɵɵelementStart(0, "button", 20);
5634
+ function TerminologyCollectionCardComponent_ng_container_0_button_18_Template(rf, ctx) { if (rf & 1) {
5635
+ const _r4 = i0.ɵɵgetCurrentView();
5636
+ i0.ɵɵelementStart(0, "button", 24);
5605
5637
  i0.ɵɵpipe(1, "translate");
5606
- i0.ɵɵlistener("click", function TerminologyCollectionCardComponent_ng_container_0_button_14_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.attach(ctx_r1.collection); return i0.ɵɵresetView($event.stopPropagation()); });
5607
- i0.ɵɵelementStart(2, "span", 21)(3, "mat-icon", 22);
5638
+ i0.ɵɵlistener("click", function TerminologyCollectionCardComponent_ng_container_0_button_18_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); ctx_r1.attach(ctx_r1.collection); return i0.ɵɵresetView($event.stopPropagation()); });
5639
+ i0.ɵɵelementStart(2, "span", 25)(3, "mat-icon", 26);
5608
5640
  i0.ɵɵtext(4, "sync");
5609
5641
  i0.ɵɵelementEnd();
5610
5642
  i0.ɵɵtext(5);
@@ -5616,10 +5648,10 @@ function TerminologyCollectionCardComponent_ng_container_0_button_14_Template(rf
5616
5648
  i0.ɵɵadvance(5);
5617
5649
  i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 4, ctx_r1.localizationKey + "SYNC"), " ");
5618
5650
  } }
5619
- function TerminologyCollectionCardComponent_ng_container_0_ng_container_15_a_1_Template(rf, ctx) { if (rf & 1) {
5620
- i0.ɵɵelementStart(0, "a", 24);
5651
+ function TerminologyCollectionCardComponent_ng_container_0_ng_container_19_a_1_Template(rf, ctx) { if (rf & 1) {
5652
+ i0.ɵɵelementStart(0, "a", 28);
5621
5653
  i0.ɵɵpipe(1, "translate");
5622
- i0.ɵɵelementStart(2, "mat-icon", 25);
5654
+ i0.ɵɵelementStart(2, "mat-icon", 29);
5623
5655
  i0.ɵɵtext(3, "edit");
5624
5656
  i0.ɵɵelementEnd()();
5625
5657
  } if (rf & 2) {
@@ -5627,9 +5659,9 @@ function TerminologyCollectionCardComponent_ng_container_0_ng_container_15_a_1_T
5627
5659
  i0.ɵɵproperty("matTooltip", i0.ɵɵpipeBind1(1, 2, ctx_r1.tooltipLocalizationKey + "EDIT"));
5628
5660
  i0.ɵɵattribute("href", ctx_r1.getEditLink(ctx_r1.collection), i0.ɵɵsanitizeUrl);
5629
5661
  } }
5630
- function TerminologyCollectionCardComponent_ng_container_0_ng_container_15_Template(rf, ctx) { if (rf & 1) {
5662
+ function TerminologyCollectionCardComponent_ng_container_0_ng_container_19_Template(rf, ctx) { if (rf & 1) {
5631
5663
  i0.ɵɵelementContainerStart(0);
5632
- i0.ɵɵtemplate(1, TerminologyCollectionCardComponent_ng_container_0_ng_container_15_a_1_Template, 4, 4, "a", 23);
5664
+ i0.ɵɵtemplate(1, TerminologyCollectionCardComponent_ng_container_0_ng_container_19_a_1_Template, 4, 4, "a", 27);
5633
5665
  i0.ɵɵelementContainerEnd();
5634
5666
  } if (rf & 2) {
5635
5667
  const ctx_r1 = i0.ɵɵnextContext(2);
@@ -5639,33 +5671,39 @@ function TerminologyCollectionCardComponent_ng_container_0_ng_container_15_Templ
5639
5671
  function TerminologyCollectionCardComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
5640
5672
  const _r1 = i0.ɵɵgetCurrentView();
5641
5673
  i0.ɵɵelementContainerStart(0);
5642
- i0.ɵɵelementStart(1, "div", 1)(2, "mat-radio-button", 2);
5674
+ i0.ɵɵelementStart(1, "div", 2)(2, "mat-radio-button", 3);
5643
5675
  i0.ɵɵpipe(3, "translate");
5644
5676
  i0.ɵɵlistener("click", function TerminologyCollectionCardComponent_ng_container_0_Template_mat_radio_button_click_2_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.selectGlossary(ctx_r1.collection)); });
5645
- i0.ɵɵelementStart(4, "div", 1)(5, "div", 3);
5646
- i0.ɵɵtemplate(6, TerminologyCollectionCardComponent_ng_container_0_span_6_Template, 2, 2, "span", 4)(7, TerminologyCollectionCardComponent_ng_container_0_span_7_Template, 2, 1, "span", 5);
5677
+ i0.ɵɵelementStart(4, "div", 2)(5, "div", 4);
5678
+ i0.ɵɵtemplate(6, TerminologyCollectionCardComponent_ng_container_0_span_6_Template, 2, 2, "span", 5)(7, TerminologyCollectionCardComponent_ng_container_0_span_7_Template, 2, 1, "span", 6);
5679
+ i0.ɵɵelementEnd();
5680
+ i0.ɵɵtemplate(8, TerminologyCollectionCardComponent_ng_container_0_span_8_Template, 3, 3, "span", 7);
5647
5681
  i0.ɵɵelementEnd();
5648
- i0.ɵɵtemplate(8, TerminologyCollectionCardComponent_ng_container_0_span_8_Template, 3, 3, "span", 6);
5682
+ i0.ɵɵelementStart(9, "div", 8);
5683
+ i0.ɵɵtemplate(10, TerminologyCollectionCardComponent_ng_container_0_ng_container_10_Template, 2, 1, "ng-container", 9)(11, TerminologyCollectionCardComponent_ng_container_0_ng_template_11_Template, 4, 2, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
5649
5684
  i0.ɵɵelementEnd();
5650
- i0.ɵɵtemplate(9, TerminologyCollectionCardComponent_ng_container_0_span_9_Template, 3, 6, "span", 7)(10, TerminologyCollectionCardComponent_ng_container_0_span_10_Template, 4, 8, "span", 7);
5651
- i0.ɵɵelementStart(11, "div", 8);
5652
- i0.ɵɵtemplate(12, TerminologyCollectionCardComponent_ng_container_0_div_12_Template, 4, 1, "div", 9)(13, TerminologyCollectionCardComponent_ng_container_0_span_13_Template, 5, 3, "span", 10)(14, TerminologyCollectionCardComponent_ng_container_0_button_14_Template, 7, 6, "button", 11);
5685
+ i0.ɵɵtemplate(13, TerminologyCollectionCardComponent_ng_container_0_span_13_Template, 3, 6, "span", 10)(14, TerminologyCollectionCardComponent_ng_container_0_span_14_Template, 4, 8, "span", 10);
5686
+ i0.ɵɵelementStart(15, "div", 11);
5687
+ i0.ɵɵtemplate(16, TerminologyCollectionCardComponent_ng_container_0_div_16_Template, 4, 1, "div", 12)(17, TerminologyCollectionCardComponent_ng_container_0_span_17_Template, 5, 3, "span", 13)(18, TerminologyCollectionCardComponent_ng_container_0_button_18_Template, 7, 6, "button", 14);
5653
5688
  i0.ɵɵelementEnd()();
5654
- i0.ɵɵtemplate(15, TerminologyCollectionCardComponent_ng_container_0_ng_container_15_Template, 2, 1, "ng-container", 0);
5689
+ i0.ɵɵtemplate(19, TerminologyCollectionCardComponent_ng_container_0_ng_container_19_Template, 2, 1, "ng-container", 1);
5655
5690
  i0.ɵɵelementEnd();
5656
5691
  i0.ɵɵelementContainerEnd();
5657
5692
  } if (rf & 2) {
5693
+ const currentDirection_r5 = i0.ɵɵreference(12);
5658
5694
  const ctx_r1 = i0.ɵɵnextContext();
5659
5695
  i0.ɵɵadvance(2);
5660
5696
  i0.ɵɵclassProp("mat-mdc-radio-checked", ctx_r1.collection.default || ctx_r1.collection === ctx_r1.selected);
5661
- i0.ɵɵproperty("disabled", ctx_r1.isSelectionDisabled)("matTooltip", ctx_r1.collection.termTooltipKey ? i0.ɵɵpipeBind1(3, 13, ctx_r1.tooltipLocalizationKey + ctx_r1.collection.termTooltipKey) : "");
5697
+ i0.ɵɵproperty("disabled", ctx_r1.isSelectionDisabled)("matTooltip", ctx_r1.collection.termTooltipKey ? i0.ɵɵpipeBind1(3, 15, ctx_r1.tooltipLocalizationKey + ctx_r1.collection.termTooltipKey) : "");
5662
5698
  i0.ɵɵadvance(4);
5663
5699
  i0.ɵɵproperty("ngIf", !ctx_r1.collection.termTooltipKey);
5664
5700
  i0.ɵɵadvance();
5665
5701
  i0.ɵɵproperty("ngIf", ctx_r1.collection.termTooltipKey);
5666
5702
  i0.ɵɵadvance();
5667
5703
  i0.ɵɵproperty("ngIf", ctx_r1.collection.default);
5668
- i0.ɵɵadvance();
5704
+ i0.ɵɵadvance(2);
5705
+ i0.ɵɵproperty("ngIf", ctx_r1.collection.termCollection)("ngIfElse", currentDirection_r5);
5706
+ i0.ɵɵadvance(3);
5669
5707
  i0.ɵɵproperty("ngIf", ctx_r1.collection.termCount);
5670
5708
  i0.ɵɵadvance();
5671
5709
  i0.ɵɵproperty("ngIf", ctx_r1.collection.lastUpdated);
@@ -5699,21 +5737,26 @@ class TerminologyCollectionCardComponent {
5699
5737
  this.terminologyService.sync(collection, this.engineId).subscribe();
5700
5738
  }
5701
5739
  getEditLink(collection) {
5702
- return this.terminologyCollection.getEditLink(collection.termCollection?.id, this.sourceLanguageCode, this.targetLanguageCode);
5740
+ // Collections with terms that shouldn't be translated.
5741
+ if (collection.termCollection?.languages && collection.termCollection?.languages.length === 1) {
5742
+ return this.terminologyCollection.getEditLink(collection.termCollection.id);
5743
+ }
5744
+ // Adds both source and target languages to the collection.
5745
+ return this.terminologyCollection.getEditLink(collection.termCollection.id, this.sourceLanguageCode, this.targetLanguageCode);
5703
5746
  }
5704
5747
  isCollectionDisabled(collection) {
5705
5748
  return collection.termId !== null && collection.termEntries <= 0 || collection.default;
5706
5749
  }
5707
5750
  static { this.ɵfac = function TerminologyCollectionCardComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TerminologyCollectionCardComponent)(i0.ɵɵdirectiveInject(TerminologyService), i0.ɵɵdirectiveInject(TerminologyCollectionService)); }; }
5708
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TerminologyCollectionCardComponent, selectors: [["lib-terminology-collection-card"]], inputs: { collection: "collection", selected: "selected", localizationKey: "localizationKey", tooltipLocalizationKey: "tooltipLocalizationKey", sourceLanguageCode: "sourceLanguageCode", engineId: "engineId", targetLanguageCode: "targetLanguageCode", hasEditPermissions: "hasEditPermissions" }, outputs: { glossarySelectEvent: "glossarySelectEvent" }, decls: 1, vars: 1, consts: [[4, "ngIf"], ["fxLayout", "row", "fxLayoutAlign", "start center"], ["fxFlex", "", "fxLayoutAlign", "center center", 3, "click", "disabled", "matTooltip"], [1, "collection-label"], ["class", "text-m-semi-bold", 3, "matTooltip", 4, "ngIf"], ["class", "text-m-semi-bold", 4, "ngIf"], ["class", "default-badge", 4, "ngIf"], ["class", "collection-label-block text-s", 4, "ngIf"], ["fxLayout", "row", "fxLayoutAlign", "start center", "fxLayoutGap", "0.5rem", 1, "collection-label-block", "collection-status-labels", "text-s"], ["fxLayout", "row", "fxLayoutAlign", "start center", "fxLayoutGap", "0.25rem", 4, "ngIf"], ["fxLayout", "row", "fxLayoutAlign", "start center", "fxLayoutGap", "0.5rem", 4, "ngIf"], ["mat-button", "", "color", "primary", 3, "matTooltip", "click", 4, "ngIf"], [1, "text-m-semi-bold", 3, "matTooltip"], [1, "text-m-semi-bold"], [1, "default-badge"], [1, "collection-label-block", "text-s"], ["fxLayout", "row", "fxLayoutAlign", "start center", "fxLayoutGap", "0.25rem"], ["color", "accent", 1, "material-icons", "collection-list-error"], ["fxLayout", "row", "fxLayoutAlign", "start center", "fxLayoutGap", "0.5rem"], ["color", "accent", "diameter", "20"], ["mat-button", "", "color", "primary", 3, "click", "matTooltip"], ["fxLayout", "row", "fxLayoutAlign", "start center", 1, "text-s"], [1, "pt-1"], ["class", "collection-list-edit", "mat-icon-button", "", "target", "_blank", 3, "matTooltip", 4, "ngIf"], ["mat-icon-button", "", "target", "_blank", 1, "collection-list-edit", 3, "matTooltip"], [1, "material-icons"]], template: function TerminologyCollectionCardComponent_Template(rf, ctx) { if (rf & 1) {
5709
- i0.ɵɵtemplate(0, TerminologyCollectionCardComponent_ng_container_0_Template, 16, 15, "ng-container", 0);
5751
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TerminologyCollectionCardComponent, selectors: [["lib-terminology-collection-card"]], inputs: { collection: "collection", selected: "selected", localizationKey: "localizationKey", tooltipLocalizationKey: "tooltipLocalizationKey", sourceLanguageCode: "sourceLanguageCode", engineId: "engineId", targetLanguageCode: "targetLanguageCode", hasEditPermissions: "hasEditPermissions" }, outputs: { glossarySelectEvent: "glossarySelectEvent" }, decls: 1, vars: 1, consts: [["currentDirection", ""], [4, "ngIf"], ["fxLayout", "row", "fxLayoutAlign", "start center"], ["fxFlex", "", "fxLayoutAlign", "center center", 3, "click", "disabled", "matTooltip"], [1, "collection-label"], ["class", "text-m-semi-bold", 3, "matTooltip", 4, "ngIf"], ["class", "text-m-semi-bold", 4, "ngIf"], ["class", "default-badge", 4, "ngIf"], [1, "collection-languages"], [4, "ngIf", "ngIfElse"], ["class", "collection-label-block text-s", 4, "ngIf"], ["fxLayout", "row", "fxLayoutAlign", "start center", "fxLayoutGap", "0.5rem", 1, "collection-label-block", "collection-status-labels", "text-s"], ["fxLayout", "row", "fxLayoutAlign", "start center", "fxLayoutGap", "0.25rem", 4, "ngIf"], ["fxLayout", "row", "fxLayoutAlign", "start center", "fxLayoutGap", "0.5rem", 4, "ngIf"], ["mat-button", "", "color", "primary", 3, "matTooltip", "click", 4, "ngIf"], [1, "text-m-semi-bold", 3, "matTooltip"], [1, "text-m-semi-bold"], [1, "default-badge"], [4, "ngFor", "ngForOf"], [1, "collection-label-block", "text-s"], ["fxLayout", "row", "fxLayoutAlign", "start center", "fxLayoutGap", "0.25rem"], ["color", "accent", 1, "material-icons", "collection-list-error"], ["fxLayout", "row", "fxLayoutAlign", "start center", "fxLayoutGap", "0.5rem"], ["color", "accent", "diameter", "20"], ["mat-button", "", "color", "primary", 3, "click", "matTooltip"], ["fxLayout", "row", "fxLayoutAlign", "start center", 1, "text-s"], [1, "pt-1"], ["class", "collection-list-edit", "mat-icon-button", "", "target", "_blank", 3, "matTooltip", 4, "ngIf"], ["mat-icon-button", "", "target", "_blank", 1, "collection-list-edit", 3, "matTooltip"], [1, "material-icons", "material-icons-outlined"]], template: function TerminologyCollectionCardComponent_Template(rf, ctx) { if (rf & 1) {
5752
+ i0.ɵɵtemplate(0, TerminologyCollectionCardComponent_ng_container_0_Template, 20, 17, "ng-container", 1);
5710
5753
  } if (rf & 2) {
5711
5754
  i0.ɵɵproperty("ngIf", ctx.collection);
5712
- } }, dependencies: [i1$2.NgIf, i2$3.DefaultLayoutDirective, i2$3.DefaultLayoutGapDirective, i2$3.DefaultLayoutAlignDirective, i2$3.DefaultFlexDirective, i2$1.MatButton, i2$1.MatIconAnchor, i1.MatIcon, i2$5.MatProgressSpinner, i5$2.MatRadioButton, i2$2.MatTooltip, i1$2.UpperCasePipe, i1$1.TranslatePipe, DateAgoPipe] }); }
5755
+ } }, dependencies: [i1$2.NgForOf, i1$2.NgIf, i2$3.DefaultLayoutDirective, i2$3.DefaultLayoutGapDirective, i2$3.DefaultLayoutAlignDirective, i2$3.DefaultFlexDirective, i2$1.MatButton, i2$1.MatIconAnchor, i1.MatIcon, i2$5.MatProgressSpinner, i5$2.MatRadioButton, i2$2.MatTooltip, i1$2.UpperCasePipe, i1$1.TranslatePipe, DateAgoPipe], styles: [".collection-languages[_ngcontent-%COMP%]{display:flex;gap:2px}.collection-languages[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{border-radius:100px;padding-right:8px;padding-left:8px;color:var(--base-40);background-color:var(--base-70)}"] }); }
5713
5756
  }
5714
5757
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TerminologyCollectionCardComponent, [{
5715
5758
  type: Component,
5716
- args: [{ selector: 'lib-terminology-collection-card', template: "<ng-container *ngIf=\"collection\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <mat-radio-button\r\n fxFlex\r\n fxLayoutAlign=\"center center\"\r\n [class.mat-mdc-radio-checked]=\"collection.default || collection === selected\"\r\n [disabled]=\"isSelectionDisabled\"\r\n [matTooltip]=\"collection.termTooltipKey ? (tooltipLocalizationKey + collection.termTooltipKey | translate) : ''\"\r\n (click)=\"selectGlossary(collection)\"\r\n >\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <div class=\"collection-label\">\r\n <span *ngIf=\"!collection.termTooltipKey\" class=\"text-m-semi-bold\" [matTooltip]=\"collection.name ?? ''\">\r\n {{ collection.name }}\r\n </span>\r\n\r\n <span *ngIf=\"collection.termTooltipKey\" class=\"text-m-semi-bold\">\r\n {{ collection.name }}\r\n </span>\r\n </div>\r\n \r\n <span *ngIf=\"collection.default\" class=\"default-badge\" >{{ localizationKey + \"DEFAULT\" | translate }}</span>\r\n </div>\r\n \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 \r\n <div class=\"collection-label-block collection-status-labels text-s\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"0.5rem\">\r\n <div *ngIf=\"collection.mtStatus && collection.mtStatus === collectionErrorStatus\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"0.25rem\">\r\n <span color=\"accent\" class=\"material-icons collection-list-error\"> error </span>\r\n \r\n <span *ngIf=\"collection.mtCollection?.subStatus === collectionImportingErrorSubStatus\">\r\n {{ localizationKey + \"ERRORS.\" + (collection.mtCollection?.subStatus | uppercase) | translate }}\r\n </span>\r\n </div>\r\n \r\n <span *ngIf=\"collection.isImporting\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"0.5rem\">\r\n <mat-spinner color=\"accent\" diameter=\"20\"> </mat-spinner>\r\n <span>\r\n {{ tooltipLocalizationKey + \"IMPORTING\" | translate }}\r\n </span>\r\n </span>\r\n \r\n <button *ngIf=\"collection.syncButtonVisible\" mat-button color=\"primary\" (click)=\"attach(collection); $event.stopPropagation()\" [matTooltip]=\"tooltipLocalizationKey + 'SYNC' | translate\">\r\n <span fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"text-s\">\r\n <mat-icon class=\"pt-1\">sync</mat-icon>\r\n {{ localizationKey + \"SYNC\" | translate }}\r\n </span>\r\n </button>\r\n </div>\r\n </mat-radio-button>\r\n\r\n <ng-container *ngIf=\"hasEditPermissions\">\r\n <a\r\n class=\"collection-list-edit\"\r\n mat-icon-button\r\n target=\"_blank\"\r\n [matTooltip]=\"tooltipLocalizationKey + 'EDIT' | translate\"\r\n [attr.href]=\"getEditLink(collection)\"\r\n *ngIf=\"collection.termCollection\"\r\n >\r\n <mat-icon class=\"material-icons\">edit</mat-icon>\r\n </a>\r\n </ng-container>\r\n </div>\r\n</ng-container>\r\n" }]
5759
+ args: [{ selector: 'lib-terminology-collection-card', template: "<ng-container *ngIf=\"collection\">\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <mat-radio-button\r\n fxFlex\r\n fxLayoutAlign=\"center center\"\r\n [class.mat-mdc-radio-checked]=\"collection.default || collection === selected\"\r\n [disabled]=\"isSelectionDisabled\"\r\n [matTooltip]=\"collection.termTooltipKey ? (tooltipLocalizationKey + collection.termTooltipKey | translate) : ''\"\r\n (click)=\"selectGlossary(collection)\"\r\n >\r\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <div class=\"collection-label\">\r\n <span *ngIf=\"!collection.termTooltipKey\" class=\"text-m-semi-bold\" [matTooltip]=\"collection.name ?? ''\">\r\n {{ collection.name }}\r\n </span>\r\n\r\n <span *ngIf=\"collection.termTooltipKey\" class=\"text-m-semi-bold\">\r\n {{ collection.name }}\r\n </span>\r\n </div>\r\n \r\n <span *ngIf=\"collection.default\" class=\"default-badge\" >{{ localizationKey + \"DEFAULT\" | translate }}</span>\r\n </div>\r\n\r\n <div class=\"collection-languages\">\r\n <ng-container *ngIf=\"collection.termCollection; else currentDirection\">\r\n <span *ngFor=\"let lang of collection.termCollection.languages\">{{lang.id}}</span>\r\n </ng-container>\r\n\r\n <ng-template #currentDirection>\r\n <span>{{sourceLanguageCode}}</span>\r\n <span>{{targetLanguageCode}}</span>\r\n </ng-template>\r\n </div>\r\n \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 \r\n <div class=\"collection-label-block collection-status-labels text-s\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"0.5rem\">\r\n <div *ngIf=\"collection.mtStatus && collection.mtStatus === collectionErrorStatus\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"0.25rem\">\r\n <span color=\"accent\" class=\"material-icons collection-list-error\"> error </span>\r\n \r\n <span *ngIf=\"collection.mtCollection?.subStatus === collectionImportingErrorSubStatus\">\r\n {{ localizationKey + \"ERRORS.\" + (collection.mtCollection?.subStatus | uppercase) | translate }}\r\n </span>\r\n </div>\r\n \r\n <span *ngIf=\"collection.isImporting\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"0.5rem\">\r\n <mat-spinner color=\"accent\" diameter=\"20\"> </mat-spinner>\r\n <span>\r\n {{ tooltipLocalizationKey + \"IMPORTING\" | translate }}\r\n </span>\r\n </span>\r\n \r\n <button *ngIf=\"collection.syncButtonVisible\" mat-button color=\"primary\" (click)=\"attach(collection); $event.stopPropagation()\" [matTooltip]=\"tooltipLocalizationKey + 'SYNC' | translate\">\r\n <span fxLayout=\"row\" fxLayoutAlign=\"start center\" class=\"text-s\">\r\n <mat-icon class=\"pt-1\">sync</mat-icon>\r\n {{ localizationKey + \"SYNC\" | translate }}\r\n </span>\r\n </button>\r\n </div>\r\n </mat-radio-button>\r\n\r\n <ng-container *ngIf=\"hasEditPermissions\">\r\n <a\r\n class=\"collection-list-edit\"\r\n mat-icon-button\r\n target=\"_blank\"\r\n [matTooltip]=\"tooltipLocalizationKey + 'EDIT' | translate\"\r\n [attr.href]=\"getEditLink(collection)\"\r\n *ngIf=\"collection.termCollection\"\r\n >\r\n <mat-icon class=\"material-icons material-icons-outlined\">edit</mat-icon>\r\n </a>\r\n </ng-container>\r\n </div>\r\n</ng-container>\r\n", styles: [".collection-languages{display:flex;gap:2px}.collection-languages span{border-radius:100px;padding-right:8px;padding-left:8px;color:var(--base-40);background-color:var(--base-70)}\n"] }]
5717
5760
  }], () => [{ type: TerminologyService }, { type: TerminologyCollectionService }], { collection: [{
5718
5761
  type: Input
5719
5762
  }], selected: [{