mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[DURACOM-191] Remove menu.module, resource-policies.module and search.module
This commit is contained in:
@@ -1,54 +0,0 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { RouterModule } from '@angular/router';
|
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
|
||||||
|
|
||||||
import { MenuComponent } from './menu.component';
|
|
||||||
import { ExternalLinkMenuItemComponent } from './menu-item/external-link-menu-item.component';
|
|
||||||
import { LinkMenuItemComponent } from './menu-item/link-menu-item.component';
|
|
||||||
import { OnClickMenuItemComponent } from './menu-item/onclick-menu-item.component';
|
|
||||||
import { TextMenuItemComponent } from './menu-item/text-menu-item.component';
|
|
||||||
import { MenuSectionComponent } from './menu-section/menu-section.component';
|
|
||||||
|
|
||||||
const COMPONENTS = [
|
|
||||||
MenuSectionComponent,
|
|
||||||
MenuComponent,
|
|
||||||
];
|
|
||||||
|
|
||||||
const ENTRY_COMPONENTS = [
|
|
||||||
TextMenuItemComponent,
|
|
||||||
LinkMenuItemComponent,
|
|
||||||
OnClickMenuItemComponent,
|
|
||||||
ExternalLinkMenuItemComponent,
|
|
||||||
];
|
|
||||||
|
|
||||||
const MODULES = [
|
|
||||||
TranslateModule,
|
|
||||||
RouterModule,
|
|
||||||
CommonModule,
|
|
||||||
];
|
|
||||||
const PROVIDERS = [
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
...MODULES,
|
|
||||||
...COMPONENTS,
|
|
||||||
...ENTRY_COMPONENTS,
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
...PROVIDERS,
|
|
||||||
...ENTRY_COMPONENTS,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
...COMPONENTS,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This module handles all components, providers and modules that are needed for the menu
|
|
||||||
*/
|
|
||||||
export class MenuModule {
|
|
||||||
|
|
||||||
}
|
|
@@ -1,56 +0,0 @@
|
|||||||
/**
|
|
||||||
* The contents of this file are subject to the license and copyright
|
|
||||||
* detailed in the LICENSE and NOTICE files at the root of the source
|
|
||||||
* tree and available online at
|
|
||||||
*
|
|
||||||
* http://www.dspace.org/license/
|
|
||||||
*/
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
|
|
||||||
import { ClaimedTaskActionsApproveComponent } from './claimed-task/approve/claimed-task-actions-approve.component';
|
|
||||||
import { ClaimedTaskActionsComponent } from './claimed-task/claimed-task-actions.component';
|
|
||||||
import { ClaimedTaskActionsEditMetadataComponent } from './claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component';
|
|
||||||
import { ClaimedTaskActionsRejectComponent } from './claimed-task/reject/claimed-task-actions-reject.component';
|
|
||||||
import { ClaimedTaskActionsReturnToPoolComponent } from './claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component';
|
|
||||||
import { ClaimedTaskActionsLoaderComponent } from './claimed-task/switcher/claimed-task-actions-loader.component';
|
|
||||||
import { ItemActionsComponent } from './item/item-actions.component';
|
|
||||||
import { PoolTaskActionsComponent } from './pool-task/pool-task-actions.component';
|
|
||||||
import { WorkflowitemActionsComponent } from './workflowitem/workflowitem-actions.component';
|
|
||||||
import { WorkspaceitemActionsComponent } from './workspaceitem/workspaceitem-actions.component';
|
|
||||||
|
|
||||||
const ENTRY_COMPONENTS = [
|
|
||||||
ClaimedTaskActionsApproveComponent,
|
|
||||||
ClaimedTaskActionsRejectComponent,
|
|
||||||
ClaimedTaskActionsReturnToPoolComponent,
|
|
||||||
ClaimedTaskActionsEditMetadataComponent,
|
|
||||||
];
|
|
||||||
|
|
||||||
const DECLARATIONS = [
|
|
||||||
...ENTRY_COMPONENTS,
|
|
||||||
ClaimedTaskActionsComponent,
|
|
||||||
ClaimedTaskActionsLoaderComponent,
|
|
||||||
ItemActionsComponent,
|
|
||||||
PoolTaskActionsComponent,
|
|
||||||
WorkflowitemActionsComponent,
|
|
||||||
WorkspaceitemActionsComponent,
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This module contains Item actions used in MyDSpace
|
|
||||||
*/
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
...DECLARATIONS,
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
...ENTRY_COMPONENTS,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
...DECLARATIONS,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class MyDSpaceActionsModule {
|
|
||||||
|
|
||||||
}
|
|
@@ -1,41 +0,0 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
|
||||||
|
|
||||||
import { ResourcePolicyCreateComponent } from './create/resource-policy-create.component';
|
|
||||||
import { ResourcePolicyEditComponent } from './edit/resource-policy-edit.component';
|
|
||||||
import { ResourcePolicyEntryComponent } from './entry/resource-policy-entry.component';
|
|
||||||
import { ResourcePolicyFormComponent } from './form/resource-policy-form.component';
|
|
||||||
import { ResourcePolicyResolver } from './resolvers/resource-policy.resolver';
|
|
||||||
import { ResourcePolicyTargetResolver } from './resolvers/resource-policy-target.resolver';
|
|
||||||
import { ResourcePoliciesComponent } from './resource-policies.component';
|
|
||||||
|
|
||||||
const COMPONENTS = [
|
|
||||||
ResourcePoliciesComponent,
|
|
||||||
ResourcePolicyEntryComponent,
|
|
||||||
ResourcePolicyFormComponent,
|
|
||||||
ResourcePolicyEditComponent,
|
|
||||||
ResourcePolicyCreateComponent,
|
|
||||||
];
|
|
||||||
|
|
||||||
const PROVIDERS = [
|
|
||||||
ResourcePolicyResolver,
|
|
||||||
ResourcePolicyTargetResolver,
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
NgbModule,
|
|
||||||
CommonModule,
|
|
||||||
TranslateModule,
|
|
||||||
...COMPONENTS,
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
...PROVIDERS,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
...COMPONENTS,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class ResourcePoliciesModule { }
|
|
@@ -1,119 +0,0 @@
|
|||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import {
|
|
||||||
MissingTranslationHandler,
|
|
||||||
TranslateModule,
|
|
||||||
} from '@ngx-translate/core';
|
|
||||||
import { NouisliderModule } from 'ng2-nouislider';
|
|
||||||
|
|
||||||
import { ConfigurationSearchPageComponent } from '../../search-page/configuration-search-page.component';
|
|
||||||
import { ThemedConfigurationSearchPageComponent } from '../../search-page/themed-configuration-search-page.component';
|
|
||||||
import { MissingTranslationHelper } from '../translate/missing-translation.helper';
|
|
||||||
import { AdvancedSearchComponent } from './advanced-search/advanced-search.component';
|
|
||||||
import { FacetConfigResponse } from './models/facet-config-response.model';
|
|
||||||
import { FacetValues } from './models/facet-values.model';
|
|
||||||
import { SearchObjects } from './models/search-objects.model';
|
|
||||||
import { SearchResult } from './models/search-result.model';
|
|
||||||
import { SearchComponent } from './search.component';
|
|
||||||
import { SearchAuthorityFilterComponent } from './search-filters/search-filter/search-authority-filter/search-authority-filter.component';
|
|
||||||
import { SearchBooleanFilterComponent } from './search-filters/search-filter/search-boolean-filter/search-boolean-filter.component';
|
|
||||||
import { SearchFacetFilterComponent } from './search-filters/search-filter/search-facet-filter/search-facet-filter.component';
|
|
||||||
import { SearchFacetOptionComponent } from './search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component';
|
|
||||||
import { SearchFacetRangeOptionComponent } from './search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component';
|
|
||||||
import { SearchFacetSelectedOptionComponent } from './search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component';
|
|
||||||
import { SearchFacetFilterWrapperComponent } from './search-filters/search-filter/search-facet-filter-wrapper/search-facet-filter-wrapper.component';
|
|
||||||
import { SearchFilterComponent } from './search-filters/search-filter/search-filter.component';
|
|
||||||
import { SearchHierarchyFilterComponent } from './search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component';
|
|
||||||
import { SearchRangeFilterComponent } from './search-filters/search-filter/search-range-filter/search-range-filter.component';
|
|
||||||
import { SearchTextFilterComponent } from './search-filters/search-filter/search-text-filter/search-text-filter.component';
|
|
||||||
import { SearchFiltersComponent } from './search-filters/search-filters.component';
|
|
||||||
import { ThemedSearchFiltersComponent } from './search-filters/themed-search-filters.component';
|
|
||||||
import { SearchLabelComponent } from './search-labels/search-label/search-label.component';
|
|
||||||
import { SearchLabelsComponent } from './search-labels/search-labels.component';
|
|
||||||
import { SearchResultsComponent } from './search-results/search-results.component';
|
|
||||||
import { ThemedSearchResultsComponent } from './search-results/themed-search-results.component';
|
|
||||||
import { SearchSettingsComponent } from './search-settings/search-settings.component';
|
|
||||||
import { ThemedSearchSettingsComponent } from './search-settings/themed-search-settings.component';
|
|
||||||
import { SearchSidebarComponent } from './search-sidebar/search-sidebar.component';
|
|
||||||
import { ThemedSearchSidebarComponent } from './search-sidebar/themed-search-sidebar.component';
|
|
||||||
import { SearchSwitchConfigurationComponent } from './search-switch-configuration/search-switch-configuration.component';
|
|
||||||
import { ThemedSearchComponent } from './themed-search.component';
|
|
||||||
|
|
||||||
const COMPONENTS = [
|
|
||||||
SearchComponent,
|
|
||||||
ThemedSearchComponent,
|
|
||||||
SearchResultsComponent,
|
|
||||||
SearchSidebarComponent,
|
|
||||||
SearchSettingsComponent,
|
|
||||||
SearchFiltersComponent,
|
|
||||||
SearchFilterComponent,
|
|
||||||
SearchFacetFilterComponent,
|
|
||||||
SearchLabelsComponent,
|
|
||||||
SearchLabelComponent,
|
|
||||||
SearchFacetFilterWrapperComponent,
|
|
||||||
SearchRangeFilterComponent,
|
|
||||||
SearchTextFilterComponent,
|
|
||||||
SearchHierarchyFilterComponent,
|
|
||||||
SearchBooleanFilterComponent,
|
|
||||||
SearchFacetOptionComponent,
|
|
||||||
SearchFacetSelectedOptionComponent,
|
|
||||||
SearchFacetRangeOptionComponent,
|
|
||||||
SearchAuthorityFilterComponent,
|
|
||||||
SearchSwitchConfigurationComponent,
|
|
||||||
ConfigurationSearchPageComponent,
|
|
||||||
ThemedConfigurationSearchPageComponent,
|
|
||||||
ThemedSearchResultsComponent,
|
|
||||||
ThemedSearchSettingsComponent,
|
|
||||||
AdvancedSearchComponent,
|
|
||||||
ThemedSearchFiltersComponent,
|
|
||||||
ThemedSearchSidebarComponent,
|
|
||||||
];
|
|
||||||
|
|
||||||
const ENTRY_COMPONENTS = [
|
|
||||||
SearchFacetFilterComponent,
|
|
||||||
SearchRangeFilterComponent,
|
|
||||||
SearchTextFilterComponent,
|
|
||||||
SearchHierarchyFilterComponent,
|
|
||||||
SearchBooleanFilterComponent,
|
|
||||||
SearchFacetOptionComponent,
|
|
||||||
SearchFacetSelectedOptionComponent,
|
|
||||||
SearchFacetRangeOptionComponent,
|
|
||||||
SearchAuthorityFilterComponent,
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Declaration needed to make sure all decorator functions are called in time
|
|
||||||
*/
|
|
||||||
export const MODELS = [
|
|
||||||
SearchObjects,
|
|
||||||
FacetConfigResponse,
|
|
||||||
FacetValues,
|
|
||||||
SearchResult,
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
TranslateModule.forChild({
|
|
||||||
missingTranslationHandler: { provide: MissingTranslationHandler, useClass: MissingTranslationHelper },
|
|
||||||
useDefaultLang: true,
|
|
||||||
}),
|
|
||||||
NouisliderModule,
|
|
||||||
...COMPONENTS,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
...COMPONENTS,
|
|
||||||
],
|
|
||||||
})
|
|
||||||
export class SearchModule {
|
|
||||||
/**
|
|
||||||
* NOTE: this method allows to resolve issue with components that using a custom decorator
|
|
||||||
* which are not loaded during SSR otherwise
|
|
||||||
*/
|
|
||||||
static withEntryComponents() {
|
|
||||||
return {
|
|
||||||
ngModule: SearchModule,
|
|
||||||
providers: ENTRY_COMPONENTS.map((component) => ({ provide: component })),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
@@ -18,6 +18,7 @@ import {
|
|||||||
} from '@ngrx/store';
|
} from '@ngrx/store';
|
||||||
import { REQUEST } from '@nguniversal/express-engine/tokens';
|
import { REQUEST } from '@nguniversal/express-engine/tokens';
|
||||||
import {
|
import {
|
||||||
|
MissingTranslationHandler,
|
||||||
TranslateLoader,
|
TranslateLoader,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
} from '@ngx-translate/core';
|
} from '@ngx-translate/core';
|
||||||
@@ -54,6 +55,7 @@ import { StatisticsModule } from '../../app/statistics/statistics.module';
|
|||||||
import { SubmissionService } from '../../app/submission/submission.service';
|
import { SubmissionService } from '../../app/submission/submission.service';
|
||||||
import { TranslateBrowserLoader } from '../../ngx-translate-loaders/translate-browser.loader';
|
import { TranslateBrowserLoader } from '../../ngx-translate-loaders/translate-browser.loader';
|
||||||
import { BrowserInitService } from './browser-init.service';
|
import { BrowserInitService } from './browser-init.service';
|
||||||
|
import { MissingTranslationHelper } from '../../app/shared/translate/missing-translation.helper';
|
||||||
|
|
||||||
export const REQ_KEY = makeStateKey<string>('req');
|
export const REQ_KEY = makeStateKey<string>('req');
|
||||||
|
|
||||||
@@ -86,6 +88,8 @@ export function getRequest(transferState: TransferState): any {
|
|||||||
useFactory: (createTranslateLoader),
|
useFactory: (createTranslateLoader),
|
||||||
deps: [TransferState, HttpClient],
|
deps: [TransferState, HttpClient],
|
||||||
},
|
},
|
||||||
|
missingTranslationHandler: { provide: MissingTranslationHandler, useClass: MissingTranslationHelper },
|
||||||
|
useDefaultLang: true,
|
||||||
}),
|
}),
|
||||||
AppModule,
|
AppModule,
|
||||||
],
|
],
|
||||||
|
@@ -14,9 +14,6 @@ import { IdlePreloadModule } from 'angular-idle-preload';
|
|||||||
|
|
||||||
import { AppModule } from '../../app/app.module';
|
import { AppModule } from '../../app/app.module';
|
||||||
import { RootModule } from '../../app/root.module';
|
import { RootModule } from '../../app/root.module';
|
||||||
import { MenuModule } from '../../app/shared/menu/menu.module';
|
|
||||||
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
|
|
||||||
import { SearchModule } from '../../app/shared/search/search.module';
|
|
||||||
import { StatisticsModule } from '../../app/statistics/statistics.module';
|
import { StatisticsModule } from '../../app/statistics/statistics.module';
|
||||||
import { StatisticsPageModule } from '../../app/statistics-page/statistics-page.module';
|
import { StatisticsPageModule } from '../../app/statistics-page/statistics-page.module';
|
||||||
import { SubmissionModule } from '../../app/submission/submission.module';
|
import { SubmissionModule } from '../../app/submission/submission.module';
|
||||||
@@ -200,7 +197,6 @@ const DECLARATIONS = [
|
|||||||
FormsModule,
|
FormsModule,
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
IdlePreloadModule,
|
IdlePreloadModule,
|
||||||
MenuModule,
|
|
||||||
NgbModule,
|
NgbModule,
|
||||||
RouterModule,
|
RouterModule,
|
||||||
ScrollToModule,
|
ScrollToModule,
|
||||||
@@ -210,9 +206,7 @@ const DECLARATIONS = [
|
|||||||
StoreRouterConnectingModule,
|
StoreRouterConnectingModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
SubmissionModule,
|
SubmissionModule,
|
||||||
SearchModule,
|
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ResourcePoliciesModule,
|
|
||||||
SystemWideAlertModule,
|
SystemWideAlertModule,
|
||||||
NgxGalleryModule,
|
NgxGalleryModule,
|
||||||
...DECLARATIONS,
|
...DECLARATIONS,
|
||||||
|
@@ -13,9 +13,6 @@ import { IdlePreloadModule } from 'angular-idle-preload';
|
|||||||
|
|
||||||
import { AppModule } from '../../app/app.module';
|
import { AppModule } from '../../app/app.module';
|
||||||
import { RootModule } from '../../app/root.module';
|
import { RootModule } from '../../app/root.module';
|
||||||
import { MenuModule } from '../../app/shared/menu/menu.module';
|
|
||||||
import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resource-policies.module';
|
|
||||||
import { SearchModule } from '../../app/shared/search/search.module';
|
|
||||||
import { StatisticsModule } from '../../app/statistics/statistics.module';
|
import { StatisticsModule } from '../../app/statistics/statistics.module';
|
||||||
import { StatisticsPageModule } from '../../app/statistics-page/statistics-page.module';
|
import { StatisticsPageModule } from '../../app/statistics-page/statistics-page.module';
|
||||||
import { SubmissionModule } from '../../app/submission/submission.module';
|
import { SubmissionModule } from '../../app/submission/submission.module';
|
||||||
@@ -32,7 +29,6 @@ const DECLARATIONS = [
|
|||||||
FormsModule,
|
FormsModule,
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
IdlePreloadModule,
|
IdlePreloadModule,
|
||||||
MenuModule,
|
|
||||||
NgbModule,
|
NgbModule,
|
||||||
RouterModule,
|
RouterModule,
|
||||||
ScrollToModule,
|
ScrollToModule,
|
||||||
@@ -42,9 +38,7 @@ const DECLARATIONS = [
|
|||||||
StoreRouterConnectingModule,
|
StoreRouterConnectingModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
SubmissionModule,
|
SubmissionModule,
|
||||||
SearchModule,
|
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ResourcePoliciesModule,
|
|
||||||
],
|
],
|
||||||
declarations: DECLARATIONS,
|
declarations: DECLARATIONS,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user