[ADF-5146] Upgrade to Angular 10 (#5834)

* remove useless module

* upgrade to angular 8

* upgrade material to v8

* upgrade adf libs

* migrate demo shell to v8

* upgrade to angular 9

* upgrade material to v9

* remove hammer

* upgrade nx

* upgrade datetime picker

* upgrade flex layout

* update core api

* remove entry components

* code fixes

* upgrade testbed usage

* code fixes

* remove unnecessary core-js from tests

* upgrade CLI

* ts config fixes

* fix builds

* fix testing config

* compile fixes

* fix demo shell dev setup

* fix core tests

* fix card view import

* upgrade nx

* disable smart builds for now

* remove fdescribe

* restore smart builds

* fix issues

* unify tsconfigs and fix newly found issues

* fix configuration and cleanup package scripts

* improved production build from the same config

* use ADF libs directly instead of node_modules

* disable smart build

* single app configuration (angular)

* fix core build

* fix build scripts

* lint fixes

* fix linting setup

* fix linting rules

* various fixes

* disable affected libs for unit tests

* cleanup insights package.json

* simplify smart-build

* fix content tests

* fix tests

* test fixes

* fix tests

* fix test

* fix tests

* disable AppExtensionsModule (monaco example)

* remove monaco extension module

* upgrade bundle check rules

* fix insights tests and karma config

* fix protractor config

* e2e workaround

* upgrade puppeteer and split linting and build

* reusable resources config

* update protractor config

* fix after rebase

* fix protractor config

* fix e2e tsconfig

* update e2e setup

* Save demoshell artifact on S3 and remove travis cache

* Push the libs on S3 and fetch before releasing it

* Add deps

* Add dependencies among libs and run only affected unit test and build

* fix the travis stage name

* fix after renaming dev to demoshell

* force the order of the projects

* remove unused dependencies

* fix content e2e script

* exit codes fix

* add extra exit codes to core e2e

* postinstall hook and package cleanup

* cleanup packages

* remove deprecated code and dependency on router

* improve bundle analyzer script

* minor code fixes

* update spec

* fix code after rebase

* upgrade protractor after rebase

* fix e2e mapping lib

* Update tsconfig.e2e.json

* update e2e tsconfig

* fix angular config

* fix protractor runs

* cache dist folder for libs

* update material selectors for dropdowns

* selector fixes

* remove duplicated e2e that have unit tests already

* fix login selector

* fix e2e

* fix test

* fix import issues

* fix selector

* cleanup old monaco extension files

* cleanup demo shell login

* add protractor max retries

* disable customisations of protractor

* fix login validation

* fix after rebase

* fix after rebase, disable latest versions of libs

* Hide the report tab and rollback the localstorage

* rename protractor config back to js

* restore lint as part of build

* cleanup code

* do not copy anything to node_modules on dist test

* fix unit tests

* config fixes

* fix code

* fix code after rebase

* fix tests

* remove existing words from spellcheck

* remove useless directive decorators

* update package.json after rebase

* add js-api back

* code fixes

* add missing export

* update configs

* fix code

* try fix the sso login test

* fix

* remove puppeteer unit

* fix e2e script

* fix

* make provider easy

* fix routes module before upgrade

* fix unit tests

* upgrade angular cli

* upgrade to angular 10

Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com>
Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com>
Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com>
This commit is contained in:
Denys Vuika
2020-07-03 13:01:05 +01:00
committed by GitHub
parent 2f0a585273
commit cd2b489100
579 changed files with 15689 additions and 10745 deletions

View File

@@ -15,15 +15,8 @@
* limitations under the License.
*/
import { ModuleWithProviders } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {
AuthGuard,
AuthGuardEcm,
ErrorContentComponent,
AuthGuardBpm,
AuthGuardSsoRoleService
} from '@alfresco/adf-core';
import { Routes } from '@angular/router';
import { AuthGuard, AuthGuardEcm, ErrorContentComponent, AuthGuardBpm, AuthGuardSsoRoleService } from '@alfresco/adf-core';
import { AppLayoutComponent } from './components/app-layout/app-layout.component';
import { HomeComponent } from './components/home/home.component';
import { LogoutComponent } from './components/logout/logout.component';
@@ -60,12 +53,13 @@ import { ConfirmDialogExampleComponent } from './components/confirm-dialog/confi
import { DemoErrorComponent } from './components/error/demo-error.component';
import { TaskHeaderCloudDemoComponent } from './components/cloud/task-header-cloud-demo.component';
import { FilteredSearchComponent } from './components/files/filtered-search.component';
export const appRoutes: Routes = [
{ path: 'login', loadChildren: 'app/components/login/login.module#AppLoginModule' },
{ path: 'login', loadChildren: () => import('./components/login/login.module').then(m => m.AppLoginModule) },
{ path: 'logout', component: LogoutComponent },
{
path: 'settings',
loadChildren: 'app/components/settings/settings.module#AppSettingsModule'
loadChildren: () => import('./components/settings/settings.module').then(m => m.AppSettingsModule)
},
{
path: 'files/:nodeId/view',
@@ -76,7 +70,7 @@ export const appRoutes: Routes = [
children: [
{
path: '',
loadChildren: 'app/components/file-view/file-view.module#FileViewModule'
loadChildren: () => import('./components/file-view/file-view.module').then(m => m.FileViewModule)
}
]
},
@@ -88,7 +82,7 @@ export const appRoutes: Routes = [
children: [
{
path: '',
loadChildren: 'app/components/file-view/file-view.module#FileViewModule'
loadChildren: () => import('./components/file-view/file-view.module').then(m => m.FileViewModule)
}
]
},
@@ -101,14 +95,14 @@ export const appRoutes: Routes = [
{
path: 'breadcrumb',
canActivate: [AuthGuardEcm],
loadChildren: 'app/components/breadcrumb-demo/breadcrumb-demo.module#AppBreadcrumbModule'
loadChildren: () => import('./components/breadcrumb-demo/breadcrumb-demo.module').then(m => m.AppBreadcrumbModule)
},
{
path: 'notifications',
children: [
{
path: '',
loadChildren: 'app/components/notifications/notifications.module#AppNotificationsModule'
loadChildren: () => import('./components/notifications/notifications.module').then(m => m.AppNotificationsModule)
}
]
},
@@ -117,7 +111,7 @@ export const appRoutes: Routes = [
children: [
{
path: '',
loadChildren: 'app/components/config-editor/config-editor.module#AppConfigEditorModule'
loadChildren: () => import('./components/config-editor/config-editor.module').then(m => m.AppConfigEditorModule)
}
]
},
@@ -126,7 +120,7 @@ export const appRoutes: Routes = [
children: [
{
path: '',
loadChildren: 'app/components/pipes/pipes.module#AppPipesModule'
loadChildren: () => import('./components/pipes/pipes.module').then(m => m.AppPipesModule)
}
]
},
@@ -135,7 +129,7 @@ export const appRoutes: Routes = [
children: [
{
path: '',
loadChildren: 'app/components/card-view/card-view.module#AppCardViewModule'
loadChildren: () => import('./components/card-view/card-view.module').then(m => m.AppCardViewModule)
}
]
},
@@ -144,7 +138,7 @@ export const appRoutes: Routes = [
children: [
{
path: '',
loadChildren: 'app/components/sites/sites.module#SitesModule'
loadChildren: () => import('./components/sites/sites.module').then(m => m.SitesModule)
}
]
},
@@ -153,7 +147,7 @@ export const appRoutes: Routes = [
children: [
{
path: '',
loadChildren: 'app/components/header-data/header-data.module#AppHeaderDataModule'
loadChildren: () => import('./components/header-data/header-data.module').then(m => m.AppHeaderDataModule)
}
]
},
@@ -184,7 +178,7 @@ export const appRoutes: Routes = [
},
{
path: 'community',
loadChildren: 'app/components/cloud/community/community.module#AppCommunityModule'
loadChildren: () => import('./components/cloud/community/community.module').then(m => m.AppCommunityModule)
},
{
path: ':appName',
@@ -232,7 +226,7 @@ export const appRoutes: Routes = [
},
{
path: 'node-selector',
loadChildren: 'app/components/content-node-selector/content-node-selector.module#AppContentNodeSelectorModule'
loadChildren: () => import('./components/content-node-selector/content-node-selector.module').then(m => m.AppContentNodeSelectorModule)
},
{
path: 'confirm-dialog',
@@ -240,12 +234,12 @@ export const appRoutes: Routes = [
},
{
path: 'settings-layout',
loadChildren: 'app/components/settings/settings.module#AppSettingsModule'
loadChildren: () => import('./components/settings/settings.module').then(m => m.AppSettingsModule)
},
{
path: 'trashcan',
canActivate: [AuthGuardEcm],
loadChildren: 'app/components/trashcan/trashcan.module#AppTrashcanModule'
loadChildren: () => import('./components/trashcan/trashcan.module').then(m => m.AppTrashcanModule)
},
{
path: 'files',
@@ -270,7 +264,7 @@ export const appRoutes: Routes = [
{
path: 'extensions/document-list/presets',
canActivate: [AuthGuardEcm],
loadChildren: './components/document-list/extension-presets/extension-presets.module#ExtensionPresetsModule'
loadChildren: () => import('./components/document-list/extension-presets/extension-presets.module').then(m => m.ExtensionPresetsModule)
},
{
path: 'files/:id',
@@ -285,16 +279,16 @@ export const appRoutes: Routes = [
{
path: 'dl-custom-sources',
canActivate: [AuthGuardEcm],
loadChildren: 'app/components/files/custom-sources.module#AppCustomSourcesModule'
loadChildren: () => import('./components/files/custom-sources.module').then(m => m.AppCustomSourcesModule)
},
{
path: 'datatable',
loadChildren: 'app/components/datatable/datatable.module#AppDataTableModule'
loadChildren: () => import('./components/datatable/datatable.module').then(m => m.AppDataTableModule)
},
{
path: 'datatable/dnd',
loadChildren: './components/datatable/drag-and-drop/datatable-dnd.module#AppDataTableDndModule'
loadChildren: () => import('./components/datatable/drag-and-drop/datatable-dnd.module').then(m => m.AppDataTableDndModule)
},
{
path: 'search',
@@ -368,17 +362,17 @@ export const appRoutes: Routes = [
{
path: 'webscript',
canActivate: [AuthGuardEcm],
loadChildren: 'app/components/webscript/webscript.module#AppWebScriptModule'
loadChildren: () => import('./components/webscript/webscript.module').then(m => m.AppWebScriptModule)
},
{
path: 'tag',
canActivate: [AuthGuardEcm],
loadChildren: 'app/components/tag/tag.module#AppTagModule'
loadChildren: () => import('./components/tag/tag.module').then(m => m.AppTagModule)
},
{
path: 'social',
canActivate: [AuthGuardEcm],
loadChildren: 'app/components/social/social.module#AppSocialModule'
loadChildren: () => import('./components/social/social.module').then(m => m.AppSocialModule)
},
{
path: 'permissions/:id',
@@ -392,11 +386,11 @@ export const appRoutes: Routes = [
},
{
path: 'about',
loadChildren: 'app/components/about/about.module#AppAboutModule'
loadChildren: () => import('./components/about/about.module').then(m => m.AppAboutModule)
},
{
path: 'icons',
loadChildren: './components/icons/icons.module#AppIconsModule'
loadChildren: () => import('./components/icons/icons.module').then(m => m.AppIconsModule)
},
{ path: 'form-cloud', component: FormCloudDemoComponent },
{ path: 'form', component: FormComponent },
@@ -413,11 +407,11 @@ export const appRoutes: Routes = [
},
{
path: 'datatable-lazy',
loadChildren: 'app/components/lazy-loading/lazy-loading.module#LazyLoadingModule'
loadChildren: () => import('./components/lazy-loading/lazy-loading.module').then(m => m.LazyLoadingModule)
},
{
path: 'copy-content',
loadChildren: 'app/components/datatable/copy-content/datatable.module#AppDataTableCopyModule'
loadChildren: () => import('./components/datatable/copy-content/datatable.module').then(m => m.AppDataTableCopyModule)
},
{
path: 'template-list',
@@ -426,12 +420,12 @@ export const appRoutes: Routes = [
{
path: 'task-list',
canActivate: [AuthGuardBpm],
loadChildren: 'app/components/task-list-demo/task-list.module#AppTaskListModule'
loadChildren: () => import('./components/task-list-demo/task-list.module').then(m => m.AppTaskListModule)
},
{
path: 'process-list',
canActivate: [AuthGuardBpm],
loadChildren: 'app/components/process-list-demo/process-list.module#AppProcessListModule'
loadChildren: () => import('./components/process-list-demo/process-list.module').then(m => m.AppProcessListModule)
},
{
path: 'error/no-authorization',
@@ -459,5 +453,3 @@ export const appRoutes: Routes = [
redirectTo: 'error/404'
}
];
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes, { initialNavigation: true });