@eui/cli 21.0.0-alpha.9 → 21.0.0-next.2
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/README.md +1 -1
- package/bin/eui-cli.js +61 -41
- package/bin/scripts/build-app.js +12 -0
- package/bin/scripts/lint-app.js +22 -0
- package/bin/scripts/new.js +39 -0
- package/bin/scripts/serve-app.js +12 -0
- package/lib/app-utils/build.js +176 -0
- package/lib/app-utils/projects.js +41 -0
- package/lib/app-utils/serve.js +78 -0
- package/lib/build.js +14 -39
- package/lib/cli.js +22 -5
- package/lib/config.js +1 -0
- package/lib/generators.js +5 -8
- package/lib/install.js +7 -7
- package/lib/post-build.js +1 -3
- package/lib/skeletons/_angular/base/angular.json +2 -31
- package/lib/skeletons/_angular/base/package.json +24 -23
- package/lib/skeletons/_angular/base/src/app/app.component.spec.ts +2 -2
- package/lib/skeletons/_angular/base/src/app/app.component.ts +2 -2
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.component.ts +1 -1
- package/lib/skeletons/_angular/base/src/karma.conf.js +42 -2
- package/lib/skeletons/_angular/base/src/tsconfig.spec.json +1 -5
- package/lib/skeletons/_angular/base/tsconfig.json +1 -1
- package/lib/skeletons/_angular/base-mobile/package.json +4 -4
- package/lib/skeletons/_angular/base-mobile/tsconfig.json +27 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/app.component.ts +16 -16
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/home/home.component.ts +4 -4
- package/lib/skeletons/_angular/options/ecl-eu/src/app/app.component.ts +16 -16
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/home/home.component.ts +4 -4
- package/lib/skeletons/_angular/options/ecl-eu/src/app/shared/shared.module.ts +1 -5
- package/lib/skeletons/_angular/options/pnpm/package.json +72 -0
- package/lib/utils.js +204 -0
- package/package.json +10 -13
- package/.version.properties +0 -1
- package/lib/skeletons/_angular/base/.euirc.json +0 -8
- package/lib/skeletons/web-symfony/myapp-web/angular.json +0 -169
- package/lib/skeletons/web-symfony/myapp-web/package.json +0 -23
- package/lib/skeletons/web-symfony/myapp-web/src/app/app-routing.module.ts +0 -18
- package/lib/skeletons/web-symfony/myapp-web/src/app/app.component.ts +0 -77
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.html +0 -160
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.scss +0 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.ts +0 -104
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/models/product.model.ts +0 -6
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/products-routing.module.ts +0 -16
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/products.module.ts +0 -16
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/services/products.service.ts +0 -29
- package/lib/skeletons/web-symfony/myapp-web/src/environments/environment.ts +0 -17
- package/lib/skeletons/web-symfony/myapp-web-rest/.env +0 -28
- package/lib/skeletons/web-symfony/myapp-web-rest/bin/console +0 -42
- package/lib/skeletons/web-symfony/myapp-web-rest/composer.json +0 -67
- package/lib/skeletons/web-symfony/myapp-web-rest/composer.lock +0 -3572
- package/lib/skeletons/web-symfony/myapp-web-rest/config/bootstrap.php +0 -21
- package/lib/skeletons/web-symfony/myapp-web-rest/config/bundles.php +0 -12
- package/lib/skeletons/web-symfony/myapp-web-rest/config/config.yml +0 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/cache.yaml +0 -19
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/dev/routing.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/doctrine.yaml +0 -29
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/doctrine_migrations.yaml +0 -5
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/framework.yaml +0 -17
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/prod/doctrine.yaml +0 -32
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/routing.yaml +0 -4
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/sensio_framework_extra.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/test/framework.yaml +0 -4
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/test/routing.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/twig.yaml +0 -4
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes/annotations.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes/dev/twig.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/services.yaml +0 -27
- package/lib/skeletons/web-symfony/myapp-web-rest/public/index.php +0 -27
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Controller/ProductController.php +0 -196
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Entity/Product.php +0 -99
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Kernel.php +0 -53
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Migrations/Version20190604101623.php +0 -31
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Migrations/Version20190604101638.php +0 -35
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Repository/ProductRepository.php +0 -51
- package/lib/skeletons/web-symfony/myapp-web-rest/symfony.lock +0 -274
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/base.html.twig +0 -12
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/lucky/number.html.twig +0 -1
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/product/index.html.twig +0 -20
package/lib/utils.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
const childProcess = require('child_process');
|
|
2
|
+
const execSync = childProcess.execSync;
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const fse = require('fs-extra');
|
|
5
|
+
const glob = require('glob');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const figlet = require('figlet');
|
|
8
|
+
|
|
1
9
|
module.exports.getAngularPath = (targetPath, appName, appType, artifactId) => {
|
|
2
10
|
switch(appType) {
|
|
3
11
|
case 'angular':
|
|
@@ -11,3 +19,199 @@ module.exports.getAngularPath = (targetPath, appName, appType, artifactId) => {
|
|
|
11
19
|
return `${targetPath}/client`;
|
|
12
20
|
}
|
|
13
21
|
}
|
|
22
|
+
|
|
23
|
+
module.exports.getArgs = () => {
|
|
24
|
+
const argv = require('yargs').argv;
|
|
25
|
+
|
|
26
|
+
const processArgs = process.env._CSDR_ARGS;
|
|
27
|
+
|
|
28
|
+
let args = {};
|
|
29
|
+
|
|
30
|
+
if (processArgs) {
|
|
31
|
+
processArgs.split(',').forEach((item) => {
|
|
32
|
+
// check if it's defined as array - example format : someArray:test1=test1|test2=test2
|
|
33
|
+
if (item.indexOf('Array') > 0) {
|
|
34
|
+
const arrayItems = item.split(':')[1];
|
|
35
|
+
const subItems = arrayItems.split('|');
|
|
36
|
+
const array = [];
|
|
37
|
+
subItems.forEach((sub) => {
|
|
38
|
+
const subItemSplit = sub.split('=');
|
|
39
|
+
const newItem = {};
|
|
40
|
+
newItem[subItemSplit[0].trim()] = subItemSplit[1].trim();
|
|
41
|
+
array.push(newItem);
|
|
42
|
+
})
|
|
43
|
+
args[item.split(':')[0]] = array;
|
|
44
|
+
|
|
45
|
+
// otherwise normal key/value pairs - example format : test1:test1,test2:test2
|
|
46
|
+
} else {
|
|
47
|
+
const itemSplit = item.split(':');
|
|
48
|
+
args[itemSplit[0].trim()] = itemSplit[1].trim();
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
root: argv._[0],
|
|
55
|
+
...argv,
|
|
56
|
+
...args
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
module.exports.logBigTitle = (text) => {
|
|
62
|
+
console.log('\n\n');
|
|
63
|
+
console.log('\x1b[33m', figlet.textSync(text, { horizontalLayout: 'full' }) ,'\x1b[0m');
|
|
64
|
+
console.log('\n');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
module.exports.logTitle = (msg) => {
|
|
68
|
+
log(msg, 0);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const logInfo = module.exports.logInfo = (msg) => {
|
|
72
|
+
log(msg, 1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
module.exports.logSuccess = (msg) => {
|
|
76
|
+
if (!msg) msg = 'OK';
|
|
77
|
+
log(msg, 2);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
module.exports.logError = (msg) => {
|
|
81
|
+
log(msg, 3);
|
|
82
|
+
}
|
|
83
|
+
module.exports.logErrorTrace = (filename, method, e) => {
|
|
84
|
+
log(`ERROR in ${filename}`, 3);
|
|
85
|
+
log(`...method : ${method}`, 3);
|
|
86
|
+
log(`...message : ${e.message}`, 3);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
module.exports.logWarning = (msg) => {
|
|
90
|
+
log(msg, 4);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
module.exports.logAccent = (msg) => {
|
|
94
|
+
log(msg, 5);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
module.exports.logBanner = (msg) => {
|
|
98
|
+
log(msg, 6);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
module.exports.logDebug = (msg) => {
|
|
102
|
+
if (getArgs().debug) {
|
|
103
|
+
log(msg, 7);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
module.exports.logDebugTrace = (filename, method, e) => {
|
|
107
|
+
if (getArgs().debug) {
|
|
108
|
+
log(`ERROR in ${filename}`, 7);
|
|
109
|
+
log(`...method : ${method}`, 7);
|
|
110
|
+
log(`...message : ${e.message}`, 7);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
module.exports.logDebugResponse = (response) => {
|
|
114
|
+
if (getArgs().debug) {
|
|
115
|
+
console.log(response);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
module.exports.isDirEmpty = (path) => {
|
|
120
|
+
try {
|
|
121
|
+
var files = fse.readdirSync(path);
|
|
122
|
+
|
|
123
|
+
if (files.length === 0) {
|
|
124
|
+
return true;
|
|
125
|
+
} else {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
} catch (err) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const isFileExists = module.exports.isFileExists = (path) => {
|
|
135
|
+
try {
|
|
136
|
+
return fs.statSync(path);
|
|
137
|
+
} catch (err) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
module.exports.mkdir = (path) => {
|
|
144
|
+
if (!fs.existsSync(path)) {
|
|
145
|
+
fs.mkdirSync(path);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
module.exports.copydir = (from, to, overwrite = true, globPattern = '**/*') => {
|
|
150
|
+
function _recursiveMkDir(dir) {
|
|
151
|
+
if (!fs.existsSync(dir)) {
|
|
152
|
+
_recursiveMkDir(path.dirname(dir));
|
|
153
|
+
fs.mkdirSync(dir);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
logInfo('----->copydir from : ' + from + ' ====> to : ' + to );
|
|
158
|
+
var files = glob.sync(globPattern, { cwd: from, nodir: true, follow: true, dot: true });
|
|
159
|
+
files.forEach(file => {
|
|
160
|
+
const origin = path.join(from, file);
|
|
161
|
+
const dest = path.join(to, file);
|
|
162
|
+
_recursiveMkDir(path.dirname(dest));
|
|
163
|
+
fse.copySync(origin, dest, { overwrite: overwrite });
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
module.exports.move = (from, to) => {
|
|
168
|
+
fse.removeSync(to);
|
|
169
|
+
fse.moveSync(from, to, );
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
module.exports.remove = (path) => {
|
|
173
|
+
fse.removeSync(path);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
module.exports.copy = (origin, dest) => {
|
|
177
|
+
fse.copySync(origin, dest);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const log = (msg, type) => {
|
|
181
|
+
var msgContent;
|
|
182
|
+
|
|
183
|
+
if (type === 0 || !type) {
|
|
184
|
+
msgContent = `\n${msg.toUpperCase()}`;
|
|
185
|
+
console.info('\x1b[33m', msgContent ,'\x1b[0m');
|
|
186
|
+
}
|
|
187
|
+
if (type === 1) {
|
|
188
|
+
msgContent = `${msg}`;
|
|
189
|
+
console.info('\x1b[34m\x1b[1m', msgContent ,'\x1b[0m');
|
|
190
|
+
}
|
|
191
|
+
if (type === 2) {
|
|
192
|
+
msgContent = `${msg}\n`;
|
|
193
|
+
console.info('\x1b[32m\x1b[1m', msgContent ,'\x1b[0m');
|
|
194
|
+
}
|
|
195
|
+
if (type === 3) {
|
|
196
|
+
msgContent = `\n${msg}`;
|
|
197
|
+
console.info('\x1b[31m\x1b[1m', msgContent ,'\x1b[0m');
|
|
198
|
+
}
|
|
199
|
+
if (type === 4) {
|
|
200
|
+
msgContent = `\n${msg}\n`;
|
|
201
|
+
console.info('\x1b[33m', msgContent ,'\x1b[0m');
|
|
202
|
+
}
|
|
203
|
+
if (type === 5) {
|
|
204
|
+
msgContent = `${msg}\n`;
|
|
205
|
+
console.info(msgContent);
|
|
206
|
+
}
|
|
207
|
+
if (type === 6) {
|
|
208
|
+
msgContent = msg
|
|
209
|
+
console.info('\n\n');
|
|
210
|
+
console.info(msgContent);
|
|
211
|
+
console.info('\n');
|
|
212
|
+
}
|
|
213
|
+
if (type === 7) {
|
|
214
|
+
msgContent = `${msg}`;
|
|
215
|
+
console.info(msgContent);
|
|
216
|
+
}
|
|
217
|
+
}
|
package/package.json
CHANGED
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eui/cli",
|
|
3
|
-
"version": "21.0.0-
|
|
3
|
+
"version": "21.0.0-next.2",
|
|
4
4
|
"tag": "next",
|
|
5
5
|
"license": "EUPL-1.1",
|
|
6
|
-
"description": "eUI CLI app generator",
|
|
6
|
+
"description": "eUI CLI app generator & tools",
|
|
7
7
|
"bin": {
|
|
8
8
|
"eui-cli": "bin/eui-cli.js"
|
|
9
9
|
},
|
|
10
10
|
"main": "./lib/cli.js",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://
|
|
13
|
+
"url": "https://sdlc.webcloud.ec.europa.eu/csdr/eui/eui.git"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"replace-in-file": "^7.1.0",
|
|
23
|
-
"execa": "^5.1.1",
|
|
24
|
-
"inquirer": "^8.1.0"
|
|
16
|
+
"figlet": "1.9.3",
|
|
17
|
+
"inquirer": "6.5.0",
|
|
18
|
+
"yargs": "17.7.2",
|
|
19
|
+
"fs-extra": "9.0.0",
|
|
20
|
+
"glob": "7.2.3",
|
|
21
|
+
"cross-spawn": "7.0.6"
|
|
25
22
|
},
|
|
26
23
|
"preferGlobal": true,
|
|
27
24
|
"homepage": "https://eui.ecdevops.eu",
|
|
28
25
|
"author": "ec.europa.eui@gmail.com",
|
|
29
26
|
"engines": {
|
|
30
|
-
"node": "^
|
|
27
|
+
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
31
28
|
"yarn": ">=1.22.4 <2"
|
|
32
29
|
}
|
|
33
30
|
}
|
package/.version.properties
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
19.3.2
|
|
@@ -1,169 +0,0 @@
|
|
|
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
|
-
"styleext": "scss"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"architect": {
|
|
21
|
-
"build": {
|
|
22
|
-
"builder": "ngx-build-plus:build",
|
|
23
|
-
"options": {
|
|
24
|
-
"outputPath": "dist",
|
|
25
|
-
"index": "src/index.html",
|
|
26
|
-
"main": "src/main.ts",
|
|
27
|
-
"polyfills": "src/polyfills.ts",
|
|
28
|
-
"tsConfig": "src/tsconfig.app.json",
|
|
29
|
-
"assets": [
|
|
30
|
-
"src/favicon.ico",
|
|
31
|
-
"src/assets",
|
|
32
|
-
{
|
|
33
|
-
"glob": "**/*",
|
|
34
|
-
"input": "node_modules/@eui/core/assets/",
|
|
35
|
-
"output": "./assets"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"glob": "**/*",
|
|
39
|
-
"input": "node_modules/@eui/styles/dist/assets/images",
|
|
40
|
-
"output": "./assets/images"
|
|
41
|
-
}
|
|
42
|
-
],
|
|
43
|
-
"styles": [
|
|
44
|
-
"node_modules/@eui/styles/dist/styles/eui.css",
|
|
45
|
-
"node_modules/@eui/styles/dist/styles/eui-utilities.css",
|
|
46
|
-
"node_modules/@eui/styles/dist/styles/eui-legacy-bootstrap-utilities.css",
|
|
47
|
-
"src/styles.scss"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
"configurations": {
|
|
51
|
-
"production": {
|
|
52
|
-
"fileReplacements": [
|
|
53
|
-
{
|
|
54
|
-
"replace": "src/environments/environment.ts",
|
|
55
|
-
"with": "src/environments/environment.prod.ts"
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"optimization": true,
|
|
59
|
-
"outputHashing": "all",
|
|
60
|
-
"sourceMap": false,
|
|
61
|
-
"extractCss": true,
|
|
62
|
-
"namedChunks": true,
|
|
63
|
-
"aot": true,
|
|
64
|
-
"extractLicenses": true,
|
|
65
|
-
"vendorChunk": false,
|
|
66
|
-
"buildOptimizer": true,
|
|
67
|
-
"budgets": [
|
|
68
|
-
{
|
|
69
|
-
"type": "initial",
|
|
70
|
-
"maximumWarning": "3mb",
|
|
71
|
-
"maximumError": "5mb"
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
"dev": {
|
|
76
|
-
"fileReplacements": [
|
|
77
|
-
{
|
|
78
|
-
"replace": "src/environments/environment.ts",
|
|
79
|
-
"with": "src/environments/environment.dev.ts"
|
|
80
|
-
}
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"serve": {
|
|
86
|
-
"builder": "@angular-devkit/build-angular:dev-server",
|
|
87
|
-
"options": {
|
|
88
|
-
"browserTarget": "app:build"
|
|
89
|
-
},
|
|
90
|
-
"configurations": {
|
|
91
|
-
"proxy-mock": {
|
|
92
|
-
"browserTarget": "app:build",
|
|
93
|
-
"proxyConfig": "proxy-mock.conf.json"
|
|
94
|
-
},
|
|
95
|
-
"proxy": {
|
|
96
|
-
"browserTarget": "app:build",
|
|
97
|
-
"proxyConfig": "proxy.conf.json"
|
|
98
|
-
},
|
|
99
|
-
"production": {
|
|
100
|
-
"browserTarget": "app:build:production"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"test": {
|
|
105
|
-
"builder": "@angular-devkit/build-angular:karma",
|
|
106
|
-
"options": {
|
|
107
|
-
"main": "src/test.ts",
|
|
108
|
-
"polyfills": "src/polyfills.ts",
|
|
109
|
-
"tsConfig": "src/tsconfig.spec.json",
|
|
110
|
-
"karmaConfig": "src/karma.conf.js",
|
|
111
|
-
"styles": [
|
|
112
|
-
"src/styles.scss"
|
|
113
|
-
],
|
|
114
|
-
"scripts": [],
|
|
115
|
-
"assets": [
|
|
116
|
-
"src/favicon.ico",
|
|
117
|
-
"src/assets",
|
|
118
|
-
{
|
|
119
|
-
"glob": "**/*",
|
|
120
|
-
"input": "node_modules/@eui/core/assets/",
|
|
121
|
-
"output": "./assets"
|
|
122
|
-
}
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"lint": {
|
|
127
|
-
"builder": "@angular-devkit/build-angular:tslint",
|
|
128
|
-
"options": {
|
|
129
|
-
"tsConfig": [
|
|
130
|
-
"src/tsconfig.app.json",
|
|
131
|
-
"src/tsconfig.spec.json"
|
|
132
|
-
],
|
|
133
|
-
"exclude": [
|
|
134
|
-
"**/node_modules/**"
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"app-e2e": {
|
|
141
|
-
"root": "e2e/",
|
|
142
|
-
"projectType": "application",
|
|
143
|
-
"prefix": "",
|
|
144
|
-
"architect": {
|
|
145
|
-
"e2e": {
|
|
146
|
-
"builder": "@angular-devkit/build-angular:protractor",
|
|
147
|
-
"options": {
|
|
148
|
-
"protractorConfig": "e2e/protractor.conf.js",
|
|
149
|
-
"devServerTarget": "app:serve"
|
|
150
|
-
},
|
|
151
|
-
"configurations": {
|
|
152
|
-
"production": {
|
|
153
|
-
"devServerTarget": "app:serve:production"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
"lint": {
|
|
158
|
-
"builder": "@angular-devkit/build-angular:tslint",
|
|
159
|
-
"options": {
|
|
160
|
-
"tsConfig": "e2e/tsconfig.e2e.json",
|
|
161
|
-
"exclude": [
|
|
162
|
-
"**/node_modules/**"
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "eui-angular-app",
|
|
3
|
-
"version": "21.0.0-alpha.8",
|
|
4
|
-
"license": "EUPL-1.1",
|
|
5
|
-
"description": "eUI JEE Symfony app scripts",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"ng": "ng",
|
|
8
|
-
"e2e": "ng e2e",
|
|
9
|
-
"stylelint": "stylelint \"src/**/*.scss\"",
|
|
10
|
-
"tslint": "tslint \"src/**/*.ts\"",
|
|
11
|
-
"clean": "rimraf out-tsc dist packages/**/dist/** packages/**/out-tsc/** packages/**/src/lib/**/*.js packages/**/src/lib/**/*.js.map",
|
|
12
|
-
"start-symfony": "eui-scripts start-symfony --configuration=dev",
|
|
13
|
-
"start-serve": "eui-scripts serve-app --configuration=proxy-mock",
|
|
14
|
-
"start": "npm run clean && npm-run-all --parallel start-symfony start-serve",
|
|
15
|
-
"start-mean": "npm run clean && npm-run-all --parallel start-mock-server-mean start-serve",
|
|
16
|
-
"start-proxy": "npm run clean && eui-scripts serve-app --configuration=proxy",
|
|
17
|
-
"generate-changelog": "eui-scripts generate-changelog"
|
|
18
|
-
},
|
|
19
|
-
"private": true,
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"@eui/deps-base": "21.0.0-alpha.8"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
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: './features/home/home.module#Module' },
|
|
8
|
-
{ path: 'screen/products', loadChildren: './features/products/products.module#ProductsModule' },
|
|
9
|
-
{ path: 'screen/module1', loadChildren: './features/module1/module1.module#Module' },
|
|
10
|
-
{ path: 'screen/module2', loadChildren: './features/module2/module2.module#Module' }
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
@NgModule({
|
|
14
|
-
imports: [
|
|
15
|
-
RouterModule.forRoot(routes),
|
|
16
|
-
],
|
|
17
|
-
})
|
|
18
|
-
export class AppRoutingModule {}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import { Observable } from 'rxjs/Observable';
|
|
4
|
-
import { Store } from '@ngrx/store';
|
|
5
|
-
|
|
6
|
-
import { UserState, getUserState, UxLink, UxLanguage } from '@eui/core';
|
|
7
|
-
|
|
8
|
-
@Component({
|
|
9
|
-
selector: 'app-root',
|
|
10
|
-
templateUrl: './app.component.html'
|
|
11
|
-
})
|
|
12
|
-
export class AppComponent implements OnInit {
|
|
13
|
-
userState: Observable<UserState>;
|
|
14
|
-
|
|
15
|
-
menuLinks: UxLink[] = [];
|
|
16
|
-
notificationLinks: UxLink[] = [];
|
|
17
|
-
|
|
18
|
-
constructor(
|
|
19
|
-
private translateService: TranslateService,
|
|
20
|
-
private store: Store<any>,
|
|
21
|
-
) {
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
ngOnInit() {
|
|
25
|
-
this.userState = <any>this.store.select(getUserState);
|
|
26
|
-
|
|
27
|
-
this._createMenuLinks();
|
|
28
|
-
this._createNotifications();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
onLanguageChanged(language: UxLanguage) {
|
|
32
|
-
this.translateService.use(language.code);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
private _createMenuLinks() {
|
|
36
|
-
this.menuLinks = [
|
|
37
|
-
new UxLink(
|
|
38
|
-
{
|
|
39
|
-
label: 'HOME', url: '/screen/home', isHome: true
|
|
40
|
-
}
|
|
41
|
-
),
|
|
42
|
-
new UxLink(
|
|
43
|
-
{
|
|
44
|
-
label: 'Module1', url: '/screen/module1', children: [
|
|
45
|
-
new UxLink({ label: 'disabled item', disabled: true }),
|
|
46
|
-
new UxLink({ label: 'Page 1', url: '/screen/module1/page1' }),
|
|
47
|
-
new UxLink({ label: 'Page 2', url: '/screen/module1/page2' })
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
),
|
|
51
|
-
new UxLink(
|
|
52
|
-
{
|
|
53
|
-
label: 'Module2', url: '/screen/module2'
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
new UxLink(
|
|
57
|
-
{
|
|
58
|
-
label: 'Products', url: '/screen/products'
|
|
59
|
-
}
|
|
60
|
-
)
|
|
61
|
-
];
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
private _createNotifications() {
|
|
65
|
-
this.notificationLinks = [
|
|
66
|
-
new UxLink(
|
|
67
|
-
{ label: 'Notification title', subLabel: 'This is the description of the noficiation' }
|
|
68
|
-
),
|
|
69
|
-
new UxLink(
|
|
70
|
-
{ label: 'Notification title', subLabel: 'This is the description of the noficiation' }
|
|
71
|
-
),
|
|
72
|
-
new UxLink(
|
|
73
|
-
{ label: 'Notification title', subLabel: 'This is the description of the noficiation' }
|
|
74
|
-
),
|
|
75
|
-
];
|
|
76
|
-
}
|
|
77
|
-
}
|