@eui/cli 16.0.0-next.1 → 16.0.0-next.10

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 (35) hide show
  1. package/.version.properties +1 -1
  2. package/bin/eui-cli.js +0 -14
  3. package/lib/build.js +8 -2
  4. package/lib/cli.js +16 -1
  5. package/lib/config.js +2 -1
  6. package/lib/skeletons/_angular/base/package.json +2 -2
  7. package/lib/skeletons/_angular/base/src/.eslintrc.json +5 -3
  8. package/lib/skeletons/_angular/base/src/app/app.component.ts +1 -4
  9. package/lib/skeletons/_angular/base/src/app/features/home/home.component.html +7 -5
  10. package/lib/skeletons/_angular/base-mobile/package.json +5 -7
  11. package/lib/skeletons/_angular/base-mobile/src/app/app.component.ts +2 -4
  12. package/lib/skeletons/_angular/options/{ecl → ecl-ec}/src/app/shared/shared.module.ts +10 -12
  13. package/lib/skeletons/_angular/options/{ecl → ecl-ec}/src/config/global.ts +3 -0
  14. package/lib/skeletons/_angular/options/ecl-eu/angular.json +171 -0
  15. package/lib/skeletons/_angular/options/ecl-eu/src/app/app.component.html +189 -0
  16. package/lib/skeletons/_angular/options/ecl-eu/src/app/app.component.ts +59 -0
  17. package/lib/skeletons/_angular/options/ecl-eu/src/app/features/home/home.component.html +71 -0
  18. package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/components/page1/page1.component.html +1 -0
  19. package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/components/page2/page2.component.html +1 -0
  20. package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module1/module1.component.html +1 -0
  21. package/lib/skeletons/_angular/options/ecl-eu/src/app/features/module2/module2.component.html +1 -0
  22. package/lib/skeletons/_angular/options/ecl-eu/src/app/shared/shared.module.ts +19 -0
  23. package/lib/skeletons/_angular/options/ecl-eu/src/config/global.ts +23 -0
  24. package/lib/skeletons/_angular/options/openid-jwt/package.json +2 -2
  25. package/lib/skeletons/_angular/options/openid-jwt/src/app/core/core.module.ts +3 -0
  26. package/lib/skeletons/web-symfony/myapp-web/package.json +2 -2
  27. package/package.json +2 -2
  28. /package/lib/skeletons/_angular/options/{ecl → ecl-ec}/angular.json +0 -0
  29. /package/lib/skeletons/_angular/options/{ecl → ecl-ec}/src/app/app.component.html +0 -0
  30. /package/lib/skeletons/_angular/options/{ecl → ecl-ec}/src/app/app.component.ts +0 -0
  31. /package/lib/skeletons/_angular/options/{ecl → ecl-ec}/src/app/features/home/home.component.html +0 -0
  32. /package/lib/skeletons/_angular/options/{ecl → ecl-ec}/src/app/features/module1/components/page1/page1.component.html +0 -0
  33. /package/lib/skeletons/_angular/options/{ecl → ecl-ec}/src/app/features/module1/components/page2/page2.component.html +0 -0
  34. /package/lib/skeletons/_angular/options/{ecl → ecl-ec}/src/app/features/module1/module1.component.html +0 -0
  35. /package/lib/skeletons/_angular/options/{ecl → ecl-ec}/src/app/features/module2/module2.component.html +0 -0
@@ -1 +1 @@
1
- 16.0.0-next.1
1
+ 16.0.0-next.10
package/bin/eui-cli.js CHANGED
@@ -48,21 +48,7 @@ if (args.targetPath) {
48
48
  if (args.v) {
49
49
  console.info('Current eUI CLI version installed : ' + config.version);
50
50
 
51
- // } else if (args.m) {
52
- // // module/sub-package generator
53
- // return generators.moduleGenerate({
54
- // inputConfig: inputConfig,
55
- // targetPath: targetPath
56
- // });
57
-
58
- // } else if (args.f) {
59
- // return generators.featureGenerate({
60
- // inputConfig: inputConfig,
61
- // targetPath: targetPath
62
- // });
63
-
64
51
  } else {
65
- // Application generator
66
52
  return generators.appGenerate({
67
53
  inputConfig: inputConfig,
68
54
  targetPath: targetPath
package/lib/build.js CHANGED
@@ -141,9 +141,15 @@ const copyAngular = (targetPath, cliConfig, overwrite = true) => {
141
141
  .then(() => {
142
142
  if (cliConfig.appOptions && cliConfig.appOptions.length !== 0) {
143
143
  cliConfig.appOptions.forEach((item) => {
144
- console.log('Applying option : ' + item);
145
- tools.copydir(config.optionsPath[item], targetPath, true);
144
+ if (item !== 'ecl') {
145
+ console.log('Applying option : ' + item);
146
+ tools.copydir(config.optionsPath[item], targetPath, true);
147
+ }
146
148
  })
149
+ if (cliConfig.appOptionsEclTheme) {
150
+ console.log(`eUI ECL theme selected : ` + cliConfig.appOptionsEclTheme);
151
+ tools.copydir(config.optionsPath[cliConfig.appOptionsEclTheme], targetPath, true);
152
+ }
147
153
  }
148
154
  return Promise.resolve();
149
155
  })
package/lib/cli.js CHANGED
@@ -5,6 +5,7 @@ const defaultConfig = {
5
5
  appScope: '@app',
6
6
  appType: 'angular',
7
7
  appOptions: [],
8
+ appOptionsEclTheme: 'ecl-ec',
8
9
  appFeatures: [],
9
10
  groupId: 'ec.europa.digit',
10
11
  artifactId: 'myapp',
@@ -79,13 +80,27 @@ module.exports.start = (options) => {
79
80
  message: 'Select one or more additional configuration options :',
80
81
  choices: [
81
82
  { name: 'OpenId Connect JWT implementation', value: 'openid-jwt' },
82
- { name: 'ECL app-shell template and configuration - for ec.europa.eu apps', value: 'ecl' },
83
+ { name: 'eUI ECL app-shell template and configuration - for ec.europa.eu apps', value: 'ecl' },
83
84
  ],
84
85
  when: function (answers) {
85
86
  return (answers.appType !== 'mobile');
86
87
  }
87
88
  },
88
89
 
90
+ {
91
+ type: 'list',
92
+ name: 'appOptionsEclTheme',
93
+ default: defaultConfig.appOptionsEclTheme,
94
+ message: 'Select which eUI ECL theme flavor you need :',
95
+ choices: [
96
+ { name: 'eUI ECL - EC theme', value: 'ecl-ec' },
97
+ { name: 'eUI ECL - EU theme', value: 'ecl-eu' },
98
+ ],
99
+ when: function (answers) {
100
+ return (answers.appOptions.includes('ecl'));
101
+ }
102
+ },
103
+
89
104
  {
90
105
  name: 'npmInstall',
91
106
  type: 'confirm',
package/lib/config.js CHANGED
@@ -17,7 +17,8 @@ module.exports.webSymfonyPath = path.join(skeletonsPath, 'web-symfony');
17
17
 
18
18
  module.exports.optionsPath = {
19
19
  "openid-jwt": path.join(skeletonsPath, '_angular/options/openid-jwt'),
20
- "ecl": path.join(skeletonsPath, '_angular/options/ecl'),
20
+ "ecl-ec": path.join(skeletonsPath, '_angular/options/ecl-ec'),
21
+ "ecl-eu": path.join(skeletonsPath, '_angular/options/ecl-eu'),
21
22
  };
22
23
 
23
24
  module.exports.version = version;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "16.0.0-next.1",
3
+ "version": "16.0.0-next.10",
4
4
  "license": "EUPL-1.1",
5
5
  "scripts": {
6
6
  "ng": "ng",
@@ -20,6 +20,6 @@
20
20
  },
21
21
  "private": true,
22
22
  "dependencies": {
23
- "@eui/deps-base": "16.0.0-next.1"
23
+ "@eui/deps-base": "16.0.0-next.10"
24
24
  }
25
25
  }
@@ -5,7 +5,8 @@
5
5
  "**/dist/**",
6
6
  "**/coverage/**",
7
7
  "**/e2e/**",
8
- "**/test/**"
8
+ "**/test/**",
9
+ "**/testing/**"
9
10
  ],
10
11
  "overrides": [
11
12
  {
@@ -20,8 +21,9 @@
20
21
  "createDefaultProgram": true
21
22
  },
22
23
  "extends": [
23
- "plugin:@angular-eslint/ng-cli-compat",
24
- "plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
24
+ "eslint:recommended",
25
+ "plugin:@typescript-eslint/recommended",
26
+ "plugin:@angular-eslint/recommended",
25
27
  "plugin:@angular-eslint/template/process-inline-templates"
26
28
  ],
27
29
  "rules": {
@@ -10,7 +10,7 @@ import { Observable, Subscription } from 'rxjs';
10
10
  selector: 'app-root',
11
11
  templateUrl: './app.component.html',
12
12
  })
13
- export class AppComponent implements OnInit, OnDestroy {
13
+ export class AppComponent implements OnDestroy {
14
14
  userInfos: UserState;
15
15
  // Observe state changes
16
16
  userState: Observable<UserState>;
@@ -42,9 +42,6 @@ export class AppComponent implements OnInit, OnDestroy {
42
42
  }));
43
43
  }
44
44
 
45
- ngOnInit() {
46
- }
47
-
48
45
  ngOnDestroy() {
49
46
  this.subs.forEach((s: Subscription) => s.unsubscribe());
50
47
  }
@@ -4,14 +4,14 @@
4
4
  <eui-page-content>
5
5
  <h3 class="eui-u-font-bold eui-u-color-info">Overview</h3>
6
6
 
7
- <p>The <strong><a href="https://webgate.ec.europa.eu/fpfis/wikis/display/eUI" target="_blank">eUI
7
+ <p>The <strong><a href="https://webgate.ec.europa.eu/fpfis/wikis/display/eUI" target="_blank" class="eui-u-text-link-external">eUI
8
8
  Platform</a></strong> (eUI) is meant to ease development of <strong>Single Web Page
9
9
  Applications</strong> (SPAs) providing rich <strong>User Experience</strong> (UX) starting point
10
10
  to directly quick-start applications development.</p>
11
11
 
12
12
  <p>It's also focusing on rationalisation and implementation of <strong><a
13
13
  href="https://webgate.ec.europa.eu/fpfis/wikis/display/Europa/User+experience"
14
- target="_blank">European Commission's User Experience</a></strong> (UX@EC) and the adoption
14
+ target="_blank" class="eui-u-text-link-external">European Commission's User Experience</a></strong> (UX@EC) and the adoption
15
15
  of a common look and feel for your web applications.</p>
16
16
 
17
17
  <p>Thereby, the <strong>eUI framework</strong> provides guidelines and recommendations on
@@ -19,7 +19,7 @@
19
19
  to build common and homogeneous graphical web interfaces that reflects the <strong>European
20
20
  Commission Style Guides</strong> towards a corporate look and feel.
21
21
  It also offers consistency from User Experience point of view through various participant projects
22
- such as Opsys, My Workplace, Compass Corporate, Assmal, eProcurement, Sygma, Sedia, etc.</p>
22
+ such as Opsys, MyWorkplace, Compass Corporate, Assmal, eProcurement, Sygma, Sedia, etc.</p>
23
23
 
24
24
  <p>The target audience goes from Developers who will find a lot of usefull technical information, but
25
25
  also Designers who want to reuse such materials to illustrate their work as well as Analysts and
@@ -27,8 +27,10 @@
27
27
 
28
28
  <p>Feel free to participate and help to improve the eUI platform.</p>
29
29
  <p>Contact us at <strong><a
30
- href="mailto:DIGIT-EUI-SUPPORT@ec.europa.eu">DIGIT-EUI-SUPPORT@ec.europa.eu</a></strong> and
31
- join us on MS Teams : <a href="https://teams.microsoft.com/l/team/19%3a2f5bb6b7d1e24c4aabaa62229d3e1955%40thread.tacv2/conversations?groupId=fb6def72-c57b-4e8f-a82e-49be65d6e1f5&tenantId=b24c8b06-522c-46fe-9080-70926f8dddb1" target="_blank">MS Teams EC_eUI team</a>
30
+ href="mailto:DIGIT-EUI-SUPPORT@ec.europa.eu" class="eui-u-text-link">DIGIT-EUI-SUPPORT@ec.europa.eu</a></strong> and
31
+ join us on MS Teams : <a href="https://teams.microsoft.com/l/team/19%3a2f5bb6b7d1e24c4aabaa62229d3e1955%40thread.tacv2/conversations?groupId=fb6def72-c57b-4e8f-a82e-49be65d6e1f5&tenantId=b24c8b06-522c-46fe-9080-70926f8dddb1" target="_blank" class="eui-u-text-link-external">
32
+ MS Teams EC_eUI team
33
+ </a>
32
34
  </p>
33
35
 
34
36
  <div>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "16.0.0-next.1",
3
+ "version": "16.0.0-next.10",
4
4
  "license": "EUPL-1.1",
5
5
  "scripts": {
6
6
  "ng": "ng",
@@ -20,10 +20,8 @@
20
20
  },
21
21
  "private": true,
22
22
  "dependencies": {
23
- "@eui/deps-base": "16.0.0-next.1",
24
- "@eui/mobile-core": "14.2.0",
25
- "@eui/mobile-styles": "14.2.0",
26
- "@eui/ecl-core": "14.1.4"
27
- },
28
- "resolutions": {}
23
+ "@eui/deps-base": "16.0.0-next.10",
24
+ "@eui/mobile-core": "15.1.0",
25
+ "@eui/mobile-styles": "15.1.0"
26
+ }
29
27
  }
@@ -11,7 +11,7 @@ import { EuimMenuItem } from '@eui/mobile-core';
11
11
  selector: 'app-root',
12
12
  templateUrl: './app.component.html',
13
13
  })
14
- export class AppComponent implements OnInit, OnDestroy {
14
+ export class AppComponent implements OnDestroy {
15
15
  userInfos: UserState;
16
16
  // Observe state changes
17
17
  userState: Observable<UserState>;
@@ -42,14 +42,12 @@ export class AppComponent implements OnInit, OnDestroy {
42
42
  }));
43
43
  }
44
44
 
45
- ngOnInit() {
46
- }
47
-
48
45
  ngOnDestroy() {
49
46
  this.subs.forEach((s: Subscription) => s.unsubscribe());
50
47
  }
51
48
 
52
49
  onItemClick(item: EuimMenuItem) {
53
50
  // Handle any menu item click
51
+ console.log(item);
54
52
  }
55
53
  }
@@ -1,21 +1,19 @@
1
1
  import { NgModule } from '@angular/core';
2
2
  import { RouterModule } from '@angular/router';
3
+ import { CommonModule } from '@angular/common';
3
4
  import { TranslateModule } from '@ngx-translate/core';
4
5
 
5
6
  import { EclAllModule } from '@eui/ecl';
6
7
 
8
+ const MODULES = [
9
+ RouterModule,
10
+ EclAllModule,
11
+ TranslateModule,
12
+ CommonModule,
13
+ ];
7
14
  @NgModule({
8
- imports: [
9
- RouterModule,
10
- EclAllModule,
11
- TranslateModule,
12
- ],
13
- declarations: [
14
- ],
15
- exports: [
16
- RouterModule,
17
- EclAllModule,
18
- TranslateModule,
19
- ],
15
+ imports: [...MODULES],
16
+ declarations: [],
17
+ exports: [...MODULES],
20
18
  })
21
19
  export class SharedModule {}
@@ -17,4 +17,7 @@ export const GLOBAL: GlobalConfig = {
17
17
  lang: 'en',
18
18
  },
19
19
  },
20
+ eui: {
21
+ theme: 'ec'
22
+ }
20
23
  };
@@ -0,0 +1,171 @@
1
+ {
2
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
+ "version": 1,
4
+ "newProjectRoot": "projects",
5
+ "defaultProject": "app",
6
+ "cli": {
7
+ "analytics": false
8
+ },
9
+ "projects": {
10
+ "app": {
11
+ "root": "",
12
+ "sourceRoot": "src",
13
+ "projectType": "application",
14
+ "prefix": "app",
15
+ "schematics": {
16
+ "@schematics/angular:component": {
17
+ "style": "scss"
18
+ },
19
+ "@schematics/angular:application": {
20
+ "strict": true
21
+ }
22
+ },
23
+ "architect": {
24
+ "build": {
25
+ "builder": "@angular-devkit/build-angular:browser",
26
+ "options": {
27
+ "outputPath": "dist",
28
+ "index": "src/index.html",
29
+ "main": "src/main.ts",
30
+ "polyfills": "src/polyfills.ts",
31
+ "tsConfig": "src/tsconfig.app.json",
32
+ "inlineStyleLanguage": "scss",
33
+ "assets": [
34
+ "src/favicon.ico",
35
+ "src/assets",
36
+ {
37
+ "glob": "**/*",
38
+ "input": "node_modules/@eui/core/assets/",
39
+ "output": "./assets"
40
+ },
41
+ {
42
+ "glob": "**/*",
43
+ "input": "node_modules/@eui/styles-base/dist/assets/ecl",
44
+ "output": "./assets/images/ecl"
45
+ },
46
+ {
47
+ "glob": "**/*",
48
+ "input": "node_modules/@eui/styles-base/dist/assets",
49
+ "output": "./assets"
50
+ },
51
+ {
52
+ "glob": "**/*",
53
+ "input": "node_modules/@eui/ecl/assets/",
54
+ "output": "./assets"
55
+ }
56
+ ],
57
+ "styles": [
58
+ "node_modules/@eui/styles/dist/styles/eui-ecl-eu.css",
59
+ "src/styles.scss"
60
+ ]
61
+ },
62
+ "configurations": {
63
+ "production": {
64
+ "fileReplacements": [
65
+ {
66
+ "replace": "src/environments/environment.ts",
67
+ "with": "src/environments/environment.prod.ts"
68
+ }
69
+ ],
70
+ "optimization": false,
71
+ "outputHashing": "all",
72
+ "sourceMap": false,
73
+ "namedChunks": true,
74
+ "aot": true,
75
+ "extractLicenses": true,
76
+ "vendorChunk": false,
77
+ "buildOptimizer": false,
78
+ "budgets": [
79
+ {
80
+ "type": "initial",
81
+ "maximumWarning": "2mb",
82
+ "maximumError": "6mb"
83
+ }
84
+ ]
85
+ },
86
+ "production-optimized": {
87
+ "fileReplacements": [
88
+ {
89
+ "replace": "src/environments/environment.ts",
90
+ "with": "src/environments/environment.prod.ts"
91
+ }
92
+ ],
93
+ "optimization": {
94
+ "scripts": true,
95
+ "styles": {
96
+ "minify": false,
97
+ "inlineCritical": true
98
+ },
99
+ "fonts": true
100
+ },
101
+ "outputHashing": "all",
102
+ "sourceMap": false,
103
+ "namedChunks": true,
104
+ "aot": true,
105
+ "extractLicenses": true,
106
+ "vendorChunk": false,
107
+ "buildOptimizer": true,
108
+ "budgets": [
109
+ {
110
+ "type": "initial",
111
+ "maximumWarning": "2mb",
112
+ "maximumError": "6mb"
113
+ }
114
+ ]
115
+ },
116
+ "development": {
117
+ "buildOptimizer": false,
118
+ "optimization": false,
119
+ "vendorChunk": true,
120
+ "extractLicenses": false,
121
+ "sourceMap": true,
122
+ "namedChunks": true
123
+ }
124
+ },
125
+ "defaultConfiguration": "production"
126
+ },
127
+ "serve": {
128
+ "builder": "@angular-devkit/build-angular:dev-server",
129
+ "options": {
130
+ "browserTarget": "app:build"
131
+ },
132
+ "configurations": {
133
+ "proxy-mock": {
134
+ "browserTarget": "app:build",
135
+ "proxyConfig": "proxy-mock.conf.json"
136
+ },
137
+ "production": {
138
+ "browserTarget": "app:build:production"
139
+ },
140
+ "development": {
141
+ "browserTarget": "app:build:development"
142
+ }
143
+ },
144
+ "defaultConfiguration": "development"
145
+ },
146
+ "lint": {
147
+ "builder": "@angular-eslint/builder:lint",
148
+ "options": {
149
+ "lintFilePatterns": [
150
+ "src/**/*.ts",
151
+ "src/**/*.html"
152
+ ],
153
+ "eslintConfig": "src/.eslintrc.json"
154
+ }
155
+ },
156
+ "test": {
157
+ "builder": "@angular-devkit/build-angular:karma",
158
+ "options": {
159
+ "polyfills": [
160
+ "zone.js",
161
+ "zone.js/testing"
162
+ ],
163
+ "tsConfig": "src/tsconfig.spec.json",
164
+ "karmaConfig": "src/karma.conf.js",
165
+ "inlineStyleLanguage": "scss"
166
+ }
167
+ }
168
+ }
169
+ }
170
+ }
171
+ }
@@ -0,0 +1,189 @@
1
+ <ecl-app>
2
+ <ecl-site-header siteName="Site name">
3
+
4
+ <div eclSiteHeaderEnvironment>Environment</div>
5
+
6
+ <ecl-site-header-action>
7
+ <ecl-site-header-login
8
+ [isLoggedIn]="isLoggedIn"
9
+ (login)="onLogin($event)">
10
+ <p eclSiteHeaderLoginDescription>
11
+ {{ 'ecl.site-header.LOGGED-IN-AS' | translate }} {{ userInfos?.fullName }}
12
+ </p>
13
+ <hr eclSiteHeaderLoginSeparator />
14
+ <a eclLink variant="standalone" href="#" (click)="onLogout($event)">
15
+ {{ 'ecl.site-header.LOGOUT' | translate }}
16
+ </a>
17
+ </ecl-site-header-login>
18
+
19
+ <ecl-site-header-language></ecl-site-header-language>
20
+
21
+ <ecl-site-header-search (search)="onSearch($event)"></ecl-site-header-search>
22
+ </ecl-site-header-action>
23
+
24
+ <ecl-menu (menuItemSelect)="onMenuItemSelected($event)">
25
+ <ecl-menu-item label="Home"></ecl-menu-item>
26
+ <ecl-menu-item label="Item 1">
27
+ <ecl-menu-mega>
28
+ <ecl-menu-mega-item label="Item 1.1"></ecl-menu-mega-item>
29
+ <ecl-menu-mega-item label="Item 1.2"></ecl-menu-mega-item>
30
+ <ecl-menu-mega-item label="Item 1.3" [isCurrent]="true"></ecl-menu-mega-item>
31
+ </ecl-menu-mega>
32
+
33
+ </ecl-menu-item>
34
+
35
+ <ecl-menu-item label="Item 2">
36
+ <ecl-menu-mega>
37
+ <ecl-menu-mega-item label="Item 2.1"></ecl-menu-mega-item>
38
+ <ecl-menu-mega-item label="Item 2.2"></ecl-menu-mega-item>
39
+ <ecl-menu-mega-item label="Item 2.3"></ecl-menu-mega-item>
40
+ </ecl-menu-mega>
41
+ </ecl-menu-item>
42
+
43
+ <ecl-menu-item label="Item 3">
44
+ <ecl-menu-mega>
45
+ <ecl-menu-mega-item label="Item 3.1"></ecl-menu-mega-item>
46
+ <ecl-menu-mega-item label="Item 3.2"></ecl-menu-mega-item>
47
+ <ecl-menu-mega-item label="Item 3.3"></ecl-menu-mega-item>
48
+ </ecl-menu-mega>
49
+ </ecl-menu-item>
50
+ </ecl-menu>
51
+ </ecl-site-header>
52
+
53
+ <ecl-page-header>
54
+ <ecl-breadcrumb>
55
+ <ecl-breadcrumb-segment>Home</ecl-breadcrumb-segment>
56
+ <ecl-breadcrumb-segment>European Commission</ecl-breadcrumb-segment>
57
+ <ecl-breadcrumb-segment [isCurrentPage]="true">ECL</ecl-breadcrumb-segment>
58
+ </ecl-breadcrumb>
59
+
60
+ <div eclPageHeaderMeta>
61
+ <span eclPageHeaderMetaItem>
62
+ Auto generated template
63
+ </span>
64
+ </div>
65
+ <h1 eclPageHeaderTitle>Europa Component Library</h1>
66
+ <div eclPageHeaderDescriptionContainer>
67
+ <p eclPageHeaderDescription>
68
+ The Europa Component Library (ECL) is a comprehensive style guide containing the design elements and visual standards that make up all Europa websites and applications.
69
+ </p>
70
+ </div>
71
+ </ecl-page-header>
72
+
73
+ <div class="ecl-u-pv-xl">
74
+ <router-outlet></router-outlet>
75
+ </div>
76
+
77
+ <ecl-site-footer>
78
+ <div eclSiteFooterRow>
79
+ <div eclSiteFooterColumn>
80
+ <div eclSiteFooterSection>
81
+ <h2 eclSiteFooterTitle>
82
+ <a eclLink
83
+ variant="standalone"
84
+ eclSiteFooterTitleLink
85
+ routerLink="/">Site name
86
+ </a>
87
+ </h2>
88
+ <div eclSiteFooterDescription>
89
+ This site is managed by <a routerLink="/" eclLink variant="standalone">site owner name</a>
90
+ and is an official website of the European Union
91
+ </div>
92
+ </div>
93
+ </div>
94
+ <div eclSiteFooterColumn>
95
+ <div eclSiteFooterSection>
96
+ <h2 eclSiteFooterTitle
97
+ [isSeparator]="true">
98
+ Contact site name
99
+ </h2>
100
+ <ul eclSiteFooterList>
101
+ <li eclSiteFooterListItem>
102
+ <a eclLink
103
+ eclSiteFooterLink
104
+ variant="standalone"
105
+ routerLink="/">
106
+ Link
107
+ </a>
108
+ </li>
109
+ </ul>
110
+ </div>
111
+ <div eclSiteFooterSection>
112
+ <h2 eclSiteFooterTitle
113
+ [isSeparator]="true">
114
+ Follow us
115
+ </h2>
116
+ <ul eclSiteFooterList
117
+ [isInline]="true">
118
+ <li eclSiteFooterListItem>
119
+ <a eclLink
120
+ eclSiteFooterLink
121
+ variant="standalone"
122
+ routerLink="/">
123
+ <span eclLinkLabel>Social 1</span>
124
+ </a>
125
+ </li>
126
+ <li eclSiteFooterListItem>
127
+ <a eclLink
128
+ eclSiteFooterLink
129
+ variant="standalone"
130
+ routerLink="/">
131
+ <span eclLinkLabel>Social 2</span>
132
+ </a>
133
+ </li>
134
+ <li eclSiteFooterListItem>
135
+ <a eclLink
136
+ eclSiteFooterLink
137
+ variant="standalone"
138
+ routerLink="/">
139
+ <span eclLinkLabel>Social 3</span>
140
+ </a>
141
+ </li>
142
+ </ul>
143
+ </div>
144
+ </div>
145
+ <div eclSiteFooterColumn>
146
+ <div eclSiteFooterSection>
147
+ <h2 eclSiteFooterTitle
148
+ [isSeparator]="true">
149
+ Optional links
150
+ </h2>
151
+ <ul eclSiteFooterList>
152
+ <li eclSiteFooterListItem>
153
+ <a eclLink
154
+ eclSiteFooterLink
155
+ variant="standalone"
156
+ routerLink="/">
157
+ {{ 'ecl.footer.ACCESSIBILITY' | translate }}
158
+ </a>
159
+ </li>
160
+ <li eclSiteFooterListItem>
161
+ <a eclLink
162
+ eclSiteFooterLink
163
+ variant="standalone"
164
+ routerLink="/">
165
+ Link 2
166
+ </a>
167
+ </li>
168
+ <li eclSiteFooterListItem>
169
+ <a eclLink
170
+ eclSiteFooterLink
171
+ variant="standalone"
172
+ routerLink="/">
173
+ Link 3
174
+ </a>
175
+ </li>
176
+ <li eclSiteFooterListItem>
177
+ <a eclLink
178
+ eclSiteFooterLink
179
+ variant="standalone"
180
+ routerLink="/">
181
+ Link 4
182
+ </a>
183
+ </li>
184
+ </ul>
185
+ </div>
186
+ </div>
187
+ </div>
188
+ </ecl-site-footer>
189
+ </ecl-app>
@@ -0,0 +1,59 @@
1
+ import { Component, OnDestroy } 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
+
9
+ import {
10
+ EclMenuItemSelectEvent,
11
+ EclSiteHeaderLoginEvent,
12
+ EclSiteHeaderSearchEvent,
13
+ } from '@eui/ecl';
14
+
15
+ @Component({
16
+ selector: 'app-root',
17
+ templateUrl: './app.component.html',
18
+ })
19
+ export class AppComponent implements OnDestroy {
20
+ userInfos: UserState;
21
+ // Observe state changes
22
+ userState: Observable<UserState>;
23
+ // an array to keep all subscriptions and easily unsubscribe
24
+ subs: Subscription[] = [];
25
+
26
+ isLoggedIn = false;
27
+
28
+ constructor(
29
+ private store: Store<any>,
30
+ ) {
31
+ this.userState = this.store.select(getUserState);
32
+ this.subs.push(this.userState.subscribe((user: UserState) => {
33
+ this.userInfos = { ...user };
34
+ }));
35
+ }
36
+
37
+ ngOnDestroy() {
38
+ this.subs.forEach((s: Subscription) => s.unsubscribe());
39
+ }
40
+
41
+ onLogin(evt: EclSiteHeaderLoginEvent) {
42
+ this.isLoggedIn = true;
43
+ console.log(evt);
44
+ }
45
+
46
+ onLogout(evt: MouseEvent) {
47
+ this.isLoggedIn = false;
48
+ evt.preventDefault();
49
+ console.log('logout');
50
+ }
51
+
52
+ onSearch(evt: EclSiteHeaderSearchEvent) {
53
+ console.log(evt);
54
+ }
55
+
56
+ onMenuItemSelected(evt: EclMenuItemSelectEvent) {
57
+ console.log('menu item selected', evt);
58
+ }
59
+ }
@@ -0,0 +1,71 @@
1
+ <div class="ecl-container">
2
+ <div class="ecl-row">
3
+ <div class="ecl-col-12">
4
+ <main>
5
+ <h2 class="ecl-u-type-heading-2 ecl-u-mv-none">Purpose</h2>
6
+ <p class="ecl-u-type-paragraph ecl-u-mt-m ecl-u-mb-none">
7
+ This library contains useful components that you can use to build your own website, following DG COMM guidelines.
8
+ </p>
9
+
10
+ <p class="ecl-u-type-paragraph ecl-u-mt-m ecl-u-mb-m">All library elements are accompanied by</p>
11
+ <ul eclUnorderedList>
12
+ <li eclUnorderedListItem>documentation explaining what a component is and how it should be used</li>
13
+ <li eclUnorderedListItem>a visual demonstration</li>
14
+ <li eclUnorderedListItem>HTML/CSS code for implementation</li>
15
+ </ul>
16
+
17
+
18
+ <h2 class="ecl-u-type-heading-2 ecl-u-mt-xl ecl-u-mb-none">eUI/ECL integration</h2>
19
+ <p class="ecl-u-type-paragraph ecl-u-mt-m ecl-u-mb-none">
20
+ eUI provides <a eclLink href="http://www.angular.io">Angular</a> implementation of <a eclLink href="https://ec.europa.eu/component-library/">ECL components,</a> enabling projects based on angular, get all benefints of having ECL compliant web application.
21
+ </p>
22
+
23
+ <p class="ecl-u-type-paragraph ecl-u-mt-m ecl-u-mb-none">
24
+ It is also possible to use all eUI components in eui/ECL application by importing specific component module
25
+ or by importing all components pulling UxAllModule / EuiAllModule
26
+ </p>
27
+
28
+ <h2 class="ecl-u-type-heading-2 ecl-u-mt-xl ecl-u-mb-none">Documentation</h2>
29
+ <p class="ecl-u-type-paragraph ecl-u-mt-m ecl-u-mb-m">
30
+ Documentation can be found as live showcase of all components available, as well as other building blocks, such
31
+ as utility css classes, typography, colors etc.
32
+ </p>
33
+
34
+ <ul eclUnorderedList>
35
+ <li eclUnorderedListItem><a eclLink href="https://ec.europa.eu/component-library">ECL reference documentation</a></li>
36
+ <li eclUnorderedListItem><a eclLink href="https://eui.ecdevops.eu/">eUI library</a></li>
37
+ </ul>
38
+
39
+ <h2 class="ecl-u-type-heading-2 ecl-u-mt-xl ecl-u-mb-none">Support</h2>
40
+ <p class="ecl-u-type-paragraph ecl-u-mt-m ecl-u-mb-none">
41
+ For support in building a European Commission website using the ECL, please contact <a eclLink href="mailto:Europamanagement@ec.europa.eu">COMM Europa Management</a> (CEM)
42
+ </p>
43
+
44
+ <p>For support in building a European Commission website using the eui/ECL integration, please contact
45
+ <a eclLink href="DIGIT-EUI-SUPPORT@ec.europa.eu">DIGIT eUI Support</a> team.
46
+ </p>
47
+
48
+ <h2 class="ecl-u-type-heading-2 ecl-u-mt-xl ecl-u-mb-none">Contact</h2>
49
+
50
+ <dl eclDescriptionList [isHorizontal]="true" class="ecl-u-mt-m">
51
+ <dt eclDescriptionListTerm>Microsoft Teams</dt>
52
+ <dd eclDescriptionListDefinition>
53
+ <a eclLink href="https://teams.microsoft.com/l/team/19%3a2f5bb6b7d1e24c4aabaa62229d3e1955%40thread.tacv2/conversations?groupId=fb6def72-c57b-4e8f-a82e-49be65d6e1f5&tenantId=b24c8b06-522c-46fe-9080-70926f8dddb1">
54
+ https://teams.microsoft.com
55
+ </a>
56
+ </dd>
57
+
58
+ <dt eclDescriptionListTerm>DIGIT eUI Support</dt>
59
+ <dd eclDescriptionListDefinition>
60
+ <a eclLink href="mailto:DIGIT-EUI-SUPPORT@ec.europa.eu">DIGIT-EUI-SUPPORT@ec.europa.eu</a>
61
+ </dd>
62
+
63
+ <dt eclDescriptionListTerm>COMM Europa Management</dt>
64
+ <dd eclDescriptionListDefinition>
65
+ <a eclLink href="mailto:Europamanagement@ec.europa.eu">Europamanagement@ec.europa.eu</a>
66
+ </dd>
67
+ </dl>
68
+ </main>
69
+ </div>
70
+ </div>
71
+ </div>
@@ -0,0 +1,19 @@
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 {}
@@ -0,0 +1,23 @@
1
+ import { GlobalConfig } from '@eui/core';
2
+
3
+ export const GLOBAL: GlobalConfig = {
4
+ appTitle: 'CSDR-app',
5
+ i18n: {
6
+ i18nService: {
7
+ defaultLanguage: 'en',
8
+ languages: ['en', 'fr'],
9
+ },
10
+ i18nLoader: {
11
+ i18nFolders: ['i18n-eui', 'i18n-ecl', 'i18n'],
12
+ },
13
+ },
14
+ user: {
15
+ defaultUserPreferences: {
16
+ dashboard: { },
17
+ lang: 'en',
18
+ },
19
+ },
20
+ eui: {
21
+ theme: 'eu',
22
+ },
23
+ };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "16.0.0-next.1",
3
+ "version": "16.0.0-next.10",
4
4
  "license": "EUPL-1.1",
5
5
  "scripts": {
6
6
  "ng": "ng",
@@ -18,6 +18,6 @@
18
18
  },
19
19
  "private": true,
20
20
  "dependencies": {
21
- "@eui/deps-base": "16.0.0-next.1"
21
+ "@eui/deps-base": "16.0.0-next.10"
22
22
  }
23
23
  }
@@ -16,6 +16,7 @@ import {
16
16
  CoreModuleEffects,
17
17
  EUI_CONFIG_TOKEN,
18
18
  } from '@eui/core';
19
+ import { EuiLayoutModule } from '@eui/components/layout';
19
20
 
20
21
  import { appConfig } from '../../config/index';
21
22
  import { environment } from '../../environments/environment';
@@ -26,6 +27,7 @@ import { SharedModule } from '@shared/shared.module';
26
27
 
27
28
  @NgModule({
28
29
  imports: [
30
+ EuiLayoutModule,
29
31
  SharedModule,
30
32
  HttpClientModule,
31
33
  EuiCoreModule.forRoot(),
@@ -37,6 +39,7 @@ import { SharedModule } from '@shared/shared.module';
37
39
  declarations: [
38
40
  ],
39
41
  exports: [
42
+ EuiLayoutModule,
40
43
  SharedModule,
41
44
  ],
42
45
  providers: [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eui-angular-app",
3
- "version": "16.0.0-next.1",
3
+ "version": "16.0.0-next.10",
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": "16.0.0-next.1"
22
+ "@eui/deps-base": "16.0.0-next.10"
23
23
  }
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/cli",
3
- "version": "16.0.0-next.1",
3
+ "version": "16.0.0-next.10",
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.8.1"
16
+ "@eui/tools": "6.11.27"
17
17
  },
18
18
  "preferGlobal": true,
19
19
  "homepage": "https://eui.ecdevops.eu",