From a4d51b6d7fad4f14ec9395be01077fd551c1ca7e Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 15 Jul 2019 16:11:07 +0000 Subject: [PATCH] [Trunk | Library]: 1. compatibleDataProviders.component & compatibleDataProvidersTable.component & entityRegistries.component & entityRegistriesTable.component & journals.component & journalsTable.component: Add 'valueIsUnique' field in 'Filter'. 2. searchFilter.component: Add case when filter has unique value (radio button) | Show more values either in modal or inline (new mocks for connect) 3. searchHelperClasses.class: Add 'valueIsUnique' field. 4. searchPage.component: Add title in Filters & show download-map-table options above selected filters Keyword query in specific fields (defined in properties/searchFields) when used by new deposit pages 5. searchDataproviders.service: Add method 'searchDataprovidersForDepositSearch()' 6. refineResults.class: Fill "valueIsUnique" field of filter. 7. properties/searchFields: Add 'uniqueValue: boolean' (default false) field in 'FieldDetails' class and 'fieldHasUniqueValue()' function which checks 'fieldType' and 'usedBy'. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@56562 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../compatibleDataProviders.component.ts | 2 +- .../compatibleDataProvidersTable.component.ts | 2 +- .../entityRegistries.component.ts | 2 +- .../entityRegistriesTable.component.ts | 2 +- .../dataProviders/journals.component.ts | 2 +- .../dataProviders/journalsTable.component.ts | 2 +- .../searchUtils/searchFilter.component.html | 135 ++++++++++++--- .../searchUtils/searchFilter.component.ts | 16 ++ .../searchUtils/searchHelperClasses.class.ts | 3 +- .../searchUtils/searchPage.component.html | 102 +++++++----- .../searchUtils/searchPage.component.ts | 36 +++- searchPages/searchUtils/searchPage.module.ts | 4 +- services/searchDataproviders.service.ts | 19 ++- services/servicesUtils/refineResults.class.ts | 5 +- utils/properties/searchFields.ts | 155 +++++++++++------- 15 files changed, 352 insertions(+), 135 deletions(-) diff --git a/searchPages/dataProviders/compatibleDataProviders.component.ts b/searchPages/dataProviders/compatibleDataProviders.component.ts index baf3ddfd..6a552333 100644 --- a/searchPages/dataProviders/compatibleDataProviders.component.ts +++ b/searchPages/dataProviders/compatibleDataProviders.component.ts @@ -203,7 +203,7 @@ properties:EnvProperties; var value:Value = {name: value_names[i][j], id: value_original_ids[i][j], number:j, selected:false} values.push(value); } - var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: true }; + var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: true, valueIsUnique: false }; filters.push(filter); } return filters; diff --git a/searchPages/dataProviders/compatibleDataProvidersTable.component.ts b/searchPages/dataProviders/compatibleDataProvidersTable.component.ts index 67cd1dcb..7002d552 100644 --- a/searchPages/dataProviders/compatibleDataProvidersTable.component.ts +++ b/searchPages/dataProviders/compatibleDataProvidersTable.component.ts @@ -250,7 +250,7 @@ properties:EnvProperties; var value:Value = {name: value_names[i][j], id: value_original_ids[i][j], number:j, selected:false} values.push(value); } - var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: filter_valueIsExact[i] }; + var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: filter_valueIsExact[i], valueIsUnique: false }; filters.push(filter); } return filters; diff --git a/searchPages/dataProviders/entityRegistries.component.ts b/searchPages/dataProviders/entityRegistries.component.ts index 9cbd4e08..766cca46 100644 --- a/searchPages/dataProviders/entityRegistries.component.ts +++ b/searchPages/dataProviders/entityRegistries.component.ts @@ -193,7 +193,7 @@ properties:EnvProperties; var value:Value = {name: value_names[i][j], id: value_original_ids[i][j], number:j, selected:false} values.push(value); } - var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: true }; + var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: true, valueIsUnique: false }; filters.push(filter); } return filters; diff --git a/searchPages/dataProviders/entityRegistriesTable.component.ts b/searchPages/dataProviders/entityRegistriesTable.component.ts index 821eb75c..32ed60eb 100644 --- a/searchPages/dataProviders/entityRegistriesTable.component.ts +++ b/searchPages/dataProviders/entityRegistriesTable.component.ts @@ -255,7 +255,7 @@ properties:EnvProperties; var value:Value = {name: value_names[i][j], id: value_original_ids[i][j], number:j, selected:false} values.push(value); } - var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: filter_valueIsExact[i] }; + var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: filter_valueIsExact[i], valueIsUnique: false }; filters.push(filter); } return filters; diff --git a/searchPages/dataProviders/journals.component.ts b/searchPages/dataProviders/journals.component.ts index 4f136cef..5db4ae59 100644 --- a/searchPages/dataProviders/journals.component.ts +++ b/searchPages/dataProviders/journals.component.ts @@ -196,7 +196,7 @@ properties:EnvProperties; var value:Value = {name: value_names[i][j], id: value_original_ids[i][j], number:j, selected:false} values.push(value); } - var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: true }; + var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: true, valueIsUnique: false }; filters.push(filter); } return filters; diff --git a/searchPages/dataProviders/journalsTable.component.ts b/searchPages/dataProviders/journalsTable.component.ts index 98e621da..106fd74d 100644 --- a/searchPages/dataProviders/journalsTable.component.ts +++ b/searchPages/dataProviders/journalsTable.component.ts @@ -210,7 +210,7 @@ properties:EnvProperties; var value:Value = {name: value_names[i][j], id: value_original_ids[i][j], number:j, selected:false} values.push(value); } - var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: true }; + var filter:Filter = {title: filter_names[i], filterId: filter_ids[i], originalFilterId: filter_original_ids[i], values : values, countSelectedValues:0, "filterOperator": 'or', valueIsExact: true, valueIsUnique: false }; filters.push(filter); } return filters; diff --git a/searchPages/searchUtils/searchFilter.component.html b/searchPages/searchUtils/searchFilter.component.html index dde58170..58571805 100644 --- a/searchPages/searchUtils/searchFilter.component.html +++ b/searchPages/searchUtils/searchFilter.component.html @@ -4,27 +4,107 @@
{{_formatTitle(filter.title,filter.values.length)}}