Skip to content

Commit

Permalink
Merge branch 'main' into feature/dev-2490-refactor-sessionservice-to-…
Browse files Browse the repository at this point in the history
…return-true-observables-that-also

* main:
  feat(advanced-search): advanced search library (#1131)
  chore(main): release 10.23.7 (#1215)
  fix(resource): resources do not load from url (#1214)
  chore(main): release 10.23.6 (#1213)
  fix(ontology form): remove the input decorator (#1212)
  chore(main): release 10.23.5 (#1208)
  chore(deps): bump js-lib version to 8.3.5 (#1211)

# Conflicts:
#	apps/dsp-app/src/app/app.module.ts
#	apps/dsp-app/src/app/project/project.component.html
#	apps/dsp-app/src/app/project/project.component.ts
#	tsconfig.base.json
  • Loading branch information
irmastnt committed Oct 6, 2023
2 parents bd673c4 + 7e0a550 commit e253811
Show file tree
Hide file tree
Showing 161 changed files with 6,903 additions and 8,939 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Changelog

## [10.23.7](https://github.com/dasch-swiss/dsp-das/compare/v10.23.6...v10.23.7) (2023-10-04)


### Bug Fixes

* **resource:** resources do not load from url ([#1214](https://github.com/dasch-swiss/dsp-das/issues/1214)) ([689acbe](https://github.com/dasch-swiss/dsp-das/commit/689acbe6933e3da508268c8c65dfd76c74afeeb9))

## [10.23.6](https://github.com/dasch-swiss/dsp-das/compare/v10.23.5...v10.23.6) (2023-10-03)


### Bug Fixes

* **ontology form:** remove the input decorator ([#1212](https://github.com/dasch-swiss/dsp-das/issues/1212)) ([64100e7](https://github.com/dasch-swiss/dsp-das/commit/64100e7385f0985e1b7eca7b087e99c413a85368))

## [10.23.5](https://github.com/dasch-swiss/dsp-das/compare/v10.23.4...v10.23.5) (2023-09-29)


### Bug Fixes

* **app:** sort incoming links for more than 25 ([#1203](https://github.com/dasch-swiss/dsp-das/issues/1203)) ([7a17d7c](https://github.com/dasch-swiss/dsp-das/commit/7a17d7c8569e5005f48ed1011bd6f26053d5a989))
* **link to controlled vocabulary:** Link to correct route ([#1207](https://github.com/dasch-swiss/dsp-das/issues/1207)) ([51bae4b](https://github.com/dasch-swiss/dsp-das/commit/51bae4bba2588f138b7ca95434895ab105fe4c1f))


### Maintenance

* **app-global, app-routing-module:** Replaces string literals with constants ([#1210](https://github.com/dasch-swiss/dsp-das/issues/1210)) ([a70388c](https://github.com/dasch-swiss/dsp-das/commit/a70388cee52e4ad56c68019da048e33bba4b5435))
* **deps:** bump js-lib version to 8.3.5 ([#1211](https://github.com/dasch-swiss/dsp-das/issues/1211)) ([a6682e9](https://github.com/dasch-swiss/dsp-das/commit/a6682e9e05f498df83f65c0c0ed47e09bacbf8da))
* **progress indicator:** move app progress indicator into shared lib ([#1204](https://github.com/dasch-swiss/dsp-das/issues/1204)) ([95d843d](https://github.com/dasch-swiss/dsp-das/commit/95d843d9c1c3231244c67f4712d0bbfc2365a2fa))
* **project edit dialog:** remove dialog and replace in component ([#1202](https://github.com/dasch-swiss/dsp-das/issues/1202)) ([7a42167](https://github.com/dasch-swiss/dsp-das/commit/7a421679caab8405a1e0a8d112656c3b06a2bc53))

## [10.23.4](https://github.com/dasch-swiss/dsp-das/compare/v10.23.3...v10.23.4) (2023-09-15)


Expand Down
11 changes: 10 additions & 1 deletion apps/dsp-app/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ import { UserComponent } from './user/user.component';
// search results and resource viewer
import { ResourceComponent } from './workspace/resource/resource.component';
import { ResultsComponent } from './workspace/results/results.component';
import {ProjectFormComponent} from "@dsp-app/src/app/project/project-form/project-form.component";
import { AdvancedSearchContainerComponent } from './workspace/search/advanced-search/advanced-search-container.component';
import { ProjectFormComponent } from "@dsp-app/src/app/project/project-form/project-form.component";
import { RouteConstants } from '@dasch-swiss/vre/shared/app-config';

const routes: Routes = [
Expand Down Expand Up @@ -132,6 +133,14 @@ const routes: Routes = [
},
],
},
{
path: RouteConstants.advancedSearch,
component: AdvancedSearchContainerComponent,
},
{
path: RouteConstants.advancedSearchResultsRelative,
component: ResultsComponent,
},
{
path: RouteConstants.notFoundWildcard,
component: StatusComponent,
Expand Down
36 changes: 4 additions & 32 deletions apps/dsp-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,22 +140,7 @@ import { UriValueComponent } from './workspace/resource/values/uri-value/uri-val
import { ListViewComponent } from './workspace/results/list-view/list-view.component';
import { ResourceListComponent } from './workspace/results/list-view/resource-list/resource-list.component';
import { ResultsComponent } from './workspace/results/results.component';
import { AdvancedSearchComponent } from './workspace/search/advanced-search/advanced-search.component';
import { ResourceAndPropertySelectionComponent } from './workspace/search/advanced-search/resource-and-property-selection/resource-and-property-selection.component';
import { SearchSelectPropertyComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/search-select-property.component';
import { SearchBooleanValueComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/search-boolean-value/search-boolean-value.component';
import { SearchDateValueComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/search-date-value/search-date-value.component';
import { SearchDecimalValueComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/search-decimal-value/search-decimal-value.component';
import { SearchIntValueComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/search-int-value/search-int-value.component';
import { SearchLinkValueComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/search-link-value/search-link-value.component';
import { SearchDisplayListComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/search-list-value/search-display-list/search-display-list.component';
import { SearchListValueComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/search-list-value/search-list-value.component';
import { SearchResourceComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/search-resource/search-resource.component';
import { SearchTextValueComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/search-text-value/search-text-value.component';
import { SearchUriValueComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/search-uri-value/search-uri-value.component';
import { SpecifyPropertyValueComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/specify-property-value.component';
import { SearchSelectResourceClassComponent } from './workspace/search/advanced-search/resource-and-property-selection/search-select-resource-class/search-select-resource-class.component';
import { SearchSelectOntologyComponent } from './workspace/search/advanced-search/search-select-ontology/search-select-ontology.component';
import { AdvancedSearchContainerComponent } from './workspace/search/advanced-search/advanced-search-container.component';
import { ExpertSearchComponent } from './workspace/search/expert-search/expert-search.component';
import { FulltextSearchComponent } from './workspace/search/fulltext-search/fulltext-search.component';
import { SearchPanelComponent } from './workspace/search/search-panel/search-panel.component';
Expand All @@ -177,6 +162,7 @@ import {
} from '@dasch-swiss/vre/shared/app-config';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import { AppDatePickerModule } from '@dasch-swiss/vre/shared/app-date-picker';
import { AdvancedSearchComponent } from '@dasch-swiss/vre/advanced-search';
import { NgxsStoragePluginModule } from '@ngxs/storage-plugin';
import { apiConnectionTokenProvider } from './providers/api-connection-token.provider';
import { NgxsStoreModule } from '@dasch-swiss/vre/shared/app-state';
Expand All @@ -195,7 +181,7 @@ export function httpLoaderFactory(httpClient: HttpClient) {
AddUserComponent,
AddValueComponent,
AdminImageDirective,
AdvancedSearchComponent,
AdvancedSearchContainerComponent,
AppComponent,
ArchiveComponent,
AudioComponent,
Expand Down Expand Up @@ -265,7 +251,6 @@ export function httpLoaderFactory(httpClient: HttpClient) {
PropertyFormComponent,
PropertyInfoComponent,
ReplaceFileFormComponent,
ResourceAndPropertySelectionComponent,
ResourceClassFormComponent,
ResourceClassInfoComponent,
ResourceClassPropertyInfoComponent,
Expand All @@ -274,20 +259,7 @@ export function httpLoaderFactory(httpClient: HttpClient) {
ResourceLinkFormComponent,
ResourceListComponent,
ResultsComponent,
SearchBooleanValueComponent,
SearchDateValueComponent,
SearchDecimalValueComponent,
SearchDisplayListComponent,
SearchIntValueComponent,
SearchLinkValueComponent,
SearchListValueComponent,
SearchPanelComponent,
SearchResourceComponent,
SearchSelectOntologyComponent,
SearchSelectPropertyComponent,
SearchSelectResourceClassComponent,
SearchTextValueComponent,
SearchUriValueComponent,
SelectedResourcesComponent,
SelectGroupComponent,
SelectLanguageComponent,
Expand All @@ -296,7 +268,6 @@ export function httpLoaderFactory(httpClient: HttpClient) {
SelectPropertiesComponent,
SelectResourceClassComponent,
SortButtonComponent,
SpecifyPropertyValueComponent,
SplitPipe,
StatusComponent,
StillImageComponent,
Expand Down Expand Up @@ -352,6 +323,7 @@ export function httpLoaderFactory(httpClient: HttpClient) {
NgxSkeletonLoaderModule,
PdfViewerModule,
ReactiveFormsModule,
AdvancedSearchComponent,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
Expand Down
2 changes: 0 additions & 2 deletions apps/dsp-app/src/app/main/dialog/dialog.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@
<app-ontology-form
[projectUuid]="data.project"
(closeDialog)="dialogRef.close($event)"
[existingOntologyNames]="data.existing"
></app-ontology-form>
</div>

Expand All @@ -373,7 +372,6 @@
[iri]="data.id"
[projectUuid]="data.project"
(closeDialog)="dialogRef.close($event)"
[existingOntologyNames]="data.existing"
></app-ontology-form>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { DialogComponent } from '@dsp-app/src/app/main/dialog/dialog.component';
import { existingNamesValidator } from '@dsp-app/src/app/main/directive/existing-name/existing-name.directive';
import { AppErrorHandler } from '@dasch-swiss/vre/shared/app-error-handler';
import { ProjectService } from '@dsp-app/src/app/workspace/resource/services/project.service';
import { AutocompleteItem } from '@dsp-app/src/app/workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/operator';
import { AutocompleteItem } from '@dsp-app/src/app/workspace/search/operator';

@Component({
selector: 'app-add-user',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { ApplicationStateService } from '@dasch-swiss/vre/shared/app-state-service';
import { DspApiConnectionToken } from '@dasch-swiss/vre/shared/app-config';
import { AppErrorHandler } from '@dasch-swiss/vre/shared/app-error-handler';
import { AutocompleteItem } from '@dsp-app/src/app/workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/operator';
import { AutocompleteItem } from '@dsp-app/src/app/workspace/search/operator';

@Component({
selector: 'app-select-group',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ export class OntologyFormComponent implements OnInit {
// ontology iri in case of edit
@Input() iri: string;

// existing ontology names; name has to be unique
@Input() existingOntologyNames: string[] = [];

@Output() closeDialog: EventEmitter<any> = new EventEmitter<any>();

@Output() updateParent: EventEmitter<string> = new EventEmitter<string>();

// existing ontology names; name has to be unique
existingOntologyNames: string[] = [];

loading: boolean;

project: ReadProject;
Expand Down Expand Up @@ -139,7 +139,8 @@ export class OntologyFormComponent implements OnInit {
this.projectUuid = this._route.parent.snapshot.params.uuid;
}

if (!this.existingOntologyNames.length) {
if (!this.iri && !this.existingOntologyNames.length) {
// if there is no iri, we are creating a new ontology
this._applicationStateService.get('currentProjectOntologies').subscribe(
(response: ReadOntology[]) => {
response.forEach((onto) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import { existingNamesValidator } from '@dsp-app/src/app/main/directive/existing
import { AppErrorHandler } from '@dasch-swiss/vre/shared/app-error-handler';
import { SortingService } from '@dsp-app/src/app/main/services/sorting.service';
import { CustomRegex } from '@dsp-app/src/app/workspace/resource/values/custom-regex';
import { AutocompleteItem } from '@dsp-app/src/app/workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/operator';
import {
DefaultProperties,
DefaultProperty,
Expand All @@ -51,6 +50,7 @@ import { OntologyService } from '../ontology.service';
import { GuiCardinality } from '@dsp-app/src/app/project/ontology/resource-class-info/resource-class-property-info/resource-class-property-info.component';
import { PropToDisplay } from '../resource-class-info/resource-class-info.component';
import { NotificationService } from '@dasch-swiss/vre/shared/app-notification';
import { AutocompleteItem } from '@dsp-app/src/app/workspace/search/operator';

export type EditMode =
| 'createProperty'
Expand Down
13 changes: 12 additions & 1 deletion apps/dsp-app/src/app/project/project.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,18 @@
<!-- Description Section -->
<mat-divider></mat-divider>
<mat-list-item
[ngClass]="{ 'active': this.listItemSelected === routeConstants.projectRelative + '/' + projectUuid }"
[ngClass]="{ 'active': listItemSelected === routeConstants.advancedSearch}" class="section-title" (click)="open(routeConstants.advancedSearch)">
<span matListItemTitle class="section-label">
<mat-icon class="sidenav-prefix-icon">search</mat-icon>
<p>Advanced Search</p>
<mat-icon class="sidenav-suffix-icon">chevron_right</mat-icon>
</span>

</mat-list-item>

<!-- Description Section -->
<mat-divider></mat-divider>
<mat-list-item [ngClass]="{ 'active': listItemSelected === routeConstants.projectRelative + '/' + projectUuid }"
class="section-title"
(click)="open(routeConstants.projectRelative + '/' + projectUuid)"
>
Expand Down
4 changes: 4 additions & 0 deletions apps/dsp-app/src/app/project/project.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ export class ProjectComponent implements OnInit {

ngOnInit() {
switch (this._router.url) {
case `${RouteConstants.project}/${this.projectUuid}/${RouteConstants.advancedSearch}`: {
this.listItemSelected = RouteConstants.advancedSearch;
break;
}
case `${RouteConstants.project}/${this.projectUuid}`: {
this.listItemSelected = this._router.url;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { DspApiConnectionToken } from '@dasch-swiss/vre/shared/app-config';
import { AppErrorHandler } from '@dasch-swiss/vre/shared/app-error-handler';
import { Session } from '@dasch-swiss/vre/shared/app-session';
import { ProjectService } from '@dsp-app/src/app/workspace/resource/services/project.service';
import { AutocompleteItem } from '@dsp-app/src/app/workspace/search/advanced-search/resource-and-property-selection/search-select-property/specify-property-value/operator';
import { AutocompleteItem } from '../../workspace/search/operator';

// --> TODO replace it by IPermissions from dsp-js
export interface IPermissions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export class ResourceComponent implements OnChanges, OnDestroy {
private _valueOperationEventService: ValueOperationEventService,
private _cdr:ChangeDetectorRef
) {

this._route.params.subscribe((params) => {
this.projectCode = params['project'];
this.resourceUuid = params['resource'];
Expand Down Expand Up @@ -293,10 +294,6 @@ export class ResourceComponent implements OnChanges, OnDestroy {
// guard; not yet implemented
return;
}
if (resource.res.id !== this.resourceIri) {
// ensure that only the latest requested resource is rendered
return; // guard for there is already another resource requested
}
if (resource.isRegion) {
// render the image onto which the region is pointing; a region
// itself can not be displayed without an image it is annotating
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
<!-- header / toolbar to select view and pagination -->
<div *ngIf="numberOfAllResults !== 0 && loading === false" class="list-view-header">
<button mat-button class="pagination-button previous" [disabled]="0 >= currentIndex" (click)="goToPage('previous')">
<mat-icon>west</mat-icon>
<span>Previous</span>
</button>
<span class="fill-remaining-space"></span>
<div class="range">{{currentRangeStart}} - {{currentRangeEnd}} of {{numberOfAllResults}}</div>
<span class="fill-remaining-space"></span>
<button mat-button class="pagination-button next" [disabled]="(pageSize > numberOfAllResults) || nextDisabled" (click)="goToPage('next')">
<span>Next</span>
<mat-icon>east</mat-icon>
</button>
<div *ngIf="!loading && (numberOfAllResults > 0 && resources.resources.length)" class="list-view-header">
<div *ngIf="search.mode === 'gravsearch' && search.projectUuid && (numberOfAllResults > 0 && resources.resources.length)" class="back">
<button mat-button class="back-button" (click)="handleBackButtonClicked()">
<span>Go Back to Search Form</span>
<mat-icon iconPositionEnd>chevron_right</mat-icon>
</button>
</div>
<div class="navigation">
<button mat-button class="pagination-button previous" [disabled]="0 >= currentIndex" (click)="goToPage('previous')">
<mat-icon>west</mat-icon>
<span>Previous</span>
</button>
<span class="fill-remaining-space"></span>
<div class="range">{{currentRangeStart}} - {{currentRangeEnd}} of {{numberOfAllResults}}</div>
<span class="fill-remaining-space"></span>
<button mat-button class="pagination-button next" [disabled]="(pageSize > numberOfAllResults) || nextDisabled" (click)="goToPage('next')">
<span>Next</span>
<mat-icon>east</mat-icon>
</button>
</div>
</div>

<!-- container with search results -->
Expand Down Expand Up @@ -43,10 +51,16 @@
</div>
<!-- Case B: user clicked on the class item -->
<div *ngIf="search.mode !== 'fulltext'">
<div *ngIf="search.mode === 'gravsearch' && search.projectUuid" class="back">
<button mat-button class="back-button" (click)="handleBackButtonClicked()">
<span>Go Back to Search Form</span>
<mat-icon iconPositionEnd>chevron_right</mat-icon>
</button>
</div>
<!-- Case B1: there is no resources created-->
<div *ngIf="hasPermission" class="no-results-container">
<mat-icon>warning</mat-icon>
<div>No resources have been created for this class yet.</div>
<div>No results were found for your query.</div>
</div>
<!-- Case B2: no permission-->
<div *ngIf="!hasPermission" class="no-results-container">
Expand Down

0 comments on commit e253811

Please sign in to comment.