-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'alex/w2p-100839_created-themeable-brows…
…e-by-component_contribute-7.2' into atmire-contributions-august_contribute-7.6 # Conflicts: # src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts # src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.html # src/app/shared/shared.module.ts # src/themes/custom/entry-components.ts # src/themes/custom/lazy-theme.module.ts
- Loading branch information
Showing
13 changed files
with
135 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import { Component, Input, Output, EventEmitter } from '@angular/core'; | ||
import { ThemedComponent } from '../theme-support/themed.component'; | ||
import { BrowseByComponent } from './browse-by.component'; | ||
import { Observable } from 'rxjs'; | ||
import { RemoteData } from '../../core/data/remote-data'; | ||
import { PaginatedList } from '../../core/data/paginated-list.model'; | ||
import { ListableObject } from '../object-collection/shared/listable-object.model'; | ||
import { PaginationComponentOptions } from '../pagination/pagination-component-options.model'; | ||
import { SortOptions, SortDirection } from '../../core/cache/models/sort-options.model'; | ||
import { StartsWithType } from '../starts-with/starts-with-decorator'; | ||
|
||
/** | ||
* Themed wrapper for {@link BrowseByComponent} | ||
*/ | ||
@Component({ | ||
selector: 'ds-themed-browse-by', | ||
styleUrls: [], | ||
templateUrl: '../theme-support/themed.component.html', | ||
}) | ||
export class ThemedBrowseByComponent extends ThemedComponent<BrowseByComponent> { | ||
|
||
@Input() title: string; | ||
|
||
@Input() parentname: string; | ||
|
||
@Input() objects$: Observable<RemoteData<PaginatedList<ListableObject>>>; | ||
|
||
@Input() paginationConfig: PaginationComponentOptions; | ||
|
||
@Input() sortConfig: SortOptions; | ||
|
||
@Input() type: StartsWithType; | ||
|
||
@Input() startsWithOptions: number[]; | ||
|
||
@Input() showPaginator: boolean; | ||
|
||
@Input() hideGear: boolean; | ||
|
||
@Output() prev: EventEmitter<boolean> = new EventEmitter(); | ||
|
||
@Output() next: EventEmitter<boolean> = new EventEmitter(); | ||
|
||
@Output() pageSizeChange: EventEmitter<number> = new EventEmitter(); | ||
|
||
@Output() sortDirectionChange: EventEmitter<SortDirection> = new EventEmitter(); | ||
|
||
protected inAndOutputNames: (keyof BrowseByComponent & keyof this)[] = [ | ||
'title', | ||
'parentname', | ||
'objects$', | ||
'paginationConfig', | ||
'sortConfig', | ||
'type', | ||
'startsWithOptions', | ||
'showPaginator', | ||
'hideGear', | ||
'prev', | ||
'next', | ||
'pageSizeChange', | ||
'sortDirectionChange', | ||
]; | ||
|
||
protected getComponentName(): string { | ||
return 'BrowseByComponent'; | ||
} | ||
|
||
protected importThemedComponent(themeName: string): Promise<any> { | ||
return import(`../../../themes/${themeName}/app/shared/browse-by/browse-by.component.ts`); | ||
} | ||
|
||
protected importUnthemedComponent(): Promise<any> { | ||
return import('./browse-by.component'); | ||
} | ||
|
||
} |
Empty file.
Empty file.
17 changes: 17 additions & 0 deletions
17
src/themes/custom/app/shared/browse-by/browse-by.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Component } from '@angular/core'; | ||
import { fadeIn, fadeInOut } from '../../../../../app/shared/animations/fade'; | ||
import { BrowseByComponent as BaseComponent } from '../../../../../app/shared/browse-by/browse-by.component'; | ||
|
||
@Component({ | ||
selector: 'ds-browse-by', | ||
// styleUrls: ['./browse-by.component.scss'], | ||
styleUrls: ['../../../../../app/shared/browse-by/browse-by.component.scss'], | ||
// templateUrl: './browse-by.component.html', | ||
templateUrl: '../../../../../app/shared/browse-by/browse-by.component.html', | ||
animations: [ | ||
fadeIn, | ||
fadeInOut, | ||
], | ||
}) | ||
export class BrowseByComponent extends BaseComponent { | ||
} |
Empty file.
Empty file.
19 changes: 19 additions & 0 deletions
19
...m/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Component } from '@angular/core'; | ||
import { BrowseEntry } from '../../../../../../app/core/shared/browse-entry.model'; | ||
import { ViewMode } from '../../../../../../app/core/shared/view-mode.model'; | ||
import { listableObjectComponent } from '../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator'; | ||
import { Context } from '../../../../../../app/core/shared/context.model'; | ||
import { | ||
BrowseEntryListElementComponent as BaseComponent | ||
} from '../../../../../../app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component'; | ||
|
||
@Component({ | ||
selector: 'ds-browse-entry-list-element', | ||
// styleUrls: ['./browse-entry-list-element.component.scss'], | ||
styleUrls: ['../../../../../../app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.scss'], | ||
// templateUrl: './browse-entry-list-element.component.html', | ||
templateUrl: '../../../../../../app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.html', | ||
}) | ||
@listableObjectComponent(BrowseEntry, ViewMode.ListElement, Context.Any, 'custom') | ||
export class BrowseEntryListElementComponent extends BaseComponent { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters