@eui/tools 6.6.2 → 6.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +18 -0
  3. package/package.json +1 -1
  4. package/scripts/app/public/index.html +41 -32
  5. package/scripts/app/public/index.js +34 -25
  6. package/scripts/app/public/package-init.html +11 -0
  7. package/scripts/app/public/package-init.js +2 -0
  8. package/scripts/app/routes/index.js +22 -22
  9. package/scripts/csdr/cli/constants.js +2 -1
  10. package/scripts/csdr/cli/package-build-frontend.js +6 -10
  11. package/scripts/csdr/cli/skeletons/package/frontend/15.x/default/assets/i18n/en.json +6 -0
  12. package/scripts/csdr/cli/skeletons/package/frontend/15.x/default/assets/i18n/fr.json +6 -0
  13. package/scripts/csdr/cli/skeletons/package/frontend/15.x/default/src/index.ts +2 -0
  14. package/scripts/csdr/cli/skeletons/package/frontend/15.x/default/src/lib/components/main.component.html +57 -0
  15. package/scripts/csdr/cli/skeletons/package/frontend/15.x/default/src/lib/components/main.component.ts +8 -0
  16. package/scripts/csdr/cli/skeletons/package/frontend/15.x/default/src/lib/constants.ts +1 -0
  17. package/scripts/csdr/cli/skeletons/package/frontend/15.x/default/src/lib/containers/container.component.ts +28 -0
  18. package/scripts/csdr/cli/skeletons/package/frontend/15.x/default/src/lib/module.ts +79 -0
  19. package/scripts/csdr/cli/skeletons/package/frontend/15.x/default/src/lib/routing-module.ts +23 -0
  20. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/.eslintrc.json +79 -0
  21. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/assets/i18n/en.json +6 -0
  22. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/assets/i18n/fr.json +6 -0
  23. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/dependencies-base.json +2 -0
  24. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/dependencies-composite.json +3 -0
  25. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/gitignore_TO_REPLACE +46 -0
  26. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/karma.conf.js +7 -0
  27. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/ng-package.json +7 -0
  28. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/package.json +4 -0
  29. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/dummy.spec.ts.TO_REPLACE +5 -0
  30. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/index.ts +4 -0
  31. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/blocks/sample/components/sample.component.html +1 -0
  32. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/blocks/sample/components/sample.component.ts +14 -0
  33. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/blocks/sample/containers/container.component.ts +36 -0
  34. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/blocks/sample/models/block.model.ts +5 -0
  35. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/blocks/sample/models/index.ts +1 -0
  36. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/blocks/sample/module.ts +37 -0
  37. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/components/sample.component.html +1 -0
  38. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/components/sample.component.ts +14 -0
  39. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/constants.ts +1 -0
  40. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/containers/block-store.service.ts +33 -0
  41. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/containers/container.component.ts +44 -0
  42. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/containers/generic-block-resolver.service.ts +32 -0
  43. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/models/block-type.model.ts +6 -0
  44. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/models/block.model.ts +10 -0
  45. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/models/index.ts +2 -0
  46. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/module.ts +60 -0
  47. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/store/actions/block.actions.ts +26 -0
  48. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/store/reducers/block.reducer.ts +48 -0
  49. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/store/reducers/index.ts +22 -0
  50. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/main/store/selectors/block.selectors.ts +29 -0
  51. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/lib/module.ts +17 -0
  52. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/src/test.ts.TO_REPLACE +21 -0
  53. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/tsconfig.lib.json +32 -0
  54. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant/tsconfig.spec.json +17 -0
  55. package/scripts/csdr/config/remotes.js +1 -1
  56. package/scripts/utils/tools.js +1 -0
  57. package/scripts/csdr/cli/skeletons/package/frontend-eui15/assets/i18n/en.json +0 -3
  58. package/scripts/csdr/cli/skeletons/package/frontend-eui15/assets/i18n/fr.json +0 -3
  59. package/scripts/csdr/cli/skeletons/package/frontend-eui15/src/index.ts +0 -1
  60. package/scripts/csdr/cli/skeletons/package/frontend-eui15/src/lib/module.ts +0 -11
  61. /package/scripts/csdr/cli/skeletons/package/{frontend-eui15 → frontend/15.x/default}/.eslintrc.json +0 -0
  62. /package/scripts/csdr/cli/skeletons/package/{frontend-eui15 → frontend/15.x/default}/dependencies-base.json +0 -0
  63. /package/scripts/csdr/cli/skeletons/package/{frontend-eui15 → frontend/15.x/default}/dependencies-composite.json +0 -0
  64. /package/scripts/csdr/cli/skeletons/package/{frontend-eui15 → frontend/15.x/default}/gitignore_TO_REPLACE +0 -0
  65. /package/scripts/csdr/cli/skeletons/package/{frontend-eui15 → frontend/15.x/default}/karma.conf.js +0 -0
  66. /package/scripts/csdr/cli/skeletons/package/{frontend-eui15 → frontend/15.x/default}/ng-package.json +0 -0
  67. /package/scripts/csdr/cli/skeletons/package/{frontend-eui15 → frontend/15.x/default}/package.json +0 -0
  68. /package/scripts/csdr/cli/skeletons/package/{frontend-eui15 → frontend/15.x/default}/src/dummy.spec.ts.TO_REPLACE +0 -0
  69. /package/scripts/csdr/cli/skeletons/package/{frontend-eui15 → frontend/15.x/default}/src/test.ts.TO_REPLACE +0 -0
  70. /package/scripts/csdr/cli/skeletons/package/{frontend-eui15 → frontend/15.x/default}/tsconfig.lib.json +0 -0
  71. /package/scripts/csdr/cli/skeletons/package/{frontend-eui15 → frontend/15.x/default}/tsconfig.spec.json +0 -0
@@ -1 +1 @@
1
- 6.6.2
1
+ 6.7.1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.7.1 (2023-03-06)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * participant skeleton for new package v15 creation - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([778ad270](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/778ad270965e92d7fb452efdf3151a7af8fe4689))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.7.0 (2023-03-06)
11
+
12
+ ##### New Features
13
+
14
+ * **other:**
15
+ * new participant and default pkg skeletons for v15 - adapted init-custom app generated json - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([dd351337](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/dd351337631dd934f1c3b067e22122effb8e8987))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.6.2 (2023-03-06)
2
20
 
3
21
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.6.2",
3
+ "version": "6.7.1",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -26,7 +26,7 @@
26
26
  <body>
27
27
  <div id="app" class="container-fluid">
28
28
  <div class="row">
29
- <div class="col-4 full-height-flex">
29
+ <div class="col-6 full-height-flex">
30
30
  <h3 class="mt-2 mb-4">CSDR custom installation (experimental)</h3>
31
31
 
32
32
  <div class="header-flex">
@@ -35,20 +35,16 @@
35
35
  <div class="row mb-3">
36
36
  <label class="col-sm-2 col-form-label">App</label>
37
37
  <div class="col-sm-10">
38
- <select disabled class="form-select">
39
- <option>Open this select menu</option>
40
- <option selected value="my-workplace">MyWorkplace</option>
41
- <!-- <option value="sedia">Sedia</option> -->
38
+ <select disabled class="form-select" v-model="selectedApp">
39
+ <option value="my-workplace">MyWorkplace</option>
42
40
  </select>
43
41
  </div>
44
42
  </div>
45
43
  <div class="row mb-3">
46
44
  <label class="col-sm-2 col-form-label">eUI Version</label>
47
45
  <div class="col-sm-10">
48
- <select disabled class="form-select">
49
- <option>Open this select menu</option>
50
- <option selected value="15.x">eUI 15</option>
51
- <!-- <option value="10.x">eUI 10</option> -->
46
+ <select dis abled class="form-select" v-model="selectedEuiVersion">
47
+ <option value="15.x">eUI 15</option>
52
48
  </select>
53
49
  </div>
54
50
  </div>
@@ -66,32 +62,42 @@
66
62
  <table class="table table-striped" v-show="remotes.length !== 0">
67
63
  <thead>
68
64
  <tr>
69
- <th scope="col">&nbsp;</th>
70
65
  <th scope="col">Remote</th>
71
- <th scope="col">Participant ?</th>
72
- <th scope="col">Full skel.?</th>
66
+ <th scope="col">Participant</th>
67
+ <th scope="col">Full SK</th>
68
+ <th scope="col">Local</th>
69
+ <th scope="col">Installed</th>
73
70
  </tr>
74
71
  </thead>
75
72
  <tbody>
76
73
  <tr v-for="remote in remotes">
74
+ <td>{{ remote.name }}</td>
75
+ <td>
76
+ <div :class="{ 'text-primary fw-bold': remote.participant }">{{ remote.participant }}</div>
77
+ </td>
77
78
  <td>
78
- <div class="form-check" :key="remote.name">
79
+ <div :class="{ 'text-success fw-bold': remote.fullSkeletonSources }">
80
+ {{ remote.fullSkeletonSources }}
81
+ </div>
82
+ </td>
83
+ <td>
84
+ <div class="form-check form-switch">
79
85
  <input
80
86
  class="form-check-input"
81
87
  type="checkbox"
82
88
  :value="remote.name"
83
89
  :id="remote.name"
84
- v-model="selectedRemotes"
85
- @change="remoteSelected($event)" />
90
+ v-model="selectedLocalRemotes" />
86
91
  </div>
87
92
  </td>
88
- <td>{{ remote.name }}</td>
89
- <td>
90
- <div :class="{ 'text-primary fw-bold': remote.participant }">{{ remote.participant }}</div>
91
- </td>
92
93
  <td>
93
- <div :class="{ 'text-success fw-bold': remote.fullSkeletonSources }">
94
- {{ remote.fullSkeletonSources }}
94
+ <div class="form-check form-switch">
95
+ <input
96
+ class="form-check-input"
97
+ type="checkbox"
98
+ :value="remote.name"
99
+ :id="remote.name"
100
+ v-model="selectedInstalledRemotes" />
95
101
  </div>
96
102
  </td>
97
103
  </tr>
@@ -100,12 +106,17 @@
100
106
  </div>
101
107
  </div>
102
108
 
103
- <div class="col-8">
109
+ <div class="col-6">
110
+ <h5 class="mt-5 mb-3">
111
+ Selected local remotes (intialized as sources):
112
+ <span class="text-primary fw-bold">{{ selectedLocalRemotes.length }}</span>
113
+ </h5>
114
+ {{ selectedLocalRemotes }}
104
115
  <h5 class="mt-5 mb-3">
105
- Selected remotes :
106
- <span class="text-primary fw-bold">{{ selectedRemotes.length }}</span>
116
+ Selected local remotes (intialized as dependencies):
117
+ <span class="text-primary fw-bold">{{ selectedInstalledRemotes.length }}</span>
107
118
  </h5>
108
- {{ selectedRemotes }}
119
+ {{ selectedInstalledRemotes }}
109
120
 
110
121
  <h5 class="mt-5 mb-3">
111
122
  Derived dependencies:
@@ -119,15 +130,13 @@
119
130
  </h5>
120
131
  {{ packages }}
121
132
 
122
- <h5 class="mt-5 mb-3">
123
- Remotes to install as dependencies :
124
- <span class="text-primary fw-bold">{{ remotesToInstall.length }}</span>
125
- </h5>
126
- {{ remotesToInstall }}
127
-
128
133
  <hr />
129
134
 
130
- <button class="btn btn-primary" type="button" :disabled="selectedRemotes.length === 0" @click="saveConfig()">
135
+ <button
136
+ class="btn btn-primary"
137
+ type="button"
138
+ :disabled="selectedLocalRemotes.length === 0 && selectedInstalledRemotes.length === 0"
139
+ @click="saveConfig()">
131
140
  Save configuration
132
141
  </button>
133
142
 
@@ -12,11 +12,13 @@ new Vue({
12
12
  el: "#app",
13
13
  data() {
14
14
  return {
15
+ selectedApp: "my-workplace-host-playground-custom",
16
+ selectedEuiVersion: "15.x",
15
17
  remotes: [],
16
- selectedRemotes: [],
18
+ selectedLocalRemotes: [],
19
+ selectedInstalledRemotes: [],
17
20
  deps: [],
18
21
  packages: [],
19
- remotesToInstall: [],
20
22
  saveConfigSubmitted: false,
21
23
  saveConfigOK: false,
22
24
  };
@@ -30,43 +32,33 @@ new Vue({
30
32
  const res = await fetch("http://localhost:3000/api/remotes");
31
33
  const finalRes = await res.json();
32
34
  this.remotes = finalRes;
33
- this.getRemotesToInstall();
34
35
  },
35
36
  async getConfig() {
36
37
  const res = await fetch("http://localhost:3000/api/config");
37
38
  const finalRes = await res.json();
38
- if (finalRes.selectedRemotes) {
39
- this.selectedRemotes = finalRes.selectedRemotes;
39
+
40
+ if (Object.keys(finalRes).length !== 0) {
41
+ this.selectedApp = finalRes.app;
42
+ this.selectedEuiVersion = finalRes.euiVersion;
43
+ this.selectedLocalRemotes = finalRes.localRemotes;
44
+ this.selectedInstalledRemotes = finalRes.installedRemotes;
40
45
  this.deps = finalRes.deps;
41
46
  this.packages = finalRes.packages;
42
- this.remotesToInstall = finalRes.remotesToInstall;
43
47
  }
44
48
  },
45
49
  async getPackages() {
46
- const res = await fetch("http://localhost:3000/api/remotes/packages", getRequestBody(this.selectedRemotes));
50
+ const res = await fetch("http://localhost:3000/api/remotes/packages", getRequestBody(this.selectedLocalRemotes));
47
51
  const finalRes = await res.json();
48
52
  this.packages = finalRes.packages.filter(
49
53
  (p) => p.indexOf("csdr-") < 0 && p.indexOf("cc-shared-ui") < 0 && p.indexOf("mywp-shared-ui") < 0
50
54
  );
51
55
  this.deps = finalRes.deps;
52
- this.getRemotesToInstall();
53
- },
54
- remoteSelected(event) {
55
- this.getPackages();
56
- this.saveConfigSubmitted = false;
57
- },
58
- getRemotesToInstall() {
59
- this.remotesToInstall = this.remotes
60
- .map((r) => r.name)
61
- .filter((r) => {
62
- return !this.selectedRemotes.includes(r);
63
- });
64
56
  },
65
57
  reset() {
66
- this.selectedRemotes = [];
58
+ this.selectedLocalRemotes = [];
59
+ this.selectedInstalledRemotes = [];
67
60
  this.packages = [];
68
61
  this.deps = [];
69
- this.remotesToInstall = [];
70
62
  this.saveConfigOK = false;
71
63
  this.saveConfigSubmitted = false;
72
64
  },
@@ -75,10 +67,12 @@ new Vue({
75
67
  const res = await fetch(
76
68
  "http://localhost:3000/api/config",
77
69
  getRequestBody({
78
- selectedRemotes: this.selectedRemotes,
70
+ app: this.selectedApp,
71
+ euiVersion: this.selectedEuiVersion,
72
+ localRemotes: this.selectedLocalRemotes,
73
+ installedRemotes: this.selectedInstalledRemotes,
79
74
  deps: this.deps,
80
75
  packages: this.packages,
81
- remotesToInstall: this.remotesToInstall,
82
76
  })
83
77
  );
84
78
 
@@ -88,8 +82,23 @@ new Vue({
88
82
  this.saveConfigOK = true;
89
83
  }
90
84
  this.saveConfigSubmitted = true;
91
-
92
- const finalRes = await res.json();
85
+ },
86
+ },
87
+ watch: {
88
+ selectedLocalRemotes: {
89
+ handler: function (val) {
90
+ this.saveConfigOK = false;
91
+ this.saveConfigSubmitted = false;
92
+ this.getPackages();
93
+ },
94
+ deep: true,
95
+ },
96
+ selectedInstalledRemotes: {
97
+ handler: function (val) {
98
+ this.saveConfigOK = false;
99
+ this.saveConfigSubmitted = false;
100
+ },
101
+ deep: true,
93
102
  },
94
103
  },
95
104
  });
@@ -86,6 +86,17 @@
86
86
  v-model="params.externalRepoName" />
87
87
  </div>
88
88
  </div>
89
+
90
+ <div class="row mt-3 mb-3">
91
+ <div class="col-sm-4">
92
+ <label class="form-check-label d-flex justify-content-end"> Participant package type ?</label>
93
+ </div>
94
+ <div class="col-sm-8">
95
+ <div class="form-check form-switch">
96
+ <input class="form-check-input" type="checkbox" v-model="params.pkgFrontendParticipant" />
97
+ </div>
98
+ </div>
99
+ </div>
89
100
  </div>
90
101
 
91
102
  <div v-if="params.pkgFrontendType === 'remote'">
@@ -46,6 +46,7 @@ new Vue({
46
46
  pkgScope: "@zzz",
47
47
  pkgName: "my-package",
48
48
  csdrRepo: true,
49
+ pkgFrontendParticipant: false,
49
50
  pkgGroupId: "eu.europa.ec.cc",
50
51
  remoteConfig: {
51
52
  rmTeamName: "cc-digit-ui-rm",
@@ -127,6 +128,7 @@ new Vue({
127
128
  if (!params.csdrRepo) {
128
129
  params.externalRepoName = this.params.externalRepoName;
129
130
  }
131
+ params.pkgFrontendParticipant = this.params.pkgFrontendParticipant;
130
132
  } else {
131
133
  params.remoteConfig = this.params.remoteConfig;
132
134
  }
@@ -40,65 +40,65 @@ router.get('/remotes', function (req, res) {
40
40
  })
41
41
  });
42
42
 
43
- router.get('/remotes/stats', function (req, res) {
43
+ router.post('/remotes/packages', function (req, res) {
44
44
  return Promise.resolve()
45
45
  .then(() => {
46
- return metadataUtils.stats.getRemoteAllStats();
47
- })
48
- .then((stats) => {
49
- res.send(stats);
46
+ const remotes = req.body;
47
+ const depsPackages = configUtils.remotes.getRemotesPackages(remotes);
48
+ res.send(depsPackages);
50
49
  })
51
50
  .catch((e) => {
52
51
  handlerError(res, e);
53
52
  })
54
53
  });
55
54
 
56
- router.post('/remotes/packages', function (req, res) {
55
+ router.get('/config', function (req, res) {
57
56
  return Promise.resolve()
58
57
  .then(() => {
59
- const remotes = req.body;
60
- const depsPackages = configUtils.remotes.getRemotesPackages(remotes);
61
- res.send(depsPackages);
58
+ return configUtils.global.getCustomConfig();
59
+ })
60
+ .then((customConfig) => {
61
+ res.send(customConfig);
62
62
  })
63
63
  .catch((e) => {
64
64
  handlerError(res, e);
65
65
  })
66
66
  });
67
67
 
68
- router.post('/remotes/stats', function (req, res) {
68
+ router.post('/config', function (req, res) {
69
69
  return Promise.resolve()
70
70
  .then(() => {
71
- return metadataUtils.stats.getRemoteStats(req.body.remote);
71
+ return configUtils.global.generateCustomConfig(req.body);
72
72
  })
73
- .then((remoteStats) => {
74
- res.send(remoteStats);
73
+ .then(() => {
74
+ res.status(200);
75
+ res.send({ status: 'OK'})
75
76
  })
76
77
  .catch((e) => {
77
78
  handlerError(res, e);
78
79
  })
79
80
  });
80
81
 
81
- router.get('/config', function (req, res) {
82
+ router.get('/remotes/stats', function (req, res) {
82
83
  return Promise.resolve()
83
84
  .then(() => {
84
- return configUtils.global.getCustomConfig();
85
+ return metadataUtils.stats.getRemoteAllStats();
85
86
  })
86
- .then((customConfig) => {
87
- res.send(customConfig);
87
+ .then((stats) => {
88
+ res.send(stats);
88
89
  })
89
90
  .catch((e) => {
90
91
  handlerError(res, e);
91
92
  })
92
93
  });
93
94
 
94
- router.post('/config', function (req, res) {
95
+ router.post('/remotes/stats', function (req, res) {
95
96
  return Promise.resolve()
96
97
  .then(() => {
97
- return configUtils.global.generateCustomConfig(req.body);
98
+ return metadataUtils.stats.getRemoteStats(req.body.remote);
98
99
  })
99
- .then(() => {
100
- res.status(200);
101
- res.send({ status: 'OK'})
100
+ .then((remoteStats) => {
101
+ res.send(remoteStats);
102
102
  })
103
103
  .catch((e) => {
104
104
  handlerError(res, e);
@@ -5,7 +5,8 @@ const path = require('path');
5
5
  module.exports.TARGET_ROOT_PATH = path.join(process.cwd(), 'packages');
6
6
  module.exports.TARGET_ROOT_REMOTES_PATH = path.join(process.cwd(), 'remotes');
7
7
  module.exports.SKELETONS_ROOT_PATH = path.join(__dirname, 'skeletons', 'package');
8
- module.exports.FRONTEND_SKELETON_EUI15_PATH = path.join(this.SKELETONS_ROOT_PATH, 'frontend-eui15');
8
+ module.exports.FRONTEND_SKELETON_EUI15_PATH = path.join(this.SKELETONS_ROOT_PATH, 'frontend', '15.x', 'default');
9
+ module.exports.FRONTEND_SKELETON_EUI15_PARTICIPANT_PATH = path.join(this.SKELETONS_ROOT_PATH, 'frontend', '15.x', 'participant');
9
10
  module.exports.BACKEND_SKELETON_PATH = path.join(this.SKELETONS_ROOT_PATH, 'backend');
10
11
  module.exports.VIRTUAL_REMOTE_SKELETON_ROOT_PATH = path.join(__dirname, 'skeletons', 'virtual-remote');
11
12
 
@@ -40,7 +40,7 @@ const replaceContent = (targetPath, name, scope, fullName) => {
40
40
  tools.replaceInPath(targetPath, '@module.scope@', scope);
41
41
  tools.replaceInPath(targetPath, '@module.scope-name@', `${scope.substr(1)}-${name}`);
42
42
  tools.replaceInPath(targetPath, '@module.scope.string@', scope.substr(1));
43
- tools.replaceInPath(targetPath, '@module.class.name@', tools.camelCaseString(name, '-', true));
43
+ tools.replaceInPath(targetPath, '@module.class.name@', tools.camelCaseString(`${scope.substr(1)}-${name}`, '-', true));
44
44
  }
45
45
 
46
46
 
@@ -140,7 +140,11 @@ const generateDefault = (args = constants.DEFAULT_CONFIG) => {
140
140
  .then(() => {
141
141
  tools.logInfo('Copying skeleton to target');
142
142
  if (args.pkgFrontendVersion === constants.CONFIG_OPTIONS.pkgFrontendVersion.EUI15) {
143
- tools.copydir(constants.FRONTEND_SKELETON_EUI15_PATH, targetPath, true);
143
+ if (args.pkgFrontendParticipant) {
144
+ tools.copydir(constants.FRONTEND_SKELETON_EUI15_PARTICIPANT_PATH, targetPath, true);
145
+ } else {
146
+ tools.copydir(constants.FRONTEND_SKELETON_EUI15_PATH, targetPath, true);
147
+ }
144
148
  }
145
149
 
146
150
  // REPLACING PLACEHOLDERS
@@ -171,14 +175,6 @@ const generateDefault = (args = constants.DEFAULT_CONFIG) => {
171
175
  replaceExtensions(targetPath);
172
176
  })
173
177
 
174
- .then(() => {
175
- if (
176
- args.pkgFrontendVersion === constants.CONFIG_OPTIONS.pkgFrontendVersion.EUI15
177
- ) {
178
- return tools.remove(path.join(targetPath, 'tslint.json'));
179
- }
180
- })
181
-
182
178
  .then(() => {
183
179
  tools.logSuccess();
184
180
  })
@@ -0,0 +1,6 @@
1
+ {
2
+ "@module.scope-name@.TITLE": "@module.scope-name@",
3
+ "@module.scope-name@.FILTER": "Search filter",
4
+ "@module.scope-name@.QUICK_SECTION": "Quick filter",
5
+ "@module.scope-name@.SEARCH_RESULT": "Filter results"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "@module.scope-name@.TITLE": "**fr** @module.scope-name@ **fr**",
3
+ "@module.scope-name@.FILTER": "**fr** Search filter **fr**",
4
+ "@module.scope-name@.QUICK_SECTION": "**fr** Quick filter **fr**",
5
+ "@module.scope-name@.SEARCH_RESULT": "**fr** Filter results **fr**"
6
+ }
@@ -0,0 +1,2 @@
1
+ export { @module.class.name@Module, @module.class.name@CommonModule } from './lib/module';
2
+ export { RoutingModule, routes } from './lib/routing-module';
@@ -0,0 +1,57 @@
1
+ <eui-page>
2
+ <eui-page-header [label]="'@module.scope-name@.TITLE' | translate">
3
+ <eui-page-header-action-items>
4
+
5
+ </eui-page-header-action-items>
6
+ </eui-page-header>
7
+
8
+ <eui-page-content>
9
+
10
+ <eui-page-columns>
11
+
12
+ <eui-page-column
13
+ label="{{ '@module.scope-name@.FILTER' | translate }}"
14
+ [size]="'3xl'"
15
+ [isCollapsible]="true">
16
+
17
+ <eui-page-column-body>
18
+
19
+ <!-- QUICK FILTER SECTION -->
20
+ <div class="eui-u-flex eui-u-flex-column eui-u-mt-xs">
21
+ <div class="eui-u-flex eui-u-flex-row">
22
+ <div class="eui-u-font-size-l"><strong>{{ '@module.scope-name@.QUICK_SECTION' | translate }}</strong></div>
23
+ </div>
24
+ </div>
25
+
26
+ </eui-page-column-body>
27
+ </eui-page-column>
28
+
29
+ <eui-page-column>
30
+
31
+ <eui-page-column-header-left-content>
32
+ <div class="eui-page-column__header-left-content-label">{{ '@module.scope-name@.SEARCH_RESULT' | translate }}</div>
33
+ </eui-page-column-header-left-content>
34
+
35
+ <eui-page-column-header-right-content>
36
+ <div class="eui-u-flex">
37
+ <button
38
+ euiButton
39
+ euiSecondary>
40
+ <span euiIcon iconClass="eui-icon-refresh"></span>
41
+ <span euiLabel>{{ '@module.scope-name@.CREATE_DOSSIER' | translate }}</span>
42
+ </button>
43
+ </div>
44
+ </eui-page-column-header-right-content>
45
+
46
+ <eui-page-column-header-body>
47
+ </eui-page-column-header-body>
48
+
49
+ <eui-page-column-body>
50
+ </eui-page-column-body>
51
+
52
+ </eui-page-column>
53
+
54
+ </eui-page-columns>
55
+
56
+ </eui-page-content>
57
+ </eui-page>
@@ -0,0 +1,8 @@
1
+ import { Component, Input } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: '@module.scope-name@-cp',
5
+ templateUrl: './main.component.html',
6
+ })
7
+ export class @module.class.name@Component {
8
+ }
@@ -0,0 +1 @@
1
+ export const namespace = '@module.class.name@:main';
@@ -0,0 +1,28 @@
1
+ import { ChangeDetectionStrategy, Component, Input, OnInit, OnDestroy } from '@angular/core';
2
+
3
+ import { BreadcrumbsService } from '@csdr/core';
4
+
5
+ @Component({
6
+ selector: '@module.scope-name@-ct',
7
+ changeDetection: ChangeDetectionStrategy.OnPush,
8
+ template: `
9
+ <@module.scope-name@-cp>
10
+ </@module.scope-name@-cp>`,
11
+ })
12
+ export class @module.class.name@ContainerComponent implements OnInit, OnDestroy {
13
+
14
+ constructor(private breadcrumbs: BreadcrumbsService) {
15
+ }
16
+
17
+ ngOnInit(): void {
18
+ this.breadcrumbs.removeAll();
19
+ this.breadcrumbs.addItem({
20
+ id: '@module.scope-name@',
21
+ description: '@module.class.name@',
22
+ url: '/@module.scope-name@',
23
+ });
24
+ }
25
+
26
+ ngOnDestroy(): void {
27
+ }
28
+ }
@@ -0,0 +1,79 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ // import { StoreModule } from '@ngrx/store';
4
+ // import { EffectsModule } from '@ngrx/effects';
5
+
6
+ import { TranslateModule } from '@ngx-translate/core';
7
+
8
+ import { EuiButtonModule } from '@eui/components/eui-button';
9
+ import { EuiPageModule } from '@eui/components/eui-page';
10
+
11
+ import { CcSharedModule } from '@cc/shared';
12
+
13
+ // -- Components --
14
+ import { @module.class.name@Component } from './components/main.component';
15
+
16
+ const COMPONENTS = [
17
+ @module.class.name@Component,
18
+ ];
19
+
20
+ // -- Containers --
21
+ import { @module.class.name@ContainerComponent } from './containers/container.component';
22
+
23
+ const CONTAINERS = [
24
+ @module.class.name@ContainerComponent,
25
+ ];
26
+
27
+ // -- Effects --
28
+ const EFFECTS = [
29
+ ];
30
+
31
+ // -- Reducer --
32
+ // import { TOKEN, reducerProvider } from './store/reducers';
33
+
34
+ // -- Services --
35
+ const SERVICES = [
36
+ ];
37
+
38
+ // -- Constants --
39
+ import { namespace } from './constants';
40
+
41
+ // -- Routes --
42
+ import { RoutingModule } from './routing-module';
43
+
44
+ @NgModule({
45
+ imports: [
46
+ CommonModule,
47
+ // StoreModule.forFeature(namespace, TOKEN),
48
+ // EffectsModule.forFeature(EFFECTS),
49
+ TranslateModule,
50
+
51
+ EuiButtonModule,
52
+ EuiPageModule,
53
+
54
+ CcSharedModule,
55
+ ],
56
+ declarations: [
57
+ ...COMPONENTS,
58
+ ...CONTAINERS,
59
+ ],
60
+ providers: [
61
+ // reducerProvider,
62
+ ...SERVICES,
63
+ ],
64
+ exports: [],
65
+ })
66
+ export class @module.class.name@CommonModule {
67
+ }
68
+
69
+ @NgModule({
70
+ imports: [
71
+ @module.class.name@CommonModule,
72
+ RoutingModule,
73
+ ],
74
+ exports: [
75
+ @module.class.name@CommonModule,
76
+ ],
77
+ })
78
+ export class @module.class.name@Module {
79
+ }