@eui/cli 21.0.0-alpha.24 → 21.0.0-alpha.25
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/bin/scripts/serve-app.js +2 -2
- package/lib/app-utils/projects.js +41 -0
- package/lib/app-utils/serve.js +76 -0
- package/lib/build.js +0 -28
- package/lib/cli.js +0 -1
- package/lib/skeletons/_angular/base/angular.json +0 -6
- package/lib/skeletons/_angular/base/package.json +2 -2
- package/lib/skeletons/_angular/base-mobile/package.json +1 -1
- package/lib/utils.js +0 -14
- package/package.json +1 -2
- 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/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/bin/scripts/serve-app.js
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// TODO v21 - for openid config injection extracted from eUI tools
|
|
2
|
+
|
|
3
|
+
// 'use strict';
|
|
4
|
+
|
|
5
|
+
// const path = require('path');
|
|
6
|
+
|
|
7
|
+
// const tools = require('../tools');
|
|
8
|
+
|
|
9
|
+
// const injectionUtils = require('./injection/injection-utils');
|
|
10
|
+
// const translationUtils = require('./translations/translation-utils');
|
|
11
|
+
|
|
12
|
+
// module.exports.preBuild = (project, envTarget, build, configEnvTarget) => {
|
|
13
|
+
// return Promise.resolve()
|
|
14
|
+
// .then(() => {
|
|
15
|
+
// tools.logTitle('PRE-BUILD : preparing the project...');
|
|
16
|
+
// })
|
|
17
|
+
|
|
18
|
+
// // openId files replacement and app config injection
|
|
19
|
+
// .then(() => {
|
|
20
|
+
// return injectionUtils.openid.injectConfig(project, configEnvTarget);
|
|
21
|
+
// })
|
|
22
|
+
|
|
23
|
+
// .catch((e) => {
|
|
24
|
+
// throw e;
|
|
25
|
+
// })
|
|
26
|
+
// };
|
|
27
|
+
|
|
28
|
+
// module.exports.processSvgAssets = (project) => {
|
|
29
|
+
// return Promise.resolve()
|
|
30
|
+
// .then(() => {
|
|
31
|
+
// const svgsInPath = path.join(project.paths.rootPath, 'src', 'assets', 'svg');
|
|
32
|
+
// const svgsSpritePath = path.join(svgsInPath, sprites);
|
|
33
|
+
// const svgsSpriteFile = 'sprite.svg';
|
|
34
|
+
|
|
35
|
+
// return svgUtils.generateSvgsSprite(svgsInPath, svgsSpritePath, svgsSpriteFile);
|
|
36
|
+
// })
|
|
37
|
+
|
|
38
|
+
// .catch((e) => {
|
|
39
|
+
// throw e;
|
|
40
|
+
// });
|
|
41
|
+
// };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const childProcess = require('child_process');
|
|
3
|
+
const execSync = childProcess.execSync;
|
|
4
|
+
|
|
5
|
+
const utils = require('../utils');
|
|
6
|
+
|
|
7
|
+
module.exports.run = () => {
|
|
8
|
+
|
|
9
|
+
let { configuration, baseHref, servePath, host, proxyConfig, maxSpaceSize, port, disableHostCheck, open, debug, configEnvTarget, noLiveReload } = utils.getArgs();
|
|
10
|
+
|
|
11
|
+
const ng = path.resolve(process.cwd(), 'node_modules', '@angular', 'cli', 'bin', 'ng');
|
|
12
|
+
|
|
13
|
+
const prjName = 'app';
|
|
14
|
+
|
|
15
|
+
return Promise.resolve()
|
|
16
|
+
// .then(() => {
|
|
17
|
+
// return preBuildUtils.projects.preBuild(prj, configuration, false, configEnvTarget);
|
|
18
|
+
// })
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
// trigger ng serve with parameters provided
|
|
22
|
+
.then(() => {
|
|
23
|
+
utils.logTitle(`Serving application : ${prjName}...`);
|
|
24
|
+
|
|
25
|
+
let args;
|
|
26
|
+
|
|
27
|
+
if (maxSpaceSize) {
|
|
28
|
+
args = ['--max_old_space_size=8192', ng, 'serve', prjName];
|
|
29
|
+
} else {
|
|
30
|
+
args = [ng, 'serve', prjName];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (configuration) {
|
|
34
|
+
args.push(`--configuration=${configuration}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (proxyConfig) {
|
|
38
|
+
args.push(`--proxy-config=${proxyConfig}`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (baseHref) {
|
|
42
|
+
args.push(`--base-href=${baseHref}`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (servePath) {
|
|
46
|
+
args.push(`--serve-path=${servePath}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (host) {
|
|
50
|
+
args.push(`--host=${host}`);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (port) {
|
|
54
|
+
args.push(`--port=${port}`);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (disableHostCheck) {
|
|
58
|
+
args.push(`--disable-host-check`);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!(open === 'false')) {
|
|
62
|
+
args.push('--open=true');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (noLiveReload) {
|
|
66
|
+
args.push('--live-reload=false');
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
utils.logInfo(`ng serve with args ${args}`);
|
|
70
|
+
|
|
71
|
+
return execSync(`node ${args.join(' ')}`, { cwd: process.cwd(), stdio: 'inherit' });
|
|
72
|
+
})
|
|
73
|
+
.catch((e) => {
|
|
74
|
+
throw e;
|
|
75
|
+
});
|
|
76
|
+
}
|
package/lib/build.js
CHANGED
|
@@ -28,8 +28,6 @@ const build = (cliConfig, targetPath) => {
|
|
|
28
28
|
if (!utils.isDirEmpty(target)) {
|
|
29
29
|
utils.logError(`Target directory : ${target} is not empty, execute eUI CLI in a blank directory... quitting`);
|
|
30
30
|
throw new Error('DIR_NOT_EMPTY');
|
|
31
|
-
} else {
|
|
32
|
-
return utils.rimraf(`${target}/**/*`);
|
|
33
31
|
}
|
|
34
32
|
})
|
|
35
33
|
|
|
@@ -83,32 +81,6 @@ const build = (cliConfig, targetPath) => {
|
|
|
83
81
|
throw e;
|
|
84
82
|
})
|
|
85
83
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
// BUILD symfony
|
|
89
|
-
if (appType === 'web-symfony') {
|
|
90
|
-
|
|
91
|
-
return Promise.resolve()
|
|
92
|
-
.then(() => {
|
|
93
|
-
console.log('--cloning eui php starter repository')
|
|
94
|
-
execSync(`git clone https://${config.webPhpStarterRepo} ${targetPath}`);
|
|
95
|
-
})
|
|
96
|
-
.then(() => {
|
|
97
|
-
console.log('--building web-symfony');
|
|
98
|
-
const angularPath = utils.getAngularPath(targetPath, appName, appType, artifactId);
|
|
99
|
-
return copyAngular(angularPath, cliConfig, false);
|
|
100
|
-
})
|
|
101
|
-
.then(() => {
|
|
102
|
-
execSync(`npm run init`, { cwd: path.join(targetPath, 'server'), stdio: "inherit" });
|
|
103
|
-
})
|
|
104
|
-
.catch((e) => {
|
|
105
|
-
throw e;
|
|
106
|
-
})
|
|
107
|
-
.finally(() => {
|
|
108
|
-
return utils.rimraf(`${targetPath}/.git`);
|
|
109
|
-
})
|
|
110
|
-
}
|
|
111
|
-
|
|
112
84
|
})
|
|
113
85
|
.catch((e) => {
|
|
114
86
|
console.log(e);
|
package/lib/cli.js
CHANGED
|
@@ -35,7 +35,6 @@ module.exports.start = (options) => {
|
|
|
35
35
|
{ name: 'eUI Angular - Mobile Ionic', value: 'mobile' },
|
|
36
36
|
{ name: 'eUI Angular + Spring Boot web module - JDK + Maven required !!!', value: 'web-spring-boot' },
|
|
37
37
|
{ name: 'eUI Angular + Maven web module (JEE Spring maven web module) - JDK + Maven required !!!', value: 'web-maven' },
|
|
38
|
-
{ name: 'eUI Angular + PHP/Symfony starter - PHP7 and composer required !!!', value: 'web-symfony' },
|
|
39
38
|
],
|
|
40
39
|
default: 0,
|
|
41
40
|
validate: function (value) {
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
"styles": [
|
|
47
47
|
"node_modules/@eui/styles/dist/eui.css",
|
|
48
48
|
"node_modules/@eui/styles/dist/eui-utilities.css",
|
|
49
|
-
"node_modules/@eui/styles/dist/eui-theme-eui-legacy.css",
|
|
50
49
|
"src/styles.scss"
|
|
51
50
|
]
|
|
52
51
|
},
|
|
@@ -143,11 +142,6 @@
|
|
|
143
142
|
"glob": "**/*",
|
|
144
143
|
"input": "node_modules/@eui/core/assets/",
|
|
145
144
|
"output": "./assets"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"glob": "**/*",
|
|
149
|
-
"input": "node_modules/@eui/styles/dist/assets/",
|
|
150
|
-
"output": "./assets"
|
|
151
145
|
}
|
|
152
146
|
]
|
|
153
147
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eui-angular-app",
|
|
3
|
-
"version": "21.0.0-alpha.
|
|
3
|
+
"version": "21.0.0-alpha.25",
|
|
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": "21.0.0-alpha.
|
|
24
|
+
"@eui/deps-base": "21.0.0-alpha.25"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"npm-run-all": "4.1.5",
|
package/lib/utils.js
CHANGED
|
@@ -169,20 +169,6 @@ module.exports.move = (from, to) => {
|
|
|
169
169
|
fse.moveSync(from, to, );
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
module.exports.rimraf = (inputPath) => {
|
|
173
|
-
this.logInfo(`Removing ${inputPath}...`);
|
|
174
|
-
let exec = path.resolve(process.cwd(), 'node_modules', 'rimraf', 'bin.js');
|
|
175
|
-
if (!isFileExists(exec)) {
|
|
176
|
-
// special location when used within eUI CLI
|
|
177
|
-
exec = path.resolve(__dirname, '../../../..', 'rimraf', 'bin.js');
|
|
178
|
-
}
|
|
179
|
-
try {
|
|
180
|
-
execSync(`node ${exec} ${inputPath}`, { cwd: process.cwd(), stdio: 'inherit' });
|
|
181
|
-
} catch(e) {
|
|
182
|
-
console.log(e);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
172
|
module.exports.remove = (path) => {
|
|
187
173
|
fse.removeSync(path);
|
|
188
174
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eui/cli",
|
|
3
|
-
"version": "21.0.0-alpha.
|
|
3
|
+
"version": "21.0.0-alpha.25",
|
|
4
4
|
"tag": "next",
|
|
5
5
|
"license": "EUPL-1.1",
|
|
6
6
|
"description": "eUI CLI app generator & tools",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"inquirer": "6.5.0",
|
|
18
18
|
"yargs": "17.7.2",
|
|
19
19
|
"fs-extra": "9.0.0",
|
|
20
|
-
"rimraf": "3.0.2",
|
|
21
20
|
"glob": "7.2.3",
|
|
22
21
|
"cross-spawn": "7.0.6"
|
|
23
22
|
},
|
|
@@ -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,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
|
-
}
|