mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge branch 'w2p-101127_browse-by-controlled-vocabulary' into w2p-101127_browse-by-controlled-vocabulary-7.6.0-next
Remove invalid _links in BrowseDefinition models Make arrows smaller in on VocabularyTreeview template
This commit is contained in:
@@ -27,7 +27,7 @@ describe('BrowseService', () => {
|
||||
const browseDefinitions = [
|
||||
Object.assign(new FlatBrowseDefinition(), {
|
||||
id: 'date',
|
||||
metadataBrowse: false,
|
||||
browseType: 'flatBrowse',
|
||||
sortOptions: [
|
||||
{
|
||||
name: 'title',
|
||||
@@ -54,7 +54,7 @@ describe('BrowseService', () => {
|
||||
}),
|
||||
Object.assign(new ValueListBrowseDefinition(), {
|
||||
id: 'author',
|
||||
metadataBrowse: true,
|
||||
browseType: 'valueList',
|
||||
sortOptions: [
|
||||
{
|
||||
name: 'title',
|
||||
@@ -158,7 +158,7 @@ describe('BrowseService', () => {
|
||||
|
||||
describe('when getBrowseEntriesFor is called with a valid browse definition id', () => {
|
||||
it('should call hrefOnlyDataService.findListByHref with the expected href', () => {
|
||||
const expected = browseDefinitions[1]._links.entries.href;
|
||||
const expected = (browseDefinitions[1] as ValueListBrowseDefinition)._links.entries.href;
|
||||
|
||||
scheduler.schedule(() => service.getBrowseEntriesFor(new BrowseEntrySearchOptions(browseDefinitions[1].id)).subscribe());
|
||||
scheduler.flush();
|
||||
|
@@ -1,9 +1,10 @@
|
||||
import { inheritSerialization } from 'cerialize';
|
||||
import { inheritSerialization, deserialize } from 'cerialize';
|
||||
import { typedObject } from '../cache/builders/build-decorators';
|
||||
import { excludeFromEquals } from '../utilities/equals.decorators';
|
||||
import { FLAT_BROWSE_DEFINITION } from './flat-browse-definition.resource-type';
|
||||
import { ResourceType } from './resource-type';
|
||||
import { NonHierarchicalBrowseDefinition } from './non-hierarchical-browse-definition';
|
||||
import { HALLink } from './hal-link.model';
|
||||
|
||||
/**
|
||||
* BrowseDefinition model for browses of type 'flatBrowse'
|
||||
@@ -23,6 +24,12 @@ export class FlatBrowseDefinition extends NonHierarchicalBrowseDefinition {
|
||||
return this._links.self.href;
|
||||
}
|
||||
|
||||
@deserialize
|
||||
_links: {
|
||||
self: HALLink;
|
||||
items: HALLink;
|
||||
};
|
||||
|
||||
getRenderType(): string {
|
||||
return this.dataType;
|
||||
}
|
||||
|
@@ -36,8 +36,6 @@ export class HierarchicalBrowseDefinition extends BrowseDefinition {
|
||||
@deserialize
|
||||
_links: {
|
||||
self: HALLink;
|
||||
entries: HALLink;
|
||||
items: HALLink;
|
||||
vocabulary: HALLink;
|
||||
};
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import { autoserialize, autoserializeAs, deserialize, inheritSerialization } from 'cerialize';
|
||||
import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize';
|
||||
import { SortOption } from './sort-option.model';
|
||||
import { BrowseByDataType } from '../../browse-by/browse-by-switcher/browse-by-decorator';
|
||||
import { HALLink } from './hal-link.model';
|
||||
import { BrowseDefinition } from './browse-definition.model';
|
||||
|
||||
/**
|
||||
@@ -22,11 +21,4 @@ export abstract class NonHierarchicalBrowseDefinition extends BrowseDefinition {
|
||||
|
||||
@autoserialize
|
||||
dataType: BrowseByDataType;
|
||||
|
||||
@deserialize
|
||||
_links: {
|
||||
self: HALLink;
|
||||
entries: HALLink;
|
||||
items: HALLink;
|
||||
};
|
||||
}
|
||||
|
@@ -1,9 +1,10 @@
|
||||
import { inheritSerialization } from 'cerialize';
|
||||
import { inheritSerialization, deserialize } from 'cerialize';
|
||||
import { typedObject } from '../cache/builders/build-decorators';
|
||||
import { excludeFromEquals } from '../utilities/equals.decorators';
|
||||
import { VALUE_LIST_BROWSE_DEFINITION } from './value-list-browse-definition.resource-type';
|
||||
import { ResourceType } from './resource-type';
|
||||
import { NonHierarchicalBrowseDefinition } from './non-hierarchical-browse-definition';
|
||||
import { HALLink } from './hal-link.model';
|
||||
|
||||
/**
|
||||
* BrowseDefinition model for browses of type 'valueList'
|
||||
@@ -23,6 +24,12 @@ export class ValueListBrowseDefinition extends NonHierarchicalBrowseDefinition {
|
||||
return this._links.self.href;
|
||||
}
|
||||
|
||||
@deserialize
|
||||
_links: {
|
||||
self: HALLink;
|
||||
entries: HALLink;
|
||||
};
|
||||
|
||||
getRenderType(): string {
|
||||
return this.dataType;
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@
|
||||
<!-- Leaf node -->
|
||||
<cdk-tree-node *cdkTreeNodeDef="let node" cdkTreeNodePadding class="d-flex">
|
||||
<button type="button" class="btn btn-default" cdkTreeNodeToggle>
|
||||
<span class="fas fa-angle-right fa-2x invisible" aria-hidden="true"></span>
|
||||
<span class="fas fa-angle-right invisible" aria-hidden="true"></span>
|
||||
</button>
|
||||
<label *ngIf="multiSelect" class="d-flex align-items-center m-0 p-0 form-check"
|
||||
[class.text-success]="node.isSelected"
|
||||
@@ -54,7 +54,7 @@
|
||||
<button type="button" class="btn btn-default" cdkTreeNodeToggle
|
||||
[attr.aria-label]="'toggle ' + node.name"
|
||||
(click)="loadChildren(node)">
|
||||
<span class="fas {{treeControl.isExpanded(node) ? 'fa-angle-down' : 'fa-angle-right'}} fa-2x"
|
||||
<span class="fas {{treeControl.isExpanded(node) ? 'fa-angle-down' : 'fa-angle-right'}}"
|
||||
aria-hidden="true"></span>
|
||||
</button>
|
||||
|
||||
|
Reference in New Issue
Block a user