@studyportals/fawkes 8.2.4-16 → 8.2.4-18
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.
- package/dist/src/common/IPresenter.d.ts +1 -0
- package/dist/src/enums/FilterCombinations.d.ts +0 -2
- package/dist/src/enums/FilterCombinations.js +0 -2
- package/dist/src/organisations/SearchIndexabilityManager.js +0 -4
- package/dist/src/organisations/policies/our-picks/CountryAreaCity.js +1 -1
- package/dist/src/organisations/policies/our-picks/CountryCity.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedCountryAreaCity.js +1 -1
- package/dist/src/organisations/policies/ranked/RankedCountryCity.js +1 -1
- package/dist/src/presenters/CityPresenter.d.ts +4 -3
- package/dist/src/presenters/CityPresenter.js +4 -1
- package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.js +2 -4
- package/package.json +1 -1
|
@@ -73,8 +73,6 @@ export declare enum FilterCombinations {
|
|
|
73
73
|
RANKED_CONTINENT = "rankedContinent",
|
|
74
74
|
RANKED_CONTINENT_ATTENDANCE = "rankedContinentAttendance",
|
|
75
75
|
RANKED_COUNTRY = "rankedCountry",
|
|
76
|
-
RANKED_COUNTRY_CITY = "rankedCountryCity",
|
|
77
|
-
RANKED_COUNTRY_AREA_CITY = "rankedCountryAreaCity",
|
|
78
76
|
RANKED_COUNTRY_ATTENDANCE = "rankedCountryAttendance",
|
|
79
77
|
RANKED_DISCIPLINE_COUNTRY = "rankedDisciplineCountry",
|
|
80
78
|
RANKED_DISCIPLINE = "rankedDiscipline",
|
|
@@ -74,8 +74,6 @@ export var FilterCombinations;
|
|
|
74
74
|
FilterCombinations["RANKED_CONTINENT"] = "rankedContinent";
|
|
75
75
|
FilterCombinations["RANKED_CONTINENT_ATTENDANCE"] = "rankedContinentAttendance";
|
|
76
76
|
FilterCombinations["RANKED_COUNTRY"] = "rankedCountry";
|
|
77
|
-
FilterCombinations["RANKED_COUNTRY_CITY"] = "rankedCountryCity";
|
|
78
|
-
FilterCombinations["RANKED_COUNTRY_AREA_CITY"] = "rankedCountryAreaCity";
|
|
79
77
|
FilterCombinations["RANKED_COUNTRY_ATTENDANCE"] = "rankedCountryAttendance";
|
|
80
78
|
FilterCombinations["RANKED_DISCIPLINE_COUNTRY"] = "rankedDisciplineCountry";
|
|
81
79
|
FilterCombinations["RANKED_DISCIPLINE"] = "rankedDiscipline";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { DependencyTypes } from '../enums/DependencyTypes';
|
|
2
2
|
import { Area, AreaAttendance, Attendance, Continent, Country, CountryAttendance, Unfiltered, RankedArea, RankedAreaDiscipline, RankedAttendance, RankedAttendanceDiscipline, RankedContinent, RankedContinentAttendance, RankedCountry, RankedCountryAttendance, RankedCountryDiscipline, RankedDiscipline, RankedUnfiltered, CountryCity, CountryAreaCity } from '../organisations/policies';
|
|
3
|
-
import { RankedCountryCity } from './policies/ranked/RankedCountryCity';
|
|
4
|
-
import { RankedCountryAreaCity } from './policies/ranked/RankedCountryAreaCity';
|
|
5
3
|
export class SearchIndexabilityManager {
|
|
6
4
|
policies;
|
|
7
5
|
constructor(portalType, seoInfoBase, filterState, sortingState, applicationState) {
|
|
@@ -30,8 +28,6 @@ export class SearchIndexabilityManager {
|
|
|
30
28
|
new RankedContinent(dependencies),
|
|
31
29
|
new RankedContinentAttendance(dependencies),
|
|
32
30
|
new RankedCountry(dependencies),
|
|
33
|
-
new RankedCountryCity(dependencies),
|
|
34
|
-
new RankedCountryAreaCity(dependencies),
|
|
35
31
|
new RankedCountryAttendance(dependencies),
|
|
36
32
|
new RankedCountryDiscipline(dependencies),
|
|
37
33
|
new RankedDiscipline(dependencies),
|
|
@@ -18,7 +18,7 @@ export class CountryAreaCity extends OrganisationsSeoIndexabilityPolicy {
|
|
|
18
18
|
async generateUrls() {
|
|
19
19
|
const cityFragments = await CityPresenter
|
|
20
20
|
.getInstance(this.dependencies.searchApiClient)
|
|
21
|
-
.
|
|
21
|
+
.getFragmentsAsync();
|
|
22
22
|
const paths = [];
|
|
23
23
|
console.warn(`Total city fragments fetched: ${cityFragments.length}`);
|
|
24
24
|
const filteredFragmentsForCountryAreaCity = cityFragments.filter(city => city.areaId !== null && city.areaId !== undefined);
|
|
@@ -17,7 +17,7 @@ export class CountryCity extends OrganisationsSeoIndexabilityPolicy {
|
|
|
17
17
|
async generateUrls() {
|
|
18
18
|
const cityFragments = await CityPresenter
|
|
19
19
|
.getInstance(this.dependencies.searchApiClient)
|
|
20
|
-
.
|
|
20
|
+
.getFragmentsAsync();
|
|
21
21
|
const paths = [];
|
|
22
22
|
const filteredFragmentsForCountryCity = cityFragments.filter(city => city.areaId === null || city.areaId === undefined);
|
|
23
23
|
for (const city of filteredFragmentsForCountryCity) {
|
|
@@ -15,7 +15,7 @@ export class RankedCountryAreaCity extends RankedOrganisationsSeoIndexabilityPol
|
|
|
15
15
|
async generateUrls() {
|
|
16
16
|
const cityFragments = await CityPresenter
|
|
17
17
|
.getInstance(this.dependencies.searchApiClient)
|
|
18
|
-
.
|
|
18
|
+
.getFragmentsAsync();
|
|
19
19
|
const paths = [];
|
|
20
20
|
console.warn(`Total city fragments fetched: ${cityFragments.length}`);
|
|
21
21
|
const filteredFragmentsForCountryAreaCity = cityFragments.filter(city => city.areaId !== null && city.areaId !== undefined);
|
|
@@ -15,7 +15,7 @@ export class RankedCountryCity extends RankedOrganisationsSeoIndexabilityPolicy
|
|
|
15
15
|
async generateUrls() {
|
|
16
16
|
const cityFragments = await CityPresenter
|
|
17
17
|
.getInstance(this.dependencies.searchApiClient)
|
|
18
|
-
.
|
|
18
|
+
.getFragmentsAsync();
|
|
19
19
|
const paths = [];
|
|
20
20
|
const filteredFragmentsForCountryCity = cityFragments.filter(city => city.areaId === null || city.areaId === undefined);
|
|
21
21
|
for (const city of filteredFragmentsForCountryCity) {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
2
|
import { ICityFragment } from './fragments/ICityFragment';
|
|
3
|
-
import { ISearchApiClient } from '../../sitemap-generator-seo';
|
|
4
|
-
export declare class CityPresenter {
|
|
3
|
+
import { IPresenter, ISearchApiClient } from '../../sitemap-generator-seo';
|
|
4
|
+
export declare class CityPresenter implements IPresenter {
|
|
5
5
|
readonly filterKey: FilterKey;
|
|
6
6
|
private searchApiClient;
|
|
7
7
|
private static instance;
|
|
8
8
|
private constructor();
|
|
9
9
|
private fragmentsPromise;
|
|
10
10
|
static getInstance(searchApiClient: ISearchApiClient): CityPresenter;
|
|
11
|
-
getFragments():
|
|
11
|
+
getFragments(): ICityFragment[];
|
|
12
|
+
getFragmentsAsync(): Promise<ICityFragment[]>;
|
|
12
13
|
private fetchCities;
|
|
13
14
|
private processCity;
|
|
14
15
|
}
|
|
@@ -16,7 +16,10 @@ export class CityPresenter {
|
|
|
16
16
|
}
|
|
17
17
|
return CityPresenter.instance;
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
getFragments() {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
async getFragmentsAsync() {
|
|
20
23
|
if (!this.fragmentsPromise) {
|
|
21
24
|
this.fragmentsPromise = this.fetchCities();
|
|
22
25
|
}
|
|
@@ -8,8 +8,7 @@ import { CountryPresenter } from '../presenters/CountryPresenter';
|
|
|
8
8
|
import { DisciplinePresenter } from '../presenters/DisciplinePresenter';
|
|
9
9
|
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
10
10
|
import { CountryAreaCity } from '../organisations/policies/our-picks/CountryAreaCity';
|
|
11
|
-
import {
|
|
12
|
-
import { RankedCountryAreaCity } from '../organisations/policies/ranked/RankedCountryAreaCity';
|
|
11
|
+
import { CityPresenter } from '../presenters/CityPresenter';
|
|
13
12
|
export class OrganisationsSitemapUrlGeneratorManager extends BaseSitemapUrlGeneratorManager {
|
|
14
13
|
portalType;
|
|
15
14
|
policies;
|
|
@@ -40,8 +39,6 @@ export class OrganisationsSitemapUrlGeneratorManager extends BaseSitemapUrlGener
|
|
|
40
39
|
new RankedAttendanceDiscipline(dependencies),
|
|
41
40
|
new RankedContinent(dependencies),
|
|
42
41
|
new RankedContinentAttendance(dependencies),
|
|
43
|
-
new RankedCountryCity(dependencies),
|
|
44
|
-
new RankedCountryAreaCity(dependencies),
|
|
45
42
|
new RankedCountry(dependencies),
|
|
46
43
|
new RankedCountryAttendance(dependencies),
|
|
47
44
|
new RankedCountryDiscipline(dependencies),
|
|
@@ -53,6 +50,7 @@ export class OrganisationsSitemapUrlGeneratorManager extends BaseSitemapUrlGener
|
|
|
53
50
|
this.presenters.set(FilterKey.CONTINENT, ContinentPresenter.getInstance());
|
|
54
51
|
this.presenters.set(FilterKey.COUNTRY, CountryPresenter.getInstance());
|
|
55
52
|
this.presenters.set(FilterKey.DISCIPLINES, DisciplinePresenter.getInstance());
|
|
53
|
+
this.presenters.set(FilterKey.CITY, CityPresenter.getInstance(searchApiClient));
|
|
56
54
|
this.setFilterKeyValueCounts();
|
|
57
55
|
}
|
|
58
56
|
}
|