@eui/cli 19.0.0-next.9 → 19.0.0-rc.1

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.
@@ -1 +1 @@
1
- 19.0.0-next.9
1
+ 19.0.0-rc.1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "19.0.0-next.9",
3
+ "version": "19.0.0-rc.1",
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.9"
24
+ "@eui/deps-base": "19.0.0-rc.1"
25
25
  },
26
26
  "resolutions": {
27
27
  "js-yaml": ">=3.13.1",
@@ -44,7 +44,8 @@
44
44
  }
45
45
  ],
46
46
  "@typescript-eslint/ban-ts-comment": "off",
47
- "@typescript-eslint/ban-types": "error",
47
+ "@typescript-eslint/no-empty-object-type": "error",
48
+ "@typescript-eslint/no-unsafe-function-type": "error",
48
49
  "@typescript-eslint/consistent-type-definitions": "off",
49
50
  "@typescript-eslint/dot-notation": "off",
50
51
  "@typescript-eslint/explicit-member-accessibility": [
@@ -1,4 +1,4 @@
1
- import { Inject, Injectable } from '@angular/core';
1
+ import { inject, Injectable } from '@angular/core';
2
2
  import { HttpClient } from '@angular/common/http';
3
3
  import {
4
4
  CONFIG_TOKEN,
@@ -7,8 +7,9 @@ import {
7
7
  EuiAppConfig,
8
8
  UserDetails,
9
9
  UserPreferences,
10
+ EuiServiceStatus,
10
11
  } from '@eui/core';
11
- import { Observable, of, zip } from 'rxjs';
12
+ import { catchError, Observable, of } from 'rxjs';
12
13
  import { switchMap } from 'rxjs/operators';
13
14
 
14
15
  @Injectable({
@@ -16,25 +17,17 @@ import { switchMap } from 'rxjs/operators';
16
17
  })
17
18
  export class AppStarterService {
18
19
  defaultUserPreferences: UserPreferences | undefined;
20
+ private userService: UserService = inject(UserService);
21
+ private i18nService: I18nService = inject(I18nService);
22
+ private config: EuiAppConfig = inject(CONFIG_TOKEN);
23
+ private http: HttpClient = inject(HttpClient);
19
24
 
20
- constructor(
21
- protected userService: UserService,
22
- protected i18nService: I18nService,
23
- @Inject(CONFIG_TOKEN) private config: EuiAppConfig,
24
- protected http: HttpClient,
25
- ) {
26
- }
27
-
28
- // eslint-disable-next-line
29
- start(): Observable<any> {
30
-
31
- return zip(
32
- this.initUserService().pipe(
33
- switchMap((userStatus) => {
34
- console.log(userStatus);
35
- return this.i18nService.init();
36
- }),
37
- ),
25
+ start(): Observable<EuiServiceStatus> {
26
+ return this.initUserService().pipe(
27
+ switchMap((userStatus) => {
28
+ console.log(userStatus);
29
+ return this.i18nService.init();
30
+ }),
38
31
  );
39
32
  }
40
33
 
@@ -43,12 +36,10 @@ export class AppStarterService {
43
36
  * create user: UserState object
44
37
  * then initialise to the UserService on run time
45
38
  */
46
- // eslint-disable-next-line
47
- initUserService(): Observable<any> {
48
- return zip(
49
- this.fetchUserDetails(),
50
- ).pipe(
51
- switchMap(([userDetails]) => this.userService.init(userDetails)));
39
+ initUserService(): Observable<EuiServiceStatus> {
40
+ return this.fetchUserDetails().pipe(
41
+ switchMap((userDetails) => this.userService.init(userDetails))
42
+ );
52
43
  }
53
44
 
54
45
  /**
@@ -58,11 +49,20 @@ export class AppStarterService {
58
49
  // const url = this.config.modules.your_custom_module.your_custom_endpoint
59
50
  const moduleCoreApi= this.config.modules?.['core'];
60
51
  const url = `${moduleCoreApi?.['base']}${moduleCoreApi?.['userDetails']}`;
61
- const user = { userId: 'anonymous' };
52
+ const user = {
53
+ userId: 'anonymous',
54
+ firstName: 'FirstName',
55
+ lastName: 'LastName',
56
+ fullName: 'FullName',
57
+ };
62
58
 
63
59
  if (!url) {
64
60
  return of(user);
65
61
  }
66
- return this.http.get<UserDetails>(url);
62
+ return this.http.get<UserDetails>(url)
63
+ .pipe(
64
+ // in case of Http failure return dummy user
65
+ catchError(() => of(user)),
66
+ );
67
67
  }
68
68
  }
@@ -1,9 +1,8 @@
1
- import {ComponentFixture, TestBed} from '@angular/core/testing';
2
- import {RouterModule} from '@angular/router';
3
- import {AppComponent} from './app.component';
4
- import {EuiAppModule} from '@eui/components/layout';
5
- import {CoreModule} from './core/core.module';
6
- import {routes} from './app.routes';
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+ import { RouterModule } from '@angular/router';
3
+ import { AppComponent } from './app.component';
4
+ import { EuiAppModule } from '@eui/components/layout';
5
+ import { routes } from './app.routes';
7
6
  import { provideHttpClientTesting } from '@angular/common/http/testing';
8
7
 
9
8
  describe('AppComponent', () => {
@@ -14,7 +13,6 @@ describe('AppComponent', () => {
14
13
  await TestBed.configureTestingModule({
15
14
  imports: [
16
15
  RouterModule.forRoot(routes),
17
- CoreModule,
18
16
  EuiAppModule,
19
17
  ],
20
18
  providers: [
@@ -1,11 +1,10 @@
1
1
  import { Component } from '@angular/core';
2
- // import { BrowserModule } from '@angular/platform-browser';
3
- // import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
4
2
  import { TranslateModule } from '@ngx-translate/core';
5
3
  import { EuiLayoutModule } from '@eui/components/layout';
6
4
  import { EuiLanguageSelectorModule } from '@eui/components/eui-language-selector';
7
5
  import { EuiUserProfileModule } from '@eui/components/eui-user-profile';
8
6
  import { EuiIconModule } from '@eui/components/eui-icon';
7
+ import { EuiMenuItem } from '@eui/components/eui-menu';
9
8
 
10
9
  @Component({
11
10
  selector: 'app-root',
@@ -20,7 +19,7 @@ import { EuiIconModule } from '@eui/components/eui-icon';
20
19
  ],
21
20
  })
22
21
  export class AppComponent {
23
- sidebarItems = [
22
+ sidebarItems: EuiMenuItem[] = [
24
23
  { label: 'Home', url: 'screen/home' },
25
24
  { label: 'Module 1', url: 'screen/module1', children: [
26
25
  { label: 'page 1', url: 'screen/module1/page1' },
@@ -1,5 +1,7 @@
1
- import { APP_INITIALIZER, ApplicationConfig, importProvidersFrom } from '@angular/core';
1
+ import { inject, provideAppInitializer } from '@angular/core';
2
+ import { ApplicationConfig, importProvidersFrom } from '@angular/core';
2
3
  import { provideRouter } from '@angular/router';
4
+ import { Observable } from 'rxjs';
3
5
 
4
6
  import { routes } from './app.routes';
5
7
  import { AppStarterService } from './app-starter.service';
@@ -15,19 +17,29 @@ import {
15
17
  CoreModule as EuiCoreModule,
16
18
  translateConfig,
17
19
  EUI_CONFIG_TOKEN,
20
+ provideEuiInitializer,
21
+ EuiServiceStatus,
18
22
  } from '@eui/core';
19
23
 
20
24
  import { appConfig as euiAppConfig} from '../config';
21
25
  import { environment } from '../environments/environment';
26
+ import { provideAnimations } from '@angular/platform-browser/animations';
27
+
28
+ /**
29
+ * The provided function is injected at application startup and executed during
30
+ * app initialization. If the function returns a Promise or an Observable, initialization
31
+ * does not complete until the Promise is resolved or the Observable is completed.
32
+ */
33
+ const init = (): Observable<EuiServiceStatus> => {
34
+ const appStarter = inject(AppStarterService);
35
+ return appStarter.start();
36
+ };
22
37
 
23
38
  export const appConfig: ApplicationConfig = {
24
39
  providers: [
25
- importProvidersFrom(EuiCoreModule.forRoot()),
26
- importProvidersFrom(TranslateModule.forRoot(translateConfig)),
27
- provideHttpClient(withInterceptorsFromDi()),
28
40
  {
29
41
  provide: EUI_CONFIG_TOKEN,
30
- useValue: { euiAppConfig, environment }
42
+ useValue: { appConfig: euiAppConfig, environment }
31
43
  },
32
44
  {
33
45
  // Sets the withCredentials on Ajax Request to send the JSESSIONID cookie to another domain.
@@ -58,16 +70,15 @@ export const appConfig: ApplicationConfig = {
58
70
  useClass: CachePreventionInterceptor,
59
71
  multi: true,
60
72
  },
61
-
73
+ provideEuiInitializer(),
74
+ provideAppInitializer(init),
75
+ provideHttpClient(withInterceptorsFromDi()),
76
+ importProvidersFrom(
77
+ EuiCoreModule.forRoot(),
78
+ TranslateModule.forRoot(translateConfig)
79
+ ),
62
80
  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
81
  provideRouter(routes),
82
+ provideAnimations(),
72
83
  ],
73
84
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "19.0.0-next.9",
3
+ "version": "19.0.0-rc.1",
4
4
  "license": "EUPL-1.1",
5
5
  "scripts": {
6
6
  "ng": "ng",
@@ -1,19 +1,17 @@
1
- import { Component, OnDestroy } from '@angular/core';
2
- import { Store } from '@ngrx/store';
1
+ import { Component, OnInit, Signal } from '@angular/core';
2
+ import { RouterOutlet } from '@angular/router';
3
3
  import {
4
- getUserState,
4
+ UserService,
5
5
  UserState,
6
- CoreState,
7
6
  } from '@eui/core';
8
- import { Observable, Subscription } from 'rxjs';
9
- import { EclSiteHeaderComponentModule, EclSiteHeaderLoginEvent, EclSiteHeaderSearchEvent } from '@eui/ecl/components/ecl-site-header';
10
- import { EclMenuItemSelectEvent, EclMenuComponentModule } from '@eui/ecl/components/ecl-menu';
11
- import { EclAppComponentModule } from '@eui/ecl/components/ecl-app';
12
- import { EclIconComponentModule } from '@eui/ecl/components/ecl-icon';
13
- import { EclSiteFooterComponentModule } from '@eui/ecl/components/ecl-site-footer';
14
- import { EclBreadcrumbComponentModule } from '@eui/ecl/components/ecl-breadcrumb';
15
- import { EclPageHeaderComponentModule } from '@eui/ecl/components/ecl-page-header';
16
- import { RouterOutlet } from '@angular/router';
7
+ import { EclAppModule } from '@eui/ecl/components/ecl-app';
8
+ import { EclBreadcrumbModule } from '@eui/ecl/components/ecl-breadcrumb';
9
+ import { EclIconModule } from '@eui/ecl/components/ecl-icon';
10
+ import { EclMenuItemSelectEvent, EclMenuModule } from '@eui/ecl/components/ecl-menu';
11
+ import { EclLinkModule } from '@eui/ecl/components/ecl-link';
12
+ import { EclPageHeaderModule } from '@eui/ecl/components/ecl-page-header';
13
+ import { EclSiteFooterModule } from '@eui/ecl/components/ecl-site-footer';
14
+ import { EclSiteHeaderLoginEvent, EclSiteHeaderModule, EclSiteHeaderSearchEvent } from '@eui/ecl/components/ecl-site-header';
17
15
  import { TranslateModule } from '@ngx-translate/core';
18
16
 
19
17
  @Component({
@@ -21,55 +19,47 @@ import { TranslateModule } from '@ngx-translate/core';
21
19
  templateUrl: './app.component.html',
22
20
  standalone: true,
23
21
  imports: [
24
- EclAppComponentModule,
25
- EclBreadcrumbComponentModule,
26
- EclIconComponentModule,
27
- EclMenuComponentModule,
28
- EclPageHeaderComponentModule,
29
- EclSiteHeaderComponentModule,
30
- EclSiteFooterComponentModule,
22
+ EclAppModule,
23
+ EclBreadcrumbModule,
24
+ EclIconModule,
25
+ EclLinkModule,
26
+ EclMenuModule,
27
+ EclPageHeaderModule,
28
+ EclSiteHeaderModule,
29
+ EclSiteFooterModule,
31
30
  RouterOutlet,
32
31
  TranslateModule,
33
32
  ]
34
33
  })
35
- export class AppComponent implements OnDestroy {
36
- userInfos: UserState;
37
- // Observe state changes
38
- userState: Observable<UserState>;
39
- // an array to keep all subscriptions and easily unsubscribe
40
- subs: Subscription[] = [];
34
+ export class AppComponent implements OnInit {
41
35
 
42
36
  isLoggedIn = false;
37
+ userState: Signal<UserState>;
38
+ userInfos: UserState;
43
39
 
44
- constructor(
45
- private store: Store<CoreState>,
46
- ) {
47
- this.userState = this.store.select(getUserState);
48
- this.subs.push(this.userState.subscribe((user: UserState) => {
49
- this.userInfos = { ...user };
50
- }));
51
- }
40
+ constructor(private userService: UserService<UserState>,) { }
52
41
 
53
- ngOnDestroy() {
54
- this.subs.forEach((s: Subscription) => s.unsubscribe());
42
+ ngOnInit(): void {
43
+ this.userState = this.userService.getSignal();
44
+ this.userInfos = this.userState();
55
45
  }
56
46
 
57
- onLogin(evt: EclSiteHeaderLoginEvent) {
47
+ onLogin(evt: EclSiteHeaderLoginEvent): void {
58
48
  this.isLoggedIn = true;
59
49
  console.log(evt);
60
50
  }
61
51
 
62
- onLogout(evt: MouseEvent) {
52
+ onLogout(evt: MouseEvent): void {
63
53
  this.isLoggedIn = false;
64
54
  evt.preventDefault();
65
55
  console.log('logout');
66
56
  }
67
57
 
68
- onSearch(evt: EclSiteHeaderSearchEvent) {
58
+ onSearch(evt: EclSiteHeaderSearchEvent): void {
69
59
  console.log(evt);
70
60
  }
71
61
 
72
- onMenuItemSelected(evt: EclMenuItemSelectEvent) {
62
+ onMenuItemSelected(evt: EclMenuItemSelectEvent): void {
73
63
  console.log('menu item selected', evt);
74
64
  }
75
65
  }
@@ -1,9 +1,11 @@
1
- import { APP_INITIALIZER, ApplicationConfig, importProvidersFrom } from '@angular/core';
1
+ import { inject, provideAppInitializer } from '@angular/core';
2
+ import { ApplicationConfig, importProvidersFrom } from '@angular/core';
2
3
  import { provideRouter } from '@angular/router';
4
+ import { Observable } from 'rxjs';
3
5
 
4
6
  import { routes } from './app.routes';
5
7
  import { AppStarterService } from './app-starter.service';
6
- import { EclLanguageService, EclDefaultLanguageService } from '@eui/ecl/core';
8
+
7
9
  import { TranslateModule } from '@ngx-translate/core';
8
10
 
9
11
  import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
@@ -15,19 +17,29 @@ import {
15
17
  CoreModule as EuiCoreModule,
16
18
  translateConfig,
17
19
  EUI_CONFIG_TOKEN,
20
+ provideEuiInitializer,
21
+ EuiServiceStatus,
18
22
  } from '@eui/core';
19
23
 
20
24
  import { appConfig as euiAppConfig} from '../config';
21
25
  import { environment } from '../environments/environment';
26
+ import { provideAnimations } from '@angular/platform-browser/animations';
27
+
28
+ /**
29
+ * The provided function is injected at application startup and executed during
30
+ * app initialization. If the function returns a Promise or an Observable, initialization
31
+ * does not complete until the Promise is resolved or the Observable is completed.
32
+ */
33
+ const init = (): Observable<EuiServiceStatus> => {
34
+ const appStarter = inject(AppStarterService);
35
+ return appStarter.start();
36
+ };
22
37
 
23
38
  export const appConfig: ApplicationConfig = {
24
39
  providers: [
25
- importProvidersFrom(EuiCoreModule.forRoot()),
26
- importProvidersFrom(TranslateModule.forRoot(translateConfig)),
27
- provideHttpClient(withInterceptorsFromDi()),
28
40
  {
29
41
  provide: EUI_CONFIG_TOKEN,
30
- useValue: { euiAppConfig, environment }
42
+ useValue: { appConfig: euiAppConfig, environment }
31
43
  },
32
44
  {
33
45
  // Sets the withCredentials on Ajax Request to send the JSESSIONID cookie to another domain.
@@ -58,12 +70,15 @@ export const appConfig: ApplicationConfig = {
58
70
  useClass: CachePreventionInterceptor,
59
71
  multi: true,
60
72
  },
61
-
73
+ provideEuiInitializer(),
74
+ provideAppInitializer(init),
75
+ provideHttpClient(withInterceptorsFromDi()),
76
+ importProvidersFrom(
77
+ EuiCoreModule.forRoot(),
78
+ TranslateModule.forRoot(translateConfig)
79
+ ),
62
80
  AppStarterService,
63
- {
64
- provide: EclLanguageService,
65
- useClass: EclDefaultLanguageService
66
- },
67
81
  provideRouter(routes),
82
+ provideAnimations(),
68
83
  ],
69
84
  };
@@ -1,16 +1,16 @@
1
1
  import { Component, Inject } from '@angular/core';
2
2
  import { CONFIG_TOKEN, EuiAppConfig } from '@eui/core';
3
3
  import { TranslateModule } from '@ngx-translate/core';
4
- import { EclListDirectiveModule } from '@eui/ecl/components/ecl-list';
5
- import { EclLinkDirectiveModule } from '@eui/ecl/components/ecl-link';
4
+ import { EclListModule } from '@eui/ecl/components/ecl-list';
5
+ import { EclLinkModule } from '@eui/ecl/components/ecl-link';
6
6
 
7
7
  @Component({
8
8
  templateUrl: './home.component.html',
9
9
  standalone: true,
10
10
  imports: [
11
11
  TranslateModule,
12
- EclLinkDirectiveModule,
13
- EclListDirectiveModule,
12
+ EclLinkModule,
13
+ EclListModule,
14
14
  ],
15
15
  })
16
16
  export class HomeComponent {
@@ -1,19 +1,17 @@
1
- import { Component, OnDestroy } from '@angular/core';
2
- import { Store } from '@ngrx/store';
1
+ import { Component, OnInit, Signal } from '@angular/core';
2
+ import { RouterOutlet } from '@angular/router';
3
3
  import {
4
- getUserState,
4
+ UserService,
5
5
  UserState,
6
- CoreState,
7
6
  } from '@eui/core';
8
- import { Observable, Subscription } from 'rxjs';
9
- import { EclSiteHeaderComponentModule, EclSiteHeaderLoginEvent, EclSiteHeaderSearchEvent } from '@eui/ecl/components/ecl-site-header';
10
- import { EclMenuItemSelectEvent, EclMenuComponentModule } from '@eui/ecl/components/ecl-menu';
11
- import { EclAppComponentModule } from '@eui/ecl/components/ecl-app';
12
- import { EclIconComponentModule } from '@eui/ecl/components/ecl-icon';
13
- import { EclSiteFooterComponentModule } from '@eui/ecl/components/ecl-site-footer';
14
- import { EclBreadcrumbComponentModule } from '@eui/ecl/components/ecl-breadcrumb';
15
- import { EclPageHeaderComponentModule } from '@eui/ecl/components/ecl-page-header';
16
- import { RouterOutlet } from '@angular/router';
7
+ import { EclAppModule } from '@eui/ecl/components/ecl-app';
8
+ import { EclBreadcrumbModule } from '@eui/ecl/components/ecl-breadcrumb';
9
+ import { EclIconModule } from '@eui/ecl/components/ecl-icon';
10
+ import { EclMenuItemSelectEvent, EclMenuModule } from '@eui/ecl/components/ecl-menu';
11
+ import { EclLinkModule } from '@eui/ecl/components/ecl-link';
12
+ import { EclPageHeaderModule } from '@eui/ecl/components/ecl-page-header';
13
+ import { EclSiteFooterModule } from '@eui/ecl/components/ecl-site-footer';
14
+ import { EclSiteHeaderLoginEvent, EclSiteHeaderModule, EclSiteHeaderSearchEvent } from '@eui/ecl/components/ecl-site-header';
17
15
  import { TranslateModule } from '@ngx-translate/core';
18
16
 
19
17
  @Component({
@@ -21,55 +19,47 @@ import { TranslateModule } from '@ngx-translate/core';
21
19
  templateUrl: './app.component.html',
22
20
  standalone: true,
23
21
  imports: [
24
- EclAppComponentModule,
25
- EclBreadcrumbComponentModule,
26
- EclIconComponentModule,
27
- EclMenuComponentModule,
28
- EclPageHeaderComponentModule,
29
- EclSiteHeaderComponentModule,
30
- EclSiteFooterComponentModule,
22
+ EclAppModule,
23
+ EclBreadcrumbModule,
24
+ EclIconModule,
25
+ EclLinkModule,
26
+ EclMenuModule,
27
+ EclPageHeaderModule,
28
+ EclSiteHeaderModule,
29
+ EclSiteFooterModule,
31
30
  RouterOutlet,
32
31
  TranslateModule,
33
32
  ]
34
33
  })
35
- export class AppComponent implements OnDestroy {
36
- userInfos: UserState;
37
- // Observe state changes
38
- userState: Observable<UserState>;
39
- // an array to keep all subscriptions and easily unsubscribe
40
- subs: Subscription[] = [];
34
+ export class AppComponent implements OnInit {
41
35
 
42
36
  isLoggedIn = false;
37
+ userState: Signal<UserState>;
38
+ userInfos: UserState;
43
39
 
44
- constructor(
45
- private store: Store<CoreState>,
46
- ) {
47
- this.userState = this.store.select(getUserState);
48
- this.subs.push(this.userState.subscribe((user: UserState) => {
49
- this.userInfos = { ...user };
50
- }));
51
- }
40
+ constructor(private userService: UserService<UserState>,) { }
52
41
 
53
- ngOnDestroy() {
54
- this.subs.forEach((s: Subscription) => s.unsubscribe());
42
+ ngOnInit(): void {
43
+ this.userState = this.userService.getSignal();
44
+ this.userInfos = this.userState();
55
45
  }
56
46
 
57
- onLogin(evt: EclSiteHeaderLoginEvent) {
47
+ onLogin(evt: EclSiteHeaderLoginEvent): void {
58
48
  this.isLoggedIn = true;
59
49
  console.log(evt);
60
50
  }
61
51
 
62
- onLogout(evt: MouseEvent) {
52
+ onLogout(evt: MouseEvent): void {
63
53
  this.isLoggedIn = false;
64
54
  evt.preventDefault();
65
55
  console.log('logout');
66
56
  }
67
57
 
68
- onSearch(evt: EclSiteHeaderSearchEvent) {
58
+ onSearch(evt: EclSiteHeaderSearchEvent): void {
69
59
  console.log(evt);
70
60
  }
71
61
 
72
- onMenuItemSelected(evt: EclMenuItemSelectEvent) {
62
+ onMenuItemSelected(evt: EclMenuItemSelectEvent): void {
73
63
  console.log('menu item selected', evt);
74
64
  }
75
65
  }
@@ -1,9 +1,11 @@
1
- import { APP_INITIALIZER, ApplicationConfig, importProvidersFrom } from '@angular/core';
1
+ import { inject, provideAppInitializer } from '@angular/core';
2
+ import { ApplicationConfig, importProvidersFrom } from '@angular/core';
2
3
  import { provideRouter } from '@angular/router';
4
+ import { Observable } from 'rxjs';
3
5
 
4
6
  import { routes } from './app.routes';
5
7
  import { AppStarterService } from './app-starter.service';
6
- import { EclLanguageService, EclDefaultLanguageService } from '@eui/ecl/core';
8
+
7
9
  import { TranslateModule } from '@ngx-translate/core';
8
10
 
9
11
  import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
@@ -15,19 +17,29 @@ import {
15
17
  CoreModule as EuiCoreModule,
16
18
  translateConfig,
17
19
  EUI_CONFIG_TOKEN,
20
+ provideEuiInitializer,
21
+ EuiServiceStatus,
18
22
  } from '@eui/core';
19
23
 
20
24
  import { appConfig as euiAppConfig} from '../config';
21
25
  import { environment } from '../environments/environment';
26
+ import { provideAnimations } from '@angular/platform-browser/animations';
27
+
28
+ /**
29
+ * The provided function is injected at application startup and executed during
30
+ * app initialization. If the function returns a Promise or an Observable, initialization
31
+ * does not complete until the Promise is resolved or the Observable is completed.
32
+ */
33
+ const init = (): Observable<EuiServiceStatus> => {
34
+ const appStarter = inject(AppStarterService);
35
+ return appStarter.start();
36
+ };
22
37
 
23
38
  export const appConfig: ApplicationConfig = {
24
39
  providers: [
25
- importProvidersFrom(EuiCoreModule.forRoot()),
26
- importProvidersFrom(TranslateModule.forRoot(translateConfig)),
27
- provideHttpClient(withInterceptorsFromDi()),
28
40
  {
29
41
  provide: EUI_CONFIG_TOKEN,
30
- useValue: { euiAppConfig, environment }
42
+ useValue: { appConfig: euiAppConfig, environment }
31
43
  },
32
44
  {
33
45
  // Sets the withCredentials on Ajax Request to send the JSESSIONID cookie to another domain.
@@ -58,12 +70,15 @@ export const appConfig: ApplicationConfig = {
58
70
  useClass: CachePreventionInterceptor,
59
71
  multi: true,
60
72
  },
61
-
73
+ provideEuiInitializer(),
74
+ provideAppInitializer(init),
75
+ provideHttpClient(withInterceptorsFromDi()),
76
+ importProvidersFrom(
77
+ EuiCoreModule.forRoot(),
78
+ TranslateModule.forRoot(translateConfig)
79
+ ),
62
80
  AppStarterService,
63
- {
64
- provide: EclLanguageService,
65
- useClass: EclDefaultLanguageService
66
- },
67
81
  provideRouter(routes),
82
+ provideAnimations(),
68
83
  ],
69
84
  };
@@ -1,16 +1,16 @@
1
1
  import { Component, Inject } from '@angular/core';
2
2
  import { CONFIG_TOKEN, EuiAppConfig } from '@eui/core';
3
3
  import { TranslateModule } from '@ngx-translate/core';
4
- import { EclListDirectiveModule } from '@eui/ecl/components/ecl-list';
5
- import { EclLinkDirectiveModule } from '@eui/ecl/components/ecl-link';
4
+ import { EclListModule } from '@eui/ecl/components/ecl-list';
5
+ import { EclLinkModule } from '@eui/ecl/components/ecl-link';
6
6
 
7
7
  @Component({
8
8
  templateUrl: './home.component.html',
9
9
  standalone: true,
10
10
  imports: [
11
11
  TranslateModule,
12
- EclLinkDirectiveModule,
13
- EclListDirectiveModule,
12
+ EclLinkModule,
13
+ EclListModule,
14
14
  ],
15
15
  })
16
16
  export class HomeComponent {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "19.0.0-next.9",
3
+ "version": "19.0.0-rc.1",
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.9"
21
+ "@eui/deps-base": "19.0.0-rc.1"
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.9",
3
+ "version": "19.0.0-rc.1",
4
4
  "tag": "next",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI CLI app generator",
@@ -13,7 +13,7 @@
13
13
  "url": "https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui"
14
14
  },
15
15
  "dependencies": {
16
- "@eui/tools": "6.21.8"
16
+ "@eui/tools": "6.21.11"
17
17
  },
18
18
  "peerDependencies": {
19
19
  "@eui/tools": "^6.0.0",