@eui/cli 19.0.0-next.3 → 19.0.0-next.5

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.
Files changed (30) hide show
  1. package/.version.properties +1 -1
  2. package/lib/skeletons/_angular/base/package.json +2 -2
  3. package/lib/skeletons/_angular/base/src/app/app.component.spec.ts +1 -1
  4. package/lib/skeletons/_angular/base/src/app/app.component.ts +9 -0
  5. package/lib/skeletons/_angular/base/src/app/app.config.ts +20 -0
  6. package/lib/skeletons/_angular/base/src/app/app.routes.ts +9 -0
  7. package/lib/skeletons/_angular/base/src/app/core/core.module.ts +1 -3
  8. package/lib/skeletons/_angular/base/src/app/features/home/home.component.ts +6 -2
  9. package/lib/skeletons/_angular/base/src/app/features/home/home.routes.ts +6 -0
  10. package/lib/skeletons/_angular/base/src/app/features/module1/components/page1/page1.component.ts +7 -3
  11. package/lib/skeletons/_angular/base/src/app/features/module1/components/page2/page2.component.ts +7 -3
  12. package/lib/skeletons/_angular/base/src/app/features/module1/module1.component.ts +6 -3
  13. package/lib/skeletons/_angular/base/src/app/features/module1/{module1-routing.module.ts → module1.routes.ts} +2 -10
  14. package/lib/skeletons/_angular/base/src/app/features/module2/module2.component.ts +7 -3
  15. package/lib/skeletons/_angular/base/src/app/features/module2/module2.routes.ts +6 -0
  16. package/lib/skeletons/_angular/base/src/main.ts +7 -10
  17. package/lib/skeletons/_angular/base-mobile/package.json +1 -1
  18. package/lib/skeletons/_angular/options/ecl-ec/src/app/app.component.ts +3 -6
  19. package/lib/skeletons/_angular/options/ecl-eu/src/app/app.component.ts +3 -6
  20. package/lib/skeletons/web-symfony/myapp-web/package.json +2 -2
  21. package/package.json +1 -1
  22. package/lib/skeletons/_angular/base/src/app/app-routing.module.ts +0 -17
  23. package/lib/skeletons/_angular/base/src/app/app.module.spec.ts +0 -31
  24. package/lib/skeletons/_angular/base/src/app/app.module.ts +0 -35
  25. package/lib/skeletons/_angular/base/src/app/features/home/home-routing.module.ts +0 -15
  26. package/lib/skeletons/_angular/base/src/app/features/home/home.module.ts +0 -18
  27. package/lib/skeletons/_angular/base/src/app/features/module1/module1.module.ts +0 -21
  28. package/lib/skeletons/_angular/base/src/app/features/module2/module2-routing.module.ts +0 -16
  29. package/lib/skeletons/_angular/base/src/app/features/module2/module2.module.ts +0 -17
  30. package/lib/skeletons/_angular/base/src/app/shared/shared.module.ts +0 -45
@@ -1 +1 @@
1
- 19.0.0-next.3
1
+ 19.0.0-next.5
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "19.0.0-next.3",
3
+ "version": "19.0.0-next.5",
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.3"
24
+ "@eui/deps-base": "19.0.0-next.5"
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-routing.module';
6
+ import {routes} from './app.routes';
7
7
  import { provideHttpClientTesting } from '@angular/common/http/testing';
8
8
 
9
9
  describe('AppComponent', () => {
@@ -1,8 +1,17 @@
1
1
  import { Component } from '@angular/core';
2
+ import { BrowserModule } from '@angular/platform-browser';
3
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
4
+ import { CoreModule } from './core/core.module';
2
5
 
3
6
  @Component({
4
7
  selector: 'app-root',
5
8
  templateUrl: './app.component.html',
9
+ standalone: true,
10
+ imports: [
11
+ BrowserModule,
12
+ BrowserAnimationsModule,
13
+ CoreModule,
14
+ ],
6
15
  })
7
16
  export class AppComponent {
8
17
  sidebarItems = [
@@ -0,0 +1,20 @@
1
+ import { APP_INITIALIZER, ApplicationConfig } from '@angular/core';
2
+ import { provideRouter } from '@angular/router';
3
+
4
+ import { routes } from './app.routes';
5
+ import { AppStarterService } from './app-starter.service';
6
+
7
+ export const appConfig: ApplicationConfig = {
8
+ providers: [
9
+ AppStarterService,
10
+ {
11
+ provide: APP_INITIALIZER,
12
+ useFactory: (appStarterService: AppStarterService) => () => new Promise<void>((resolve) => {
13
+ appStarterService.start().subscribe(() => resolve());
14
+ }),
15
+ deps: [AppStarterService],
16
+ multi: true
17
+ },
18
+ provideRouter(routes),
19
+ ],
20
+ };
@@ -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
+ ];
@@ -85,6 +85,4 @@ import { SharedModule } from '@shared/shared.module';
85
85
  },
86
86
  ]
87
87
  })
88
- export class CoreModule {
89
-
90
- }
88
+ export class CoreModule {}
@@ -1,9 +1,13 @@
1
1
  import { Component, Inject } from '@angular/core';
2
- import { CONFIG_TOKEN } from '@eui/core';
3
- import { EuiAppConfig } from '@eui/core';
2
+ import { CONFIG_TOKEN, EuiAppConfig } from '@eui/core';
3
+ import { EuiPageModule } from '@eui/components/eui-page';
4
4
 
5
5
  @Component({
6
6
  templateUrl: './home.component.html',
7
+ standalone: true,
8
+ imports: [
9
+ EuiPageModule,
10
+ ],
7
11
  })
8
12
  export class HomeComponent {
9
13
  constructor(@Inject(CONFIG_TOKEN) private config: EuiAppConfig) {
@@ -0,0 +1,6 @@
1
+ import { Routes } from '@angular/router';
2
+ import { HomeComponent } from './home.component';
3
+
4
+ export const HOME_ROUTES: Routes = [
5
+ { path: '', component: HomeComponent },
6
+ ];
@@ -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 {}
@@ -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 { NgModule } from '@angular/core';
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 routes: Routes = [
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 {}
@@ -0,0 +1,6 @@
1
+ import { Routes } from '@angular/router';
2
+ import { Module2Component } from './module2.component';
3
+
4
+ export const MODULE2_ROUTES: Routes = [
5
+ { path: '', component: Module2Component },
6
+ ];
@@ -1,19 +1,16 @@
1
- import { enableProdMode } from "@angular/core";
2
- import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
3
- import { preInitApp } from "@eui/core";
4
-
5
- import { AppModule } from "./app/app.module";
6
- import { environment } from "./environments/environment";
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
- platformBrowserDynamic()
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 {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "19.0.0-next.3",
3
+ "version": "19.0.0-next.5",
4
4
  "license": "EUPL-1.1",
5
5
  "scripts": {
6
6
  "ng": "ng",
@@ -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;
@@ -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",
3
+ "version": "19.0.0-next.5",
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.3"
21
+ "@eui/deps-base": "19.0.0-next.5"
22
22
  }
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/cli",
3
- "version": "19.0.0-next.3",
3
+ "version": "19.0.0-next.5",
4
4
  "tag": "next",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI CLI app generator",
@@ -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 {}
@@ -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 {}