feature modules (#636)

* permission manager module

* permissions module

* common module

* layout and search modules

* trashcan module, lazy load

* fix context menu module

* lint fix

* recent files module

* favorites module (lazy)

* shared files module (lazy)

* shared link module (lazy)

* lazy loaading fixes
This commit is contained in:
Denys Vuika
2018-09-17 04:57:56 +01:00
committed by Cilibiu Bogdan
parent f44838ac42
commit eb97b18f95
32 changed files with 2113 additions and 1666 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -39,26 +39,13 @@ import { ContentModule } from '@alfresco/adf-content-services';
import { AppComponent } from './app.component';
import { APP_ROUTES } from './app.routes';
import { GenericErrorComponent } from './components/generic-error/generic-error.component';
import { FilesComponent } from './components/files/files.component';
import { FavoritesComponent } from './components/favorites/favorites.component';
import { LibrariesComponent } from './components/libraries/libraries.component';
import { RecentFilesComponent } from './components/recent-files/recent-files.component';
import { SharedFilesComponent } from './components/shared-files/shared-files.component';
import { TrashcanComponent } from './components/trashcan/trashcan.component';
import { LayoutComponent } from './components/layout/layout.component';
import { SidenavViewsManagerDirective } from './components/layout/sidenav-views-manager.directive';
import { CurrentUserComponent } from './components/current-user/current-user.component';
import { SearchInputComponent } from './components/search/search-input/search-input.component';
import { SearchInputControlComponent } from './components/search/search-input-control/search-input-control.component';
import { LocationLinkComponent } from './components/location-link/location-link.component';
import { SharedLinkViewComponent } from './components/shared-link-view/shared-link-view.component';
import { NodeVersionsDialogComponent } from './dialogs/node-versions/node-versions.dialog';
import { LibraryDialogComponent } from './dialogs/library/library.dialog';
import { ContentManagementService } from './services/content-management.service';
import { NodeActionsService } from './services/node-actions.service';
import { NodePermissionService } from './services/node-permission.service';
import { SearchResultsComponent } from './components/search/search-results/search-results.component';
import { ProfileResolver } from './services/profile.resolver';
import { ExperimentalGuard } from './services/experimental-guard.service';
@@ -67,9 +54,6 @@ import { MaterialModule } from './material.module';
import { ContentApiService } from './services/content-api.service';
import { AppExtensionsModule } from './extensions.module';
import { CoreExtensionsModule } from './extensions/core.extensions.module';
import { SearchResultsRowComponent } from './components/search/search-results-row/search-results-row.component';
import { NodePermissionsDialogComponent } from './dialogs/node-permissions/node-permissions.dialog';
import { PermissionsManagerComponent } from './components/permission-manager/permissions-manager.component';
import { AppRouteReuseStrategy } from './app.routes.strategy';
import { AppInfoDrawerModule } from './components/info-drawer/info.drawer.module';
import { DirectivesModule } from './directives/directives.module';
@@ -78,6 +62,13 @@ import { ExtensionsModule } from '@alfresco/adf-extensions';
import { AppToolbarModule } from './components/toolbar/toolbar.module';
import { AppCreateMenuModule } from './components/create-menu/create-menu.module';
import { AppSidenavModule } from './components/sidenav/sidenav.module';
import { AppPermissionsModule } from './components/permissions/permissions.module';
import { AppCommonModule } from './components/common/common.module';
import { AppLayoutModule } from './components/layout/layout.module';
import { AppCurrentUserModule } from './components/current-user/current-user.module';
import { AppSearchInputModule } from './components/search/search-input.module';
import { AppSearchResultsModule } from './components/search/search-results.module';
import { AppLoginModule } from './components/login/login.module';
@NgModule({
imports: [
@@ -96,36 +87,26 @@ import { AppSidenavModule } from './components/sidenav/sidenav.module';
CoreExtensionsModule.forRoot(),
ExtensionsModule.forRoot(),
AppExtensionsModule,
AppLoginModule,
AppCommonModule,
AppLayoutModule,
AppCurrentUserModule,
DirectivesModule,
ContextMenuModule.forRoot(),
AppInfoDrawerModule,
AppToolbarModule,
AppSidenavModule,
AppCreateMenuModule
AppCreateMenuModule,
AppPermissionsModule,
AppSearchInputModule,
AppSearchResultsModule
],
declarations: [
AppComponent,
GenericErrorComponent,
LayoutComponent,
SidenavViewsManagerDirective,
CurrentUserComponent,
SearchInputComponent,
SearchInputControlComponent,
FilesComponent,
FavoritesComponent,
LibrariesComponent,
RecentFilesComponent,
SharedFilesComponent,
TrashcanComponent,
LocationLinkComponent,
SearchResultsRowComponent,
NodeVersionsDialogComponent,
LibraryDialogComponent,
NodePermissionsDialogComponent,
PermissionsManagerComponent,
SearchResultsComponent,
SharedLinkViewComponent
LibraryDialogComponent
],
providers: [
{ provide: RouteReuseStrategy, useClass: AppRouteReuseStrategy },
@@ -145,11 +126,7 @@ import { AppSidenavModule } from './components/sidenav/sidenav.module';
ExperimentalGuard,
ContentApiService
],
entryComponents: [
LibraryDialogComponent,
NodeVersionsDialogComponent,
NodePermissionsDialogComponent
],
entryComponents: [LibraryDialogComponent, NodeVersionsDialogComponent],
bootstrap: [AppComponent]
})
export class AppModule {}

View File

@@ -25,26 +25,18 @@
import { Routes } from '@angular/router';
import { AuthGuardEcm } from '@alfresco/adf-core';
import { SharedLinkViewComponent } from './components/shared-link-view/shared-link-view.component';
import { LayoutComponent } from './components/layout/layout.component';
import { FilesComponent } from './components/files/files.component';
import { FavoritesComponent } from './components/favorites/favorites.component';
import { LibrariesComponent } from './components/libraries/libraries.component';
import { RecentFilesComponent } from './components/recent-files/recent-files.component';
import { SharedFilesComponent } from './components/shared-files/shared-files.component';
import { TrashcanComponent } from './components/trashcan/trashcan.component';
import { GenericErrorComponent } from './components/generic-error/generic-error.component';
import { GenericErrorComponent } from './components/common/generic-error/generic-error.component';
import { SearchResultsComponent } from './components/search/search-results/search-results.component';
import { ProfileResolver } from './services/profile.resolver';
import { LoginComponent } from './components/login/login.component';
export const APP_ROUTES: Routes = [
{
path: 'login',
loadChildren: 'src/app/components/login/login.module#AppLoginModule',
component: LoginComponent,
data: {
title: 'APP.SIGN_IN'
}
@@ -52,17 +44,12 @@ export const APP_ROUTES: Routes = [
{
path: 'settings',
loadChildren:
'src/app/components/settings/settings.module#AppSettingsModule',
data: {
title: 'Settings'
}
'src/app/components/settings/settings.module#AppSettingsModule'
},
{
path: 'preview/s/:id',
component: SharedLinkViewComponent,
data: {
title: 'APP.PREVIEW.TITLE'
}
loadChildren:
'src/app/components/shared-link-view/shared-link-view.module#AppSharedLinkViewModule'
},
{
path: '',
@@ -76,16 +63,11 @@ export const APP_ROUTES: Routes = [
},
{
path: 'favorites',
data: {
sortingPreferenceKey: 'favorites'
},
children: [
{
path: '',
component: FavoritesComponent,
data: {
title: 'APP.BROWSE.FAVORITES.TITLE'
}
loadChildren:
'src/app/components/favorites/favorites.module#AppFavoritesModule'
},
{
path: 'preview/:nodeId',
@@ -101,15 +83,13 @@ export const APP_ROUTES: Routes = [
},
{
path: 'libraries',
data: {
sortingPreferenceKey: 'libraries'
},
children: [
{
path: '',
component: LibrariesComponent,
data: {
title: 'APP.BROWSE.LIBRARIES.TITLE'
title: 'APP.BROWSE.LIBRARIES.TITLE',
sortingPreferenceKey: 'libraries'
}
},
{
@@ -183,10 +163,8 @@ export const APP_ROUTES: Routes = [
children: [
{
path: '',
component: RecentFilesComponent,
data: {
title: 'APP.BROWSE.RECENT.TITLE'
}
loadChildren:
'src/app/components/recent-files/recent-files.module#AppRecentFilesModule'
},
{
path: 'preview/:nodeId',
@@ -202,16 +180,11 @@ export const APP_ROUTES: Routes = [
},
{
path: 'shared',
data: {
sortingPreferenceKey: 'shared-files'
},
children: [
{
path: '',
component: SharedFilesComponent,
data: {
title: 'APP.BROWSE.SHARED.TITLE'
}
loadChildren:
'src/app/components/shared-files/shared-files.module#AppSharedFilesModule'
},
{
path: 'preview/:nodeId',
@@ -227,18 +200,12 @@ export const APP_ROUTES: Routes = [
},
{
path: 'trashcan',
component: TrashcanComponent,
data: {
title: 'APP.BROWSE.TRASHCAN.TITLE',
sortingPreferenceKey: 'trashcan'
}
loadChildren:
'src/app/components/trashcan/trashcan.module#AppTrashcanModule'
},
{
path: 'about',
loadChildren: 'src/app/components/about/about.module#AboutModule',
data: {
title: 'APP.BROWSE.ABOUT.TITLE'
}
loadChildren: 'src/app/components/about/about.module#AboutModule'
},
{
path: 'search',

View File

@@ -32,7 +32,10 @@ import { CoreModule } from '@alfresco/adf-core';
const routes: Routes = [
{
path: '',
component: AboutComponent
component: AboutComponent,
data: {
title: 'APP.BROWSE.ABOUT.TITLE'
}
}
];

View File

@@ -0,0 +1,37 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { GenericErrorComponent } from './generic-error/generic-error.component';
import { CoreModule } from '@alfresco/adf-core';
import { LocationLinkComponent } from './location-link/location-link.component';
@NgModule({
imports: [CommonModule, CoreModule.forChild()],
declarations: [GenericErrorComponent, LocationLinkComponent],
exports: [GenericErrorComponent, LocationLinkComponent]
})
export class AppCommonModule {}

View File

@@ -35,9 +35,9 @@ import { PathInfo, MinimalNodeEntity } from 'alfresco-js-api';
import { Observable, BehaviorSubject, of } from 'rxjs';
import { Store } from '@ngrx/store';
import { AppStore } from '../../store/states/app.state';
import { NavigateToParentFolder } from '../../store/actions';
import { ContentApiService } from '../../services/content-api.service';
import { AppStore } from '../../../store/states/app.state';
import { NavigateToParentFolder } from '../../../store/actions';
import { ContentApiService } from '../../../services/content-api.service';
@Component({
selector: 'aca-location-link',

View File

@@ -30,7 +30,6 @@ import {
MatIconModule,
MatButtonModule
} from '@angular/material';
import { BrowserModule } from '@angular/platform-browser';
import { CoreModule } from '@alfresco/adf-core';
import { CoreExtensionsModule } from '../../extensions/core.extensions.module';
@@ -47,7 +46,6 @@ import { OutsideEventDirective } from './context-menu-outside-event.directive';
MatListModule,
MatIconModule,
MatButtonModule,
BrowserModule,
CoreExtensionsModule.forChild(),
CoreModule.forChild(),
ExtensionsModule.forChild()

View File

@@ -0,0 +1,37 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { CurrentUserComponent } from './current-user.component';
import { RouterModule } from '@angular/router';
@NgModule({
imports: [CommonModule, CoreModule.forChild(), RouterModule],
declarations: [CurrentUserComponent],
exports: [CurrentUserComponent]
})
export class AppCurrentUserModule {}

View File

@@ -0,0 +1,64 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { FavoritesComponent } from './favorites.component';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { RouterModule, Routes } from '@angular/router';
import { ContentModule } from '@alfresco/adf-content-services';
import { DirectivesModule } from '../../directives/directives.module';
import { AppCommonModule } from '../common/common.module';
import { AppToolbarModule } from '../toolbar/toolbar.module';
import { ContextMenuModule } from '../context-menu/context-menu.module';
import { AppInfoDrawerModule } from '../info-drawer/info.drawer.module';
const routes: Routes = [
{
path: '',
component: FavoritesComponent,
data: {
title: 'APP.BROWSE.FAVORITES.TITLE',
sortingPreferenceKey: 'favorites'
}
}
];
@NgModule({
imports: [
CommonModule,
CoreModule.forChild(),
RouterModule.forChild(routes),
ContentModule.forChild(),
DirectivesModule,
AppCommonModule,
AppToolbarModule,
ContextMenuModule.forChild(),
AppInfoDrawerModule
],
declarations: [FavoritesComponent],
exports: [FavoritesComponent]
})
export class AppFavoritesModule {}

View File

@@ -0,0 +1,52 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { LayoutComponent } from './layout.component';
import { SidenavViewsManagerDirective } from './sidenav-views-manager.directive';
import { ContentModule } from '@alfresco/adf-content-services';
import { RouterModule } from '@angular/router';
import { AppSidenavModule } from '../sidenav/sidenav.module';
import { AppCommonModule } from '../common/common.module';
import { AppCurrentUserModule } from '../current-user/current-user.module';
import { AppSearchInputModule } from '../search/search-input.module';
@NgModule({
imports: [
CommonModule,
RouterModule,
CoreModule.forChild(),
ContentModule.forChild(),
AppCommonModule,
AppSidenavModule,
AppCurrentUserModule,
AppSearchInputModule
],
declarations: [LayoutComponent, SidenavViewsManagerDirective],
exports: [LayoutComponent]
})
export class AppLayoutModule {}

View File

@@ -27,17 +27,9 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { LoginComponent } from './login.component';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
{
path: '',
component: LoginComponent
}
];
@NgModule({
imports: [CommonModule, CoreModule.forChild(), RouterModule.forChild(routes)],
imports: [CommonModule, CoreModule.forChild()],
declarations: [LoginComponent]
})
export class AppLoginModule {}

View File

@@ -1,6 +1,6 @@
<header mat-dialog-title>{{'PERMISSIONS.DIALOG.TITLE' | translate}}</header>
<section mat-dialog-content>
<aca-permissions-manager [nodeId]="nodeId"></aca-permissions-manager>
<app-permission-manager [nodeId]="nodeId"></app-permission-manager>
</section>
<footer mat-dialog-actions>
<button mat-button color="primary" [mat-dialog-close]="true" cdkFocusInitial>{{'PERMISSIONS.DIALOG.CLOSE' | translate}}</button>

View File

@@ -1,4 +1,4 @@
@mixin aca-permissions-manager-theme($theme) {
@mixin app-permission-manager-theme($theme) {
$foreground: map-get($theme, foreground);
$accent: map-get($theme, accent);

View File

@@ -23,22 +23,22 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import {
NodePermissionDialogService,
PermissionListComponent
} from '@alfresco/adf-content-services';
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
import { Store } from '@ngrx/store';
import { AppStore } from '../../store/states/app.state';
import { SnackbarErrorAction } from '../../store/actions/snackbar.actions';
import { NodePermissionsDialogComponent } from '../../dialogs/node-permissions/node-permissions.dialog';
import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { MatDialog } from '@angular/material';
import { ContentApiService } from '../../services/content-api.service';
import { Store } from '@ngrx/store';
import { MinimalNodeEntryEntity } from 'alfresco-js-api';
import { ContentApiService } from '../../../services/content-api.service';
import { SnackbarErrorAction } from '../../../store/actions/snackbar.actions';
import { AppStore } from '../../../store/states/app.state';
import { NodePermissionsDialogComponent } from '../permission-dialog/node-permissions.dialog';
@Component({
selector: 'aca-permissions-manager',
templateUrl: './permissions-manager.component.html'
selector: 'app-permission-manager',
templateUrl: './permission-manager.component.html'
})
export class PermissionsManagerComponent implements OnInit {
@ViewChild('permissionList')

View File

@@ -0,0 +1,39 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { ContentModule } from '@alfresco/adf-content-services';
import { NodePermissionsDialogComponent } from './permission-dialog/node-permissions.dialog';
import { PermissionsManagerComponent } from './permission-manager/permission-manager.component';
@NgModule({
imports: [CommonModule, CoreModule.forChild(), ContentModule.forChild()],
declarations: [PermissionsManagerComponent, NodePermissionsDialogComponent],
exports: [PermissionsManagerComponent, NodePermissionsDialogComponent],
entryComponents: [NodePermissionsDialogComponent]
})
export class AppPermissionsModule {}

View File

@@ -0,0 +1,63 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { RouterModule, Routes } from '@angular/router';
import { ContentModule } from '@alfresco/adf-content-services';
import { DirectivesModule } from '../../directives/directives.module';
import { AppCommonModule } from '../common/common.module';
import { AppToolbarModule } from '../toolbar/toolbar.module';
import { ContextMenuModule } from '../context-menu/context-menu.module';
import { RecentFilesComponent } from './recent-files.component';
import { AppInfoDrawerModule } from '../info-drawer/info.drawer.module';
const routes: Routes = [
{
path: '',
component: RecentFilesComponent,
data: {
title: 'APP.BROWSE.RECENT.TITLE'
}
}
];
@NgModule({
imports: [
CommonModule,
CoreModule.forChild(),
RouterModule.forChild(routes),
ContentModule.forChild(),
DirectivesModule,
AppCommonModule,
AppToolbarModule,
ContextMenuModule.forChild(),
AppInfoDrawerModule
],
declarations: [RecentFilesComponent],
exports: [RecentFilesComponent]
})
export class AppRecentFilesModule {}

View File

@@ -0,0 +1,38 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { SearchInputComponent } from './search-input/search-input.component';
import { SearchInputControlComponent } from './search-input-control/search-input-control.component';
import { ContentModule } from '@alfresco/adf-content-services';
@NgModule({
imports: [CommonModule, CoreModule.forChild(), ContentModule.forChild()],
declarations: [SearchInputComponent, SearchInputControlComponent],
exports: [SearchInputComponent, SearchInputControlComponent]
})
export class AppSearchInputModule {}

View File

@@ -0,0 +1,48 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { ContentModule } from '@alfresco/adf-content-services';
import { SearchResultsComponent } from './search-results/search-results.component';
import { SearchResultsRowComponent } from './search-results-row/search-results-row.component';
import { AppInfoDrawerModule } from '../info-drawer/info.drawer.module';
import { AppToolbarModule } from '../toolbar/toolbar.module';
import { AppCommonModule } from '../common/common.module';
@NgModule({
imports: [
CommonModule,
CoreModule.forChild(),
ContentModule.forChild(),
AppCommonModule,
AppInfoDrawerModule,
AppToolbarModule
],
declarations: [SearchResultsComponent, SearchResultsRowComponent],
exports: [SearchResultsComponent, SearchResultsRowComponent]
})
export class AppSearchResultsModule {}

View File

@@ -32,7 +32,10 @@ import { CoreModule } from '@alfresco/adf-core';
const routes: Routes = [
{
path: '',
component: SettingsComponent
component: SettingsComponent,
data: {
title: 'Settings'
}
}
];

View File

@@ -0,0 +1,64 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { SharedFilesComponent } from './shared-files.component';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { RouterModule, Routes } from '@angular/router';
import { ContentModule } from '@alfresco/adf-content-services';
import { DirectivesModule } from '../../directives/directives.module';
import { AppCommonModule } from '../common/common.module';
import { AppToolbarModule } from '../toolbar/toolbar.module';
import { ContextMenuModule } from '../context-menu/context-menu.module';
import { AppInfoDrawerModule } from '../info-drawer/info.drawer.module';
const routes: Routes = [
{
path: '',
component: SharedFilesComponent,
data: {
title: 'APP.BROWSE.SHARED.TITLE',
sortingPreferenceKey: 'shared-files'
}
}
];
@NgModule({
imports: [
CommonModule,
CoreModule.forChild(),
RouterModule.forChild(routes),
ContentModule.forChild(),
DirectivesModule,
AppCommonModule,
AppToolbarModule,
ContextMenuModule.forChild(),
AppInfoDrawerModule
],
declarations: [SharedFilesComponent],
exports: [SharedFilesComponent]
})
export class AppSharedFilesModule {}

View File

@@ -0,0 +1,59 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { SharedLinkViewComponent } from './shared-link-view.component';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { RouterModule, Routes } from '@angular/router';
import { DirectivesModule } from '../../directives/directives.module';
import { AppCommonModule } from '../common/common.module';
import { AppToolbarModule } from '../toolbar/toolbar.module';
import { AppInfoDrawerModule } from '../info-drawer/info.drawer.module';
const routes: Routes = [
{
path: '',
component: SharedLinkViewComponent,
data: {
title: 'APP.PREVIEW.TITLE'
}
}
];
@NgModule({
imports: [
CommonModule,
CoreModule.forChild(),
RouterModule.forChild(routes),
DirectivesModule,
AppCommonModule,
AppToolbarModule,
AppInfoDrawerModule
],
declarations: [SharedLinkViewComponent],
exports: [SharedLinkViewComponent]
})
export class AppSharedLinkViewModule {}

View File

@@ -0,0 +1,62 @@
/*!
* @license
* Alfresco Example Content Application
*
* Copyright (C) 2005 - 2018 Alfresco Software Limited
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { TrashcanComponent } from './trashcan.component';
import { Routes, RouterModule } from '@angular/router';
import { ContentModule } from '@alfresco/adf-content-services';
import { AppCommonModule } from '../common/common.module';
import { AppToolbarModule } from '../toolbar/toolbar.module';
import { DirectivesModule } from '../../directives/directives.module';
import { ContextMenuModule } from '../context-menu/context-menu.module';
const routes: Routes = [
{
path: '',
component: TrashcanComponent,
data: {
title: 'APP.BROWSE.TRASHCAN.TITLE',
sortingPreferenceKey: 'trashcan'
}
}
];
@NgModule({
imports: [
CommonModule,
CoreModule.forChild(),
RouterModule.forChild(routes),
ContentModule.forChild(),
DirectivesModule,
AppCommonModule,
AppToolbarModule,
ContextMenuModule.forChild()
],
declarations: [TrashcanComponent],
exports: [TrashcanComponent]
})
export class AppTrashcanModule {}

View File

@@ -27,7 +27,6 @@ import { AuthGuardEcm, CoreModule } from '@alfresco/adf-core';
import { CommonModule } from '@angular/common';
import { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core';
import { LayoutComponent } from '../components/layout/layout.component';
import { TrashcanComponent } from '../components/trashcan/trashcan.component';
import * as app from './evaluators/app.evaluators';
import * as nav from './evaluators/navigation.evaluators';
import { AppExtensionService } from './extension.service';
@@ -70,7 +69,6 @@ export class CoreExtensionsModule {
constructor(extensions: ExtensionService) {
extensions.setComponents({
'app.layout.main': LayoutComponent,
'app.components.trashcan': TrashcanComponent,
'app.components.tabs.metadata': MetadataTabComponent,
'app.components.tabs.comments': CommentsTabComponent,
'app.components.tabs.versions': VersionsTabComponent,

View File

@@ -58,9 +58,9 @@ import { ContentApiService } from './content-api.service';
import { sharedUrl } from '../store/selectors/app.selectors';
import { NodeActionsService } from './node-actions.service';
import { TranslationService } from '@alfresco/adf-core';
import { NodePermissionsDialogComponent } from '../dialogs/node-permissions/node-permissions.dialog';
import { NodeVersionsDialogComponent } from '../dialogs/node-versions/node-versions.dialog';
import { take, map, tap, mergeMap, catchError } from 'rxjs/operators';
import { NodePermissionsDialogComponent } from '../components/permissions/permission-dialog/node-permissions.dialog';
interface RestoredNode {
status: number;

View File

@@ -3,11 +3,11 @@
@import '../components/sidenav/sidenav.component.theme';
@import '../components/about/about.component.theme';
@import '../components/generic-error/generic-error.component.theme';
@import '../components/common/generic-error/generic-error.component.theme';
@import '../components/search/search-input/search-input.component.theme';
@import '../components/settings/settings.component.theme';
@import '../components/current-user/current-user.component.theme';
@import '../components/permission-manager/permissions-manager.component.theme';
@import '../components/permissions/permission-manager/permission-manager.component.theme';
@import '../components/context-menu/context-menu.component.theme';
@import '../dialogs/node-versions/node-versions.dialog.theme';
@@ -87,7 +87,7 @@ $custom-theme: mat-light-theme($custom-theme-primary, $custom-theme-accent);
@include aca-layout-theme($theme);
@include aca-search-input-theme($theme);
@include aca-generic-error-theme($theme);
@include aca-permissions-manager-theme($theme);
@include app-permission-manager-theme($theme);
@include aca-node-versions-dialog-theme($theme);
@include aca-settings-theme($theme);
@include snackbar-theme($theme);

File diff suppressed because it is too large Load Diff

View File

@@ -1,42 +0,0 @@
{
"$schema": "../../../extension.schema.json",
"$version": "1.0.0",
"$name": "plugin2",
"$description": "demo plugin",
"routes": [
{
"id": "plugin2.routes.about",
"path": "ext/bin",
"component": "app.components.trashcan",
"data": {
"title": "Custom Trashcan"
}
}
],
"features": {
"navbar": [
{
"id": "plugin2.navbar.group1",
"disabled": true,
"items": [
{
"id": "plugin2.navbar.group1.link1",
"icon": "build",
"title": "Trashcan (native)",
"description": "Uses native application route",
"route": "trashcan"
},
{
"id": "plugin2.navbar.group1.link2",
"icon": "build",
"title": "Trashcan (custom)",
"description": "Uses custom defined route",
"route": "plugin2.routes.about"
}
]
}
]
}
}