@studyportals/fawkes 8.5.1 → 8.5.2-0
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/structured-data/SearchStructuredDataFactory.js +1 -1
- package/package.json +1 -1
- package/dist/src/programmes/policies/DisciplineArea.d.ts +0 -15
- package/dist/src/programmes/policies/DisciplineArea.js +0 -46
- package/dist/src/programmes/rules/ErasmusOrJointSpecialProgrammesRule.d.ts +0 -9
- package/dist/src/programmes/rules/ErasmusOrJointSpecialProgrammesRule.js +0 -28
|
@@ -172,7 +172,7 @@ export class SearchStructuredDataFactory {
|
|
|
172
172
|
return {
|
|
173
173
|
'@type': 'AggregateRating',
|
|
174
174
|
'ratingValue': reviewRating.rating,
|
|
175
|
-
'
|
|
175
|
+
'ratingCount': reviewRating.quantity,
|
|
176
176
|
'bestRating': 5,
|
|
177
177
|
'worstRating': 1
|
|
178
178
|
};
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
-
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
-
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
-
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
-
import { IProgrammeSeoDependencies } from '../types/IProgrammeSeoDependencies';
|
|
7
|
-
export declare class DisciplineArea extends ProgrammesBaseIndexabilityPolicy {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly description: string;
|
|
10
|
-
readonly filterKeys: FilterKey[];
|
|
11
|
-
protected readonly rules: (SingleValueSelectedForFilterRule | OnlyFiltersSelectedRule)[];
|
|
12
|
-
constructor(dependencies: IProgrammeSeoDependencies);
|
|
13
|
-
protected generateUrls(): Promise<string[]>;
|
|
14
|
-
get filterCombination(): FilterCombinations;
|
|
15
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
-
import { OnlyFiltersSelectedRule } from '../../common/rules/OnlyFiltersSelectedRule';
|
|
3
|
-
import { SingleValueSelectedForFilterRule } from '../../common/rules/SingleValueSelectedForFilterRule';
|
|
4
|
-
import { FilterCombinations } from '../../enums/FilterCombinations';
|
|
5
|
-
import { ProgrammesBaseIndexabilityPolicy } from '../ProgrammesBaseIndexabilityPolicy';
|
|
6
|
-
import { DisciplinePresenter } from '../../presenters/DisciplinePresenter';
|
|
7
|
-
import { AreaPresenter } from '../../presenters/AreaPresenter';
|
|
8
|
-
export class DisciplineArea extends ProgrammesBaseIndexabilityPolicy {
|
|
9
|
-
name = 'Discipline Area Policy';
|
|
10
|
-
description = 'Determines indexing rules for pages filtered by both discipline, and geographic areas.';
|
|
11
|
-
filterKeys = [FilterKey.DISCIPLINES, FilterKey.AREA];
|
|
12
|
-
rules = [
|
|
13
|
-
new SingleValueSelectedForFilterRule(FilterKey.DISCIPLINES),
|
|
14
|
-
new SingleValueSelectedForFilterRule(FilterKey.AREA),
|
|
15
|
-
new SingleValueSelectedForFilterRule(FilterKey.COUNTRY),
|
|
16
|
-
new OnlyFiltersSelectedRule([FilterKey.DISCIPLINES, FilterKey.AREA, FilterKey.COUNTRY])
|
|
17
|
-
];
|
|
18
|
-
constructor(dependencies) {
|
|
19
|
-
super(dependencies);
|
|
20
|
-
this.initateBaseRules();
|
|
21
|
-
}
|
|
22
|
-
async generateUrls() {
|
|
23
|
-
const disciplineFragments = DisciplinePresenter.getInstance().getFragments();
|
|
24
|
-
const areaFragments = AreaPresenter.getInstance().getFragments();
|
|
25
|
-
const paths = [];
|
|
26
|
-
for (const pageNumber of this.indexablePageNumbers) {
|
|
27
|
-
for (const discipline of disciplineFragments) {
|
|
28
|
-
for (const area of areaFragments) {
|
|
29
|
-
const filterKeyValues = new Map([
|
|
30
|
-
[FilterKey.DISCIPLINES, [discipline.id]],
|
|
31
|
-
[FilterKey.AREA, [area.id]],
|
|
32
|
-
[FilterKey.COUNTRY, [area.countryId]]
|
|
33
|
-
]);
|
|
34
|
-
const result = await this.checkRulesForSitemapWithPageNumber(filterKeyValues, pageNumber);
|
|
35
|
-
if (result) {
|
|
36
|
-
paths.push(this.getPathWithPageNumber(`${discipline.path}/${area.path}`, pageNumber));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return paths;
|
|
42
|
-
}
|
|
43
|
-
get filterCombination() {
|
|
44
|
-
return FilterCombinations.DISCIPLINE_AREA;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ISearchDependencies } from '../../common/ISearchDependencies';
|
|
2
|
-
import { FilterKeyValuesMap } from '../../common/FilterKeyValuesMap';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export declare class ErasmusOrJointSpecialProgrammesRule extends BaseProgrammeRule {
|
|
5
|
-
forSearch(dependencies: ISearchDependencies): Promise<boolean>;
|
|
6
|
-
forSitemapGenerator(filterKeyValues: FilterKeyValuesMap): Promise<boolean>;
|
|
7
|
-
getName(): string;
|
|
8
|
-
getDescription(): string;
|
|
9
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
2
|
-
import { SpecialProgrammesFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
-
import { BaseProgrammeRule } from '../BaseProgrammeRule';
|
|
4
|
-
export class ErasmusOrJointSpecialProgrammesRule extends BaseProgrammeRule {
|
|
5
|
-
forSearch(dependencies) {
|
|
6
|
-
const { seoInfoBase, filterState } = dependencies;
|
|
7
|
-
const selectedSpecialProgramme = seoInfoBase.getFilterOptionValueBy(FilterKey.SPECIAL_PROGRAMMES, filterState);
|
|
8
|
-
if (!selectedSpecialProgramme) {
|
|
9
|
-
return Promise.resolve(false);
|
|
10
|
-
}
|
|
11
|
-
return Promise.resolve(selectedSpecialProgramme === SpecialProgrammesFilterOptionValue.ERASMUS_MUNDUS ||
|
|
12
|
-
selectedSpecialProgramme === SpecialProgrammesFilterOptionValue.JOINT_PROGRAMMES);
|
|
13
|
-
}
|
|
14
|
-
forSitemapGenerator(filterKeyValues) {
|
|
15
|
-
const [selectedSpecialProgramme] = filterKeyValues.get(FilterKey.SPECIAL_PROGRAMMES);
|
|
16
|
-
if (!selectedSpecialProgramme) {
|
|
17
|
-
return Promise.resolve(false);
|
|
18
|
-
}
|
|
19
|
-
return Promise.resolve(selectedSpecialProgramme === SpecialProgrammesFilterOptionValue.ERASMUS_MUNDUS ||
|
|
20
|
-
selectedSpecialProgramme === SpecialProgrammesFilterOptionValue.JOINT_PROGRAMMES);
|
|
21
|
-
}
|
|
22
|
-
getName() {
|
|
23
|
-
return 'ErasmusOrJointSpecialProgrammesRule';
|
|
24
|
-
}
|
|
25
|
-
getDescription() {
|
|
26
|
-
return 'Is indexable if the selected special programme is Erasmus Mundus or Joint Programmes.';
|
|
27
|
-
}
|
|
28
|
-
}
|