Skip to content

Commit

Permalink
Various fixes so things build properly
Browse files Browse the repository at this point in the history
  • Loading branch information
ybnd committed Mar 1, 2024
1 parent 07ff82f commit f2ab19b
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/app/register-email-form/register-email-form.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SharedModule } from '../shared/shared.module';
import { RegisterEmailFormComponent } from './register-email-form.component';
import { ThemedRegisterEmailFormComponent } from './themed-registry-email-form.component';
import { ThemedRegisterEmailFormComponent } from './themed-register-email-form.component';

const DECLARATIONS = [
RegisterEmailFormComponent,
Expand Down
113 changes: 100 additions & 13 deletions src/app/search-page/themed-configuration-search-page.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Component, Input } from '@angular/core';
import { ThemedComponent } from '../shared/theme-support/themed.component';
import { ConfigurationSearchPageComponent } from './configuration-search-page.component';
import { Observable } from 'rxjs';
import { Context } from '../core/shared/context.model';
import { ViewMode } from '../core/shared/view-mode.model';
import { SelectionConfig } from '../shared/search/search-results/search-results.component';
import { CollectionElementLinkType } from '../shared/object-collection/collection-element-link.type';
import { SearchConfigurationOption } from '../shared/search/search-switch-configuration/search-configuration-option.model';

/**
* Themed wrapper for ConfigurationSearchPageComponent
Expand All @@ -13,45 +16,129 @@ import { Context } from '../core/shared/context.model';
templateUrl: '../shared/theme-support/themed.component.html',
})
export class ThemedConfigurationSearchPageComponent extends ThemedComponent<ConfigurationSearchPageComponent> {
/**
* The list of available configuration options
*/
@Input() configurationList: SearchConfigurationOption[] = [];

/**
* The current context
* If empty, 'search' is used
*/
@Input() context: Context = Context.Search;

/**
* The configuration to use for the search options
* If empty, the configuration will be determined by the route parameter called 'configuration'
* If empty, 'default' is used
*/
@Input() configuration: string;
@Input() configuration;

/**
* The actual query for the fixed filter.
* If empty, the query will be determined by the route parameter called 'filter'
*/
@Input() fixedFilterQuery: string;

/**
* If this is true, the request will only be sent if there's
* no valid cached version. Defaults to true
*/
@Input() useCachedVersionIfAvailable = true;

/**
* True when the search component should show results on the current page
*/
@Input() inPlaceSearch: boolean;
@Input() inPlaceSearch = true;

/**
* The link type of the listed search results
*/
@Input() linkType: CollectionElementLinkType;

/**
* The pagination id used in the search
*/
@Input() paginationId = 'spc';

/**
* Whether or not the search bar should be visible
*/
@Input() searchEnabled: boolean;
@Input() searchEnabled = true;

/**
* The width of the sidebar (bootstrap columns)
*/
@Input()
sideBarWidth: number;
@Input() sideBarWidth = 3;

/**
* The currently applied configuration (determines title of search)
* The placeholder of the search form input
*/
@Input()
configuration$: Observable<string>;
@Input() searchFormPlaceholder = 'search.search-form.placeholder';

/**
* The current context
* A boolean representing if result entries are selectable
*/
@Input() selectable = false;

/**
* The config option used for selection functionality
*/
@Input() selectionConfig: SelectionConfig;

/**
* A boolean representing if show csv export button
*/
@Input() showCsvExport = false;

/**
* A boolean representing if show search sidebar button
*/
@Input() showSidebar = true;

/**
* Whether to show the thumbnail preview
*/
@Input() showThumbnails;

/**
* Whether to show the view mode switch
*/
@Input() showViewModes = true;

/**
* List of available view mode
*/
@Input() useUniquePageId: boolean;

/**
* List of available view mode
*/
@Input() viewModeList: ViewMode[];

/**
* Defines whether or not to show the scope selector
*/
@Input() showScopeSelector = true;

/**
* Whether or not to track search statistics by sending updates to the rest api
*/
@Input() trackStatistics = false;

/**
* The default value for the search query when none is already defined in the {@link SearchConfigurationService}
*/
@Input() query: string;

/**
* The fallback scope when no scope is defined in the url, if this is also undefined no scope will be set
*/
@Input() scope: string;

/**
* Hides the scope in the url, this can be useful when you hardcode the scope in another way
*/
@Input()
context: Context;
@Input() hideScopeInUrl: boolean;

protected inAndOutputNames: (keyof ConfigurationSearchPageComponent & keyof this)[] =
['context', 'configuration', 'fixedFilterQuery', 'inPlaceSearch', 'searchEnabled', 'sideBarWidth'];
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/shared.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ import { EpersonSearchBoxComponent } from './eperson-group-list/eperson-search-b
import { GroupSearchBoxComponent } from './eperson-group-list/group-search-box/group-search-box.component';
import {
ThemedItemPageTitleFieldComponent
} from '../item-page/simple/field-components/specific-field/title/themed-item-page-field.component';
} from '../item-page/simple/field-components/specific-field/title/themed-item-page-title-field.component';
import { BitstreamListItemComponent } from './object-list/bitstream-list-item/bitstream-list-item.component';
import { NgxPaginationModule } from 'ngx-pagination';
import { SplitPipe } from './utils/split.pipe';
Expand Down

0 comments on commit f2ab19b

Please sign in to comment.