@eui/cli 19.0.0-next.4 → 19.0.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.version.properties +1 -1
- package/lib/skeletons/_angular/base/package.json +2 -2
- package/lib/skeletons/_angular/base/src/app/app.component.spec.ts +1 -1
- package/lib/skeletons/_angular/base/src/app/app.component.ts +15 -0
- package/lib/skeletons/_angular/base/src/app/{core/core.module.ts → app.config.ts} +25 -42
- package/lib/skeletons/_angular/base/src/app/app.routes.ts +9 -0
- package/lib/skeletons/_angular/base/src/app/features/home/home.component.ts +9 -3
- package/lib/skeletons/_angular/base/src/app/features/home/home.routes.ts +6 -0
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page1/page1.component.ts +7 -3
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page2/page2.component.ts +7 -3
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.component.ts +6 -3
- package/lib/skeletons/_angular/base/src/app/features/module1/{module1-routing.module.ts → module1.routes.ts} +2 -10
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.component.ts +7 -3
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.routes.ts +6 -0
- package/lib/skeletons/_angular/base/src/main.ts +7 -10
- package/lib/skeletons/_angular/base-mobile/package.json +1 -1
- package/lib/skeletons/_angular/options/ecl-ec/src/app/app.component.ts +11 -6
- package/lib/skeletons/_angular/options/ecl-eu/src/app/app.component.ts +3 -6
- package/lib/skeletons/web-symfony/myapp-web/package.json +2 -2
- package/package.json +1 -1
- package/lib/skeletons/_angular/base/src/app/app-routing.module.ts +0 -17
- package/lib/skeletons/_angular/base/src/app/app.module.spec.ts +0 -31
- package/lib/skeletons/_angular/base/src/app/app.module.ts +0 -35
- package/lib/skeletons/_angular/base/src/app/core/components/.gitkeep +0 -0
- package/lib/skeletons/_angular/base/src/app/core/reducers/index.ts +0 -33
- package/lib/skeletons/_angular/base/src/app/features/home/home-routing.module.ts +0 -15
- package/lib/skeletons/_angular/base/src/app/features/home/home.module.ts +0 -18
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.module.ts +0 -21
- package/lib/skeletons/_angular/base/src/app/features/module2/module2-routing.module.ts +0 -16
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.module.ts +0 -17
- package/lib/skeletons/_angular/base/src/app/shared/shared.module.ts +0 -45
- package/lib/skeletons/_angular/options/ecl-ec/src/app/shared/shared.module.ts +0 -19
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
19.0.0-next.
|
|
1
|
+
19.0.0-next.6
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "19.0.0-next.
|
|
3
|
+
"version": "19.0.0-next.6",
|
|
4
4
|
"license": "EUPL-1.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"ng": "ng",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"private": true,
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@eui/deps-base": "19.0.0-next.
|
|
24
|
+
"@eui/deps-base": "19.0.0-next.6"
|
|
25
25
|
},
|
|
26
26
|
"resolutions": {
|
|
27
27
|
"js-yaml": ">=3.13.1",
|
|
@@ -3,7 +3,7 @@ import {RouterModule} from '@angular/router';
|
|
|
3
3
|
import {AppComponent} from './app.component';
|
|
4
4
|
import {EuiAppModule} from '@eui/components/layout';
|
|
5
5
|
import {CoreModule} from './core/core.module';
|
|
6
|
-
import {routes} from './app
|
|
6
|
+
import {routes} from './app.routes';
|
|
7
7
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
|
8
8
|
|
|
9
9
|
describe('AppComponent', () => {
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
|
+
// import { BrowserModule } from '@angular/platform-browser';
|
|
3
|
+
// import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
4
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
5
|
+
import { EuiLayoutModule } from '@eui/components/layout';
|
|
6
|
+
import { EuiLanguageSelectorModule } from '@eui/components/eui-language-selector';
|
|
7
|
+
import { EuiUserProfileModule } from '@eui/components/eui-user-profile';
|
|
8
|
+
import { EuiIconModule } from '@eui/components/eui-icon';
|
|
2
9
|
|
|
3
10
|
@Component({
|
|
4
11
|
selector: 'app-root',
|
|
5
12
|
templateUrl: './app.component.html',
|
|
13
|
+
standalone: true,
|
|
14
|
+
imports: [
|
|
15
|
+
TranslateModule,
|
|
16
|
+
EuiLayoutModule,
|
|
17
|
+
EuiIconModule,
|
|
18
|
+
EuiUserProfileModule,
|
|
19
|
+
EuiLanguageSelectorModule,
|
|
20
|
+
],
|
|
6
21
|
})
|
|
7
22
|
export class AppComponent {
|
|
8
23
|
sidebarItems = [
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { APP_INITIALIZER, ApplicationConfig, importProvidersFrom } from '@angular/core';
|
|
2
|
+
import { provideRouter } from '@angular/router';
|
|
3
|
+
|
|
4
|
+
import { routes } from './app.routes';
|
|
5
|
+
import { AppStarterService } from './app-starter.service';
|
|
6
|
+
|
|
2
7
|
import { TranslateModule } from '@ngx-translate/core';
|
|
3
|
-
|
|
4
|
-
import { EffectsModule } from '@ngrx/effects';
|
|
5
|
-
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
8
|
+
|
|
6
9
|
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
|
7
10
|
import {
|
|
8
11
|
CachePreventionInterceptor,
|
|
@@ -11,48 +14,20 @@ import {
|
|
|
11
14
|
EuLoginSessionTimeoutHandlingInterceptor,
|
|
12
15
|
CoreModule as EuiCoreModule,
|
|
13
16
|
translateConfig,
|
|
14
|
-
CoreModuleEffects,
|
|
15
17
|
EUI_CONFIG_TOKEN,
|
|
16
18
|
} from '@eui/core';
|
|
17
|
-
import { EuiLayoutModule } from '@eui/components/layout';
|
|
18
|
-
import { EuiUserProfileModule } from '@eui/components/eui-user-profile';
|
|
19
19
|
|
|
20
|
-
import { appConfig } from '
|
|
21
|
-
import { environment } from '
|
|
20
|
+
import { appConfig as euiAppConfig} from '../config';
|
|
21
|
+
import { environment } from '../environments/environment';
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
import { SharedModule } from '@shared/shared.module';
|
|
26
|
-
|
|
27
|
-
@NgModule({
|
|
28
|
-
imports: [
|
|
29
|
-
EuiLayoutModule,
|
|
30
|
-
EuiUserProfileModule,
|
|
31
|
-
SharedModule,
|
|
32
|
-
EuiCoreModule.forRoot(),
|
|
33
|
-
EffectsModule.forRoot([...CoreModuleEffects]),
|
|
34
|
-
TranslateModule.forRoot(translateConfig),
|
|
35
|
-
StoreModule.forRoot(REDUCER_TOKEN, { metaReducers }),
|
|
36
|
-
StoreModule.forRoot(REDUCER_TOKEN, { metaReducers }),
|
|
37
|
-
!environment.production ? StoreDevtoolsModule.instrument({ maxAge: 50 }) : [],
|
|
38
|
-
],
|
|
39
|
-
declarations: [
|
|
40
|
-
],
|
|
41
|
-
exports: [
|
|
42
|
-
EuiLayoutModule,
|
|
43
|
-
EuiUserProfileModule,
|
|
44
|
-
SharedModule,
|
|
45
|
-
],
|
|
23
|
+
export const appConfig: ApplicationConfig = {
|
|
46
24
|
providers: [
|
|
25
|
+
importProvidersFrom(EuiCoreModule.forRoot()),
|
|
26
|
+
importProvidersFrom(TranslateModule.forRoot(translateConfig)),
|
|
47
27
|
provideHttpClient(withInterceptorsFromDi()),
|
|
48
|
-
{
|
|
49
|
-
provide: REDUCER_TOKEN,
|
|
50
|
-
deps: [],
|
|
51
|
-
useFactory: getReducers,
|
|
52
|
-
},
|
|
53
28
|
{
|
|
54
29
|
provide: EUI_CONFIG_TOKEN,
|
|
55
|
-
useValue: {
|
|
30
|
+
useValue: { euiAppConfig, environment }
|
|
56
31
|
},
|
|
57
32
|
{
|
|
58
33
|
// Sets the withCredentials on Ajax Request to send the JSESSIONID cookie to another domain.
|
|
@@ -83,8 +58,16 @@ import { SharedModule } from '@shared/shared.module';
|
|
|
83
58
|
useClass: CachePreventionInterceptor,
|
|
84
59
|
multi: true,
|
|
85
60
|
},
|
|
86
|
-
]
|
|
87
|
-
})
|
|
88
|
-
export class CoreModule {
|
|
89
61
|
|
|
90
|
-
|
|
62
|
+
AppStarterService,
|
|
63
|
+
// {
|
|
64
|
+
// provide: APP_INITIALIZER,
|
|
65
|
+
// useFactory: (appStarterService: AppStarterService) => () => new Promise<void>((resolve) => {
|
|
66
|
+
// appStarterService.start().subscribe(() => resolve());
|
|
67
|
+
// }),
|
|
68
|
+
// deps: [AppStarterService],
|
|
69
|
+
// multi: true
|
|
70
|
+
// },
|
|
71
|
+
provideRouter(routes),
|
|
72
|
+
],
|
|
73
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Routes } from '@angular/router';
|
|
2
|
+
|
|
3
|
+
export const routes: Routes = [
|
|
4
|
+
{ path: '', redirectTo: 'screen/home', pathMatch: 'full' },
|
|
5
|
+
{ path: 'index.jsp', redirectTo: 'screen/home' },
|
|
6
|
+
{ path: 'screen/home', loadChildren: () => import('./features/home/home.routes').then(m => m.HOME_ROUTES) },
|
|
7
|
+
{ path: 'screen/module1', loadChildren: () => import('./features/module1/module1.routes').then(m => m.MODULE1_ROUTES) },
|
|
8
|
+
{ path: 'screen/module2', loadChildren: () => import('./features/module2/module2.routes').then(m => m.MODULE2_ROUTES) },
|
|
9
|
+
];
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { Component, Inject } from '@angular/core';
|
|
2
|
-
import { CONFIG_TOKEN } from '@eui/core';
|
|
3
|
-
import {
|
|
2
|
+
import { CONFIG_TOKEN, EuiAppConfig } from '@eui/core';
|
|
3
|
+
import { EuiPageModule } from '@eui/components/eui-page';
|
|
4
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
4
5
|
|
|
5
6
|
@Component({
|
|
6
7
|
templateUrl: './home.component.html',
|
|
8
|
+
standalone: true,
|
|
9
|
+
imports: [
|
|
10
|
+
EuiPageModule,
|
|
11
|
+
TranslateModule,
|
|
12
|
+
],
|
|
7
13
|
})
|
|
8
14
|
export class HomeComponent {
|
|
9
|
-
constructor(@Inject(CONFIG_TOKEN)
|
|
15
|
+
constructor(@Inject(CONFIG_TOKEN) protected config: EuiAppConfig) {
|
|
10
16
|
console.log(config);
|
|
11
17
|
}
|
|
12
18
|
}
|
package/lib/skeletons/_angular/base/src/app/features/module1/components/page1/page1.component.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
|
+
import { EuiPageModule } from '@eui/components/eui-page';
|
|
2
3
|
|
|
3
4
|
@Component({
|
|
4
|
-
templateUrl: './page1.component.html'
|
|
5
|
+
templateUrl: './page1.component.html',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [
|
|
8
|
+
EuiPageModule,
|
|
9
|
+
],
|
|
5
10
|
})
|
|
6
|
-
export class Page1Component {
|
|
7
|
-
}
|
|
11
|
+
export class Page1Component {}
|
package/lib/skeletons/_angular/base/src/app/features/module1/components/page2/page2.component.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
|
+
import { EuiPageModule } from '@eui/components/eui-page';
|
|
2
3
|
|
|
3
4
|
@Component({
|
|
4
|
-
templateUrl: './page2.component.html'
|
|
5
|
+
templateUrl: './page2.component.html',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [
|
|
8
|
+
EuiPageModule,
|
|
9
|
+
],
|
|
5
10
|
})
|
|
6
|
-
export class Page2Component {
|
|
7
|
-
}
|
|
11
|
+
export class Page2Component {}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
|
+
import { EuiPageModule } from '@eui/components/eui-page';
|
|
2
3
|
|
|
3
4
|
@Component({
|
|
4
5
|
templateUrl: './module1.component.html',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [
|
|
8
|
+
EuiPageModule,
|
|
9
|
+
],
|
|
5
10
|
})
|
|
6
|
-
export class Module1Component {
|
|
7
|
-
|
|
8
|
-
}
|
|
11
|
+
export class Module1Component {}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { RouterModule, Routes } from '@angular/router';
|
|
1
|
+
import { Routes } from '@angular/router';
|
|
3
2
|
import { Page1Component } from './components/page1/page1.component';
|
|
4
3
|
import { Page2Component } from './components/page2/page2.component';
|
|
5
4
|
import { Module1Component } from './module1.component';
|
|
6
5
|
|
|
7
|
-
const
|
|
6
|
+
export const MODULE1_ROUTES: Routes = [
|
|
8
7
|
{ path: '', component: Module1Component },
|
|
9
8
|
{ path: 'page1', component: Page1Component },
|
|
10
9
|
{ path: 'page2', component: Page2Component },
|
|
11
10
|
];
|
|
12
|
-
|
|
13
|
-
@NgModule({
|
|
14
|
-
imports: [
|
|
15
|
-
RouterModule.forChild(routes)
|
|
16
|
-
],
|
|
17
|
-
})
|
|
18
|
-
export class Module1RoutingModule {}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
|
+
import { EuiPageModule } from '@eui/components/eui-page';
|
|
2
3
|
|
|
3
4
|
@Component({
|
|
4
|
-
templateUrl: './module2.component.html'
|
|
5
|
+
templateUrl: './module2.component.html',
|
|
6
|
+
standalone: true,
|
|
7
|
+
imports: [
|
|
8
|
+
EuiPageModule,
|
|
9
|
+
],
|
|
5
10
|
})
|
|
6
|
-
export class Module2Component {
|
|
7
|
-
}
|
|
11
|
+
export class Module2Component {}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import { enableProdMode } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { enableProdMode } from '@angular/core';
|
|
2
|
+
import { preInitApp } from '@eui/core';
|
|
3
|
+
import { environment } from './environments/environment';
|
|
4
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
5
|
+
import { AppComponent } from './app/app.component';
|
|
6
|
+
import { appConfig } from './app/app.config';
|
|
7
7
|
|
|
8
8
|
if (environment.production) {
|
|
9
9
|
enableProdMode();
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
preInitApp(environment).then(() =>
|
|
13
|
-
|
|
14
|
-
.bootstrapModule(AppModule)
|
|
15
|
-
.catch((err) => console.error(err))
|
|
16
|
-
);
|
|
13
|
+
bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)));
|
|
17
14
|
|
|
18
15
|
declare global {
|
|
19
16
|
interface Window {
|
|
@@ -6,16 +6,21 @@ import {
|
|
|
6
6
|
CoreState,
|
|
7
7
|
} from '@eui/core';
|
|
8
8
|
import { Observable, Subscription } from 'rxjs';
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} from '@eui/ecl';
|
|
9
|
+
import { EclSiteHeaderLoginEvent, EclSiteHeaderSearchEvent } from '@eui/ecl/components/ecl-site-header';
|
|
10
|
+
import { EclMenuItemSelectEvent } from '@eui/ecl/components/ecl-menu';
|
|
11
|
+
import { EclAllModule } from '@eui/ecl';
|
|
12
|
+
import { RouterOutlet } from '@angular/router';
|
|
13
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
15
14
|
|
|
16
15
|
@Component({
|
|
17
16
|
selector: 'app-root',
|
|
18
17
|
templateUrl: './app.component.html',
|
|
18
|
+
standalone: true,
|
|
19
|
+
imports: [
|
|
20
|
+
EclAllModule, // TODO import the relevant component modules instead of the "All" one
|
|
21
|
+
RouterOutlet,
|
|
22
|
+
TranslateModule,
|
|
23
|
+
]
|
|
19
24
|
})
|
|
20
25
|
export class AppComponent implements OnDestroy {
|
|
21
26
|
userInfos: UserState;
|
|
@@ -6,16 +6,13 @@ import {
|
|
|
6
6
|
CoreState,
|
|
7
7
|
} from '@eui/core';
|
|
8
8
|
import { Observable, Subscription } from 'rxjs';
|
|
9
|
-
|
|
10
|
-
import {
|
|
11
|
-
EclMenuItemSelectEvent,
|
|
12
|
-
EclSiteHeaderLoginEvent,
|
|
13
|
-
EclSiteHeaderSearchEvent,
|
|
14
|
-
} from '@eui/ecl';
|
|
9
|
+
import { EclSiteHeaderLoginEvent, EclSiteHeaderSearchEvent } from '@eui/ecl/components/ecl-site-header';
|
|
10
|
+
import { EclMenuItemSelectEvent } from '@eui/ecl/components/ecl-menu';
|
|
15
11
|
|
|
16
12
|
@Component({
|
|
17
13
|
selector: 'app-root',
|
|
18
14
|
templateUrl: './app.component.html',
|
|
15
|
+
standalone: true,
|
|
19
16
|
})
|
|
20
17
|
export class AppComponent implements OnDestroy {
|
|
21
18
|
userInfos: UserState;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "19.0.0-next.
|
|
3
|
+
"version": "19.0.0-next.6",
|
|
4
4
|
"license": "EUPL-1.1",
|
|
5
5
|
"description": "eUI JEE Symfony app scripts",
|
|
6
6
|
"scripts": {
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
"private": true,
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@eui/deps-base": "19.0.0-next.
|
|
21
|
+
"@eui/deps-base": "19.0.0-next.6"
|
|
22
22
|
}
|
|
23
23
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { RouterModule, Routes } from '@angular/router';
|
|
3
|
-
|
|
4
|
-
export const routes: Routes = [
|
|
5
|
-
{ path: '', redirectTo: 'screen/home', pathMatch: 'full' },
|
|
6
|
-
{ path: 'index.jsp', redirectTo: 'screen/home' },
|
|
7
|
-
{ path: 'screen/home', loadChildren: () => import('./features/home/home.module').then(m => m.Module) },
|
|
8
|
-
{ path: 'screen/module1', loadChildren: () => import('./features/module1/module1.module').then(m => m.Module) },
|
|
9
|
-
{ path: 'screen/module2', loadChildren: () => import('./features/module2/module2.module').then(m => m.Module) },
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
@NgModule({
|
|
13
|
-
imports: [
|
|
14
|
-
RouterModule.forRoot(routes),
|
|
15
|
-
],
|
|
16
|
-
})
|
|
17
|
-
export class AppRoutingModule {}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {TestBed} from '@angular/core/testing';
|
|
2
|
-
import {AppModule} from './app.module';
|
|
3
|
-
import {AppStarterService} from './app-starter.service';
|
|
4
|
-
import {of} from 'rxjs';
|
|
5
|
-
|
|
6
|
-
describe('AppModule', () => {
|
|
7
|
-
let appStarterService: AppStarterService;
|
|
8
|
-
|
|
9
|
-
beforeAll(() => {
|
|
10
|
-
TestBed.resetTestingModule()
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
beforeEach(async () => {
|
|
14
|
-
const appStarterServiceMock = {
|
|
15
|
-
start: jasmine.createSpy('start').and.returnValue(of(null)),
|
|
16
|
-
};
|
|
17
|
-
await TestBed.configureTestingModule({
|
|
18
|
-
imports: [AppModule],
|
|
19
|
-
providers: [
|
|
20
|
-
{provide: AppStarterService, useValue: appStarterServiceMock},
|
|
21
|
-
],
|
|
22
|
-
}).compileComponents();
|
|
23
|
-
|
|
24
|
-
appStarterService = TestBed.inject(AppStarterService);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('should call start method of AppStarterService', () => {
|
|
28
|
-
expect(appStarterService.start).toHaveBeenCalled();
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
2
|
-
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
3
|
-
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
|
4
|
-
|
|
5
|
-
import { AppRoutingModule } from './app-routing.module';
|
|
6
|
-
import { AppComponent } from './app.component';
|
|
7
|
-
import { CoreModule } from './core/core.module';
|
|
8
|
-
import { AppStarterService } from './app-starter.service';
|
|
9
|
-
|
|
10
|
-
@NgModule({
|
|
11
|
-
declarations: [
|
|
12
|
-
AppComponent,
|
|
13
|
-
],
|
|
14
|
-
imports: [
|
|
15
|
-
BrowserModule,
|
|
16
|
-
BrowserAnimationsModule,
|
|
17
|
-
CoreModule,
|
|
18
|
-
AppRoutingModule,
|
|
19
|
-
],
|
|
20
|
-
providers: [
|
|
21
|
-
AppStarterService,
|
|
22
|
-
{
|
|
23
|
-
provide: APP_INITIALIZER,
|
|
24
|
-
useFactory: (appStarterService: AppStarterService) => () => new Promise<void>((resolve) => {
|
|
25
|
-
appStarterService.start().subscribe(() => resolve());
|
|
26
|
-
}),
|
|
27
|
-
deps: [AppStarterService],
|
|
28
|
-
multi: true
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
bootstrap: [
|
|
32
|
-
AppComponent,
|
|
33
|
-
],
|
|
34
|
-
})
|
|
35
|
-
export class AppModule {}
|
|
File without changes
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { MetaReducer } from '@ngrx/store';
|
|
3
|
-
import { storeFreeze } from 'ngrx-store-freeze';
|
|
4
|
-
import { reducers as coreReducers, localStorageSync } from '@eui/core';
|
|
5
|
-
import { CoreState, getAppState } from '@eui/core';
|
|
6
|
-
|
|
7
|
-
import { environment } from '../../../environments/environment';
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line
|
|
10
|
-
export const REDUCER_TOKEN = new InjectionToken<any>('Registered Reducers');
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Define here your app state
|
|
14
|
-
*
|
|
15
|
-
* [IMPORTANT]
|
|
16
|
-
* There are some **reserved** slice of the state
|
|
17
|
-
* that you **can not** use in your application ==> app |user | notification
|
|
18
|
-
*/
|
|
19
|
-
// eslint-disable-next-line
|
|
20
|
-
export interface AppState extends CoreState {
|
|
21
|
-
// [key: string]: fromTaskManager.State | any;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Define here the reducers of your app
|
|
26
|
-
*/
|
|
27
|
-
const rootReducer = Object.assign({}, coreReducers, {
|
|
28
|
-
// [fromTaskManager.namespace]: fromTaskManager.reducers,
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export const getReducers = () => rootReducer;
|
|
32
|
-
|
|
33
|
-
export const metaReducers: MetaReducer<AppState>[] = !environment.production ? [localStorageSync, storeFreeze] : [localStorageSync];
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { RouterModule, Routes } from '@angular/router';
|
|
3
|
-
|
|
4
|
-
import { HomeComponent } from './home.component';
|
|
5
|
-
|
|
6
|
-
const routes: Routes = [
|
|
7
|
-
{ path: '', component: HomeComponent },
|
|
8
|
-
];
|
|
9
|
-
|
|
10
|
-
@NgModule({
|
|
11
|
-
imports: [
|
|
12
|
-
RouterModule.forChild(routes)
|
|
13
|
-
],
|
|
14
|
-
})
|
|
15
|
-
export class HomeRoutingModule {}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import { SharedModule } from '@shared/shared.module';
|
|
4
|
-
|
|
5
|
-
import { HomeRoutingModule } from './home-routing.module';
|
|
6
|
-
|
|
7
|
-
import { HomeComponent } from './home.component';
|
|
8
|
-
|
|
9
|
-
@NgModule({
|
|
10
|
-
imports: [
|
|
11
|
-
SharedModule,
|
|
12
|
-
HomeRoutingModule,
|
|
13
|
-
],
|
|
14
|
-
declarations: [
|
|
15
|
-
HomeComponent,
|
|
16
|
-
],
|
|
17
|
-
})
|
|
18
|
-
export class Module {}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { Module1RoutingModule } from './module1-routing.module';
|
|
3
|
-
import { Module1Component } from './module1.component';
|
|
4
|
-
import { Page1Component } from './components/page1/page1.component';
|
|
5
|
-
import { Page2Component } from './components/page2/page2.component';
|
|
6
|
-
|
|
7
|
-
import { SharedModule } from '@shared/shared.module';
|
|
8
|
-
|
|
9
|
-
@NgModule({
|
|
10
|
-
imports: [
|
|
11
|
-
SharedModule,
|
|
12
|
-
Module1RoutingModule,
|
|
13
|
-
],
|
|
14
|
-
declarations: [
|
|
15
|
-
Module1Component,
|
|
16
|
-
Page1Component,
|
|
17
|
-
Page2Component,
|
|
18
|
-
],
|
|
19
|
-
})
|
|
20
|
-
export class Module {
|
|
21
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { RouterModule, Routes } from '@angular/router';
|
|
3
|
-
import { Module2Component } from './module2.component';
|
|
4
|
-
|
|
5
|
-
const routes: Routes = [
|
|
6
|
-
{ path: '', component: Module2Component },
|
|
7
|
-
];
|
|
8
|
-
|
|
9
|
-
@NgModule({
|
|
10
|
-
imports: [
|
|
11
|
-
RouterModule.forChild([
|
|
12
|
-
{ path: '', component: Module2Component }
|
|
13
|
-
])
|
|
14
|
-
],
|
|
15
|
-
})
|
|
16
|
-
export class Module2RoutingModule {}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { Module2RoutingModule } from './module2-routing.module';
|
|
3
|
-
import { Module2Component } from './module2.component';
|
|
4
|
-
|
|
5
|
-
import { SharedModule } from '@shared/shared.module';
|
|
6
|
-
|
|
7
|
-
@NgModule({
|
|
8
|
-
imports: [
|
|
9
|
-
SharedModule,
|
|
10
|
-
Module2RoutingModule,
|
|
11
|
-
],
|
|
12
|
-
declarations: [
|
|
13
|
-
Module2Component,
|
|
14
|
-
],
|
|
15
|
-
})
|
|
16
|
-
export class Module {
|
|
17
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// Angular
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
-
|
|
6
|
-
// Common 3rd party module used accross the app
|
|
7
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
8
|
-
|
|
9
|
-
// eUI specific modules - commonly used accross the app - prefered way
|
|
10
|
-
// keep here to avoid imports within features modules
|
|
11
|
-
import { EuiPageModule } from '@eui/components/eui-page';
|
|
12
|
-
import { EuiIconModule } from '@eui/components/eui-icon';
|
|
13
|
-
import { EuiUserProfileModule } from '@eui/components/eui-user-profile';
|
|
14
|
-
import { EuiLanguageSelectorModule } from '@eui/components/eui-language-selector';
|
|
15
|
-
|
|
16
|
-
// import ALL eUI components
|
|
17
|
-
// import { EuiAllModule } from '@eui/components';
|
|
18
|
-
|
|
19
|
-
const MODULES = [
|
|
20
|
-
CommonModule,
|
|
21
|
-
FormsModule, ReactiveFormsModule,
|
|
22
|
-
|
|
23
|
-
TranslateModule,
|
|
24
|
-
|
|
25
|
-
// put here commonly used eUI modules components throughout the application
|
|
26
|
-
EuiPageModule,
|
|
27
|
-
EuiIconModule,
|
|
28
|
-
EuiUserProfileModule,
|
|
29
|
-
EuiLanguageSelectorModule,
|
|
30
|
-
|
|
31
|
-
// in case of you really want to import all eUI components, see commented imports above
|
|
32
|
-
// EuiAllModule,
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
@NgModule({
|
|
36
|
-
imports: [
|
|
37
|
-
...MODULES,
|
|
38
|
-
],
|
|
39
|
-
declarations: [
|
|
40
|
-
],
|
|
41
|
-
exports: [
|
|
42
|
-
...MODULES,
|
|
43
|
-
]
|
|
44
|
-
})
|
|
45
|
-
export class SharedModule {}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { RouterModule } from '@angular/router';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
5
|
-
|
|
6
|
-
import { EclAllModule } from '@eui/ecl';
|
|
7
|
-
|
|
8
|
-
const MODULES = [
|
|
9
|
-
RouterModule,
|
|
10
|
-
EclAllModule,
|
|
11
|
-
TranslateModule,
|
|
12
|
-
CommonModule,
|
|
13
|
-
];
|
|
14
|
-
@NgModule({
|
|
15
|
-
imports: [...MODULES],
|
|
16
|
-
declarations: [],
|
|
17
|
-
exports: [...MODULES],
|
|
18
|
-
})
|
|
19
|
-
export class SharedModule {}
|