@studyportals/fawkes 2.0.1-20 → 2.0.1-21
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/index.d.ts +1 -8
- package/dist/index.js +1 -3
- package/dist/scholarships-seo/index.d.ts +7 -7
- package/dist/scholarships-seo/index.js +2 -2
- package/dist/sitemap-generator-seo/index.d.ts +5 -0
- package/dist/sitemap-generator-seo/index.js +2 -1
- package/dist/src/common/BaseSeoIndexabilityPolicy.d.ts +13 -9
- package/dist/src/common/BaseSeoIndexabilityPolicy.js +18 -8
- package/dist/src/common/ICustomRule.d.ts +6 -0
- package/dist/src/common/IDependencies.d.ts +4 -0
- package/dist/src/common/IFilterKeyValues.d.ts +6 -0
- package/dist/src/common/IFilterKeyValues.js +1 -0
- package/dist/src/common/IIndexabilityPolicyDependencies.d.ts +8 -0
- package/dist/src/common/ISitemapUrlGenerator.d.ts +5 -0
- package/dist/src/common/ISitemapUrlGenerator.js +1 -0
- package/dist/src/common/RuleBasedIndexabilityPolicy.d.ts +10 -0
- package/dist/src/common/RuleBasedIndexabilityPolicy.js +12 -0
- package/dist/src/enums/DependencyTypes.d.ts +4 -0
- package/dist/src/enums/DependencyTypes.js +5 -0
- package/dist/src/enums/FilterCombinations.d.ts +9 -0
- package/dist/src/enums/FilterCombinations.js +10 -0
- package/dist/src/organisations/ISeoInfoBaseOrganisations.d.ts +1 -1
- package/dist/src/organisations/SearchIndexabilityManager.d.ts +2 -2
- package/dist/src/organisations/SeoIndexabilityPolicy.d.ts +3 -4
- package/dist/src/organisations/SeoIndexabilityPolicy.js +2 -2
- package/dist/src/organisations/SeoRuleBasedIndexabilityPolicy.d.ts +7 -8
- package/dist/src/organisations/SeoRuleBasedIndexabilityPolicy.js +4 -3
- package/dist/src/presenters/AreaPresenter.d.ts +9 -0
- package/dist/src/presenters/AreaPresenter.js +33 -0
- package/dist/src/presenters/CountryPresenter.d.ts +9 -0
- package/dist/src/presenters/CountryPresenter.js +36 -0
- package/dist/src/presenters/DisciplinePresenter.d.ts +9 -0
- package/dist/src/presenters/DisciplinePresenter.js +31 -0
- package/dist/src/presenters/fragments/IAreaFragment.d.ts +4 -0
- package/dist/src/presenters/fragments/IAreaFragment.js +1 -0
- package/dist/src/presenters/fragments/ICountryFragment.d.ts +4 -0
- package/dist/src/presenters/fragments/ICountryFragment.js +1 -0
- package/dist/src/presenters/fragments/IFragment.d.ts +4 -0
- package/dist/src/presenters/fragments/IFragment.js +1 -0
- package/dist/src/scholarships/SearchIndexabilityManager.d.ts +6 -5
- package/dist/src/scholarships/SearchIndexabilityManager.js +14 -11
- package/dist/src/scholarships/index.d.ts +0 -1
- package/dist/src/scholarships/index.js +0 -1
- package/dist/src/scholarships/policies/AreaPolicy.d.ts +10 -9
- package/dist/src/scholarships/policies/AreaPolicy.js +36 -16
- package/dist/src/scholarships/policies/CountryPolicy.d.ts +10 -6
- package/dist/src/scholarships/policies/CountryPolicy.js +32 -10
- package/dist/src/scholarships/policies/DisciplineCountryPolicy.d.ts +10 -9
- package/dist/src/scholarships/policies/DisciplineCountryPolicy.js +43 -15
- package/dist/src/scholarships/policies/DisciplinePolicy.d.ts +10 -6
- package/dist/src/scholarships/policies/DisciplinePolicy.js +33 -10
- package/dist/src/scholarships/policies/UnfilteredPolicy.d.ts +6 -5
- package/dist/src/scholarships/policies/UnfilteredPolicy.js +11 -6
- package/dist/src/scholarships/policies/UniversityCountryPolicy.d.ts +6 -5
- package/dist/src/scholarships/policies/UniversityCountryPolicy.js +35 -9
- package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.d.ts +14 -0
- package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.js +45 -0
- package/dist/src/scholarships/rules/SearchVolumeAreasRule.d.ts +12 -0
- package/dist/src/scholarships/rules/SearchVolumeAreasRule.js +34 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesRule.d.ts +12 -0
- package/dist/src/scholarships/rules/SearchVolumeCountriesRule.js +34 -0
- package/dist/src/scholarships/rules/SearchVolumeCountryDisciplineRule.d.ts +12 -0
- package/dist/src/scholarships/rules/SearchVolumeCountryDisciplineRule.js +37 -0
- package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.d.ts +12 -0
- package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.js +38 -0
- package/dist/src/scholarships/rules/files/search-volume.json +39334 -0
- package/dist/src/sitemap-generator/IOrganisation.d.ts +6 -0
- package/dist/src/sitemap-generator/IOrganisation.js +1 -0
- package/dist/src/sitemap-generator/IOrganisationsClient.d.ts +4 -0
- package/dist/src/sitemap-generator/IOrganisationsClient.js +1 -0
- package/dist/src/sitemap-generator/ISearchApiClient.d.ts +3 -0
- package/dist/src/sitemap-generator/ISearchApiClient.js +1 -0
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorDependencies.d.ts +9 -0
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorDependencies.js +1 -0
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.d.ts +4 -0
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.js +1 -0
- package/dist/src/sitemap-generator/SitemapUrlGeneratorManager.d.ts +8 -0
- package/dist/src/sitemap-generator/SitemapUrlGeneratorManager.js +20 -0
- package/dist/src/sitemap-generator/index.d.ts +0 -2
- package/dist/src/sitemap-generator/index.js +1 -2
- package/dist/src/types/SeoDependencies.d.ts +3 -0
- package/dist/src/types/SeoDependencies.js +1 -0
- package/package.json +16 -6
- package/dist/fawkes.js +0 -2
- package/dist/fawkes.js.map +0 -1
- package/dist/organisations-seo.js +0 -0
- package/dist/scholarships-seo.js +0 -2
- package/dist/scholarships-seo.js.map +0 -1
- package/dist/sitemap-generator-seo.js +0 -0
- package/dist/src/common/DisciplinePresenter.d.ts +0 -5
- package/dist/src/common/DisciplinePresenter.js +0 -48
- package/dist/src/common/IPrettyPathGenerator.d.ts +0 -3
- package/dist/src/common/fragments/Fragment.d.ts +0 -6
- package/dist/src/common/fragments/Fragment.js +0 -8
- package/dist/src/common/fragments/IFragment.d.ts +0 -4
- package/dist/src/scholarships/CustomRules.d.ts +0 -6
- package/dist/src/scholarships/CustomRules.js +0 -18
- package/dist/src/scholarships/policies/DisciplineAreaPolicy.d.ts +0 -12
- package/dist/src/scholarships/policies/DisciplineAreaPolicy.js +0 -34
- package/dist/src/sitemap-generator/CombinationType.d.ts +0 -2
- package/dist/src/sitemap-generator/CombinationType.js +0 -3
- package/dist/src/sitemap-generator/ISitemapPathGeneratorChain.d.ts +0 -4
- package/dist/src/sitemap-generator/SitemapPathGeneratorChain.d.ts +0 -7
- package/dist/src/sitemap-generator/SitemapPathGeneratorChain.js +0 -9
- /package/dist/src/common/{IPrettyPathGenerator.js → ICustomRule.js} +0 -0
- /package/dist/src/common/{fragments/IFragment.js → IDependencies.js} +0 -0
- /package/dist/src/{sitemap-generator/ISitemapPathGeneratorChain.js → common/IIndexabilityPolicyDependencies.js} +0 -0
|
File without changes
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { areasAll } from '@studyportals/static-domain-data/areas/areas';
|
|
2
|
-
import { Fragment } from './fragments/Fragment';
|
|
3
|
-
export class DisciplinePresenter {
|
|
4
|
-
// private fragments: IFragment[];
|
|
5
|
-
constructor() {
|
|
6
|
-
// this.fragments = this.getFragments();
|
|
7
|
-
}
|
|
8
|
-
// private fragments: IFragment[];
|
|
9
|
-
// private generatePaths(): IFragment[] {
|
|
10
|
-
// const disciplines: IFragment[] = [];
|
|
11
|
-
// const allDisciplines = [...disciplinesAll, ...subdisciplinesAll];
|
|
12
|
-
// allDisciplines.forEach((discipline) => {
|
|
13
|
-
// const path = disciplineGetVirtualPath(discipline.id);
|
|
14
|
-
// if (path === null) {
|
|
15
|
-
// return;
|
|
16
|
-
// }
|
|
17
|
-
// disciplines.push(new Fragment(discipline.id, path));
|
|
18
|
-
// });
|
|
19
|
-
// return disciplines;
|
|
20
|
-
// }
|
|
21
|
-
// private generatePaths(): IFragment[] {
|
|
22
|
-
// const allDisciplines = [...disciplinesAll, ...subdisciplinesAll];
|
|
23
|
-
// const allDisciplines = [...disciplinesAll];
|
|
24
|
-
// const disciplines = allDisciplines.map((discipline) => {
|
|
25
|
-
// return new Fragment(
|
|
26
|
-
// discipline.id,
|
|
27
|
-
// disciplineGetVirtualPath(discipline.id) ?? ""
|
|
28
|
-
// );
|
|
29
|
-
// }).filter((d) => d.path !== "");
|
|
30
|
-
// return disciplines;
|
|
31
|
-
// }
|
|
32
|
-
getFragments() {
|
|
33
|
-
const disciplines = [];
|
|
34
|
-
// const allDisciplines = [...disciplinesAll, ...subdisciplinesAll];
|
|
35
|
-
// const allDisciplines = [...disciplinesAll];
|
|
36
|
-
console.warn(areasAll);
|
|
37
|
-
const allDisciplines = [{ id: "1", path: "some_path" }, { id: "2", path: "some_path" }];
|
|
38
|
-
allDisciplines.forEach((discipline) => {
|
|
39
|
-
// const path = disciplineGetVirtualPath(discipline.id);
|
|
40
|
-
const path = discipline.path;
|
|
41
|
-
if (path === null) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
disciplines.push(new Fragment(discipline.id, path));
|
|
45
|
-
});
|
|
46
|
-
return disciplines;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ISeoFilterOptions } from "@/common/ISeoFilterOptions";
|
|
2
|
-
import { ISeoSearchApplicationState } from "@/common/ISeoSearchApplicationState";
|
|
3
|
-
export declare class CustomRules {
|
|
4
|
-
static isPartOfAustralia(filterOptions: ISeoFilterOptions, areaId?: string): boolean;
|
|
5
|
-
static hasMoreThan31Results(applicationState: ISeoSearchApplicationState): boolean;
|
|
6
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from "@studyportals/search-filters";
|
|
2
|
-
export class CustomRules {
|
|
3
|
-
static isPartOfAustralia(filterOptions, areaId) {
|
|
4
|
-
const australiaCode = 202;
|
|
5
|
-
if (!areaId) {
|
|
6
|
-
return false;
|
|
7
|
-
}
|
|
8
|
-
const areas = filterOptions.getOptionsInformationFor(FilterKey.AREA);
|
|
9
|
-
const identifiedArea = areas.find((area) => area.optionValue === areaId);
|
|
10
|
-
if (identifiedArea === undefined) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
return identifiedArea.countryIdentity === australiaCode.toString();
|
|
14
|
-
}
|
|
15
|
-
static hasMoreThan31Results(applicationState) {
|
|
16
|
-
return applicationState.getNumberOfResults() > 31;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BaseSeoIndexabilityPolicy } from '@/common/BaseSeoIndexabilityPolicy';
|
|
2
|
-
import { ISeoFilterState } from '@/common/ISeoFilterState';
|
|
3
|
-
import { ISeoInfoBase } from '@/common/ISeoInfoBase';
|
|
4
|
-
import { ISeoFilterOptions } from '@/common/ISeoFilterOptions';
|
|
5
|
-
import { ISeoSearchApplicationState } from '@/common/ISeoSearchApplicationState';
|
|
6
|
-
export declare class DisciplineAreaPolicy extends BaseSeoIndexabilityPolicy {
|
|
7
|
-
private filterOptions;
|
|
8
|
-
private applicationState;
|
|
9
|
-
constructor(seoInfoBase: ISeoInfoBase, filterState: ISeoFilterState, filterOptions: ISeoFilterOptions, applicationState: ISeoSearchApplicationState);
|
|
10
|
-
protected matchesFilters(): Promise<boolean>;
|
|
11
|
-
generatePaths(): string[];
|
|
12
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { FilterKey } from '@studyportals/search-filters';
|
|
2
|
-
import { BaseSeoIndexabilityPolicy } from '@/common/BaseSeoIndexabilityPolicy';
|
|
3
|
-
import { CustomRules } from '../CustomRules';
|
|
4
|
-
export class DisciplineAreaPolicy extends BaseSeoIndexabilityPolicy {
|
|
5
|
-
filterOptions;
|
|
6
|
-
applicationState;
|
|
7
|
-
constructor(seoInfoBase, filterState, filterOptions, applicationState) {
|
|
8
|
-
super(seoInfoBase, filterState);
|
|
9
|
-
this.filterOptions = filterOptions;
|
|
10
|
-
this.applicationState = applicationState;
|
|
11
|
-
}
|
|
12
|
-
async matchesFilters() {
|
|
13
|
-
const singleDisciplineSelected = await this.seoInfoBase.singleSelectionFor(FilterKey.DISCIPLINES, this.filterState);
|
|
14
|
-
const singleCountrySelected = await this.seoInfoBase.singleSelectionFor(FilterKey.COUNTRY, this.filterState);
|
|
15
|
-
const singleAreaSelected = await this.seoInfoBase.singleSelectionFor(FilterKey.AREA, this.filterState);
|
|
16
|
-
const onlyDisciplineAndAreaSelected = await this.seoInfoBase.selectionOnlyFor([
|
|
17
|
-
FilterKey.DISCIPLINES,
|
|
18
|
-
FilterKey.COUNTRY,
|
|
19
|
-
FilterKey.AREA
|
|
20
|
-
], this.filterState);
|
|
21
|
-
const areaSelected = this.seoInfoBase.getFilterOptionValueBy(FilterKey.AREA, this.filterState);
|
|
22
|
-
const isPartOfAustralia = CustomRules.isPartOfAustralia(this.filterOptions, areaSelected ?? undefined);
|
|
23
|
-
const hasMoreThan31Results = CustomRules.hasMoreThan31Results(this.applicationState);
|
|
24
|
-
return singleDisciplineSelected
|
|
25
|
-
&& singleCountrySelected
|
|
26
|
-
&& singleAreaSelected
|
|
27
|
-
&& onlyDisciplineAndAreaSelected
|
|
28
|
-
&& !isPartOfAustralia
|
|
29
|
-
&& hasMoreThan31Results;
|
|
30
|
-
}
|
|
31
|
-
generatePaths() {
|
|
32
|
-
throw new Error('Method not implemented.');
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ISitemapPathGeneratorChain } from "./ISitemapPathGeneratorChain";
|
|
2
|
-
import { CombinationTypes } from "./CombinationType";
|
|
3
|
-
export declare class SitemapPathGeneratorChain implements ISitemapPathGeneratorChain {
|
|
4
|
-
private handlers;
|
|
5
|
-
constructor();
|
|
6
|
-
generatePaths(): Map<CombinationTypes, string[]>;
|
|
7
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|