[develop | DONE | ADDED] Added file searchFields.aggregator.ts to replace searchFields.ts (does not include "countrynojurisdiction" filter for organizations | angular.json: Added fileReplacements.
This commit is contained in:
parent
815004724b
commit
17ffe66631
28
angular.json
28
angular.json
|
@ -34,6 +34,12 @@
|
||||||
"build": {
|
"build": {
|
||||||
"builder": "@angular-devkit/build-angular:browser",
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
"options": {
|
"options": {
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "src/app/openaireLibrary/utils/properties/searchFields.ts",
|
||||||
|
"with": "src/app/shared/searchFields.aggregator.ts"
|
||||||
|
}
|
||||||
|
],
|
||||||
"outputPath": "dist/aggregator/browser",
|
"outputPath": "dist/aggregator/browser",
|
||||||
"index": "src/index.html",
|
"index": "src/index.html",
|
||||||
"main": "src/main.ts",
|
"main": "src/main.ts",
|
||||||
|
@ -61,6 +67,12 @@
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"development": {
|
"development": {
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "src/app/openaireLibrary/utils/properties/searchFields.ts",
|
||||||
|
"with": "src/app/shared/searchFields.aggregator.ts"
|
||||||
|
}
|
||||||
|
],
|
||||||
"optimization": {
|
"optimization": {
|
||||||
"scripts": true,
|
"scripts": true,
|
||||||
"styles": {
|
"styles": {
|
||||||
|
@ -104,6 +116,10 @@
|
||||||
{
|
{
|
||||||
"replace": "src/environments/environment.ts",
|
"replace": "src/environments/environment.ts",
|
||||||
"with": "src/environments/environment.beta.ts"
|
"with": "src/environments/environment.beta.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"replace": "src/app/openaireLibrary/utils/properties/searchFields.ts",
|
||||||
|
"with": "src/app/shared/searchFields.aggregator.ts"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"optimization": {
|
"optimization": {
|
||||||
|
@ -149,6 +165,10 @@
|
||||||
{
|
{
|
||||||
"replace": "src/environments/environment.ts",
|
"replace": "src/environments/environment.ts",
|
||||||
"with": "src/environments/environment.prod.ts"
|
"with": "src/environments/environment.prod.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"replace": "src/app/openaireLibrary/utils/properties/searchFields.ts",
|
||||||
|
"with": "src/app/shared/searchFields.aggregator.ts"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"optimization": {
|
"optimization": {
|
||||||
|
@ -237,6 +257,10 @@
|
||||||
{
|
{
|
||||||
"replace": "src/environments/environment.ts",
|
"replace": "src/environments/environment.ts",
|
||||||
"with": "src/environments/environment.beta.ts"
|
"with": "src/environments/environment.beta.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"replace": "src/app/openaireLibrary/utils/properties/searchFields.ts",
|
||||||
|
"with": "src/app/shared/searchFields.aggregator.ts"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
|
@ -249,6 +273,10 @@
|
||||||
{
|
{
|
||||||
"replace": "src/environments/environment.ts",
|
"replace": "src/environments/environment.ts",
|
||||||
"with": "src/environments/environment.prod.ts"
|
"with": "src/environments/environment.prod.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"replace": "src/app/openaireLibrary/utils/properties/searchFields.ts",
|
||||||
|
"with": "src/app/shared/searchFields.aggregator.ts"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3e8ed4f50429dad8a3426512709ae5b586b7ef02
|
Subproject commit c351349f8ee3a130c56dc72b17159f07460c108e
|
|
@ -0,0 +1,67 @@
|
||||||
|
import {SearchFieldsBase} from "src/app/openaireLibrary/utils/properties/searchFields.base";
|
||||||
|
import {properties} from "src/environments/environment";
|
||||||
|
|
||||||
|
export class SearchFields extends SearchFieldsBase {
|
||||||
|
ORGANIZATION_REFINE_FIELDS: string[] = [];
|
||||||
|
ORGANIZATION_ADVANCED_FIELDS: string[] = ["q", "organizationlegalname", "organizationlegalshortname", "pid"];
|
||||||
|
|
||||||
|
public static getParameterOrder(fieldId: string, params): number {
|
||||||
|
let fields = [];
|
||||||
|
let searchFields = new SearchFields();
|
||||||
|
if (searchFields.RESULT_REFINE_FIELDS.indexOf(fieldId) != -1) {
|
||||||
|
fields = searchFields.RESULT_REFINE_FIELDS;
|
||||||
|
} else if (searchFields.PROJECT_REFINE_FIELDS.indexOf(fieldId) != -1) {
|
||||||
|
fields = searchFields.PROJECT_REFINE_FIELDS
|
||||||
|
} else if (searchFields.ORGANIZATION_REFINE_FIELDS.indexOf(fieldId) != -1) {
|
||||||
|
fields = searchFields.ORGANIZATION_REFINE_FIELDS;
|
||||||
|
} else if (searchFields.DATASOURCE_REFINE_FIELDS.indexOf(fieldId) != -1) {
|
||||||
|
fields = searchFields.DATASOURCE_REFINE_FIELDS;
|
||||||
|
}
|
||||||
|
let index = fields.indexOf(fieldId);
|
||||||
|
let paramIndex = 0;
|
||||||
|
if (index != -1) {
|
||||||
|
for (let keyValue of params) {
|
||||||
|
if (fields.indexOf(keyValue[0]) > index) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
paramIndex++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return paramIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum OpenaireEntities {
|
||||||
|
RESULTS = "Research products",
|
||||||
|
PUBLICATIONS = "Publications",
|
||||||
|
DATASETS = "Research data",
|
||||||
|
SOFTWARE = "Research software",
|
||||||
|
OTHER = "Other research products",
|
||||||
|
PROJECTS = "Projects",
|
||||||
|
ORGANIZATIONS = "Organizations",
|
||||||
|
DATASOURCES = "Data sources",
|
||||||
|
SERVICES = "Services",
|
||||||
|
COMMUNITIES = "Research communities",
|
||||||
|
|
||||||
|
RESULT = "Research product",
|
||||||
|
PUBLICATION = "Publication",
|
||||||
|
DATASET = "Research data",
|
||||||
|
SOFTWARE_SINGULAR = "Research software",
|
||||||
|
OTHER_SINGULAR = "Other research product",
|
||||||
|
PROJECT = "Project",
|
||||||
|
ORGANIZATION = "Organization",
|
||||||
|
DATASOURCE = "Data source",
|
||||||
|
SERVICE = "Service",
|
||||||
|
COMMUNITY = "Research community",
|
||||||
|
|
||||||
|
RESULTS_FILE = "research-products",
|
||||||
|
PUBLICATIONS_FILE = "publications",
|
||||||
|
DATASETS_FILE = "research-data",
|
||||||
|
SOFTWARE_FILE = "research-software",
|
||||||
|
OTHER_FILE = "other-research-products",
|
||||||
|
PROJECTS_FILE = "projects",
|
||||||
|
ORGANIZATIONS_FILE = "organizations",
|
||||||
|
DATASOURCES_FILE = "data-sources",
|
||||||
|
SERVICES_FILE = "services",
|
||||||
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 651102a5ba049b71bed8eb6a85a8d02cefcb24cc
|
Subproject commit 8d2f8348d8a601fad14844d920791fe7370bd4a2
|
|
@ -1 +1 @@
|
||||||
Subproject commit 37639eab68c63a506b7df10c42e3379c4a05d94d
|
Subproject commit 954a1fe8af0653740882c7db4b9bf92b8f9000f4
|
Loading…
Reference in New Issue