Merge remote-tracking branch 'remotes/origin/main' into upgrade_angular10

# Conflicts:
#	src/app/+item-page/item-page.module.ts
#	src/app/core/shared/item.model.ts
#	src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.spec.ts
#	src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.ts
#	src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.ts
#	src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.ts
#	src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts
#	src/app/shared/shared.module.ts
This commit is contained in:
Giuseppe Digilio
2020-12-11 18:13:47 +01:00
97 changed files with 991 additions and 202 deletions

View File

@@ -33,6 +33,21 @@ export abstract class TypedObject {
type: ResourceType;
}
/**
* Get the string value for an object that may be a string or a ResourceType
*
* @param type the object to get the type value for
*/
export const getResourceTypeValueFor = (type: any): string => {
if (hasValue(type)) {
if (typeof type === 'string') {
return type;
} else if (typeof type.value === 'string') {
return type.value;
}
}
}
/* tslint:disable:max-classes-per-file */
/**
* An interface to represent objects that can be cached