mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-1591] Load extensions from multiple files (#521)
* rework extension service, separate file with config * improve loading, optional entries * simplify config and unify content actions * load and merge multiple files * improve plugin loading, introduce second demo * move demo stuff to a plugin * rework navbar to make it pluggable * code and naming convention cleanup * extension schema * switch off custom navbar group by default * hotfix for facetQueries issue * consolidate files, final renames
This commit is contained in:
@@ -30,21 +30,38 @@ import { AboutComponent } from '../components/about/about.component';
|
||||
import { LayoutComponent } from '../components/layout/layout.component';
|
||||
import { ToolbarActionComponent } from './components/toolbar-action/toolbar-action.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RuleService } from './rules/rule.service';
|
||||
import { ActionService } from './actions/action.service';
|
||||
import { every, some } from './evaluators/core.evaluators';
|
||||
import {
|
||||
canCreateFolder,
|
||||
hasFolderSelected,
|
||||
canUpdateSelectedFolder,
|
||||
hasFileSelected,
|
||||
canDownloadSelection
|
||||
} from './evaluators/app.evaluators';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, CoreModule.forChild()],
|
||||
declarations: [ToolbarActionComponent],
|
||||
exports: [ToolbarActionComponent],
|
||||
entryComponents: [AboutComponent],
|
||||
providers: [ExtensionService, RuleService, ActionService]
|
||||
providers: [ExtensionService]
|
||||
})
|
||||
export class CoreExtensionsModule {
|
||||
constructor(extensions: ExtensionService) {
|
||||
extensions
|
||||
.setComponent('aca:layouts/main', LayoutComponent)
|
||||
.setComponent('aca:components/about', AboutComponent)
|
||||
.setAuthGuard('aca:auth', AuthGuardEcm);
|
||||
.setComponent('app.layout.main', LayoutComponent)
|
||||
.setComponent('app.components.about', AboutComponent)
|
||||
.setAuthGuard('app.auth', AuthGuardEcm)
|
||||
|
||||
.setEvaluator('core.every', every)
|
||||
.setEvaluator('core.some', some)
|
||||
.setEvaluator('app.selection.canDownload', canDownloadSelection)
|
||||
.setEvaluator('app.selection.file', hasFileSelected)
|
||||
.setEvaluator('app.selection.folder', hasFolderSelected)
|
||||
.setEvaluator(
|
||||
'app.selection.folder.canUpdate',
|
||||
canUpdateSelectedFolder
|
||||
)
|
||||
.setEvaluator('app.navigation.folder.canCreate', canCreateFolder);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user