Commit 924a5fd6 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

feat: 559 archive browsing

parent 8f5901fc
......@@ -1038,7 +1038,7 @@
},
"@openapitools/openapi-generator-cli": {
"version": "0.0.16-4.0.0",
"resolved": "https://packages.dlcm.ch/repository/npm-group/@openapitools/openapi-generator-cli/-/openapi-generator-cli-0.0.16-4.0.0.tgz",
"resolved": "https://registry.npmjs.org/@openapitools/openapi-generator-cli/-/openapi-generator-cli-0.0.16-4.0.0.tgz",
"integrity": "sha512-UAmi8f+S+qeIQhd6z8c+Rjd6KnSQJkla5JLi8Uotr6GV3D0mPolZymTlfBDcYq+ZcZ3m2aAcRzkpjF9Bk3Hz8g==",
"dev": true
},
......@@ -1867,7 +1867,8 @@
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
"base": {
"version": "0.11.2",
......@@ -2070,6 +2071,7 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -2110,11 +2112,6 @@
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
"dev": true
},
"browser-stdout": {
"version": "1.3.0",
"resolved": "https://packages.dlcm.ch/repository/npm-group/browser-stdout/-/browser-stdout-1.3.0.tgz",
"integrity": "sha1-81HTKWnTL6XXpVZxVCY9korjvR8="
},
"browserify-aes": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
......@@ -2786,7 +2783,8 @@
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
"concat-stream": {
"version": "1.6.2",
......@@ -3735,7 +3733,8 @@
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
},
"eslint-scope": {
"version": "4.0.3",
......@@ -4387,7 +4386,8 @@
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
"fsevents": {
"version": "1.2.7",
......@@ -4430,12 +4430,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -4455,7 +4457,8 @@
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
......@@ -4577,7 +4580,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
......@@ -4603,6 +4607,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -5035,16 +5040,6 @@
"integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==",
"dev": true
},
"graceful-readlink": {
"version": "1.0.1",
"resolved": "https://packages.dlcm.ch/repository/npm-group/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU="
},
"growl": {
"version": "1.9.2",
"resolved": "https://packages.dlcm.ch/repository/npm-group/growl/-/growl-1.9.2.tgz",
"integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8="
},
"handle-thing": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.0.tgz",
......@@ -5192,11 +5187,6 @@
"minimalistic-assert": "^1.0.1"
}
},
"he": {
"version": "1.1.1",
"resolved": "https://packages.dlcm.ch/repository/npm-group/he/-/he-1.1.1.tgz",
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0="
},
"header-case": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/header-case/-/header-case-1.0.1.tgz",
......@@ -5504,6 +5494,7 @@
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
......@@ -5512,7 +5503,8 @@
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
"ini": {
"version": "1.3.5",
......@@ -6495,77 +6487,18 @@
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
"dev": true
},
"lodash._baseassign": {
"version": "3.2.0",
"resolved": "https://packages.dlcm.ch/repository/npm-group/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz",
"integrity": "sha1-jDigmVAPIVrQnlnxci/QxSv+Ck4=",
"requires": {
"lodash._basecopy": "^3.0.0",
"lodash.keys": "^3.0.0"
}
},
"lodash._basecopy": {
"version": "3.0.1",
"resolved": "https://packages.dlcm.ch/repository/npm-group/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz",
"integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY="
},
"lodash._basecreate": {
"version": "3.0.3",
"resolved": "https://packages.dlcm.ch/repository/npm-group/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz",
"integrity": "sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE="
},
"lodash._getnative": {
"version": "3.9.1",
"resolved": "https://packages.dlcm.ch/repository/npm-group/lodash._getnative/-/lodash._getnative-3.9.1.tgz",
"integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U="
},
"lodash._isiterateecall": {
"version": "3.0.9",
"resolved": "https://packages.dlcm.ch/repository/npm-group/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz",
"integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw="
},
"lodash.clonedeep": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
"dev": true
},
"lodash.create": {
"version": "3.1.1",
"resolved": "https://packages.dlcm.ch/repository/npm-group/lodash.create/-/lodash.create-3.1.1.tgz",
"integrity": "sha1-1/KEnw29p+BGgruM1yqwIkYd6+c=",
"requires": {
"lodash._baseassign": "^3.0.0",
"lodash._basecreate": "^3.0.0",
"lodash._isiterateecall": "^3.0.0"
}
},
"lodash.debounce": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",
"dev": true
},
"lodash.isarguments": {
"version": "3.1.0",
"resolved": "https://packages.dlcm.ch/repository/npm-group/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
"integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo="
},
"lodash.isarray": {
"version": "3.0.4",
"resolved": "https://packages.dlcm.ch/repository/npm-group/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
"integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U="
},
"lodash.keys": {
"version": "3.1.2",
"resolved": "https://packages.dlcm.ch/repository/npm-group/lodash.keys/-/lodash.keys-3.1.2.tgz",
"integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=",
"requires": {
"lodash._getnative": "^3.0.0",
"lodash.isarguments": "^3.0.0",
"lodash.isarray": "^3.0.0"
}
},
"lodash.tail": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz",
......@@ -6867,6 +6800,7 @@
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -6977,6 +6911,7 @@
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"dev": true,
"requires": {
"minimist": "0.0.8"
},
......@@ -6984,80 +6919,8 @@
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
}
}
},
"mocha": {
"version": "3.5.3",
"resolved": "https://packages.dlcm.ch/repository/npm-group/mocha/-/mocha-3.5.3.tgz",
"integrity": "sha512-/6na001MJWEtYxHOV1WLfsmR4YIynkUEhBwzsb+fk2qmQ3iqsi258l/Q2MWHJMImAcNpZ8DEdYAK72NHoIQ9Eg==",
"requires": {
"browser-stdout": "1.3.0",
"commander": "2.9.0",
"debug": "2.6.8",
"diff": "3.2.0",
"escape-string-regexp": "1.0.5",
"glob": "7.1.1",
"growl": "1.9.2",
"he": "1.1.1",
"json3": "3.3.2",
"lodash.create": "3.1.1",
"mkdirp": "0.5.1",
"supports-color": "3.1.2"
},
"dependencies": {
"commander": {
"version": "2.9.0",
"resolved": "https://packages.dlcm.ch/repository/npm-group/commander/-/commander-2.9.0.tgz",
"integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=",
"requires": {
"graceful-readlink": ">= 1.0.0"
}
},
"debug": {
"version": "2.6.8",
"resolved": "https://packages.dlcm.ch/repository/npm-group/debug/-/debug-2.6.8.tgz",
"integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
"requires": {
"ms": "2.0.0"
}
},
"diff": {
"version": "3.2.0",
"resolved": "https://packages.dlcm.ch/repository/npm-group/diff/-/diff-3.2.0.tgz",
"integrity": "sha1-yc45Okt8vQsFinJck98pkCeGj/k="
},
"glob": {
"version": "7.1.1",
"resolved": "https://packages.dlcm.ch/repository/npm-group/glob/-/glob-7.1.1.tgz",
"integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.2",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"has-flag": {
"version": "1.0.0",
"resolved": "https://packages.dlcm.ch/repository/npm-group/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo="
},
"json3": {
"version": "3.3.2",
"resolved": "https://packages.dlcm.ch/repository/npm-group/json3/-/json3-3.3.2.tgz",
"integrity": "sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE="
},
"supports-color": {
"version": "3.1.2",
"resolved": "https://packages.dlcm.ch/repository/npm-group/supports-color/-/supports-color-3.1.2.tgz",
"integrity": "sha1-cqJiiU2dQIuVbKBf83su2KbiotU=",
"requires": {
"has-flag": "^1.0.0"
}
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
}
}
},
......@@ -7083,7 +6946,8 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
},
"multicast-dns": {
"version": "6.2.3",
......@@ -7145,22 +7009,6 @@
"integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==",
"dev": true
},
"ng4-twitter-timeline": {
"version": "1.0.8",
"resolved": "https://packages.dlcm.ch/repository/npm-group/ng4-twitter-timeline/-/ng4-twitter-timeline-1.0.8.tgz",
"integrity": "sha512-nTHCXIu4j+OKyKHQx1GbKyCrN9RcYIGNgTkPTKCY/al3v6zotNRIESs/VwmKmw3S5QVjSlkOsSjRPcgNYAVdCw==",
"requires": {
"mocha": "^3.4.2",
"ngc": "^1.0.0"
},
"dependencies": {
"ngc": {
"version": "1.0.0",
"resolved": "https://packages.dlcm.ch/repository/npm-group/ngc/-/ngc-1.0.0.tgz",
"integrity": "sha1-hEwr/5FPrJ4CWXtgjTQwxyz9Ygk="
}
}
},
"ngx-xml2json": {
"version": "1.0.2",
"resolved": "https://packages.dlcm.ch/repository/npm-group/ngx-xml2json/-/ngx-xml2json-1.0.2.tgz",
......@@ -7506,6 +7354,7 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
"wrappy": "1"
}
......@@ -7913,7 +7762,8 @@
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
},
"path-is-inside": {
"version": "1.0.2",
......@@ -10884,7 +10734,8 @@
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
},
"ws": {
"version": "3.3.3",
......
......@@ -34,7 +34,7 @@
</dlcm-main-toolbar-mobile>
</div>
<div class="body">
<div class="container-fluid instance-logo-wrapper">
<div class="instance-logo-wrapper">
<img [src]="logo" alt="toolbar-header-image" class="instance-logo">
</div>
......
......@@ -5,6 +5,7 @@
text-align: center;
background-color: $background-grey;
display: none;
height: $header-image-height;
@include respond-to-breakpoint-and-bigger('sm') {
display: block;
......@@ -39,6 +40,16 @@ dlcm-main-toolbar-desktop-vertical {
.body {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.content {
flex: 1;
display: flex;
overflow-y: auto;
justify-content: center;
}
// Display toolbar on left for dlcm theme on desktop only
......@@ -67,6 +78,3 @@ dlcm-main-toolbar-desktop-vertical {
padding: 10px;
}
.content {
padding: 25px;
}
@import "../../../../sass/abstracts/variables";
@import "../../../../sass/abstracts/zindex";
$height: 40px;
$height: $footer-height;
.footer {
position: fixed;
......
@import "../sass/abstracts/variables";
@import "../sass/abstracts/mixins";
.cards-container {
display: flex;
justify-content: center;
......@@ -18,3 +21,5 @@
}
}
}
@include content();
......@@ -18,6 +18,18 @@ export namespace DepositPersonAction {
export class GetAllFail extends AssociationRemoteAction.GetAllFail {
}
@TypeDefaultAction(state)
export class GetById extends AssociationRemoteAction.GetById {
}
@TypeDefaultAction(state)
export class GetByIdSuccess extends AssociationRemoteAction.GetByIdSuccess<Person> {
}
@TypeDefaultAction(state)
export class GetByIdFail extends AssociationRemoteAction.GetByIdFail {
}
@TypeDefaultAction(state)
export class Update extends AssociationRemoteAction.Update {
}
......
<mat-card class="archive"
(click)="navigate(archive)">
<mat-card-title>{{getTitle(archive)}}</mat-card-title>
<mat-card-subtitle>{{getDescription(archive)}}</mat-card-subtitle>
<mat-card-content>{{getContent(archive)}}</mat-card-content>
</mat-card>
import { async, ComponentFixture, TestBed } from "@angular/core/testing";
import { HomeBrowsingArchivePresentational } from "./home-browsing-archive.presentational";
describe("HomeBrowsingArchivePresentational", () => {
let component: HomeBrowsingArchivePresentational;
let fixture: ComponentFixture<HomeBrowsingArchivePresentational>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HomeBrowsingArchivePresentational ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeBrowsingArchivePresentational);
component = fixture.componentInstance;
fixture.detectChanges();
});
it("should create", () => {
expect(component).toBeTruthy();
});
});
import {ChangeDetectionStrategy, Component, Input, Output} from "@angular/core";
import {SearchScopeEnum} from "@app/features/home/enums/search-scope.enum";
import {SharedAbstractPresentational} from "@app/shared/components/presentationals/shared-abstract/shared-abstract.presentational";
import {ArchiveMetadata} from "@app/shared/models/business/archive-metadata.model";
import {MetadataUtil} from "@app/shared/utils/metadata.util";
import {BehaviorSubject, Observable} from "rxjs";
import {isNonEmptyString, ObservableUtil, StringUtil} from "solidify-frontend";
import PublicMetadata = ArchiveMetadata.PublicMetadata;
@Component({
selector: "dlcm-home-browsing-archive-presentational",
templateUrl: "./home-browsing-archive.presentational.html",
styleUrls: ["./home-browsing-archive.presentational.scss"],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HomeBrowsingArchivePresentational extends SharedAbstractPresentational {
@Input()
archive: ArchiveMetadata;
private readonly _navigateDetailBS: BehaviorSubject<ArchiveMetadata | undefined> = new BehaviorSubject<ArchiveMetadata | undefined>(undefined);
@Output("navigateDetailChange")
readonly navigateDetailObs: Observable<ArchiveMetadata | undefined> = ObservableUtil.asObservable(this._navigateDetailBS);
navigate(archive: ArchiveMetadata): void {
this._navigateDetailBS.next(archive);
}
getTitle(archive: ArchiveMetadata): string {
return MetadataUtil.getTitle(SearchScopeEnum.public, archive.metadata as PublicMetadata);
}
getPublicationYear(archive: ArchiveMetadata): string {
return MetadataUtil.getPublicationYear(SearchScopeEnum.public, archive.metadata as PublicMetadata);
}
getAuthors(archive: ArchiveMetadata): string {
return MetadataUtil.getAuthors(SearchScopeEnum.public, archive.metadata as PublicMetadata);
}
getDescription(archive: ArchiveMetadata): string {
return MetadataUtil.getDescription(SearchScopeEnum.public, archive.metadata as PublicMetadata);
}
getLicenses(archive: ArchiveMetadata): string {
return MetadataUtil.getLicenses(SearchScopeEnum.public, archive.metadata as PublicMetadata);
}
getContent(archive: ArchiveMetadata): string {
const publicationYear = this.getPublicationYear(archive);
const separator = " - ";
const authors = this.getAuthors(archive);
let content = StringUtil.stringEmpty;
if (isNonEmptyString(publicationYear)) {
content = publicationYear;
if (isNonEmptyString(authors)) {
content += separator + authors;
} else {
return content;
}
} else {
if (isNonEmptyString(authors)) {
return content = authors;
}
}
return content;
}
}