Skip to content

Commit

Permalink
Fixed compilation errors which were created by mistakes from upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
milanmajchrak committed Jan 16, 2024
1 parent bf6efbc commit d4348b8
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class MembersListComponent implements OnInit, OnDestroy {
this.subs.set(SubKey.Members,
this.paginationService.getCurrentPagination(this.config.id, this.config).pipe(
switchMap((currentPagination) => {
return this.ePersonDataService.findAllByHref(this.groupBeingEdited._links.epersons.href, {
return this.ePersonDataService.findListByHref(this.groupBeingEdited._links.epersons.href, {
currentPage: currentPagination.currentPage,
elementsPerPage: currentPagination.pageSize
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,12 +501,16 @@ export class ClarinMatomoStatisticsComponent implements OnInit {
// Update chart message e.g., `Statistics for years 2022 to 2023`, `Statistics for the year 2022`,..
this.updateChartMessage(labels);

// Update view data
// @ts-ignore
this.chartData?.[0]?.data = totalDataViews;
// Update downloads data
// @ts-ignore
this.chartData?.[1]?.data = totalDataDownloads;
if (this.chartData) {
if (this.chartData[0]) {
// Update view data
this.chartData[0].data = totalDataViews;
}
if (this.chartData[1]) {
// Update downloads data
this.chartData[1].data = totalDataDownloads;
}
}
this.chart.update();
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/item-page/full/full-item-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class FullItemPageComponent extends ItemPageComponent implements OnInit,
protected halService: HALEndpointService,
protected registryService: RegistryService
) {
super(route, router, items, authService, authorizationService, responseService, signpostingDataService, linkHeadService, platformId);
super(route, router, items, authService, authorizationService, responseService, signpostingDataService, linkHeadService, platformId, registryService, halService);
}

/*** AoT inheritance fix, will hopefully be resolved in the near future **/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<div class="row">
<div class="col-xs-12 col-md-12">
<ds-clarin-ref-box [item]="object"></ds-clarin-ref-box>
<ng-container *ngIf="mediaViewer.image">
<ds-media-viewer [item]="object" [videoOptions]="mediaViewer.video"></ds-media-viewer>
</ng-container>
<div *ngIf="mediaViewer.image || mediaViewer.video" class="mb-2">
<ds-themed-media-viewer [item]="object"></ds-themed-media-viewer>
</div>
<ds-clarin-generic-item-field [item]="object"
[fields]="['dc.contributor.author', 'dc.creator']"
[label]="'relationships.isAuthorOf'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<div class="row">
<div class="col-xs-12 col-md-12">
<ds-clarin-ref-box [item]="object"></ds-clarin-ref-box>
<ng-container *ngIf="mediaViewer.image">
<ds-media-viewer [item]="object" [videoOptions]="mediaViewer.video"></ds-media-viewer>
</ng-container>
<div *ngIf="mediaViewer.image || mediaViewer.video" class="mb-2">
<ds-themed-media-viewer [item]="object"></ds-themed-media-viewer>
</div>
<ds-clarin-generic-item-field [item]="object"
[fields]="['dc.contributor.author', 'dc.creator']"
[label]="'relationships.isAuthorOf'"
Expand Down
4 changes: 2 additions & 2 deletions src/app/item-page/versions/item-versions.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h2 *ngIf="displayTitle">{{"item.version.history.head" | translate}}</h2>
<thead>
<tr>
<th scope="col">{{"item.version.history.table.version" | translate}}</th>
<th scope="col" *ngIf="(showSubmitter() | async)">{{"item.version.history.table.editor" | translate}}</th>
<th scope="col" *ngIf="(showSubmitter$ | async)">{{"item.version.history.table.editor" | translate}}</th>
<th scope="col">{{"item.version.history.table.date" | translate}}</th>
<th scope="col">{{"item.version.history.table.summary" | translate}}</th>
</tr>
Expand Down Expand Up @@ -87,7 +87,7 @@ <h2 *ngIf="displayTitle">{{"item.version.history.head" | translate}}</h2>
</ng-container>
</ng-container>
</td>
<td class="version-row-element-editor" *ngIf="(showSubmitter() | async)">
<td class="version-row-element-editor" *ngIf="(showSubmitter$ | async)">
{{version?.submitterName}}
</td>
<td class="version-row-element-date">
Expand Down
3 changes: 1 addition & 2 deletions src/app/search-page/search-page.component.html
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
<ds-clarin-search></ds-clarin-search>
<ds-search-tracker></ds-search-tracker>
<ds-themed-search [showCsvExport]="true" [trackStatistics]="true"></ds-themed-search>
2 changes: 1 addition & 1 deletion src/app/shared/form/form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export class FormComponent implements OnDestroy, OnInit {
const model: DynamicFormControlModel = this.formBuilderService.findById(fieldId, formModel);

// Check if field has nested input fields
if (field instanceof FormGroup && isNotEmpty(field?.controls)) {
if (field instanceof UntypedFormGroup && isNotEmpty(field?.controls)) {
// For input field which consist of more input fields e.g. DynamicComplexModel
// add error for every input field
Object.keys(field.controls).forEach((nestedInputName, nestedInputIndex) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ export class ItemSearchResultListElementSubmissionComponent extends SearchResult
*/
showThumbnails: boolean;

/**
* Display thumbnails if required by configuration
*/
showThumbnails: boolean;

ngOnInit() {
super.ngOnInit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class ClarinSearchComponent extends SearchComponent implements OnInit {
);
const searchOptions$: Observable<PaginatedSearchOptions> = this.getSearchOptions().pipe(distinctUntilChanged());

this.sub = combineLatest([configuration$, searchSortOptions$, searchOptions$, sortOption$]).pipe(
this.subs.push(combineLatest([configuration$, searchSortOptions$, searchOptions$, sortOption$]).pipe(
filter(([configuration, searchSortOptions, searchOptions, sortOption]: [string, SortOptions[], PaginatedSearchOptions, SortOptions]) => {
// filter for search options related to instanced paginated id
return searchOptions.pagination.id === this.paginationId;
Expand Down Expand Up @@ -115,6 +115,6 @@ export class ClarinSearchComponent extends SearchComponent implements OnInit {
this.retrieveSearchResults(newSearchOptions);
this.retrieveFilters(searchOptions);
}
});
}));
}
}
2 changes: 1 addition & 1 deletion src/app/shared/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export class SearchComponent implements OnInit {
* @param searchOptions
* @private
*/
private retrieveFilters(searchOptions: PaginatedSearchOptions) {
protected retrieveFilters(searchOptions: PaginatedSearchOptions) {
this.filtersRD$.next(null);
this.searchConfigService.getConfig(searchOptions.scope, searchOptions.configuration).pipe(
getFirstCompletedRemoteData(),
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/search/themed-search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class ThemedSearchComponent extends ThemedComponent<SearchComponent> {
}

protected importThemedComponent(themeName: string): Promise<any> {
return import(`../../../themes/${themeName}/app/shared/search/search.component`);
return import(`../../../themes/${themeName}/app/shared/search/clarin-search/search.component`);
}

protected importUnthemedComponent(): Promise<any> {
Expand Down

0 comments on commit d4348b8

Please sign in to comment.