Skip to content

Commit

Permalink
fix: 5th change
Browse files Browse the repository at this point in the history
  • Loading branch information
derschnee68 committed Jan 27, 2025
1 parent def3c3b commit 3de6caf
Show file tree
Hide file tree
Showing 30 changed files with 49 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ import { ListItemService } from '../list-item/list-item.service';
*ngIf="showChildren"
[projectUuid]="listItemService.projectInfos.projectIri"
[rootNodeIri]="node.id"
[isAdmin]="isAdmin">
</app-list-item>
[isAdmin]="isAdmin" />
</div>
</div>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
*ngIf="((isListsLoading$ | async) === false) && (projectBaseService.project$ | async) as project"
[rootNodeIri]="list.id"
[projectUuid]="project.id"
[isAdmin]="projectBaseService.isAdmin$ | async">
</app-list-item>
[isAdmin]="projectBaseService.isAdmin$ | async" />
</div>
</ng-container>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import { SplitSize } from './split-size.interface';
<app-list-view
[search]="searchParams"
[withMultipleSelection]="true"
(selectedResources)="openSelectedResources($event)">
</app-list-view>
(selectedResources)="openSelectedResources($event)" />
</as-split-area>
<as-split-area [size]="60" *ngIf="selectedResources?.count > 0" cdkScrollable>
<div [ngSwitch]="viewMode">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import { OntologyClassService, SortingService } from '@dasch-swiss/vre/shared/ap
selector: 'app-ontology-classes',
template: `
<div *ngFor="let class of classesToDisplay; trackBy: trackByFn">
<app-ontology-class-item [resClass]="class" [projectMember]="projectMember"> </app-ontology-class-item>
<app-ontology-class-item [resClass]="class" [projectMember]="projectMember" />
</div>
`,
})
export class OntologyClassesComponent {
@Input({ required: true }) resClasses!: ClassDefinition[];
@Input({ required: true }) projectMember!: boolean;

get classesToDisplay(): ClassDefinition[] {
const classesToDisplay = OntologyClassService.GetClassesToDisplay(this.resClasses);
return this._sortingService.keySortByAlphabetical(classesToDisplay, 'label');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<app-dialog-header
[title]="ontologyName ? ontologyName : ('form.ontology.title.create' | translate)"
[subtitle]="ontologyName ? ('form.ontology.title.edit' | translate) : ''">
</app-dialog-header>
[subtitle]="ontologyName ? ('form.ontology.title.edit' | translate) : ''" />
<form [formGroup]="ontologyForm" class="form-content">
<app-common-input
[control]="ontologyForm.controls.name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@
(editResourceClass)="updateResourceClass($event, resClass)"
(deleteResourceClass)="deleteResourceClass($event.iri)"
(updatePropertyAssignment)="initOntologiesList()"
[updatePropertyAssignment$]="updatePropertyAssignment$">
</app-resource-class-info>
[updatePropertyAssignment$]="updatePropertyAssignment$" />
</div>
<div class="ontology-editor-list properties" *ngIf="view === 'properties'">
<!-- list of properties of current ontology -->
Expand All @@ -137,16 +136,15 @@
*ngFor="let prop of ontoProperties?.properties; trackBy: trackByPropertyDefinitionFn; let odd = odd"
[class.odd]="odd">
<!-- display only properties with guiOrder and if they exist in list of properties;
if objectType is a linkValue hide it (otherwise we have the property twice) -->
if objectType is a linkValue hide it (otherwise we have the property twice) -->
<app-property-info
[propDef]="(currentOntology$ | async)?.properties[prop.id]"
[projectUuid]="projectUuid"
[projectStatus]="(project$ | async)?.status"
(lastModificationDate)="onLastModificationDateChange()"
[userCanEdit]="isAdmin$ | async"
(editResourceProperty)="editProperty($event)"
(deleteResourceProperty)="deleteProperty($event.iri)">
</app-property-info>
(deleteResourceProperty)="deleteProperty($event.iri)" />
</mat-list-item>
</mat-list>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { map, takeUntil } from 'rxjs/operators';
</span>
</span>
<!-- display only properties if they exist in list of properties;
objectType is not a linkValue (otherwise we have the property twice) -->
objectType is not a linkValue (otherwise we have the property twice) -->
<span matListItemTitle>
<app-resource-class-property-info
class="property-info"
Expand All @@ -34,8 +34,7 @@ import { map, takeUntil } from 'rxjs/operators';
[lastModificationDate]="lastModificationDate$ | async"
[userCanEdit]="userCanEdit"
[resourceClass]="resourceClass"
(removePropertyFromClass)="removePropertyFromClass.emit($event)">
</app-resource-class-property-info>
(removePropertyFromClass)="removePropertyFromClass.emit($event)" />
</span>
</mat-list-item>
</div>`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@
[resourceClass]="resourceClass"
[userCanEdit]="userCanEdit"
[i]="i"
(removePropertyFromClass)="removeProperty($event, currentOntologyPropertiesToDisplay)">
>
</app-resource-class-info-element>
(removePropertyFromClass)="removeProperty($event, currentOntologyPropertiesToDisplay)" />
</mat-list>

<app-add-property-menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@
<!-- list of ontology classes -->
<app-ontology-classes
[resClasses]="getAllEntityDefinitionsAsArray(onto.classes)"
[projectMember]="(isAdmin$ | async) || (isMember$ | async)">
</app-ontology-classes>
[projectMember]="(isAdmin$ | async) || (isMember$ | async)" />
</mat-expansion-panel>
<mat-divider></mat-divider>
</mat-accordion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ import { shortcodeExistsValidator } from './shortcode-exists.validator';
<app-chip-list-input
[formArray]="form.controls.keywords"
data-cy="keywords-input"
[validators]="keywordsValidators">
</app-chip-list-input>
[validators]="keywordsValidators" />
</form>
`,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
<app-order-by
[orderByList]="asyncData.propertiesOrderByList"
[orderByDisabled]="asyncData.orderByButtonDisabled"
(emitPropertyOrderByChanged)="handlePropertyOrderByChanged($event)">
</app-order-by>
(emitPropertyOrderByChanged)="handlePropertyOrderByChanged($event)" />
<app-ontology-resource-form
[ontologies]="asyncData.ontologies"
[ontologiesLoading]="asyncData.ontologiesLoading"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
"
[list]="item.list"
[value]="item.searchValue"
(emitValueChanged)="onValueChanged($event, i)">
</app-property-form-list-value>
(emitValueChanged)="onValueChanged($event, i)" />
<app-property-form-link-value
*ngIf="item.selectedProperty?.isLinkedResourceProperty"
[value]="item.searchValue"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@
"
[list]="propertyFormItem.list"
[value]="propertyFormItem.searchValue"
(emitValueChanged)="onValueChanged($event)">
</app-property-form-list-value>
(emitValueChanged)="onValueChanged($event)" />

<app-property-form-link-value
*ngIf="
Expand Down Expand Up @@ -161,8 +160,7 @@
"
(emitLoadMoreSearchResults)="
onChildLoadMoreSearchResults($event)
">
</app-property-form-link-match-property>
" />
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ import { FulltextSearchComponent } from './fulltext-search.component';
#fulltextSearch
[projectfilter]="projectfilter"
[limitToProject]="limitToProject"
(search)="emitSearch($event)">
</app-fulltext-search>
(search)="emitSearch($event)" />
`,
})
class TestHostFulltextSearchComponent implements OnInit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<app-fulltext-search
[projectfilter]="projectfilter"
[(limitToProject)]="limitToProject"
(search)="emitSearch($event)">
</app-fulltext-search>
(search)="emitSearch($event)" />

<!-- Do not display advanced and expert search on mobile devices smaller than tablet -->
<div class="advanced-expert-buttons" [class.with-project-filter]="projectfilter">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<app-dialog-header
[title]="'projects.list.eraseConfirmationDialog.title' | translate"
[subtitle]="'projects.list.eraseConfirmationDialog.subtitle' | translate">
</app-dialog-header>
[subtitle]="'projects.list.eraseConfirmationDialog.subtitle' | translate" />

<mat-dialog-content>
<div>{{ 'projects.list.eraseConfirmationDialog.warning' | translate }}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ <h3 class="mat-body subtitle">
[icon]="'sort_by_alpha'"
[sortProps]="sortProps"
[activeKey]="sortBy"
(sortKeyChange)="sortList($event)">
</app-sort-button>
(sortKeyChange)="sortList($event)" />
</span>
<h2 class="mat-headline-6">{{ list.length | i18nPlural : itemPluralMapping['project'] }}</h2>
<span class="fill-remaining-space"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
(refreshParent)="refresh()"
[createNew]="true"
[isUsersProjects]="isUsersProjects"
data-cy="active-projects-section">
</app-projects-list>
data-cy="active-projects-section" />
<!-- already deactivated projects: disable the menu -->
<app-projects-list
[list]="inactiveProjects$ | async"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, DebugElement, OnInit, ViewChild } from '@angular/core';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

import { MatIconModule } from '@angular/material/icon';
import { MatMenuModule } from '@angular/material/menu';
Expand All @@ -13,8 +13,7 @@ import { SortButtonComponent } from './sort-button.component';
*/
@Component({
template: `
<app-sort-button #sortButton [sortProps]="sortProps" [position]="position" (sortKeyChange)="sortList($event)">
</app-sort-button>
<app-sort-button #sortButton [sortProps]="sortProps" [position]="position" (sortKeyChange)="sortList($event)" />
<ul class="list">
<li *ngFor="let item of list" class="item">
<span>{{ item.firstname }} </span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ <h3 class="mat-body subtitle">
[icon]="'sort_by_alpha'"
[sortProps]="sortProps"
[activeKey]="sortBy"
(sortKeyChange)="sortList($event)">
</app-sort-button>
(sortKeyChange)="sortList($event)" />
</span>
<h2 class="mat-headline-6">
<span *ngIf="projectUuid">{{ list.length | i18nPlural : itemPluralMapping['member'] }}</span>
Expand Down Expand Up @@ -72,8 +71,7 @@ <h5 class="mat-subtitle-1 info-names">
user.permissions.groupsPerProject[(project$ | async)?.id]
"
[disabled]="!status"
(groupChange)="updateGroupsMembership(user.id, $event)">
</app-select-group>
(groupChange)="updateGroupsMembership(user.id, $event)" />
</td>

<!-- action: menu with edit, remove, etc. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@
</mat-form-field>
<mat-label class="nowrap"> x {{ fixedWidth }} Px</mat-label>
</div>
<app-image-display-ratio [@replaceAnimation] *ngIf="isPercentageSize" [ratio]="ratio" class="child">
</app-image-display-ratio>
<app-image-display-absolute [@replaceAnimation] *ngIf="!isPercentageSize" [widthPx]="fixedWidth">
</app-image-display-absolute>
<app-image-display-ratio [@replaceAnimation] *ngIf="isPercentageSize" [ratio]="ratio" class="child" />
<app-image-display-absolute [@replaceAnimation] *ngIf="!isPercentageSize" [widthPx]="fixedWidth" />
</div>
</div>
<div class="action-buttons mt-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ <h4 class="mat-subtitle-2">As system admin, please enter your password before up
<button mat-button color="primary" type="reset">{{ 'form.action.reset' | translate }}</button>
<span class="fill-remaining-space"></span>
<button mat-raised-button type="submit" color="primary" [disabled]="!form.valid || !matchingPasswords">
<app-progress-indicator [color]="'white'" [status]="0" *ngIf="loading" class="submit-progress">
</app-progress-indicator>
<app-progress-indicator [color]="'white'" [status]="0" *ngIf="loading" class="submit-progress" />
{{ !loading && error ? ('form.action.retry' | translate) : ('form.action.update' | translate) }}
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<app-dialog-header
[title]="editExistingUser ? userForm.controls.username.value : ('form.user.title.profile' | translate)"
[subtitle]="editExistingUser ? ('form.user.title.edit' | translate) : ('form.user.title.new' | translate)">
</app-dialog-header>
[subtitle]="editExistingUser ? ('form.user.title.edit' | translate) : ('form.user.title.new' | translate)" />
<form [formGroup]="userForm" class="form-content user-form">
<app-common-input
[class]="editExistingUser ? 'small-field' : 'large-field' "
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<div *ngIf="src && src.fileValue.fileUrl">
<!-- in case of an error -->
<app-status [status]="404" [url]="src.fileValue.fileUrl" [representation]="'archive'" *ngIf="failedToLoad">
</app-status>
<app-status [status]="404" [url]="src.fileValue.fileUrl" [representation]="'archive'" *ngIf="failedToLoad" />

<div class="file-representation">
<div class="container">
<div class="contents">
<div class="icon">
<mat-icon> description </mat-icon>
<mat-icon> description</mat-icon>
</div>
<div class="file">
<p data-cy="original-file-name">{{ originalFilename }}</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<div *ngIf="isPdf" class="pdf-container">
<!-- in case of an error -->
<app-status [status]="404" [url]="src.fileValue.fileUrl" [representation]="'document'" *ngIf="failedToLoad">
</app-status>
<app-status [status]="404" [url]="src.fileValue.fileUrl" [representation]="'document'" *ngIf="failedToLoad" />

<pdf-viewer
class="pdf-viewer"
Expand Down Expand Up @@ -90,7 +89,7 @@
<div class="container">
<div class="contents">
<div class="icon">
<mat-icon> text_snippet </mat-icon>
<mat-icon> text_snippet</mat-icon>
</div>
<div class="file">
<p>{{ originalFilename }}</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { Component, Input, OnChanges } from '@angular/core';
import { ReadProject } from '@dasch-swiss/dsp-js';
import { ResourceSelectors, UserSelectors } from '@dasch-swiss/vre/core/state';
import { UserSelectors } from '@dasch-swiss/vre/core/state';
import {
FileRepresentation,
RepresentationConstants,
getFileValue,
RepresentationConstants,
} from '@dasch-swiss/vre/resource-editor/representations';
import { DspResource } from '@dasch-swiss/vre/shared/app-common';
import { ProjectService } from '@dasch-swiss/vre/shared/app-helper-services';
import { Store } from '@ngxs/store';
import { Observable, combineLatest } from 'rxjs';
import { combineLatest, Observable } from 'rxjs';
import { map } from 'rxjs/operators';

@Component({
Expand All @@ -34,42 +33,37 @@ import { map } from 'rxjs/operators';
[class.pdf]="representationToDisplay.fileValue.filename.split('.').pop() === 'pdf'"
*ngSwitchCase="representationConstants.document"
[src]="representationToDisplay"
[parentResource]="resource.res">
</app-document>
[parentResource]="resource.res" />
<app-audio
#audio
class="dsp-representation audio"
*ngSwitchCase="representationConstants.audio"
[src]="representationToDisplay"
[parentResource]="resource.res"
[isAdmin]="isAdmin$ | async">
</app-audio>
[isAdmin]="isAdmin$ | async" />
<app-video
#video
class="dsp-representation video"
*ngSwitchCase="representationConstants.movingImage"
[src]="representationToDisplay"
[parentResource]="resource.res"
[isAdmin]="isAdmin$ | async">
</app-video>
[isAdmin]="isAdmin$ | async" />
<app-archive
#archive
class="dsp-representation archive"
*ngSwitchCase="representationConstants.archive"
[src]="representationToDisplay"
[parentResource]="resource.res">
</app-archive>
[parentResource]="resource.res" />
<app-text
#text
class="dsp-representation text"
*ngSwitchCase="representationConstants.text"
[src]="representationToDisplay"
[parentResource]="resource.res">
</app-text>
[parentResource]="resource.res" />
</div>`,
})
export class ResourceRepresentationComponent implements OnChanges {
Expand Down
Loading

0 comments on commit 3de6caf

Please sign in to comment.