@studyportals/fawkes 9.0.1-3 → 9.0.1-5

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.
@@ -30,6 +30,8 @@ export class CountryPresenter {
30
30
  path
31
31
  });
32
32
  });
33
+ //eslint-disable-next-line no-console
34
+ console.log('generated country fragments', countries);
33
35
  return countries;
34
36
  }
35
37
  getFragments() {
@@ -8,7 +8,7 @@ export class OnlyCountriesDisciplineCountryRule {
8
8
  }
9
9
  forSearch(dependencies) {
10
10
  //eslint-disable-next-line no-console
11
- console.log('dependencies', dependencies.filterState.getSelectedFilters());
11
+ console.log('dependencies', dependencies.filterState.getSelectedValuesFor(this.countryFilterKey));
12
12
  const selectedCountry = dependencies.seoInfoBase.getFilterOptionValueBy(this.countryFilterKey, dependencies.filterState);
13
13
  if (!selectedCountry) {
14
14
  return Promise.resolve(false);
@@ -16,7 +16,7 @@ export class OnlyCountriesDisciplineCountryRule {
16
16
  const allowedCountryIds = this.getAllowedCountryIds();
17
17
  //eslint-disable-next-line no-console
18
18
  console.log('allowed country ids', Array.from(allowedCountryIds));
19
- return Promise.resolve(allowedCountryIds.has(selectedCountry));
19
+ return Promise.resolve(allowedCountryIds.includes(selectedCountry));
20
20
  }
21
21
  forSitemapGenerator(filterKeyValues) {
22
22
  const selectedCountries = filterKeyValues.get(FilterKey.COUNTRY);
@@ -27,13 +27,13 @@ export class OnlyCountriesDisciplineCountryRule {
27
27
  if (!selectedCountry) {
28
28
  return Promise.resolve(false);
29
29
  }
30
- return Promise.resolve(this.getAllowedCountryIds().has(selectedCountry));
30
+ return Promise.resolve(this.getAllowedCountryIds().includes(selectedCountry));
31
31
  }
32
32
  getAllowedCountryIds() {
33
- return new Set(CountryPresenter.getInstance()
33
+ return CountryPresenter.getInstance()
34
34
  .getFragments()
35
35
  .filter((country) => this.allowedCountryIsos.includes(country.iso))
36
- .map((country) => country.id));
36
+ .map((country) => country.id);
37
37
  }
38
38
  getDescription() {
39
39
  return 'Country is one of the allowed countries for discipline and country pages';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studyportals/fawkes",
3
- "version": "9.0.1-3",
3
+ "version": "9.0.1-5",
4
4
  "description": "A package to centralize SEO related logic for SBLP and Sitemap Generator.",
5
5
  "files": [
6
6
  "./dist"