@arsedizioni/ars-utils 18.2.404 → 18.2.406

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.
@@ -1631,7 +1631,7 @@ class ClipperReferencesComponent extends ClipperSearchResultManager {
1631
1631
  this.sendItemsTo(item ? [item] : this.selection?.all);
1632
1632
  }
1633
1633
  /**
1634
- * Prepare teh search params
1634
+ * Prepare the search params
1635
1635
  * @param newSearch : true if it is a new search
1636
1636
  * @return the new search params
1637
1637
  */
@@ -1667,6 +1667,28 @@ class ClipperReferencesComponent extends ClipperSearchResultManager {
1667
1667
  }
1668
1668
  return newParams;
1669
1669
  }
1670
+ /**
1671
+ * Get e refrences search params form clipper search params
1672
+ * @param params : the clipper search params
1673
+ * @returns : the references search params
1674
+ */
1675
+ toReferencesSearchParams(params) {
1676
+ return {
1677
+ documentId: params.id,
1678
+ year: params.year,
1679
+ sector: params.sector,
1680
+ author: params.author,
1681
+ anchor: params.anchor,
1682
+ model: params.model?.toString() ?? null,
1683
+ mode: params.mode,
1684
+ excludeTextReferences: params.excludeTextReferences,
1685
+ excludeNotesReferences: params.excludeNotesReferences,
1686
+ returnModifierInfo: params.returnModifierInfo,
1687
+ useModifierInfo: params.useModifierInfo,
1688
+ count: 15,
1689
+ first: 0
1690
+ };
1691
+ }
1670
1692
  /**
1671
1693
  * Perform a search
1672
1694
  * @param newSearch: true if is a new search
@@ -1677,7 +1699,7 @@ class ClipperReferencesComponent extends ClipperSearchResultManager {
1677
1699
  this.dialogService.busy('Ricerca in corso...');
1678
1700
  const searchParams = this.prepareFetch(newSearch);
1679
1701
  if (searchParams) {
1680
- this.clipperService.references(searchParams.toReferencesSearchParams())
1702
+ this.clipperService.references(this.toReferencesSearchParams(searchParams))
1681
1703
  .subscribe({
1682
1704
  next: (r) => {
1683
1705
  if (!r.success)
@@ -1724,7 +1746,7 @@ class ClipperReferencesComponent extends ClipperSearchResultManager {
1724
1746
  return;
1725
1747
  if (!this.snapshot.facets || this.snapshot.facets?.hasMoreFacets) {
1726
1748
  this.filterBusy.set(true);
1727
- this.clipperService.referencesFacets(params.toReferencesSearchParams())
1749
+ this.clipperService.referencesFacets(this.toReferencesSearchParams(params))
1728
1750
  .subscribe({
1729
1751
  next: (r) => {
1730
1752
  if (r.success) {