mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 05:23:06 +00:00
[CST-5249] Fixed compilation issues
This commit is contained in:
@@ -42,7 +42,6 @@ import { Router, ActivatedRoute } from '@angular/router';
|
|||||||
import {NOTIFICATIONS_RECITER_SUGGESTION_PATH} from "../admin-notifications/admin-notifications-routing-paths";
|
import {NOTIFICATIONS_RECITER_SUGGESTION_PATH} from "../admin-notifications/admin-notifications-routing-paths";
|
||||||
import { MenuID } from '../../shared/menu/menu-id.model';
|
import { MenuID } from '../../shared/menu/menu-id.model';
|
||||||
import { MenuItemType } from '../../shared/menu/menu-item-type.model';
|
import { MenuItemType } from '../../shared/menu/menu-item-type.model';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component representing the admin sidebar
|
* Component representing the admin sidebar
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
import { autoserialize, deserialize } from 'cerialize';
|
import { autoserialize, deserialize } from 'cerialize';
|
||||||
|
|
||||||
import { CacheableObject } from '../../../cache/object-cache.reducer';
|
|
||||||
import { SUGGESTION_SOURCE } from './openaire-suggestion-objects.resource-type';
|
import { SUGGESTION_SOURCE } from './openaire-suggestion-objects.resource-type';
|
||||||
import { excludeFromEquals } from '../../../utilities/equals.decorators';
|
import { excludeFromEquals } from '../../../utilities/equals.decorators';
|
||||||
import { ResourceType } from '../../../shared/resource-type';
|
import { ResourceType } from '../../../shared/resource-type';
|
||||||
import { HALLink } from '../../../shared/hal-link.model';
|
import { HALLink } from '../../../shared/hal-link.model';
|
||||||
import { typedObject } from '../../../cache/builders/build-decorators';
|
import { typedObject } from '../../../cache/builders/build-decorators';
|
||||||
|
import {CacheableObject} from "../../../cache/cacheable-object.model";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The interface representing the Suggestion Source model
|
* The interface representing the Suggestion Source model
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
import { autoserialize, deserialize } from 'cerialize';
|
import { autoserialize, deserialize } from 'cerialize';
|
||||||
|
|
||||||
import { CacheableObject } from '../../../cache/object-cache.reducer';
|
|
||||||
import { SUGGESTION_TARGET } from './openaire-suggestion-objects.resource-type';
|
import { SUGGESTION_TARGET } from './openaire-suggestion-objects.resource-type';
|
||||||
import { excludeFromEquals } from '../../../utilities/equals.decorators';
|
import { excludeFromEquals } from '../../../utilities/equals.decorators';
|
||||||
import { ResourceType } from '../../../shared/resource-type';
|
import { ResourceType } from '../../../shared/resource-type';
|
||||||
import { HALLink } from '../../../shared/hal-link.model';
|
import { HALLink } from '../../../shared/hal-link.model';
|
||||||
import { typedObject } from '../../../cache/builders/build-decorators';
|
import { typedObject } from '../../../cache/builders/build-decorators';
|
||||||
|
import {CacheableObject} from "../../../cache/cacheable-object.model";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The interface representing the Suggestion Target model
|
* The interface representing the Suggestion Target model
|
||||||
|
@@ -1,12 +1,12 @@
|
|||||||
import { autoserialize, autoserializeAs, deserialize } from 'cerialize';
|
import { autoserialize, autoserializeAs, deserialize } from 'cerialize';
|
||||||
|
|
||||||
import { CacheableObject } from '../../../cache/object-cache.reducer';
|
|
||||||
import { SUGGESTION } from './openaire-suggestion-objects.resource-type';
|
import { SUGGESTION } from './openaire-suggestion-objects.resource-type';
|
||||||
import { excludeFromEquals } from '../../../utilities/equals.decorators';
|
import { excludeFromEquals } from '../../../utilities/equals.decorators';
|
||||||
import { ResourceType } from '../../../shared/resource-type';
|
import { ResourceType } from '../../../shared/resource-type';
|
||||||
import { HALLink } from '../../../shared/hal-link.model';
|
import { HALLink } from '../../../shared/hal-link.model';
|
||||||
import { typedObject } from '../../../cache/builders/build-decorators';
|
import { typedObject } from '../../../cache/builders/build-decorators';
|
||||||
import { MetadataMap, MetadataMapSerializer } from '../../../shared/metadata.models';
|
import { MetadataMap, MetadataMapSerializer } from '../../../shared/metadata.models';
|
||||||
|
import {CacheableObject} from "../../../cache/cacheable-object.model";
|
||||||
|
|
||||||
export interface SuggestionEvidences {
|
export interface SuggestionEvidences {
|
||||||
[sectionId: string]: {
|
[sectionId: string]: {
|
||||||
|
@@ -4,14 +4,12 @@ import { Store } from '@ngrx/store';
|
|||||||
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
import { CoreState } from '../../core.reducers';
|
|
||||||
import { HALEndpointService } from '../../shared/hal-endpoint.service';
|
import { HALEndpointService } from '../../shared/hal-endpoint.service';
|
||||||
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../../cache/builders/remote-data-build.service';
|
||||||
import { ObjectCacheService } from '../../cache/object-cache.service';
|
import { ObjectCacheService } from '../../cache/object-cache.service';
|
||||||
import { dataService } from '../../cache/builders/build-decorators';
|
import { dataService } from '../../cache/builders/build-decorators';
|
||||||
import { RequestService } from '../../data/request.service';
|
import { RequestService } from '../../data/request.service';
|
||||||
import { FindListOptions } from '../../data/request.models';
|
|
||||||
import { DataService } from '../../data/data.service';
|
import { DataService } from '../../data/data.service';
|
||||||
import { ChangeAnalyzer } from '../../data/change-analyzer';
|
import { ChangeAnalyzer } from '../../data/change-analyzer';
|
||||||
import { DefaultChangeAnalyzer } from '../../data/default-change-analyzer.service';
|
import { DefaultChangeAnalyzer } from '../../data/default-change-analyzer.service';
|
||||||
@@ -24,6 +22,8 @@ import { OpenaireSuggestionTarget } from './models/openaire-suggestion-target.mo
|
|||||||
import { OpenaireSuggestion } from './models/openaire-suggestion.model';
|
import { OpenaireSuggestion } from './models/openaire-suggestion.model';
|
||||||
import { RequestParam } from '../../cache/models/request-param.model';
|
import { RequestParam } from '../../cache/models/request-param.model';
|
||||||
import { NoContent } from '../../shared/NoContent.model';
|
import { NoContent } from '../../shared/NoContent.model';
|
||||||
|
import {CoreState} from "../../core-state.model";
|
||||||
|
import {FindListOptions} from "../../data/find-list-options.model";
|
||||||
|
|
||||||
/* tslint:disable:max-classes-per-file */
|
/* tslint:disable:max-classes-per-file */
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import {HttpClient, HttpHeaders} from '@angular/common/http';
|
||||||
|
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { dataService } from '../cache/builders/build-decorators';
|
import { dataService } from '../cache/builders/build-decorators';
|
||||||
@@ -17,6 +17,10 @@ import { FollowLinkConfig } from '../../shared/utils/follow-link-config.model';
|
|||||||
import { RequestParam } from '../cache/models/request-param.model';
|
import { RequestParam } from '../cache/models/request-param.model';
|
||||||
import { CoreState } from '../core-state.model';
|
import { CoreState } from '../core-state.model';
|
||||||
import { FindListOptions } from '../data/find-list-options.model';
|
import { FindListOptions } from '../data/find-list-options.model';
|
||||||
|
import {HttpOptions} from "../dspace-rest/dspace-rest.service";
|
||||||
|
import {find, map} from "rxjs/operators";
|
||||||
|
import {PostRequest} from "../data/request.models";
|
||||||
|
import {hasValue} from "../../shared/empty.util";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A service that provides methods to make REST requests with workspaceitems endpoint.
|
* A service that provides methods to make REST requests with workspaceitems endpoint.
|
||||||
@@ -57,4 +61,29 @@ export class WorkspaceitemDataService extends DataService<WorkspaceItem> {
|
|||||||
return this.findByHref(href$, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
|
return this.findByHref(href$, useCachedVersionIfAvailable, reRequestOnStale, ...linksToFollow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Import an external source entry into a collection
|
||||||
|
* @param externalSourceEntryHref
|
||||||
|
* @param collectionId
|
||||||
|
*/
|
||||||
|
public importExternalSourceEntry(externalSourceEntryHref: string, collectionId: string): Observable<RemoteData<WorkspaceItem>> {
|
||||||
|
const options: HttpOptions = Object.create({});
|
||||||
|
let headers = new HttpHeaders();
|
||||||
|
headers = headers.append('Content-Type', 'text/uri-list');
|
||||||
|
options.headers = headers;
|
||||||
|
|
||||||
|
const requestId = this.requestService.generateRequestId();
|
||||||
|
const href$ = this.halService.getEndpoint(this.linkPath).pipe(map((href) => `${href}?owningCollection=${collectionId}`));
|
||||||
|
|
||||||
|
href$.pipe(
|
||||||
|
find((href: string) => hasValue(href)),
|
||||||
|
map((href: string) => {
|
||||||
|
const request = new PostRequest(requestId, href, externalSourceEntryHref, options);
|
||||||
|
this.requestService.send(request);
|
||||||
|
})
|
||||||
|
).subscribe();
|
||||||
|
|
||||||
|
return this.rdbService.buildFromRequestUUID(requestId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
5
src/app/openaire/openaire.effects.ts
Normal file
5
src/app/openaire/openaire.effects.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import { SuggestionTargetsEffects } from './reciter-suggestions/suggestion-targets/suggestion-targets.effects';
|
||||||
|
|
||||||
|
export const openaireEffects = [
|
||||||
|
SuggestionTargetsEffects
|
||||||
|
];
|
@@ -18,12 +18,14 @@ import { SuggestionsPopupComponent } from './reciter-suggestions/suggestions-pop
|
|||||||
import { SuggestionsNotificationComponent } from './reciter-suggestions/suggestions-notification/suggestions-notification.component';
|
import { SuggestionsNotificationComponent } from './reciter-suggestions/suggestions-notification/suggestions-notification.component';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { SearchModule } from '../shared/search/search.module';
|
import { SearchModule } from '../shared/search/search.module';
|
||||||
|
import {openaireEffects} from "./openaire.effects";
|
||||||
|
|
||||||
const MODULES = [
|
const MODULES = [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
SharedModule,
|
SharedModule,
|
||||||
CoreModule.forRoot(),
|
CoreModule.forRoot(),
|
||||||
StoreModule.forFeature('openaire', openaireReducers, storeModuleConfig as StoreConfig<OpenaireState, Action>),
|
StoreModule.forFeature('openaire', openaireReducers, storeModuleConfig as StoreConfig<OpenaireState, Action>),
|
||||||
|
EffectsModule.forFeature(openaireEffects),
|
||||||
TranslateModule
|
TranslateModule
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
import { createSelector, MemoizedSelector } from '@ngrx/store';
|
import {createFeatureSelector, createSelector, MemoizedSelector} from '@ngrx/store';
|
||||||
import { subStateSelector } from '../../shared/selector.util';
|
|
||||||
import { openaireSelector, OpenaireState } from '../openaire.reducer';
|
import { openaireSelector, OpenaireState } from '../openaire.reducer';
|
||||||
import { OpenaireSuggestionTarget } from '../../core/openaire/reciter-suggestions/models/openaire-suggestion-target.model';
|
import { OpenaireSuggestionTarget } from '../../core/openaire/reciter-suggestions/models/openaire-suggestion-target.model';
|
||||||
import { SuggestionTargetState } from './suggestion-targets/suggestion-targets.reducer';
|
import { SuggestionTargetState } from './suggestion-targets/suggestion-targets.reducer';
|
||||||
|
import {subStateSelector} from "../../submission/selectors";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Reciter Suggestion Target state.
|
* Returns the Reciter Suggestion Target state.
|
||||||
@@ -10,7 +10,7 @@ import { SuggestionTargetState } from './suggestion-targets/suggestion-targets.r
|
|||||||
* @param {AppState} state Top level state.
|
* @param {AppState} state Top level state.
|
||||||
* @return {OpenaireState}
|
* @return {OpenaireState}
|
||||||
*/
|
*/
|
||||||
const _getReciterSuggestionTargetState = (state: any) => state.openaire;
|
const _getReciterSuggestionTargetState = createFeatureSelector<OpenaireState>('openaire');
|
||||||
|
|
||||||
// Reciter Suggestion Targets
|
// Reciter Suggestion Targets
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
[showLabel]="false"
|
[showLabel]="false"
|
||||||
[object]="listableObject"
|
[object]="listableObject"
|
||||||
[linkType]="0"
|
[linkType]="0"
|
||||||
[hideMetrics]="true"
|
|
||||||
></ds-item-search-result-list-element>
|
></ds-item-search-result-list-element>
|
||||||
<!-- Actions -->
|
<!-- Actions -->
|
||||||
<ds-suggestion-actions class="parent mt-2" [hasEvidence]="hasEvidences()"
|
<ds-suggestion-actions class="parent mt-2" [hasEvidence]="hasEvidences()"
|
||||||
|
@@ -8,7 +8,6 @@
|
|||||||
[paginationOptions]="paginationConfig"
|
[paginationOptions]="paginationConfig"
|
||||||
[collectionSize]="(totalElements$ | async)"
|
[collectionSize]="(totalElements$ | async)"
|
||||||
[hideGear]="false"
|
[hideGear]="false"
|
||||||
[hideSortOptions]="true"
|
|
||||||
[retainScrollPosition]="false"
|
[retainScrollPosition]="false"
|
||||||
(paginationChange)="getSuggestionTargets()">
|
(paginationChange)="getSuggestionTargets()">
|
||||||
|
|
||||||
|
@@ -81,7 +81,7 @@ export class SuggestionTargetsEffects {
|
|||||||
return this.store$.select((state: any) => state.core.auth.user)
|
return this.store$.select((state: any) => state.core.auth.user)
|
||||||
.pipe(
|
.pipe(
|
||||||
switchMap((user: EPerson) => {
|
switchMap((user: EPerson) => {
|
||||||
return this.suggestionsService.retrieveCurrentUserSuggestions(user)
|
return this.suggestionsService.retrieveCurrentUserSuggestions(user.uuid)
|
||||||
.pipe(
|
.pipe(
|
||||||
map((suggestionTargets: OpenaireSuggestionTarget[]) => new AddUserSuggestionsAction(suggestionTargets)),
|
map((suggestionTargets: OpenaireSuggestionTarget[]) => new AddUserSuggestionsAction(suggestionTargets)),
|
||||||
catchError((errors) => of(errors))
|
catchError((errors) => of(errors))
|
||||||
|
@@ -5,7 +5,6 @@ import { catchError, map, mergeMap, take } from 'rxjs/operators';
|
|||||||
|
|
||||||
import { OpenaireSuggestionsDataService } from '../../core/openaire/reciter-suggestions/openaire-suggestions-data.service';
|
import { OpenaireSuggestionsDataService } from '../../core/openaire/reciter-suggestions/openaire-suggestions-data.service';
|
||||||
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
|
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
|
||||||
import { FindListOptions } from '../../core/data/request.models';
|
|
||||||
import { RemoteData } from '../../core/data/remote-data';
|
import { RemoteData } from '../../core/data/remote-data';
|
||||||
import { PaginatedList } from '../../core/data/paginated-list.model';
|
import { PaginatedList } from '../../core/data/paginated-list.model';
|
||||||
import { OpenaireSuggestionTarget } from '../../core/openaire/reciter-suggestions/models/openaire-suggestion-target.model';
|
import { OpenaireSuggestionTarget } from '../../core/openaire/reciter-suggestions/models/openaire-suggestion-target.model';
|
||||||
@@ -25,8 +24,9 @@ import { WorkspaceitemDataService } from '../../core/submission/workspaceitem-da
|
|||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { NoContent } from '../../core/shared/NoContent.model';
|
import { NoContent } from '../../core/shared/NoContent.model';
|
||||||
import { environment } from '../../../environments/environment';
|
import { environment } from '../../../environments/environment';
|
||||||
import { SuggestionConfig } from '../../../config/layout-config.interfaces';
|
|
||||||
import { WorkspaceItem } from '../../core/submission/models/workspaceitem.model';
|
import { WorkspaceItem } from '../../core/submission/models/workspaceitem.model';
|
||||||
|
import {FindListOptions} from "../../core/data/find-list-options.model";
|
||||||
|
import {SuggestionConfig} from "../../../config/layout-config.interfaces";
|
||||||
|
|
||||||
export interface SuggestionBulkResult {
|
export interface SuggestionBulkResult {
|
||||||
success: number;
|
success: number;
|
||||||
@@ -142,11 +142,11 @@ export class SuggestionsService {
|
|||||||
/**
|
/**
|
||||||
* Retrieve suggestion targets for the given user
|
* Retrieve suggestion targets for the given user
|
||||||
*
|
*
|
||||||
* @param user
|
* @param userUuid
|
||||||
* The EPerson object for which to retrieve suggestion targets
|
* The EPerson id for which to retrieve suggestion targets
|
||||||
*/
|
*/
|
||||||
public retrieveCurrentUserSuggestions(user: EPerson): Observable<OpenaireSuggestionTarget[]> {
|
public retrieveCurrentUserSuggestions(userUuid: string): Observable<OpenaireSuggestionTarget[]> {
|
||||||
return this.researcherProfileService.findById(user.uuid).pipe(
|
return this.researcherProfileService.findById(userUuid).pipe(
|
||||||
mergeMap((profile: ResearcherProfile) => {
|
mergeMap((profile: ResearcherProfile) => {
|
||||||
if (isNotEmpty(profile)) {
|
if (isNotEmpty(profile)) {
|
||||||
return this.researcherProfileService.findRelatedItemId(profile).pipe(
|
return this.researcherProfileService.findRelatedItemId(profile).pipe(
|
||||||
|
@@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core';
|
|||||||
import { SortDirection, SortOptions, } from '../core/cache/models/sort-options.model';
|
import { SortDirection, SortOptions, } from '../core/cache/models/sort-options.model';
|
||||||
import { PaginatedList } from '../core/data/paginated-list.model';
|
import { PaginatedList } from '../core/data/paginated-list.model';
|
||||||
import { RemoteData } from '../core/data/remote-data';
|
import { RemoteData } from '../core/data/remote-data';
|
||||||
import { getFirstSucceededRemoteDataPayload, redirectOn4xx } from '../core/shared/operators';
|
import { getFirstSucceededRemoteDataPayload } from '../core/shared/operators';
|
||||||
import { SuggestionBulkResult, SuggestionsService } from '../openaire/reciter-suggestions/suggestions.service';
|
import { SuggestionBulkResult, SuggestionsService } from '../openaire/reciter-suggestions/suggestions.service';
|
||||||
import { PaginationComponentOptions } from '../shared/pagination/pagination-component-options.model';
|
import { PaginationComponentOptions } from '../shared/pagination/pagination-component-options.model';
|
||||||
import { OpenaireSuggestion } from '../core/openaire/reciter-suggestions/models/openaire-suggestion.model';
|
import { OpenaireSuggestion } from '../core/openaire/reciter-suggestions/models/openaire-suggestion.model';
|
||||||
@@ -19,8 +19,9 @@ import { NotificationsService } from '../shared/notifications/notifications.serv
|
|||||||
import { SuggestionTargetsStateService } from '../openaire/reciter-suggestions/suggestion-targets/suggestion-targets.state.service';
|
import { SuggestionTargetsStateService } from '../openaire/reciter-suggestions/suggestion-targets/suggestion-targets.state.service';
|
||||||
import { WorkspaceitemDataService } from '../core/submission/workspaceitem-data.service';
|
import { WorkspaceitemDataService } from '../core/submission/workspaceitem-data.service';
|
||||||
import { PaginationService } from '../core/pagination/pagination.service';
|
import { PaginationService } from '../core/pagination/pagination.service';
|
||||||
import { FindListOptions } from '../core/data/request.models';
|
|
||||||
import { WorkspaceItem } from '../core/submission/models/workspaceitem.model';
|
import { WorkspaceItem } from '../core/submission/models/workspaceitem.model';
|
||||||
|
import {FindListOptions} from "../core/data/find-list-options.model";
|
||||||
|
import {redirectOn4xx} from "../core/shared/authorized.operators";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-suggestion-page',
|
selector: 'ds-suggestion-page',
|
||||||
|
@@ -14,6 +14,7 @@ import { AuthConfig } from './auth-config.interfaces';
|
|||||||
import { UIServerConfig } from './ui-server-config.interface';
|
import { UIServerConfig } from './ui-server-config.interface';
|
||||||
import { MediaViewerConfig } from './media-viewer-config.interface';
|
import { MediaViewerConfig } from './media-viewer-config.interface';
|
||||||
import { BrowseByConfig } from './browse-by-config.interface';
|
import { BrowseByConfig } from './browse-by-config.interface';
|
||||||
|
import {SuggestionConfig} from "./layout-config.interfaces";
|
||||||
|
|
||||||
interface AppConfig extends Config {
|
interface AppConfig extends Config {
|
||||||
ui: UIServerConfig;
|
ui: UIServerConfig;
|
||||||
@@ -32,6 +33,7 @@ interface AppConfig extends Config {
|
|||||||
collection: CollectionPageConfig;
|
collection: CollectionPageConfig;
|
||||||
themes: ThemeConfig[];
|
themes: ThemeConfig[];
|
||||||
mediaViewer: MediaViewerConfig;
|
mediaViewer: MediaViewerConfig;
|
||||||
|
suggestion: SuggestionConfig[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const APP_CONFIG = new InjectionToken<AppConfig>('APP_CONFIG');
|
const APP_CONFIG = new InjectionToken<AppConfig>('APP_CONFIG');
|
||||||
|
@@ -14,6 +14,7 @@ import { ServerConfig } from './server-config.interface';
|
|||||||
import { SubmissionConfig } from './submission-config.interface';
|
import { SubmissionConfig } from './submission-config.interface';
|
||||||
import { ThemeConfig } from './theme.model';
|
import { ThemeConfig } from './theme.model';
|
||||||
import { UIServerConfig } from './ui-server-config.interface';
|
import { UIServerConfig } from './ui-server-config.interface';
|
||||||
|
import {SuggestionConfig} from "./layout-config.interfaces";
|
||||||
|
|
||||||
export class DefaultAppConfig implements AppConfig {
|
export class DefaultAppConfig implements AppConfig {
|
||||||
production = false;
|
production = false;
|
||||||
@@ -210,6 +211,14 @@ export class DefaultAppConfig implements AppConfig {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
suggestion: SuggestionConfig[] = [
|
||||||
|
// {
|
||||||
|
// // Use this configuration to map a suggestion import to a specific collection based on the suggestion type.
|
||||||
|
// source: 'suggestionSource',
|
||||||
|
// collectionId: 'collectionUUID'
|
||||||
|
// }
|
||||||
|
];
|
||||||
|
|
||||||
// Theme Config
|
// Theme Config
|
||||||
themes: ThemeConfig[] = [
|
themes: ThemeConfig[] = [
|
||||||
// Add additional themes here. In the case where multiple themes match a route, the first one
|
// Add additional themes here. In the case where multiple themes match a route, the first one
|
||||||
|
46
src/config/layout-config.interfaces.ts
Normal file
46
src/config/layout-config.interfaces.ts
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import { Config } from './config.interface';
|
||||||
|
|
||||||
|
export interface UrnConfig extends Config {
|
||||||
|
name: string;
|
||||||
|
baseUrl: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CrisRefConfig extends Config {
|
||||||
|
entityType: string;
|
||||||
|
icon: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CrisLayoutMetadataBoxConfig extends Config {
|
||||||
|
defaultMetadataLabelColStyle: string;
|
||||||
|
defaultMetadataValueColStyle: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CrisLayoutTypeConfig {
|
||||||
|
orientation: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface NavbarConfig extends Config {
|
||||||
|
showCommunityCollection: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CrisItemPageConfig extends Config {
|
||||||
|
[entity: string]: CrisLayoutTypeConfig;
|
||||||
|
default: CrisLayoutTypeConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export interface CrisLayoutConfig extends Config {
|
||||||
|
urn: UrnConfig[];
|
||||||
|
crisRef: CrisRefConfig[];
|
||||||
|
itemPage: CrisItemPageConfig;
|
||||||
|
metadataBox: CrisLayoutMetadataBoxConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LayoutConfig extends Config {
|
||||||
|
navbar: NavbarConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SuggestionConfig extends Config {
|
||||||
|
source: string;
|
||||||
|
collectionId: string;
|
||||||
|
}
|
Reference in New Issue
Block a user