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