@studyportals/fawkes 1.0.1-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/README.md +17 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +1 -0
- package/dist/organisations-seo/index.d.ts +0 -0
- package/dist/organisations-seo/index.js +13 -0
- package/dist/organisations-seo.js +0 -0
- package/dist/scholarships-seo/index.d.ts +2 -0
- package/dist/scholarships-seo/index.js +7 -0
- package/dist/scholarships-seo.js +2 -0
- package/dist/scholarships-seo.js.map +1 -0
- package/dist/sitemap-generator-seo/index.d.ts +0 -0
- package/dist/sitemap-generator-seo/index.js +9 -0
- package/dist/sitemap-generator-seo.js +0 -0
- package/dist/src/common/BaseSeoIndexabilityPolicy.d.ts +12 -0
- package/dist/src/common/BaseSeoIndexabilityPolicy.js +54 -0
- package/dist/src/common/IFilterOptions.d.ts +4 -0
- package/dist/src/common/IFilterOptions.js +2 -0
- package/dist/src/common/IFilterSelectionState.d.ts +4 -0
- package/dist/src/common/IFilterSelectionState.js +2 -0
- package/dist/src/common/IPrettyPathGenerator.d.ts +3 -0
- package/dist/src/common/IPrettyPathGenerator.js +2 -0
- package/dist/src/common/ISearchApplicationState.d.ts +3 -0
- package/dist/src/common/ISearchApplicationState.js +2 -0
- package/dist/src/common/ISearchPolicyChain.d.ts +3 -0
- package/dist/src/common/ISearchPolicyChain.js +2 -0
- package/dist/src/common/ISeoIndexabilityPolicy.d.ts +3 -0
- package/dist/src/common/ISeoIndexabilityPolicy.js +2 -0
- package/dist/src/common/ISeoInfoBase.d.ts +10 -0
- package/dist/src/common/ISeoInfoBase.js +2 -0
- package/dist/src/common/index.d.ts +3 -0
- package/dist/src/common/index.js +4 -0
- package/dist/src/organisations/FilterKeyValuePairs.d.ts +7 -0
- package/dist/src/organisations/FilterKeyValuePairs.js +2 -0
- package/dist/src/organisations/IOrganisationsProvider.d.ts +3 -0
- package/dist/src/organisations/IOrganisationsProvider.js +2 -0
- package/dist/src/organisations/ISeoInfoBaseOrganisations.d.ts +7 -0
- package/dist/src/organisations/ISeoInfoBaseOrganisations.js +2 -0
- package/dist/src/organisations/ISortState.d.ts +4 -0
- package/dist/src/organisations/ISortState.js +2 -0
- package/dist/src/organisations/SearchPolicyChain.d.ts +6 -0
- package/dist/src/organisations/SearchPolicyChain.js +13 -0
- package/dist/src/organisations/SeoIndexabilityPolicy.d.ts +14 -0
- package/dist/src/organisations/SeoIndexabilityPolicy.js +33 -0
- package/dist/src/organisations/SeoRuleBasedIndexabilityPolicy.d.ts +16 -0
- package/dist/src/organisations/SeoRuleBasedIndexabilityPolicy.js +33 -0
- package/dist/src/organisations/SortingOptions.d.ts +4 -0
- package/dist/src/organisations/SortingOptions.js +8 -0
- package/dist/src/organisations/index.d.ts +2 -0
- package/dist/src/organisations/index.js +6 -0
- package/dist/src/scholarships/SearchIndexabilityManager.d.ts +15 -0
- package/dist/src/scholarships/SearchIndexabilityManager.js +78 -0
- package/dist/src/scholarships/index.d.ts +0 -0
- package/dist/src/scholarships/index.js +6 -0
- package/dist/src/scholarships/policies/AreaPolicy.d.ts +15 -0
- package/dist/src/scholarships/policies/AreaPolicy.js +110 -0
- package/dist/src/scholarships/policies/CountryPolicy.d.ts +10 -0
- package/dist/src/scholarships/policies/CountryPolicy.js +88 -0
- package/dist/src/scholarships/policies/DisciplineAreaPolicy.d.ts +10 -0
- package/dist/src/scholarships/policies/DisciplineAreaPolicy.js +99 -0
- package/dist/src/scholarships/policies/DisciplineCountryPolicy.d.ts +13 -0
- package/dist/src/scholarships/policies/DisciplineCountryPolicy.js +106 -0
- package/dist/src/scholarships/policies/DisciplinePolicy.d.ts +10 -0
- package/dist/src/scholarships/policies/DisciplinePolicy.js +88 -0
- package/dist/src/scholarships/policies/UnfilteredPolicy.d.ts +10 -0
- package/dist/src/scholarships/policies/UnfilteredPolicy.js +76 -0
- package/dist/src/scholarships/policies/UniversityCountryPolicy.d.ts +10 -0
- package/dist/src/scholarships/policies/UniversityCountryPolicy.js +94 -0
- package/dist/src/sitemap-generator/CombinationType.d.ts +2 -0
- package/dist/src/sitemap-generator/CombinationType.js +6 -0
- package/dist/src/sitemap-generator/IRankingApiClient.d.ts +3 -0
- package/dist/src/sitemap-generator/IRankingApiClient.js +2 -0
- package/dist/src/sitemap-generator/ISitemapPathGeneratorChain.d.ts +4 -0
- package/dist/src/sitemap-generator/ISitemapPathGeneratorChain.js +2 -0
- package/dist/src/sitemap-generator/SitemapPathGeneratorChain.d.ts +7 -0
- package/dist/src/sitemap-generator/SitemapPathGeneratorChain.js +13 -0
- package/dist/src/sitemap-generator/index.d.ts +3 -0
- package/dist/src/sitemap-generator/index.js +19 -0
- package/dist/tests/TestBase.test.d.mts +1 -0
- package/dist/tests/TestBase.test.mjs +9 -0
- package/package.json +55 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.AreaPolicy = void 0;
|
|
55
|
+
var search_filters_1 = require("@studyportals/search-filters");
|
|
56
|
+
var BaseSeoIndexabilityPolicy_1 = require("@/common/BaseSeoIndexabilityPolicy");
|
|
57
|
+
var AreaPolicy = /** @class */ (function (_super) {
|
|
58
|
+
__extends(AreaPolicy, _super);
|
|
59
|
+
function AreaPolicy(seoInfoBase, filterState, filterOptions) {
|
|
60
|
+
var _this = _super.call(this, seoInfoBase, filterState) || this;
|
|
61
|
+
_this.seoInfoBase = seoInfoBase;
|
|
62
|
+
_this.filterState = filterState;
|
|
63
|
+
_this.filterOptions = filterOptions;
|
|
64
|
+
return _this;
|
|
65
|
+
}
|
|
66
|
+
AreaPolicy.prototype.matchesFilters = function () {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
+
var singleAreaSelected, singleCountrySelected, onlyAreaAndCountrySelected, areaSelected, isPartOfAustralia;
|
|
69
|
+
return __generator(this, function (_a) {
|
|
70
|
+
switch (_a.label) {
|
|
71
|
+
case 0: return [4 /*yield*/, this.seoInfoBase.singleSelectionFor(search_filters_1.FilterKey.AREA, this.filterState)];
|
|
72
|
+
case 1:
|
|
73
|
+
singleAreaSelected = _a.sent();
|
|
74
|
+
return [4 /*yield*/, this.seoInfoBase.singleSelectionFor(search_filters_1.FilterKey.COUNTRY, this.filterState)];
|
|
75
|
+
case 2:
|
|
76
|
+
singleCountrySelected = _a.sent();
|
|
77
|
+
return [4 /*yield*/, this.seoInfoBase.selectionOnlyFor([
|
|
78
|
+
search_filters_1.FilterKey.AREA,
|
|
79
|
+
search_filters_1.FilterKey.COUNTRY
|
|
80
|
+
], this.filterState)];
|
|
81
|
+
case 3:
|
|
82
|
+
onlyAreaAndCountrySelected = _a.sent();
|
|
83
|
+
areaSelected = this.seoInfoBase.getFilterOptionValueBy(search_filters_1.FilterKey.AREA, this.filterState);
|
|
84
|
+
isPartOfAustralia = this.isPartOfAustralia(areaSelected !== null && areaSelected !== void 0 ? areaSelected : undefined);
|
|
85
|
+
return [2 /*return*/, singleAreaSelected
|
|
86
|
+
&& singleCountrySelected
|
|
87
|
+
&& onlyAreaAndCountrySelected
|
|
88
|
+
&& !isPartOfAustralia];
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
AreaPolicy.prototype.isPartOfAustralia = function (areaId) {
|
|
94
|
+
if (!areaId) {
|
|
95
|
+
throw new Error('Area ID is not defined');
|
|
96
|
+
}
|
|
97
|
+
var areas = this.filterOptions.getFor(search_filters_1.FilterKey.AREA);
|
|
98
|
+
var identifiedArea = areas.find(function (area) { return area.optionValue === areaId; });
|
|
99
|
+
if (identifiedArea === undefined) {
|
|
100
|
+
throw new Error("Area ".concat(areaId, " not found"));
|
|
101
|
+
}
|
|
102
|
+
return identifiedArea.countryIdentity === AreaPolicy.AUSTRALIA_CODE.toString();
|
|
103
|
+
};
|
|
104
|
+
AreaPolicy.prototype.generatePaths = function () {
|
|
105
|
+
throw new Error('Method not implemented.');
|
|
106
|
+
};
|
|
107
|
+
AreaPolicy.AUSTRALIA_CODE = 202;
|
|
108
|
+
return AreaPolicy;
|
|
109
|
+
}(BaseSeoIndexabilityPolicy_1.BaseSeoIndexabilityPolicy));
|
|
110
|
+
exports.AreaPolicy = AreaPolicy;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseSeoIndexabilityPolicy } from '@/common/BaseSeoIndexabilityPolicy';
|
|
2
|
+
import { IFilterSelectionState } from '@/common/IFilterSelectionState';
|
|
3
|
+
import { ISeoInfoBase } from '@/common/ISeoInfoBase';
|
|
4
|
+
export declare class CountryPolicy extends BaseSeoIndexabilityPolicy {
|
|
5
|
+
protected readonly seoInfoBase: ISeoInfoBase;
|
|
6
|
+
protected readonly filterState: IFilterSelectionState;
|
|
7
|
+
constructor(seoInfoBase: ISeoInfoBase, filterState: IFilterSelectionState);
|
|
8
|
+
protected matchesFilters(): Promise<boolean>;
|
|
9
|
+
generatePaths(): string[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.CountryPolicy = void 0;
|
|
55
|
+
var search_filters_1 = require("@studyportals/search-filters");
|
|
56
|
+
var BaseSeoIndexabilityPolicy_1 = require("@/common/BaseSeoIndexabilityPolicy");
|
|
57
|
+
var CountryPolicy = /** @class */ (function (_super) {
|
|
58
|
+
__extends(CountryPolicy, _super);
|
|
59
|
+
function CountryPolicy(seoInfoBase, filterState) {
|
|
60
|
+
var _this = _super.call(this, seoInfoBase, filterState) || this;
|
|
61
|
+
_this.seoInfoBase = seoInfoBase;
|
|
62
|
+
_this.filterState = filterState;
|
|
63
|
+
return _this;
|
|
64
|
+
}
|
|
65
|
+
CountryPolicy.prototype.matchesFilters = function () {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
+
var singleCountrySelected, onlyCountrySelected;
|
|
68
|
+
return __generator(this, function (_a) {
|
|
69
|
+
switch (_a.label) {
|
|
70
|
+
case 0: return [4 /*yield*/, this.seoInfoBase.singleSelectionFor(search_filters_1.FilterKey.COUNTRY, this.filterState)];
|
|
71
|
+
case 1:
|
|
72
|
+
singleCountrySelected = _a.sent();
|
|
73
|
+
return [4 /*yield*/, this.seoInfoBase.selectionOnlyFor([
|
|
74
|
+
search_filters_1.FilterKey.COUNTRY
|
|
75
|
+
], this.filterState)];
|
|
76
|
+
case 2:
|
|
77
|
+
onlyCountrySelected = _a.sent();
|
|
78
|
+
return [2 /*return*/, singleCountrySelected && onlyCountrySelected];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
CountryPolicy.prototype.generatePaths = function () {
|
|
84
|
+
throw new Error('Method not implemented.');
|
|
85
|
+
};
|
|
86
|
+
return CountryPolicy;
|
|
87
|
+
}(BaseSeoIndexabilityPolicy_1.BaseSeoIndexabilityPolicy));
|
|
88
|
+
exports.CountryPolicy = CountryPolicy;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseSeoIndexabilityPolicy } from '@/common/BaseSeoIndexabilityPolicy';
|
|
2
|
+
import { IFilterSelectionState } from '@/common/IFilterSelectionState';
|
|
3
|
+
import { ISeoInfoBase } from '@/common/ISeoInfoBase';
|
|
4
|
+
export declare class DisciplineAreaPolicy extends BaseSeoIndexabilityPolicy {
|
|
5
|
+
protected readonly seoInfoBase: ISeoInfoBase;
|
|
6
|
+
protected readonly filterState: IFilterSelectionState;
|
|
7
|
+
constructor(seoInfoBase: ISeoInfoBase, filterState: IFilterSelectionState);
|
|
8
|
+
protected matchesFilters(): Promise<boolean>;
|
|
9
|
+
generatePaths(): string[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.DisciplineAreaPolicy = void 0;
|
|
55
|
+
var search_filters_1 = require("@studyportals/search-filters");
|
|
56
|
+
var BaseSeoIndexabilityPolicy_1 = require("@/common/BaseSeoIndexabilityPolicy");
|
|
57
|
+
var DisciplineAreaPolicy = /** @class */ (function (_super) {
|
|
58
|
+
__extends(DisciplineAreaPolicy, _super);
|
|
59
|
+
function DisciplineAreaPolicy(seoInfoBase, filterState) {
|
|
60
|
+
var _this = _super.call(this, seoInfoBase, filterState) || this;
|
|
61
|
+
_this.seoInfoBase = seoInfoBase;
|
|
62
|
+
_this.filterState = filterState;
|
|
63
|
+
return _this;
|
|
64
|
+
}
|
|
65
|
+
DisciplineAreaPolicy.prototype.matchesFilters = function () {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
+
var singleDisciplineSelected, singleCountrySelected, singleAreaSelected, onlyDisciplineAndAreaSelected;
|
|
68
|
+
return __generator(this, function (_a) {
|
|
69
|
+
switch (_a.label) {
|
|
70
|
+
case 0: return [4 /*yield*/, this.seoInfoBase.singleSelectionFor(search_filters_1.FilterKey.DISCIPLINES, this.filterState)];
|
|
71
|
+
case 1:
|
|
72
|
+
singleDisciplineSelected = _a.sent();
|
|
73
|
+
return [4 /*yield*/, this.seoInfoBase.singleSelectionFor(search_filters_1.FilterKey.COUNTRY, this.filterState)];
|
|
74
|
+
case 2:
|
|
75
|
+
singleCountrySelected = _a.sent();
|
|
76
|
+
return [4 /*yield*/, this.seoInfoBase.singleSelectionFor(search_filters_1.FilterKey.AREA, this.filterState)];
|
|
77
|
+
case 3:
|
|
78
|
+
singleAreaSelected = _a.sent();
|
|
79
|
+
return [4 /*yield*/, this.seoInfoBase.selectionOnlyFor([
|
|
80
|
+
search_filters_1.FilterKey.DISCIPLINES,
|
|
81
|
+
search_filters_1.FilterKey.COUNTRY,
|
|
82
|
+
search_filters_1.FilterKey.AREA
|
|
83
|
+
], this.filterState)];
|
|
84
|
+
case 4:
|
|
85
|
+
onlyDisciplineAndAreaSelected = _a.sent();
|
|
86
|
+
return [2 /*return*/, singleDisciplineSelected
|
|
87
|
+
&& singleCountrySelected
|
|
88
|
+
&& singleAreaSelected
|
|
89
|
+
&& onlyDisciplineAndAreaSelected];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
DisciplineAreaPolicy.prototype.generatePaths = function () {
|
|
95
|
+
throw new Error('Method not implemented.');
|
|
96
|
+
};
|
|
97
|
+
return DisciplineAreaPolicy;
|
|
98
|
+
}(BaseSeoIndexabilityPolicy_1.BaseSeoIndexabilityPolicy));
|
|
99
|
+
exports.DisciplineAreaPolicy = DisciplineAreaPolicy;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseSeoIndexabilityPolicy } from '@/common/BaseSeoIndexabilityPolicy';
|
|
2
|
+
import { ISearchApplicationState } from '@/common/ISearchApplicationState';
|
|
3
|
+
import { IFilterSelectionState } from '@/common/IFilterSelectionState';
|
|
4
|
+
import { ISeoInfoBase } from '@/common/ISeoInfoBase';
|
|
5
|
+
export declare class DisciplineCountryPolicy extends BaseSeoIndexabilityPolicy {
|
|
6
|
+
protected readonly seoInfoBase: ISeoInfoBase;
|
|
7
|
+
protected readonly filterState: IFilterSelectionState;
|
|
8
|
+
protected readonly applicationState: ISearchApplicationState;
|
|
9
|
+
constructor(seoInfoBase: ISeoInfoBase, filterState: IFilterSelectionState, applicationState: ISearchApplicationState);
|
|
10
|
+
protected matchesFilters(): Promise<boolean>;
|
|
11
|
+
private hasEnoughResults;
|
|
12
|
+
generatePaths(): string[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.DisciplineCountryPolicy = void 0;
|
|
55
|
+
var search_filters_1 = require("@studyportals/search-filters");
|
|
56
|
+
var BaseSeoIndexabilityPolicy_1 = require("@/common/BaseSeoIndexabilityPolicy");
|
|
57
|
+
var DisciplineCountryPolicy = /** @class */ (function (_super) {
|
|
58
|
+
__extends(DisciplineCountryPolicy, _super);
|
|
59
|
+
function DisciplineCountryPolicy(seoInfoBase, filterState, applicationState) {
|
|
60
|
+
var _this = _super.call(this, seoInfoBase, filterState) || this;
|
|
61
|
+
_this.seoInfoBase = seoInfoBase;
|
|
62
|
+
_this.filterState = filterState;
|
|
63
|
+
_this.applicationState = applicationState;
|
|
64
|
+
return _this;
|
|
65
|
+
}
|
|
66
|
+
DisciplineCountryPolicy.prototype.matchesFilters = function () {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
+
var singleDisciplineSelected, singleCountrySelected, onlyDisciplineAndCountrySelected, hasEnoughResults;
|
|
69
|
+
return __generator(this, function (_a) {
|
|
70
|
+
switch (_a.label) {
|
|
71
|
+
case 0: return [4 /*yield*/, this.seoInfoBase.singleSelectionFor(search_filters_1.FilterKey.DISCIPLINES, this.filterState)];
|
|
72
|
+
case 1:
|
|
73
|
+
singleDisciplineSelected = _a.sent();
|
|
74
|
+
return [4 /*yield*/, this.seoInfoBase.singleSelectionFor(search_filters_1.FilterKey.COUNTRY, this.filterState)];
|
|
75
|
+
case 2:
|
|
76
|
+
singleCountrySelected = _a.sent();
|
|
77
|
+
return [4 /*yield*/, this.seoInfoBase.selectionOnlyFor([
|
|
78
|
+
search_filters_1.FilterKey.DISCIPLINES,
|
|
79
|
+
search_filters_1.FilterKey.COUNTRY
|
|
80
|
+
], this.filterState)];
|
|
81
|
+
case 3:
|
|
82
|
+
onlyDisciplineAndCountrySelected = _a.sent();
|
|
83
|
+
return [4 /*yield*/, this.hasEnoughResults()];
|
|
84
|
+
case 4:
|
|
85
|
+
hasEnoughResults = _a.sent();
|
|
86
|
+
return [2 /*return*/, singleDisciplineSelected
|
|
87
|
+
&& singleCountrySelected
|
|
88
|
+
&& onlyDisciplineAndCountrySelected
|
|
89
|
+
&& hasEnoughResults];
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
DisciplineCountryPolicy.prototype.hasEnoughResults = function () {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
96
|
+
return __generator(this, function (_a) {
|
|
97
|
+
return [2 /*return*/, this.applicationState.getNumberOfResults() > 31];
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
DisciplineCountryPolicy.prototype.generatePaths = function () {
|
|
102
|
+
throw new Error('Method not implemented.');
|
|
103
|
+
};
|
|
104
|
+
return DisciplineCountryPolicy;
|
|
105
|
+
}(BaseSeoIndexabilityPolicy_1.BaseSeoIndexabilityPolicy));
|
|
106
|
+
exports.DisciplineCountryPolicy = DisciplineCountryPolicy;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseSeoIndexabilityPolicy } from '@/common/BaseSeoIndexabilityPolicy';
|
|
2
|
+
import { IFilterSelectionState } from '@/common/IFilterSelectionState';
|
|
3
|
+
import { ISeoInfoBase } from '@/common/ISeoInfoBase';
|
|
4
|
+
export declare class DisciplinePolicy extends BaseSeoIndexabilityPolicy {
|
|
5
|
+
protected readonly seoInfoBase: ISeoInfoBase;
|
|
6
|
+
protected readonly filterState: IFilterSelectionState;
|
|
7
|
+
constructor(seoInfoBase: ISeoInfoBase, filterState: IFilterSelectionState);
|
|
8
|
+
protected matchesFilters(): Promise<boolean>;
|
|
9
|
+
generatePaths(): string[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.DisciplinePolicy = void 0;
|
|
55
|
+
var search_filters_1 = require("@studyportals/search-filters");
|
|
56
|
+
var BaseSeoIndexabilityPolicy_1 = require("@/common/BaseSeoIndexabilityPolicy");
|
|
57
|
+
var DisciplinePolicy = /** @class */ (function (_super) {
|
|
58
|
+
__extends(DisciplinePolicy, _super);
|
|
59
|
+
function DisciplinePolicy(seoInfoBase, filterState) {
|
|
60
|
+
var _this = _super.call(this, seoInfoBase, filterState) || this;
|
|
61
|
+
_this.seoInfoBase = seoInfoBase;
|
|
62
|
+
_this.filterState = filterState;
|
|
63
|
+
return _this;
|
|
64
|
+
}
|
|
65
|
+
DisciplinePolicy.prototype.matchesFilters = function () {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
+
var singleDisciplineSelected, onlyDisciplineSelected;
|
|
68
|
+
return __generator(this, function (_a) {
|
|
69
|
+
switch (_a.label) {
|
|
70
|
+
case 0: return [4 /*yield*/, this.seoInfoBase.singleSelectionFor(search_filters_1.FilterKey.DISCIPLINES, this.filterState)];
|
|
71
|
+
case 1:
|
|
72
|
+
singleDisciplineSelected = _a.sent();
|
|
73
|
+
return [4 /*yield*/, this.seoInfoBase.selectionOnlyFor([
|
|
74
|
+
search_filters_1.FilterKey.DISCIPLINES
|
|
75
|
+
], this.filterState)];
|
|
76
|
+
case 2:
|
|
77
|
+
onlyDisciplineSelected = _a.sent();
|
|
78
|
+
return [2 /*return*/, singleDisciplineSelected && onlyDisciplineSelected];
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
DisciplinePolicy.prototype.generatePaths = function () {
|
|
84
|
+
throw new Error('Method not implemented.');
|
|
85
|
+
};
|
|
86
|
+
return DisciplinePolicy;
|
|
87
|
+
}(BaseSeoIndexabilityPolicy_1.BaseSeoIndexabilityPolicy));
|
|
88
|
+
exports.DisciplinePolicy = DisciplinePolicy;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ISeoInfoBase } from '@/common/ISeoInfoBase';
|
|
2
|
+
import { IFilterSelectionState } from '@/common/IFilterSelectionState';
|
|
3
|
+
import { BaseSeoIndexabilityPolicy } from '@/common/BaseSeoIndexabilityPolicy';
|
|
4
|
+
export declare class UnfilteredPolicy extends BaseSeoIndexabilityPolicy {
|
|
5
|
+
protected readonly seoInfoBase: ISeoInfoBase;
|
|
6
|
+
protected readonly filterState: IFilterSelectionState;
|
|
7
|
+
constructor(seoInfoBase: ISeoInfoBase, filterState: IFilterSelectionState);
|
|
8
|
+
protected matchesFilters(): Promise<boolean>;
|
|
9
|
+
generatePaths(): string[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.UnfilteredPolicy = void 0;
|
|
55
|
+
var BaseSeoIndexabilityPolicy_1 = require("@/common/BaseSeoIndexabilityPolicy");
|
|
56
|
+
var UnfilteredPolicy = /** @class */ (function (_super) {
|
|
57
|
+
__extends(UnfilteredPolicy, _super);
|
|
58
|
+
function UnfilteredPolicy(seoInfoBase, filterState) {
|
|
59
|
+
var _this = _super.call(this, seoInfoBase, filterState) || this;
|
|
60
|
+
_this.seoInfoBase = seoInfoBase;
|
|
61
|
+
_this.filterState = filterState;
|
|
62
|
+
return _this;
|
|
63
|
+
}
|
|
64
|
+
UnfilteredPolicy.prototype.matchesFilters = function () {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
66
|
+
return __generator(this, function (_a) {
|
|
67
|
+
return [2 /*return*/, Promise.resolve(this.seoInfoBase.getSelectionTypeCount(this.filterState) === 0)];
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
UnfilteredPolicy.prototype.generatePaths = function () {
|
|
72
|
+
throw new Error('Method not implemented.');
|
|
73
|
+
};
|
|
74
|
+
return UnfilteredPolicy;
|
|
75
|
+
}(BaseSeoIndexabilityPolicy_1.BaseSeoIndexabilityPolicy));
|
|
76
|
+
exports.UnfilteredPolicy = UnfilteredPolicy;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseSeoIndexabilityPolicy } from '@/common/BaseSeoIndexabilityPolicy';
|
|
2
|
+
import { IFilterSelectionState } from '@/common/IFilterSelectionState';
|
|
3
|
+
import { ISeoInfoBase } from '@/common/ISeoInfoBase';
|
|
4
|
+
export declare class UniversityCountryPolicy extends BaseSeoIndexabilityPolicy {
|
|
5
|
+
protected readonly seoInfoBase: ISeoInfoBase;
|
|
6
|
+
protected readonly filterState: IFilterSelectionState;
|
|
7
|
+
constructor(seoInfoBase: ISeoInfoBase, filterState: IFilterSelectionState);
|
|
8
|
+
protected matchesFilters(): Promise<boolean>;
|
|
9
|
+
generatePaths(): string[];
|
|
10
|
+
}
|