forked from geolba/tethys.frontend
- libary updates for prettier, eslint and typescript
- uninstall @types/xml2js (save-dev) and core-js (save) - remove HelloWorld component from app.ts and app2.ts
This commit is contained in:
parent
6295f7ea1c
commit
426228705c
25 changed files with 961 additions and 4286 deletions
|
@ -71,13 +71,13 @@ export default class DatasetDetailComponent extends Vue {
|
|||
}
|
||||
|
||||
private getDataset(id: number): void {
|
||||
const newSub = DatasetService.getDataset(id).subscribe(
|
||||
(res: DbDataset) => {
|
||||
const newSub = DatasetService.getDataset(id).subscribe({
|
||||
next: (res: DbDataset) => {
|
||||
this.dataset = res;
|
||||
this.loaded = true;
|
||||
},
|
||||
(error: string) => this.errorHandler(error),
|
||||
);
|
||||
error: (error: string) => this.errorHandler(error),
|
||||
});
|
||||
this.subscriptions.push(newSub);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
</div>
|
||||
</div> -->
|
||||
<!-- <simple-search-component></simple-search-component> -->
|
||||
<vs-input v-on:search-change="onSearch" v-bind:placeholder="'Enter your search term...'"></vs-input>
|
||||
<vs-input v-bind:placeholder="'Enter your search term...'" @search-change="onSearch"></vs-input>
|
||||
</div>
|
||||
<section class="section" v-if="loaded">
|
||||
<section v-if="loaded" class="section">
|
||||
<div class="container">
|
||||
<!-- <span class="is-size-5"> Basic Table </span>
|
||||
<br /> -->
|
||||
|
@ -64,7 +64,7 @@
|
|||
</div>
|
||||
|
||||
<div class="card record-elem">
|
||||
<div class="columns" v-if="dataset.hasOwnProperty('titles')">
|
||||
<div v-if="dataset.hasOwnProperty('titles')" class="columns">
|
||||
<div class="column is-3-desktop is-4-tablet label">Title/<br />title:</div>
|
||||
<!-- <div class="column is-9-desktop is-8-tablet">{{ dataset.titles[0].value }}</div> -->
|
||||
<div class="column is-9-desktop is-8-tablet">
|
||||
|
@ -75,7 +75,7 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns" v-if="dataset.hasOwnProperty('abstracts')">
|
||||
<div v-if="dataset.hasOwnProperty('abstracts')" class="columns">
|
||||
<div class="column is-3-desktop is-4-tablet label">
|
||||
Zusammenfassung/<br />
|
||||
abstract:
|
||||
|
@ -88,29 +88,29 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns" v-if="dataset.hasOwnProperty('abstracts')">
|
||||
<div v-if="dataset.hasOwnProperty('abstracts')" class="columns">
|
||||
<div class="column is-3-desktop is-4-tablet label">Serieninformation/<br />series information:</div>
|
||||
<div class="column is-9-desktop is-8-tablet" v-if="dataset.hasSeriesInformationAbstract()">
|
||||
<div v-if="dataset.hasSeriesInformationAbstract()" class="column is-9-desktop is-8-tablet">
|
||||
<p>{{ dataset.SeriesInformationAbstract?.value }}</p>
|
||||
<br />
|
||||
<p v-if="dataset.hasTranslatedSeriesInformationAbstract()">
|
||||
{{ dataset.TranslatedSeriesInformationAbstract?.value }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="column is-9-desktop is-8-tablet" v-else>-</div>
|
||||
<div v-else class="column is-9-desktop is-8-tablet">-</div>
|
||||
</div>
|
||||
<div class="columns" v-if="dataset.hasOwnProperty('abstracts')">
|
||||
<div v-if="dataset.hasOwnProperty('abstracts')" class="columns">
|
||||
<div class="column is-3-desktop is-4-tablet label">Methodik/<br />method:</div>
|
||||
<div class="column is-9-desktop is-8-tablet" v-if="dataset.hasMethodsAbstract()">
|
||||
<div v-if="dataset.hasMethodsAbstract()" class="column is-9-desktop is-8-tablet">
|
||||
{{ dataset.MethodsAbstract.value }}
|
||||
</div>
|
||||
<div class="column is-9-desktop is-8-tablet" v-else>-</div>
|
||||
<div v-else class="column is-9-desktop is-8-tablet">-</div>
|
||||
</div>
|
||||
|
||||
<div class="columns">
|
||||
<div class="column is-3-desktop is-4-tablet label">Downloads/<br />downloads:</div>
|
||||
<div class="column is-9-desktop is-8-tablet" v-if="dataset.files.length > 0">
|
||||
<table id="items" v-if="dataset.hasEmbargoPassed()" class="table is-bordered is-striped">
|
||||
<div v-if="dataset.files.length > 0" class="column is-9-desktop is-8-tablet">
|
||||
<table v-if="dataset.hasEmbargoPassed()" id="items" class="table is-bordered is-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table-header">Path Name</th>
|
||||
|
@ -119,7 +119,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="file in dataset.files" :key="file.id">
|
||||
<tr v-for="file in dataset.files" v-bind:key="file.id">
|
||||
<td>
|
||||
<a class="link-label" target="_blank" v-bind:href="portal + file.id"> {{ file.label }} </a>
|
||||
</td>
|
||||
|
@ -210,7 +210,7 @@
|
|||
<div class="column">
|
||||
<h3 class="label uppercase">Lizenz/License</h3>
|
||||
<p v-if="dataset.hasLicenses()">
|
||||
<label v-for="license in dataset.licenses" :key="license.id">
|
||||
<label v-for="license in dataset.licenses" v-bind:key="license.id">
|
||||
<span class="normal label">
|
||||
{{ license.name }}
|
||||
</span>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<img src="https://bulma.io/images/placeholders/256x256.png" />
|
||||
</figure> -->
|
||||
<!-- class="columns help u-full-width featured-bg-image"> -->
|
||||
<section data-sr id="help" class="header-image align-items-center h-100">
|
||||
<section id="help" data-sr class="header-image align-items-center h-100">
|
||||
<!-- <div class="column is-two-thirds-tablet is-half-desktop is-one-third-widescreen mx-auto">
|
||||
<div class="search-box mx-auto">
|
||||
<div class="field has-addons main-search-from-bg">
|
||||
|
@ -62,7 +62,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<vs-input v-on:search-change="onSearch" v-bind:placeholder="'Enter your search term...'"></vs-input>
|
||||
<vs-input v-bind:placeholder="'Enter your search term...'" @search-change="onSearch"></vs-input>
|
||||
</section>
|
||||
|
||||
<div class="container">
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { Component, Vue } from "vue-facing-decorator";
|
||||
import MapComponent from "@/components/map/map.component.vue";
|
||||
import { defineAsyncComponent } from "vue";
|
||||
// import MapComponent from "@/components/map/map.component.vue";
|
||||
// import { Marker, MapOptions, Control, icon, LatLngBoundsExpression } from "leaflet";
|
||||
import { MapOptions } from "leaflet";
|
||||
|
||||
|
@ -10,8 +11,11 @@ import { MapOptions } from "leaflet";
|
|||
@Component({
|
||||
name: "MapViewComponent",
|
||||
components: {
|
||||
MapComponent,
|
||||
MapComponent: defineAsyncComponent(() => import("@/components/map/map.component.vue")),
|
||||
},
|
||||
// components: {
|
||||
// MapComponent,
|
||||
// },
|
||||
})
|
||||
export default class MapViewComponent extends Vue {
|
||||
public mapOptions: MapOptions = {
|
||||
|
|
|
@ -121,10 +121,10 @@ export default class SearchViewComponent extends Vue {
|
|||
|
||||
// this.facets = {};
|
||||
this.searchTerm = suggestion;
|
||||
DatasetService.facetedSearch(suggestion, this.activeFilterCategories, this.solr.core, this.solr.host, undefined).subscribe(
|
||||
(res: SolrResponse) => this.dataHandler(res),
|
||||
(error: string) => this.errorHandler(error),
|
||||
);
|
||||
DatasetService.facetedSearch(suggestion, this.activeFilterCategories, this.solr.core, this.solr.host, undefined).subscribe({
|
||||
next: (res: SolrResponse) => this.dataHandler(res),
|
||||
error: (error: string) => this.errorHandler(error),
|
||||
});
|
||||
}
|
||||
|
||||
private dataHandler(res: SolrResponse, filterItem?: FacetItem): void {
|
||||
|
@ -251,8 +251,8 @@ export default class SearchViewComponent extends Vue {
|
|||
// alert(categoryName);
|
||||
delete this.activeFilterCategories[categoryName];
|
||||
|
||||
DatasetService.facetedSearch(this.searchTerm, this.activeFilterCategories, this.solr.core, this.solr.host, undefined).subscribe(
|
||||
(res: SolrResponse) => {
|
||||
DatasetService.facetedSearch(this.searchTerm, this.activeFilterCategories, this.solr.core, this.solr.host, undefined).subscribe({
|
||||
next: (res: SolrResponse) => {
|
||||
this.results = res.response.docs;
|
||||
this.numFound = res.response.numFound;
|
||||
|
||||
|
@ -291,7 +291,8 @@ export default class SearchViewComponent extends Vue {
|
|||
}
|
||||
}
|
||||
},
|
||||
(error: string) => this.errorHandler(error),
|
||||
);
|
||||
error: (error: string) => this.errorHandler(error),
|
||||
complete: () => console.log("complete"),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div id="page_style" class="rows site-content page__style page__description" autocomplete="off">
|
||||
<div class="container-fluid banner mz-5">
|
||||
<vs-input v-on:search-change="onSearch" v-bind:propDisplay="searchTerm" v-bind:placeholder="'Enter your search term...'"></vs-input>
|
||||
<vs-input v-bind:propDisplay="searchTerm" v-bind:placeholder="'Enter your search term...'" @search-change="onSearch"></vs-input>
|
||||
</div>
|
||||
<div class="column is-half is-offset-one-quarter" style="padding-top: 0; margin-top: 0">
|
||||
<!-- <div class="tabs is-centered">
|
||||
|
@ -27,7 +27,7 @@
|
|||
</ul>
|
||||
</div> -->
|
||||
<div v-if="results.length > 0" class="result-list-info">
|
||||
<div class="resultheader" v-if="hasSearchTerm()">
|
||||
<div v-if="hasSearchTerm()" class="resultheader">
|
||||
Your search term {{ "'" + stringSearchTerm + "'" }} yielded <strong>{{ numFound }}</strong> results:
|
||||
</div>
|
||||
</div>
|
||||
|
@ -57,7 +57,7 @@
|
|||
<div class="columns">
|
||||
<div id="id-side-bar" class="column is-4 sidebar_column" style="padding-top: 1.2rem; padding-right: 1.5rem; padding-left: 1.5rem">
|
||||
<div id="externals" class="">
|
||||
<div v-for="(facetItems, key, index) in facets" :key="index" name="external_card" style="margin-bottom: 0px">
|
||||
<div v-for="(facetItems, key, index) in facets" v-bind:key="index" name="external_card" style="margin-bottom: 0px">
|
||||
<facet-category v-bind:facetItems="facetItems" v-bind:filterName="key" @filter="onFilter"></facet-category>
|
||||
</div>
|
||||
<!-- <div class="card" name="external_card" style="margin-bottom: 0px">
|
||||
|
@ -109,9 +109,9 @@
|
|||
</div>
|
||||
|
||||
<div class="col col-8 column is-8 results_column" style="padding-top: 1.2rem; padding-right: 1rem; padding-left: 1rem">
|
||||
<div class="column" v-if="activeFilterCategories && Object.keys(activeFilterCategories).length > 0">
|
||||
<span class="active-filter-items" v-for="(values, key, index) in activeFilterCategories" :key="index">
|
||||
<active-facet-category v-bind:filterItems="values" :categoryName="key" @clearFacetCategory="onClearFacetCategory"></active-facet-category>
|
||||
<div v-if="activeFilterCategories && Object.keys(activeFilterCategories).length > 0" class="column">
|
||||
<span v-for="(values, key, index) in activeFilterCategories" v-bind:key="index" class="active-filter-items">
|
||||
<active-facet-category v-bind:filterItems="values" v-bind:categoryName="key" @clear-facet-category="onClearFacetCategory"></active-facet-category>
|
||||
</span>
|
||||
</div>
|
||||
<div class="results">
|
||||
|
|
|
@ -25,11 +25,11 @@ export default class SitelinkViewComponent extends Vue {
|
|||
}
|
||||
|
||||
getYears(): void {
|
||||
const newSubs: Subscription = DatasetService.getYears().subscribe(
|
||||
(res: string[]) => this.dataHandler(res),
|
||||
(error: string) => this.errorHandler(error),
|
||||
() => newSubs.unsubscribe(),
|
||||
);
|
||||
const newSubs: Subscription = DatasetService.getYears().subscribe({
|
||||
next: (res: string[]) => this.dataHandler(res),
|
||||
error: (error: string) => this.errorHandler(error),
|
||||
complete: () => newSubs.unsubscribe(),
|
||||
});
|
||||
// this.subscriptions.push(newSubs);
|
||||
}
|
||||
|
||||
|
@ -43,13 +43,14 @@ export default class SitelinkViewComponent extends Vue {
|
|||
|
||||
select(year: string): void {
|
||||
this.selected = year;
|
||||
const newSubs = DatasetService.getDocuments(year).subscribe(
|
||||
(res: Array<DbDataset>) => {
|
||||
const newSubs: Subscription = DatasetService.getDocuments(year).subscribe({
|
||||
next: (res: Array<DbDataset>) => {
|
||||
this.datasets = res;
|
||||
},
|
||||
(error: string) => this.errorHandler(error),
|
||||
);
|
||||
this.subscriptions.push(newSubs);
|
||||
error: (error: string) => this.errorHandler(error),
|
||||
complete: () => newSubs.unsubscribe(),
|
||||
});
|
||||
// this.subscriptions.push(newSubs);
|
||||
}
|
||||
|
||||
private dataHandler(res: string[]): void {
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
</div> -->
|
||||
<div class="columns is-centered">
|
||||
<div class="column is-6-desktop">
|
||||
<div class="list" v-if="years.length > 0">
|
||||
<div v-if="years.length > 0" class="list">
|
||||
<ul class="block-list has-radius is-primary">
|
||||
<li v-for="(year, index) in years" :key="index" :class="{ highlight: year == selected }" @click="select(year)">
|
||||
<li v-for="(year, index) in years" v-bind:key="index" v-bind:class="{ highlight: year == selected }" @click="select(year)">
|
||||
{{ year }}
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -27,7 +27,7 @@
|
|||
<div class="columns is-centered">
|
||||
<div class="column is-6-desktop">
|
||||
<ol v-if="datasets.length > 0">
|
||||
<li v-for="(dataset, index) in datasets" :key="index">
|
||||
<li v-for="(dataset, index) in datasets" v-bind:key="index">
|
||||
<div class="post">
|
||||
<header class="post-header">
|
||||
<h2 class="post-title">
|
||||
|
@ -39,11 +39,11 @@
|
|||
</div>
|
||||
<div class="post-description">
|
||||
<!-- @foreach ($document->authors as $author) -->
|
||||
<div v-for="(author, index) in dataset.authors" :key="index">
|
||||
<div v-for="(author, index_a) in dataset.authors" v-bind:key="index_a">
|
||||
<em>Author: {{ author.full_name }}</em>
|
||||
<br />
|
||||
</div>
|
||||
<div v-for="(title, index) in dataset.titles" :key="index">
|
||||
<div v-for="(title, index_t) in dataset.titles" v-bind:key="index_t">
|
||||
<em>{{ title.type }}: {{ title.value }}</em>
|
||||
<br />
|
||||
</div>
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue