@eui/cli 15.0.0-rc.2 → 15.0.0-rc.20
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/angular.json +2 -2
- package/lib/skeletons/_angular/base/mock/server.js +10 -5
- package/lib/skeletons/_angular/base/package.json +3 -3
- package/lib/skeletons/_angular/base/src/app/app.component.html +3 -3
- package/lib/skeletons/_angular/base/src/app/core/core.module.ts +3 -0
- package/lib/skeletons/_angular/base/src/app/shared/shared.module.ts +24 -22
- package/lib/skeletons/_angular/base/src/assets/config/env-json-config-dev.json +1 -0
- package/lib/skeletons/_angular/base/src/assets/config/env-json-config-prod.json +1 -0
- package/lib/skeletons/_angular/base-mobile/ionic.config.json +5 -0
- package/lib/skeletons/_angular/base-mobile/ngsw-config.json +33 -0
- package/lib/skeletons/_angular/base-mobile/package.json +13 -6
- package/lib/skeletons/_angular/base-mobile/src/app/app-routing.module.ts +17 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app-starter.service.ts +73 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app.component.html +9 -7
- package/lib/skeletons/_angular/base-mobile/src/app/app.component.ts +55 -0
- package/lib/skeletons/_angular/base-mobile/src/app/app.module.ts +44 -0
- package/lib/skeletons/_angular/base-mobile/src/app/core/components/.gitkeep +0 -0
- package/lib/skeletons/_angular/base-mobile/src/app/core/core.module.ts +2 -1
- package/lib/skeletons/_angular/base-mobile/src/app/core/reducers/index.ts +31 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home-routing.module.ts +15 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.component.html +12 -6
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.component.ts +11 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/home/home.module.ts +18 -0
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page1/page1.component.html +9 -6
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/components/page2/page2.component.html +9 -6
- package/lib/skeletons/_angular/base-mobile/src/app/features/module1/module1.component.html +9 -6
- package/lib/skeletons/_angular/base-mobile/src/app/features/module2/module2.component.html +9 -6
- package/lib/skeletons/_angular/base-mobile/src/app/shared/testing/router.mock.ts +18 -0
- package/lib/skeletons/_angular/base-mobile/src/index.html +27 -0
- package/lib/skeletons/_angular/base-mobile/src/manifest.webmanifest +51 -0
- package/lib/skeletons/_angular/base-mobile/src/tsconfig.app.json +19 -0
- package/lib/skeletons/_angular/options/openid-jwt/package.json +6 -6
- package/lib/skeletons/_angular/options/openid-jwt/src/app/core/core.module.ts +3 -2
- package/lib/skeletons/_angular/options/openid-jwt/src/assets/config/env-json-config-local-mock.json +10 -0
- package/lib/skeletons/web-symfony/myapp-web/package.json +2 -2
- package/package.json +3 -3
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
15.0.0-rc.
|
|
1
|
+
15.0.0-rc.20
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
],
|
|
57
57
|
"styles": [
|
|
58
58
|
"node_modules/@eui/styles/dist/styles/eui.css",
|
|
59
|
-
"node_modules/@eui/styles/dist/styles/eui-utilities.css",
|
|
60
|
-
"node_modules/@eui/styles/dist/styles/eui-bootstrap.css",
|
|
59
|
+
"node_modules/@eui/styles/dist/styles/eui-extra-utilities.css",
|
|
60
|
+
"node_modules/@eui/styles/dist/styles/eui-legacy-bootstrap.css",
|
|
61
61
|
"node_modules/@eui/styles/dist/styles/eui-legacy-icons-font.css",
|
|
62
62
|
"src/styles.scss"
|
|
63
63
|
]
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
const express = require('express');
|
|
2
2
|
const bodyParser = require('body-parser');
|
|
3
3
|
const app = express();
|
|
4
|
-
const low = require('lowdb')
|
|
5
|
-
const FileAsync = require('lowdb/adapters/FileAsync')
|
|
6
|
-
const adapter = new FileAsync('mock/db/db.json')
|
|
7
|
-
const db = low(adapter)
|
|
4
|
+
const low = require('lowdb');
|
|
5
|
+
const FileAsync = require('lowdb/adapters/FileAsync');
|
|
6
|
+
const adapter = new FileAsync('mock/db/db.json');
|
|
7
|
+
const db = low(adapter);
|
|
8
|
+
const cors = require('cors');
|
|
8
9
|
const port = 3000;
|
|
9
10
|
|
|
10
11
|
app.use(bodyParser.urlencoded({ extended: true }));
|
|
12
|
+
app.use(cors({
|
|
13
|
+
origin: 'http://127.0.0.1:8080', // adapt to your need
|
|
14
|
+
credentials: true,
|
|
15
|
+
}));
|
|
11
16
|
|
|
12
17
|
require('./app/routes')(app, db);
|
|
13
18
|
|
|
14
19
|
app.listen(port, () => {
|
|
15
|
-
|
|
20
|
+
console.log('We are live on ' + port);
|
|
16
21
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "15.0.0-rc.
|
|
3
|
+
"version": "15.0.0-rc.20",
|
|
4
4
|
"license": "EUPL-1.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"ng": "ng",
|
|
7
7
|
"start-mock-server": "nodemon --watch ./mock ./mock/server.js",
|
|
8
|
-
"start-serve": "eui-scripts serve-app --configuration=proxy-mock
|
|
8
|
+
"start-serve": "eui-scripts serve-app --configuration=proxy-mock",
|
|
9
9
|
"start": "npm-run-all --parallel start-mock-server start-serve",
|
|
10
10
|
"start-proxy": "eui-scripts serve-app --configuration=proxy",
|
|
11
11
|
"start-local": "eui-scripts serve-app",
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
},
|
|
21
21
|
"private": true,
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@eui/deps-base": "15.0.0-rc.
|
|
23
|
+
"@eui/deps-base": "15.0.0-rc.20"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<eui-app [userInfos]="userInfos?.fullName"
|
|
1
|
+
<eui-app [userInfos]="userInfos?.fullName">
|
|
2
2
|
<eui-app-toolbar>
|
|
3
3
|
<eui-toolbar>
|
|
4
4
|
<eui-toolbar-logo></eui-toolbar-logo>
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
<eui-toolbar-item-user-profile>
|
|
9
9
|
<eui-user-profile-menu>
|
|
10
10
|
<eui-user-profile-menu-item>
|
|
11
|
-
<eui-icon
|
|
11
|
+
<eui-icon-svg icon="old-eui-person-thin"></eui-icon-svg> {{ 'eui.my-profile-informations' | translate }}
|
|
12
12
|
</eui-user-profile-menu-item>
|
|
13
13
|
<eui-user-profile-menu-item>
|
|
14
|
-
<eui-icon
|
|
14
|
+
<eui-icon-svg icon="old-eui-logout-thin"></eui-icon-svg> {{ 'eui.sign-out' | translate }}
|
|
15
15
|
</eui-user-profile-menu-item>
|
|
16
16
|
</eui-user-profile-menu>
|
|
17
17
|
</eui-toolbar-item-user-profile>
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
CoreModuleEffects,
|
|
15
15
|
EUI_CONFIG_TOKEN,
|
|
16
16
|
} from '@eui/core';
|
|
17
|
+
import { EuiLayoutModule } from '@eui/components/layout';
|
|
17
18
|
|
|
18
19
|
import { appConfig } from '../../config/index';
|
|
19
20
|
import { environment } from '../../environments/environment';
|
|
@@ -24,6 +25,7 @@ import { SharedModule } from '@shared/shared.module';
|
|
|
24
25
|
|
|
25
26
|
@NgModule({
|
|
26
27
|
imports: [
|
|
28
|
+
EuiLayoutModule,
|
|
27
29
|
SharedModule,
|
|
28
30
|
HttpClientModule,
|
|
29
31
|
EuiCoreModule.forRoot(),
|
|
@@ -35,6 +37,7 @@ import { SharedModule } from '@shared/shared.module';
|
|
|
35
37
|
declarations: [
|
|
36
38
|
],
|
|
37
39
|
exports: [
|
|
40
|
+
EuiLayoutModule,
|
|
38
41
|
SharedModule,
|
|
39
42
|
],
|
|
40
43
|
providers: [
|
|
@@ -1,43 +1,45 @@
|
|
|
1
|
+
// Angular
|
|
1
2
|
import { NgModule } from '@angular/core';
|
|
2
3
|
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
3
5
|
|
|
4
6
|
// Common 3rd party module used accross the app
|
|
5
7
|
import { TranslateModule } from '@ngx-translate/core';
|
|
6
8
|
|
|
7
9
|
// eUI specific modules - commonly used accross the app - prefered way
|
|
8
10
|
// keep here to avoid imports within features modules
|
|
9
|
-
import { EuiLayoutModule } from '@eui/components/layout';
|
|
10
11
|
import { EuiPageModule } from '@eui/components/eui-page';
|
|
11
|
-
import { EuiIconModule } from '@eui/components/
|
|
12
|
+
import { EuiIconModule } from '@eui/components/eui-icon';
|
|
12
13
|
|
|
13
|
-
// import ALL eUI components
|
|
14
|
+
// import ALL eUI components
|
|
14
15
|
// import { EuiAllModule } from '@eui/components';
|
|
15
|
-
// import { UxAllModule } from '@eui/components/legacy'; // if declared, add eui-legacy.css in angular.json styles config
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
// if declared, add eui-legacy.css + eui-legacy-utilities.css in angular.json styles config
|
|
18
|
+
// import { UxAllModule } from '@eui/components/legacy';
|
|
19
|
+
|
|
20
|
+
const MODULES = [
|
|
21
|
+
CommonModule,
|
|
22
|
+
FormsModule, ReactiveFormsModule,
|
|
23
|
+
|
|
24
|
+
TranslateModule,
|
|
25
|
+
|
|
26
|
+
// put here commonly used eUI modules components throughout the application
|
|
27
|
+
EuiPageModule,
|
|
28
|
+
EuiIconModule,
|
|
21
29
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
30
|
+
// in case of you really want to import all eUI components, see commented imports above
|
|
31
|
+
// EuiAllModule,
|
|
32
|
+
// UxAllModule,
|
|
33
|
+
];
|
|
25
34
|
|
|
26
|
-
|
|
27
|
-
|
|
35
|
+
@NgModule({
|
|
36
|
+
imports: [
|
|
37
|
+
...MODULES,
|
|
28
38
|
],
|
|
29
39
|
declarations: [
|
|
30
40
|
],
|
|
31
41
|
exports: [
|
|
32
|
-
|
|
33
|
-
TranslateModule,
|
|
34
|
-
|
|
35
|
-
EuiLayoutModule,
|
|
36
|
-
EuiPageModule,
|
|
37
|
-
EuiIconModule,
|
|
38
|
-
|
|
39
|
-
// EuiAllModule,
|
|
40
|
-
// UxAllModule,
|
|
42
|
+
...MODULES,
|
|
41
43
|
]
|
|
42
44
|
})
|
|
43
45
|
export class SharedModule {}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
|
|
3
|
+
"index": "/index.html",
|
|
4
|
+
"appData": {
|
|
5
|
+
"version": "1.1.2"
|
|
6
|
+
},
|
|
7
|
+
"assetGroups": [
|
|
8
|
+
{
|
|
9
|
+
"name": "app",
|
|
10
|
+
"installMode": "prefetch",
|
|
11
|
+
"resources": {
|
|
12
|
+
"files": [
|
|
13
|
+
"/favicon.ico",
|
|
14
|
+
"/index.html",
|
|
15
|
+
"/manifest.webmanifest",
|
|
16
|
+
"/*.css",
|
|
17
|
+
"/*.js"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "assets",
|
|
23
|
+
"installMode": "lazy",
|
|
24
|
+
"updateMode": "prefetch",
|
|
25
|
+
"resources": {
|
|
26
|
+
"files": [
|
|
27
|
+
"/assets/**",
|
|
28
|
+
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "15.0.0-rc.
|
|
3
|
+
"version": "15.0.0-rc.20",
|
|
4
4
|
"license": "EUPL-1.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"ng": "ng",
|
|
7
7
|
"start-mock-server": "nodemon --watch ./mock ./mock/server.js",
|
|
8
|
-
"start-serve": "eui-scripts serve-app --configuration=proxy-mock
|
|
8
|
+
"start-serve": "eui-scripts serve-app --configuration=proxy-mock",
|
|
9
9
|
"start": "npm-run-all --parallel start-mock-server start-serve",
|
|
10
10
|
"start-proxy": "eui-scripts serve-app --configuration=proxy",
|
|
11
11
|
"start-local": "eui-scripts serve-app",
|
|
@@ -20,8 +20,15 @@
|
|
|
20
20
|
},
|
|
21
21
|
"private": true,
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@eui/deps-base": "15.0.0-rc.
|
|
24
|
-
"@eui/mobile-core": "14.1.0-snapshot-
|
|
25
|
-
"@eui/mobile-styles": "14.1.0-snapshot-
|
|
26
|
-
}
|
|
23
|
+
"@eui/deps-base": "15.0.0-rc.20",
|
|
24
|
+
"@eui/mobile-core": "14.1.0-snapshot-1670348200908",
|
|
25
|
+
"@eui/mobile-styles": "14.1.0-snapshot-1670348200908"
|
|
26
|
+
},
|
|
27
|
+
"browserslist": [
|
|
28
|
+
"last 2 chrome versions",
|
|
29
|
+
"last 2 firefox versions",
|
|
30
|
+
"last 1 edge version",
|
|
31
|
+
"Firefox ESR"
|
|
32
|
+
],
|
|
33
|
+
"resolutions": {}
|
|
27
34
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { RouterModule, Routes } from '@angular/router';
|
|
3
|
+
|
|
4
|
+
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 {}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Inject, Injectable } from '@angular/core';
|
|
2
|
+
import {
|
|
3
|
+
CONFIG_TOKEN,
|
|
4
|
+
UserService,
|
|
5
|
+
EuiAppConfig,
|
|
6
|
+
UserDetails,
|
|
7
|
+
UserPreferences,
|
|
8
|
+
I18nService,
|
|
9
|
+
} from '@eui/core';
|
|
10
|
+
import { HttpClient } from '@angular/common/http';
|
|
11
|
+
import { Observable, of, zip, catchError } from 'rxjs';
|
|
12
|
+
import { switchMap } from 'rxjs/operators';
|
|
13
|
+
|
|
14
|
+
@Injectable({
|
|
15
|
+
providedIn: 'root',
|
|
16
|
+
})
|
|
17
|
+
export class AppStarterService {
|
|
18
|
+
defaultUserPreferences: UserPreferences;
|
|
19
|
+
|
|
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
|
+
start(): Observable<any> {
|
|
29
|
+
|
|
30
|
+
return zip(
|
|
31
|
+
this.initUserService().pipe(
|
|
32
|
+
switchMap((userStatus) => {
|
|
33
|
+
return this.i18nService.init();
|
|
34
|
+
}),
|
|
35
|
+
),
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Fetches user details,
|
|
41
|
+
* create user: UserState object
|
|
42
|
+
* then initialise to the UserService on run time
|
|
43
|
+
*/
|
|
44
|
+
initUserService(): Observable<any> {
|
|
45
|
+
return zip(
|
|
46
|
+
this.fetchUserDetails(),
|
|
47
|
+
).pipe(
|
|
48
|
+
switchMap(([userDetails]) => {
|
|
49
|
+
return this.userService.init(userDetails);
|
|
50
|
+
}),
|
|
51
|
+
catchError((err) => {
|
|
52
|
+
return of(null);
|
|
53
|
+
})
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Fetches user details
|
|
59
|
+
*/
|
|
60
|
+
private fetchUserDetails(): Observable<UserDetails> {
|
|
61
|
+
// const url = this.config.modules.your_custom_module.your_custom_endpoint
|
|
62
|
+
const moduleCoreApi = this.config.modules.core;
|
|
63
|
+
const url = `${moduleCoreApi.base}${moduleCoreApi.userDetails}`;
|
|
64
|
+
const user = { userId: 'anonymous' };
|
|
65
|
+
|
|
66
|
+
if (!url) {
|
|
67
|
+
return of(user);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return this.http.get<UserDetails>(url)
|
|
71
|
+
.pipe(catchError(err => { return of(null); }));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -3,23 +3,25 @@
|
|
|
3
3
|
<euim-app-sidebar-header>
|
|
4
4
|
<euim-user-profile>
|
|
5
5
|
<euim-user-profile-avatar>
|
|
6
|
-
<euim-avatar-icon color="
|
|
7
|
-
<ion-icon icon="person"></ion-icon>
|
|
6
|
+
<euim-avatar-icon color="primary" size="m" fill="solid">
|
|
7
|
+
<ion-icon icon="person-circle"></ion-icon>
|
|
8
8
|
</euim-avatar-icon>
|
|
9
9
|
</euim-user-profile-avatar>
|
|
10
10
|
<euim-user-profile-infos >
|
|
11
11
|
<euim-user-profile-infos-item>
|
|
12
|
-
<p euimLabel
|
|
12
|
+
<p euimLabel></p>
|
|
13
|
+
</euim-user-profile-infos-item>
|
|
14
|
+
<euim-user-profile-infos-item>
|
|
15
|
+
<p euimLabel></p>
|
|
13
16
|
</euim-user-profile-infos-item>
|
|
14
17
|
</euim-user-profile-infos>
|
|
15
18
|
<euim-user-profile-action>
|
|
16
|
-
<
|
|
17
|
-
<ion-icon name="settings-sharp" ></ion-icon>
|
|
18
|
-
</ion-button>
|
|
19
|
+
<euim-language-selector euimPrimary></euim-language-selector>
|
|
19
20
|
</euim-user-profile-action>
|
|
20
21
|
</euim-user-profile>
|
|
21
22
|
</euim-app-sidebar-header>
|
|
22
23
|
|
|
23
|
-
<euim-app-sidebar-menu [items]="sidebarItems"></euim-app-sidebar-menu>
|
|
24
|
+
<euim-app-sidebar-menu [items]="sidebarItems" (itemClick)="onItemClick($event)"></euim-app-sidebar-menu>
|
|
25
|
+
|
|
24
26
|
</euim-app-sidebar>
|
|
25
27
|
</euim-app>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Component, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { Store } from '@ngrx/store';
|
|
3
|
+
import {
|
|
4
|
+
getUserState,
|
|
5
|
+
UserState,
|
|
6
|
+
} from '@eui/core';
|
|
7
|
+
import { Observable, Subscription } from 'rxjs';
|
|
8
|
+
import { EuimMenuItem } from '@eui/mobile-core';
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: 'app-root',
|
|
12
|
+
templateUrl: './app.component.html',
|
|
13
|
+
})
|
|
14
|
+
export class AppComponent implements OnInit, OnDestroy {
|
|
15
|
+
userInfos: UserState;
|
|
16
|
+
// Observe state changes
|
|
17
|
+
userState: Observable<UserState>;
|
|
18
|
+
// an array to keep all subscriptions and easily unsubscribe
|
|
19
|
+
subs: Subscription[] = [];
|
|
20
|
+
|
|
21
|
+
sidebarItems = [
|
|
22
|
+
{ label: 'Home', url: 'screen/home', iconClass: 'eui-icon-home' },
|
|
23
|
+
{ label: 'Module 1', url: 'screen/module1', iconClass: 'eui-icon-work', children: [
|
|
24
|
+
{ label: 'page 1', url: 'screen/module1/page1' },
|
|
25
|
+
{ label: 'page 2', url: 'screen/module1/page2' },
|
|
26
|
+
] },
|
|
27
|
+
{ label: 'Module 2', url: 'screen/module2', iconClass: 'eui-icon-work' },
|
|
28
|
+
];
|
|
29
|
+
notificationItems = [
|
|
30
|
+
{ label: 'Title label 1', subLabel: 'Subtitle label' },
|
|
31
|
+
{ label: 'Title label 2', subLabel: 'Subtitle label' },
|
|
32
|
+
{ label: 'Title label 3', subLabel: 'Subtitle label' },
|
|
33
|
+
{ label: 'Title label 4', subLabel: 'Subtitle label' },
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
constructor(
|
|
37
|
+
private store: Store<any>,
|
|
38
|
+
) {
|
|
39
|
+
this.userState = this.store.select(getUserState);
|
|
40
|
+
this.subs.push(this.userState.subscribe((user: UserState) => {
|
|
41
|
+
this.userInfos = { ...user };
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
ngOnInit() {
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
ngOnDestroy() {
|
|
49
|
+
this.subs.forEach((s: Subscription) => s.unsubscribe());
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
onItemClick(item: EuimMenuItem) {
|
|
53
|
+
// Handle any menu item click
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
import { ServiceWorkerModule } from '@angular/service-worker';
|
|
10
|
+
|
|
11
|
+
@NgModule({
|
|
12
|
+
declarations: [
|
|
13
|
+
AppComponent,
|
|
14
|
+
],
|
|
15
|
+
imports: [
|
|
16
|
+
BrowserModule,
|
|
17
|
+
BrowserAnimationsModule,
|
|
18
|
+
CoreModule,
|
|
19
|
+
AppRoutingModule,
|
|
20
|
+
ServiceWorkerModule.register('ngsw-worker.js', {
|
|
21
|
+
enabled: false,
|
|
22
|
+
// Register the ServiceWorker as soon as the app is stable
|
|
23
|
+
// or after 30 seconds (whichever comes first).
|
|
24
|
+
registrationStrategy: 'registerWhenStable:30000'
|
|
25
|
+
}),
|
|
26
|
+
],
|
|
27
|
+
providers: [
|
|
28
|
+
AppStarterService,
|
|
29
|
+
{
|
|
30
|
+
provide: APP_INITIALIZER,
|
|
31
|
+
useFactory: (appStarterService) => {
|
|
32
|
+
return () => new Promise<void>((resolve) => {
|
|
33
|
+
appStarterService.start().subscribe(() => resolve());
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
deps: [AppStarterService],
|
|
37
|
+
multi: true
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
bootstrap: [
|
|
41
|
+
AppComponent,
|
|
42
|
+
],
|
|
43
|
+
})
|
|
44
|
+
export class AppModule {}
|
|
File without changes
|
|
@@ -4,7 +4,7 @@ import { StoreModule } from '@ngrx/store';
|
|
|
4
4
|
import { EffectsModule } from '@ngrx/effects';
|
|
5
5
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
6
6
|
|
|
7
|
-
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
7
|
+
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
8
8
|
|
|
9
9
|
import { IonicModule } from '@ionic/angular';
|
|
10
10
|
|
|
@@ -28,6 +28,7 @@ import { SharedModule } from '@shared/shared.module';
|
|
|
28
28
|
|
|
29
29
|
@NgModule({
|
|
30
30
|
imports: [
|
|
31
|
+
HttpClientModule,
|
|
31
32
|
SharedModule,
|
|
32
33
|
EuiCoreModule.forRoot(),
|
|
33
34
|
EffectsModule.forRoot([...CoreModuleEffects]),
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { MetaReducer } from '@ngrx/store';
|
|
3
|
+
import { storeFreeze } from 'ngrx-store-freeze';
|
|
4
|
+
import { reducers as coreReducers, CoreState, getAppState, localStorageSync } from '@eui/core';
|
|
5
|
+
|
|
6
|
+
import { environment } from '../../../environments/environment';
|
|
7
|
+
|
|
8
|
+
export const REDUCER_TOKEN = new InjectionToken<any>('Registered Reducers');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Define here your app state
|
|
12
|
+
*
|
|
13
|
+
* [IMPORTANT]
|
|
14
|
+
* There are some **reserved** slice of the state
|
|
15
|
+
* that you **can not** use in your application ==> app |user | notification
|
|
16
|
+
*/
|
|
17
|
+
// eslint-disable-next-line
|
|
18
|
+
export interface AppState extends CoreState {
|
|
19
|
+
// [key: string]: fromTaskManager.State | any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Define here the reducers of your app
|
|
24
|
+
*/
|
|
25
|
+
const rootReducer = Object.assign({}, coreReducers, {
|
|
26
|
+
// [fromTaskManager.namespace]: fromTaskManager.reducers,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export const getReducers = () => rootReducer;
|
|
30
|
+
|
|
31
|
+
export const metaReducers: MetaReducer<AppState>[] = !environment.production ? [localStorageSync, storeFreeze] : [localStorageSync];
|
|
@@ -0,0 +1,15 @@
|
|
|
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,8 +1,14 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
<euim-
|
|
4
|
-
|
|
1
|
+
<ion-header>
|
|
2
|
+
<ion-toolbar color="primary">
|
|
3
|
+
<euim-toolbar [hasSidebarTrigger]="true" [hasLanguageSelector]="true">
|
|
4
|
+
<euim-toolbar-title>eUI mobile showcase</euim-toolbar-title>
|
|
5
|
+
</euim-toolbar>
|
|
6
|
+
</ion-toolbar>
|
|
7
|
+
</ion-header>
|
|
5
8
|
|
|
6
|
-
|
|
9
|
+
<ion-content>
|
|
10
|
+
<div class="ion-padding">
|
|
11
|
+
Welcome to eUI mobile app
|
|
12
|
+
</div>
|
|
7
13
|
|
|
8
|
-
</
|
|
14
|
+
</ion-content>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Component, Inject } from '@angular/core';
|
|
2
|
+
import { CONFIG_TOKEN, EuiAppConfig } from '@eui/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './home.component.html',
|
|
6
|
+
})
|
|
7
|
+
export class HomeComponent {
|
|
8
|
+
constructor(@Inject(CONFIG_TOKEN) private config: EuiAppConfig) {
|
|
9
|
+
console.log(config);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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,8 +1,11 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
<euim-
|
|
4
|
-
|
|
1
|
+
<ion-header>
|
|
2
|
+
<ion-toolbar color="primary">
|
|
3
|
+
<euim-toolbar backButtonDefaultHref="/screen/module1">
|
|
4
|
+
<euim-toolbar-title>Module 1 - Page 1</euim-toolbar-title>
|
|
5
|
+
</euim-toolbar>
|
|
6
|
+
</ion-toolbar>
|
|
7
|
+
</ion-header>
|
|
5
8
|
|
|
9
|
+
<ion-content class="ion-padding">
|
|
6
10
|
page content
|
|
7
|
-
|
|
8
|
-
</euim-page>
|
|
11
|
+
</ion-content>
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
<euim-
|
|
4
|
-
|
|
1
|
+
<ion-header>
|
|
2
|
+
<ion-toolbar color="primary">
|
|
3
|
+
<euim-toolbar backButtonDefaultHref="/screen/module1">
|
|
4
|
+
<euim-toolbar-title>Module 1 - Page 2</euim-toolbar-title>
|
|
5
|
+
</euim-toolbar>
|
|
6
|
+
</ion-toolbar>
|
|
7
|
+
</ion-header>
|
|
5
8
|
|
|
9
|
+
<ion-content class="ion-padding">
|
|
6
10
|
page content
|
|
7
|
-
|
|
8
|
-
</euim-page>
|
|
11
|
+
</ion-content>
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
<euim-
|
|
4
|
-
|
|
1
|
+
<ion-header>
|
|
2
|
+
<ion-toolbar color="primary">
|
|
3
|
+
<euim-toolbar [hasSidebarTrigger]="true">
|
|
4
|
+
<euim-toolbar-title>Module 2 - home</euim-toolbar-title>
|
|
5
|
+
</euim-toolbar>
|
|
6
|
+
</ion-toolbar>
|
|
7
|
+
</ion-header>
|
|
5
8
|
|
|
9
|
+
<ion-content class="ion-padding">
|
|
6
10
|
page content
|
|
7
|
-
|
|
8
11
|
<br><br>
|
|
9
12
|
<a (click)="onNavigate('/screen/module1/page1')">Goto page 1</a>
|
|
10
13
|
<br><br>
|
|
11
14
|
<a (click)="onNavigate('/screen/module1/page2')">Goto page 2</a>
|
|
12
|
-
</
|
|
15
|
+
</ion-content>
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
<
|
|
2
|
-
<
|
|
3
|
-
<euim-
|
|
4
|
-
|
|
1
|
+
<ion-header>
|
|
2
|
+
<ion-toolbar color="primary">
|
|
3
|
+
<euim-toolbar [hasSidebarTrigger]="true">
|
|
4
|
+
<euim-toolbar-title>Module 2 - home</euim-toolbar-title>
|
|
5
|
+
</euim-toolbar>
|
|
6
|
+
</ion-toolbar>
|
|
7
|
+
</ion-header>
|
|
5
8
|
|
|
9
|
+
<ion-content class="ion-padding">
|
|
6
10
|
page content
|
|
7
|
-
|
|
8
|
-
</euim-page>
|
|
11
|
+
</ion-content>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NavigationEnd } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs/Observable';
|
|
3
|
+
|
|
4
|
+
export class RouterMock {
|
|
5
|
+
routerState = { root: '' };
|
|
6
|
+
public navigationEnd = new NavigationEnd(0, 'http://url1', 'http://url2');
|
|
7
|
+
public events = new Observable(observer => {
|
|
8
|
+
observer.next(this.navigationEnd);
|
|
9
|
+
observer.complete();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
constructor() {}
|
|
13
|
+
|
|
14
|
+
createUrlTree() {}
|
|
15
|
+
|
|
16
|
+
serializeUrl() {}
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>Application name</title>
|
|
7
|
+
<base href="/">
|
|
8
|
+
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
|
|
9
|
+
<meta name="format-detection" content="telephone=no"/>
|
|
10
|
+
<meta name="msapplication-tap-highlight" content="no"/>
|
|
11
|
+
<link rel="manifest" href="manifest.webmanifest">
|
|
12
|
+
|
|
13
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
14
|
+
|
|
15
|
+
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
|
16
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<app-root>
|
|
21
|
+
<div id="loader-wrapper">
|
|
22
|
+
<div id="loader"></div>
|
|
23
|
+
</div>
|
|
24
|
+
</app-root>
|
|
25
|
+
</body>
|
|
26
|
+
|
|
27
|
+
</html>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "app",
|
|
3
|
+
"short_name": "app",
|
|
4
|
+
"theme_color": "#1976d2",
|
|
5
|
+
"background_color": "#fafafa",
|
|
6
|
+
"display": "standalone",
|
|
7
|
+
"scope": "./",
|
|
8
|
+
"start_url": "./",
|
|
9
|
+
"icons": [
|
|
10
|
+
{
|
|
11
|
+
"src": "assets/icons/icon-72x72.png",
|
|
12
|
+
"sizes": "72x72",
|
|
13
|
+
"type": "image/png"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"src": "assets/icons/icon-96x96.png",
|
|
17
|
+
"sizes": "96x96",
|
|
18
|
+
"type": "image/png"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"src": "assets/icons/icon-128x128.png",
|
|
22
|
+
"sizes": "128x128",
|
|
23
|
+
"type": "image/png"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"src": "assets/icons/icon-144x144.png",
|
|
27
|
+
"sizes": "144x144",
|
|
28
|
+
"type": "image/png"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"src": "assets/icons/icon-152x152.png",
|
|
32
|
+
"sizes": "152x152",
|
|
33
|
+
"type": "image/png"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"src": "assets/icons/icon-192x192.png",
|
|
37
|
+
"sizes": "192x192",
|
|
38
|
+
"type": "image/png"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"src": "assets/icons/icon-384x384.png",
|
|
42
|
+
"sizes": "384x384",
|
|
43
|
+
"type": "image/png"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"src": "assets/icons/icon-512x512.png",
|
|
47
|
+
"sizes": "512x512",
|
|
48
|
+
"type": "image/png"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../out-tsc/app",
|
|
5
|
+
"types": []
|
|
6
|
+
},
|
|
7
|
+
"angularCompilerOptions": {
|
|
8
|
+
"annotateForClosureCompiler": true,
|
|
9
|
+
"strictTemplates": false,
|
|
10
|
+
"strictInjectionParameters": true,
|
|
11
|
+
},
|
|
12
|
+
"exclude": [
|
|
13
|
+
"test.ts",
|
|
14
|
+
"**/*.spec.ts",
|
|
15
|
+
"app/shared/testing/router.mock.ts",
|
|
16
|
+
"environments/environment.prod.ts",
|
|
17
|
+
"environments/environment.dev.ts"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "15.0.0-rc.
|
|
3
|
+
"version": "15.0.0-rc.20",
|
|
4
4
|
"license": "EUPL-1.1",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"ng": "ng",
|
|
7
7
|
"start-mock-server": "nodemon --watch ./mock ./mock/server.js",
|
|
8
|
-
"start-serve": "eui-scripts serve-app --openid --
|
|
8
|
+
"start-serve": "eui-scripts serve-app --openid --configuration=proxy-mock --configEnvTarget=local-mock",
|
|
9
9
|
"start": "npm-run-all --parallel start-mock-server start-serve",
|
|
10
|
-
"start-proxy": "eui-scripts serve-app --openid
|
|
10
|
+
"start-proxy": "eui-scripts serve-app --openid",
|
|
11
11
|
"start-openid": "eui-scripts serve-app --openid --configEnvTarget=local",
|
|
12
12
|
"build": "eui-scripts build-app",
|
|
13
|
-
"build-
|
|
14
|
-
"build-
|
|
13
|
+
"build-openid-dev": "eui-scripts build-app --configuration=production-optimized --openid --configEnvTarget=dev",
|
|
14
|
+
"build-openid-prod": "eui-scripts build-app --configuration=production-optimized --openid --configEnvTarget=prod",
|
|
15
15
|
"app:build": "eui-scripts build-app",
|
|
16
16
|
"app:inject-config": "eui-scripts inject-config-app",
|
|
17
17
|
"generate-changelog": "eui-scripts generate-changelog"
|
|
18
18
|
},
|
|
19
19
|
"private": true,
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@eui/deps-base": "15.0.0-rc.
|
|
21
|
+
"@eui/deps-base": "15.0.0-rc.20"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -3,8 +3,8 @@ import { TranslateModule } from '@ngx-translate/core';
|
|
|
3
3
|
import { StoreModule } from '@ngrx/store';
|
|
4
4
|
import { EffectsModule } from '@ngrx/effects';
|
|
5
5
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
6
|
+
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
|
6
7
|
|
|
7
|
-
import { HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
8
8
|
import {
|
|
9
9
|
CachePreventionInterceptor,
|
|
10
10
|
CorsSecurityInterceptor,
|
|
@@ -27,6 +27,7 @@ import { SharedModule } from '@shared/shared.module';
|
|
|
27
27
|
@NgModule({
|
|
28
28
|
imports: [
|
|
29
29
|
SharedModule,
|
|
30
|
+
HttpClientModule,
|
|
30
31
|
EuiCoreModule.forRoot(),
|
|
31
32
|
EffectsModule.forRoot([...CoreModuleEffects]),
|
|
32
33
|
TranslateModule.forRoot(translateConfig),
|
|
@@ -46,7 +47,7 @@ import { SharedModule } from '@shared/shared.module';
|
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
provide: EUI_CONFIG_TOKEN,
|
|
49
|
-
useValue: { appConfig
|
|
50
|
+
useValue: { appConfig, environment },
|
|
50
51
|
},
|
|
51
52
|
{
|
|
52
53
|
// Sets the withCredentials on Ajax Request to send the JSESSIONID cookie to another domain.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "15.0.0-rc.
|
|
3
|
+
"version": "15.0.0-rc.20",
|
|
4
4
|
"license": "EUPL-1.1",
|
|
5
5
|
"description": "eUI JEE Symfony app scripts",
|
|
6
6
|
"scripts": {
|
|
@@ -19,6 +19,6 @@
|
|
|
19
19
|
},
|
|
20
20
|
"private": true,
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@eui/deps-base": "15.0.0-rc.
|
|
22
|
+
"@eui/deps-base": "15.0.0-rc.20"
|
|
23
23
|
}
|
|
24
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eui/cli",
|
|
3
|
-
"version": "15.0.0-rc.
|
|
3
|
+
"version": "15.0.0-rc.20",
|
|
4
4
|
"tag": "next",
|
|
5
5
|
"license": "EUPL-1.1",
|
|
6
6
|
"description": "eUI CLI app generator",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"url": "https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@eui/tools": "
|
|
16
|
+
"@eui/tools": "6.2.43"
|
|
17
17
|
},
|
|
18
18
|
"preferGlobal": true,
|
|
19
19
|
"homepage": "https://eui.ecdevops.eu",
|
|
20
20
|
"author": "ec.europa.eui@gmail.com",
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": "^14.
|
|
22
|
+
"node": "^14.20.0 || >=16.13.0",
|
|
23
23
|
"yarn": ">=1.22.4 <2",
|
|
24
24
|
"npm": "Please use yarn instead of NPM to install dependencies"
|
|
25
25
|
}
|