geonetwork-ui 2.8.1-dev.5167dd591 → 2.8.1-dev.8a76e5fef
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/fesm2022/geonetwork-ui.mjs +20 -6
- package/fesm2022/geonetwork-ui.mjs.map +1 -1
- package/index.d.ts +3 -3
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/libs/api/repository/src/lib/gn4/elasticsearch/elasticsearch.service.ts +11 -2
- package/src/libs/feature/search/src/lib/utils/service/fields.service.ts +9 -3
- package/src/libs/feature/search/src/lib/utils/service/fields.ts +5 -5
|
@@ -25511,7 +25511,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
25511
25511
|
}] } });
|
|
25512
25512
|
|
|
25513
25513
|
var name = "geonetwork-ui";
|
|
25514
|
-
var version = "2.8.1-dev.
|
|
25514
|
+
var version = "2.8.1-dev.8a76e5fef";
|
|
25515
25515
|
var engines = {
|
|
25516
25516
|
node: ">=20"
|
|
25517
25517
|
};
|
|
@@ -25925,14 +25925,18 @@ class ElasticsearchService {
|
|
|
25925
25925
|
})
|
|
25926
25926
|
.join(' OR ');
|
|
25927
25927
|
};
|
|
25928
|
-
|
|
25928
|
+
let queryString = typeof filters === 'string'
|
|
25929
25929
|
? filters
|
|
25930
25930
|
: Object.keys(filters)
|
|
25931
|
+
.filter((fieldname) => fieldname !== 'gn-ui-crossFieldFilter')
|
|
25931
25932
|
.filter((fieldname) => !isDateRange(filters[fieldname]))
|
|
25932
25933
|
.filter((fieldname) => filters[fieldname] &&
|
|
25933
25934
|
JSON.stringify(filters[fieldname]) !== '{}')
|
|
25934
25935
|
.map((fieldname) => `${fieldname}:(${makeQuery(filters[fieldname])})`)
|
|
25935
25936
|
.join(' AND ');
|
|
25937
|
+
if (filters['gn-ui-crossFieldFilter']) {
|
|
25938
|
+
queryString = `${queryString} AND (${filters['gn-ui-crossFieldFilter']})`;
|
|
25939
|
+
}
|
|
25936
25940
|
const queryRange = Object.entries(filters)
|
|
25937
25941
|
.filter(([, value]) => isDateRange(value))
|
|
25938
25942
|
.map(([searchField, dateRange]) => {
|
|
@@ -26105,7 +26109,12 @@ class ElasticsearchService {
|
|
|
26105
26109
|
must_not: this.mustNotFilters(),
|
|
26106
26110
|
},
|
|
26107
26111
|
},
|
|
26108
|
-
_source: [
|
|
26112
|
+
_source: [
|
|
26113
|
+
'resourceTitleObject',
|
|
26114
|
+
'uuid',
|
|
26115
|
+
'resourceType',
|
|
26116
|
+
'cl_presentationForm',
|
|
26117
|
+
],
|
|
26109
26118
|
from: 0,
|
|
26110
26119
|
size: 20,
|
|
26111
26120
|
};
|
|
@@ -32971,8 +32980,8 @@ class RecordKindField extends SimpleSearchField {
|
|
|
32971
32980
|
};
|
|
32972
32981
|
const presentationFormFilter = {};
|
|
32973
32982
|
if (values.includes('reuse') && !values.includes('dataset')) {
|
|
32974
|
-
|
|
32975
|
-
|
|
32983
|
+
filters['gn-ui-crossFieldFilter'] =
|
|
32984
|
+
`(resourceType:("dataset" OR "document") AND cl_presentationForm.key:("mapDigital" OR "mapHardcopy")) OR resourceType:("application" OR "interactiveMap" OR "map" OR "map/static" OR "map/interactive" OR "map-interactive" OR "map-static" OR "mapDigital" OR "mapHardcopy" OR "staticMap")`;
|
|
32976
32985
|
}
|
|
32977
32986
|
else if (values.includes('dataset') && !values.includes('reuse')) {
|
|
32978
32987
|
presentationFormFilter['mapDigital'] = false;
|
|
@@ -33065,7 +33074,12 @@ class FieldsService {
|
|
|
33065
33074
|
: [fieldValues[fieldName]];
|
|
33066
33075
|
return this.getFiltersForValues(fieldName, values);
|
|
33067
33076
|
});
|
|
33068
|
-
return forkJoin(filtersByField$).pipe(map$1((filters) =>
|
|
33077
|
+
return forkJoin(filtersByField$).pipe(map$1((filters) => {
|
|
33078
|
+
if (typeof filters === 'string') {
|
|
33079
|
+
return filters;
|
|
33080
|
+
}
|
|
33081
|
+
return filters.reduce((prev, curr) => ({ ...prev, ...curr }), {});
|
|
33082
|
+
}));
|
|
33069
33083
|
}
|
|
33070
33084
|
readFieldValuesFromFilters(filters) {
|
|
33071
33085
|
const fieldValues$ = this.supportedFields.map((fieldName) => this.getValuesForFilters(fieldName, filters).pipe(map$1((values) => ({ [fieldName]: values }))));
|