@eui/tools 6.10.4 → 6.10.5

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 (61) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +9 -0
  3. package/package.json +1 -1
  4. package/scripts/app/public/package-init.html +10 -0
  5. package/scripts/app/public/package-init.js +2 -0
  6. package/scripts/csdr/cli/constants.js +2 -1
  7. package/scripts/csdr/cli/package-build-frontend.js +7 -2
  8. package/scripts/csdr/cli/skeletons/package/frontend/15.x/default/.eslintrc.json +2 -2
  9. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-default/.eslintrc.json +43 -0
  10. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-default/dependencies-composite.json +4 -0
  11. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-default/src/index.ts +2 -0
  12. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-default/src/lib/components/participant/participant.component.html +1 -0
  13. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-default/src/lib/components/participant/participant.component.ts +19 -0
  14. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-default/src/lib/module.ts +24 -0
  15. package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-default}/src/test.ts.TO_REPLACE +2 -2
  16. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-ngrx/assets/i18n/en.json +6 -0
  17. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-ngrx/assets/i18n/fr.json +6 -0
  18. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-ngrx/dependencies-base.json +2 -0
  19. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-ngrx/gitignore_TO_REPLACE +46 -0
  20. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-ngrx/karma.conf.js +7 -0
  21. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-ngrx/ng-package.json +7 -0
  22. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-ngrx/package.json +4 -0
  23. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-ngrx/src/dummy.spec.ts.TO_REPLACE +5 -0
  24. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-ngrx/src/test.ts.TO_REPLACE +21 -0
  25. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-ngrx/tsconfig.lib.json +32 -0
  26. package/scripts/csdr/cli/skeletons/package/frontend/15.x/participant-ngrx/tsconfig.spec.json +17 -0
  27. package/scripts/csdr/config/register.js +1 -1
  28. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-default}/assets/i18n/en.json +0 -0
  29. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-default}/assets/i18n/fr.json +0 -0
  30. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-default}/dependencies-base.json +0 -0
  31. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-default}/gitignore_TO_REPLACE +0 -0
  32. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-default}/karma.conf.js +0 -0
  33. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-default}/ng-package.json +0 -0
  34. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-default}/package.json +0 -0
  35. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-default}/src/dummy.spec.ts.TO_REPLACE +0 -0
  36. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-default}/tsconfig.lib.json +0 -0
  37. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-default}/tsconfig.spec.json +0 -0
  38. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/.eslintrc.json +0 -0
  39. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/dependencies-composite.json +0 -0
  40. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/index.ts +0 -0
  41. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/blocks/sample/components/sample.component.html +0 -0
  42. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/blocks/sample/components/sample.component.ts +0 -0
  43. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/blocks/sample/containers/container.component.ts +0 -0
  44. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/blocks/sample/models/block.model.ts +0 -0
  45. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/blocks/sample/models/index.ts +0 -0
  46. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/blocks/sample/module.ts +0 -0
  47. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/components/sample.component.html +0 -0
  48. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/components/sample.component.ts +0 -0
  49. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/constants.ts +0 -0
  50. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/containers/block-store.service.ts +0 -0
  51. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/containers/container.component.ts +0 -0
  52. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/containers/generic-block-resolver.service.ts +0 -0
  53. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/models/block-type.model.ts +0 -0
  54. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/models/block.model.ts +0 -0
  55. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/models/index.ts +0 -0
  56. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/module.ts +0 -0
  57. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/store/actions/block.actions.ts +0 -0
  58. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/store/reducers/block.reducer.ts +0 -0
  59. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/store/reducers/index.ts +0 -0
  60. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/main/store/selectors/block.selectors.ts +0 -0
  61. /package/scripts/csdr/cli/skeletons/package/frontend/15.x/{participant → participant-ngrx}/src/lib/module.ts +0 -0
@@ -1 +1 @@
1
- 6.10.4
1
+ 6.10.5
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 6.10.5 (2023-04-15)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * added simple participant skeleton - fix wrong registration of package frontend on creation - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([c2121754](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/c2121754a8706141841dc9cae2d3b34e066aae87))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 6.10.4 (2023-04-15)
2
11
 
3
12
  ##### Refactors
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.10.4",
3
+ "version": "6.10.5",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -97,6 +97,16 @@
97
97
  </div>
98
98
  </div>
99
99
  </div>
100
+ <!-- <div class="row mt-3 mb-3">
101
+ <div class="col-sm-4">
102
+ <label class="form-check-label d-flex justify-content-end"> Participant package type - NgRx (advanced) ?</label>
103
+ </div>
104
+ <div class="col-sm-8">
105
+ <div class="form-check form-switch">
106
+ <input class="form-check-input" type="checkbox" v-model="params.pkgFrontendParticipantNgRx" />
107
+ </div>
108
+ </div>
109
+ </div> -->
100
110
  </div>
101
111
 
102
112
  <div v-if="params.pkgFrontendType === 'remote'">
@@ -47,6 +47,7 @@ new Vue({
47
47
  pkgName: "my-package",
48
48
  csdrRepo: true,
49
49
  pkgFrontendParticipant: false,
50
+ pkgFrontendParticipantNgRx: false,
50
51
  pkgGroupId: "eu.europa.ec.cc",
51
52
  remoteConfig: {
52
53
  rmTeamName: "cc-digit-ui-rm",
@@ -129,6 +130,7 @@ new Vue({
129
130
  params.externalRepoName = this.params.externalRepoName;
130
131
  }
131
132
  params.pkgFrontendParticipant = this.params.pkgFrontendParticipant;
133
+ params.pkgFrontendParticipantNgRx = this.params.pkgFrontendParticipantNgRx;
132
134
  } else {
133
135
  params.remoteConfig = this.params.remoteConfig;
134
136
  }
@@ -6,7 +6,8 @@ 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
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
+ module.exports.FRONTEND_SKELETON_EUI15_PARTICIPANT_DEFAULT_PATH = path.join(this.SKELETONS_ROOT_PATH, 'frontend', '15.x', 'participant-default');
10
+ module.exports.FRONTEND_SKELETON_EUI15_PARTICIPANT_NGRX_PATH = path.join(this.SKELETONS_ROOT_PATH, 'frontend', '15.x', 'participant-ngrx');
10
11
  module.exports.BACKEND_SKELETON_PATH = path.join(this.SKELETONS_ROOT_PATH, 'backend');
11
12
  module.exports.VIRTUAL_REMOTE_SKELETON_ROOT_PATH = path.join(__dirname, 'skeletons', 'virtual-remote');
12
13
 
@@ -141,7 +141,11 @@ const generateDefault = (args = constants.DEFAULT_CONFIG) => {
141
141
  tools.logInfo('Copying skeleton to target');
142
142
  if (args.pkgFrontendVersion === constants.CONFIG_OPTIONS.pkgFrontendVersion.EUI15) {
143
143
  if (args.pkgFrontendParticipant) {
144
- tools.copydir(constants.FRONTEND_SKELETON_EUI15_PARTICIPANT_PATH, targetPath, true);
144
+ if (args.pkgFrontendParticipantNgRx) {
145
+ tools.copydir(constants.FRONTEND_SKELETON_EUI15_PARTICIPANT_NGRX_PATH, targetPath, true);
146
+ } else {
147
+ tools.copydir(constants.FRONTEND_SKELETON_EUI15_PARTICIPANT_DEFAULT_PATH, targetPath, true);
148
+ }
145
149
  } else {
146
150
  tools.copydir(constants.FRONTEND_SKELETON_EUI15_PATH, targetPath, true);
147
151
  }
@@ -161,7 +165,8 @@ const generateDefault = (args = constants.DEFAULT_CONFIG) => {
161
165
  npmPkgName: args.npmPkgName,
162
166
  paths: {
163
167
  root: targetPath
164
- }
168
+ },
169
+ tsConfigFileName: 'tsconfig.lib.json'
165
170
  };
166
171
 
167
172
  tools.logInfo('Adding CSDR config entry');
@@ -25,7 +25,7 @@
25
25
  "error",
26
26
  {
27
27
  "type": "element",
28
- "prefix": ["@module.scope-name@"],
28
+ "prefix": ["@module.scope.string@"],
29
29
  "style": "kebab-case"
30
30
  }
31
31
  ],
@@ -33,7 +33,7 @@
33
33
  "error",
34
34
  {
35
35
  "type": "attribute",
36
- "prefix": ["@module.scope-name@"],
36
+ "prefix": ["@module.scope.string@"],
37
37
  "style": "camelCase"
38
38
  }
39
39
  ]
@@ -0,0 +1,43 @@
1
+ {
2
+ "extends": "../../.eslintrc.mwp.json",
3
+ "ignorePatterns": [
4
+ "!**/*",
5
+ "**/*.d.ts",
6
+ "dist",
7
+ "test",
8
+ "coverage",
9
+ "externals",
10
+ "legacy"
11
+ ],
12
+ "overrides": [
13
+ {
14
+ "files": [
15
+ "*.ts"
16
+ ],
17
+ "parserOptions": {
18
+ "project": [
19
+ "packages/@module.full.name@/tsconfig.lib.json",
20
+ "packages/@module.full.name@/tsconfig.spec.json"
21
+ ]
22
+ },
23
+ "rules": {
24
+ "@angular-eslint/component-selector": [
25
+ "error",
26
+ {
27
+ "type": "element",
28
+ "prefix": ["@module.scope.string@"],
29
+ "style": "kebab-case"
30
+ }
31
+ ],
32
+ "@angular-eslint/directive-selector": [
33
+ "error",
34
+ {
35
+ "type": "attribute",
36
+ "prefix": ["@module.scope.string@"],
37
+ "style": "camelCase"
38
+ }
39
+ ]
40
+ }
41
+ }
42
+ ]
43
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "@eui/deps-base": "^15.0.0",
3
+ "@cc/shared": "^4.0.0"
4
+ }
@@ -0,0 +1,2 @@
1
+ export { @module.class.name@Module } from './lib/module';
2
+ export { @module.class.name@Component } from './lib/components/participant/participant.component';
@@ -0,0 +1,19 @@
1
+ import { Component, OnInit, Input } from '@angular/core';
2
+
3
+ import { BlockComponent, ParticipantBlock } from '@cc/shared';
4
+
5
+ @Component({
6
+ selector: '@module.scope.string@-participant-cp',
7
+ templateUrl: './participant.component.html',
8
+ })
9
+ export class @module.class.name@Component implements BlockComponent, OnInit {
10
+ @Input() readonly block: ParticipantBlock; // it should be an extension of ParticipantBlock
11
+
12
+ constructor() {
13
+ // constructor
14
+ }
15
+
16
+ ngOnInit(): void {
17
+ console.log('init');
18
+ }
19
+ }
@@ -0,0 +1,24 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+
4
+ import { TranslateModule } from '@ngx-translate/core';
5
+
6
+ import { CcSharedModule } from '@cc/shared';
7
+
8
+ import { @module.class.name@Component } from './components/participant/participant.component';
9
+
10
+ @NgModule({
11
+ imports: [
12
+ CommonModule,
13
+ TranslateModule,
14
+ CcSharedModule,
15
+ ],
16
+ declarations: [
17
+ @module.class.name@Component,
18
+ ],
19
+ exports: [
20
+ @module.class.name@Component,
21
+ ],
22
+ })
23
+ export class @module.class.name@Module {
24
+ }
@@ -5,7 +5,7 @@ import 'zone.js/dist/zone-testing';
5
5
  import { getTestBed } from '@angular/core/testing';
6
6
  import {
7
7
  BrowserDynamicTestingModule,
8
- platformBrowserDynamicTesting
8
+ platformBrowserDynamicTesting,
9
9
  } from '@angular/platform-browser-dynamic/testing';
10
10
 
11
11
  declare const require: any;
@@ -13,7 +13,7 @@ declare const require: any;
13
13
  // First, initialize the Angular testing environment.
14
14
  getTestBed().initTestEnvironment(
15
15
  BrowserDynamicTestingModule,
16
- platformBrowserDynamicTesting()
16
+ platformBrowserDynamicTesting(),
17
17
  );
18
18
  // Then we find all the tests.
19
19
  const context = require.context('./', true, /\.spec\.ts$/);
@@ -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,46 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+
3
+ # compiled output
4
+ **/node_modules
5
+ **/target
6
+ **/build
7
+ **/dist
8
+ **/out-tsc
9
+ **/tmp
10
+ **/test/reports
11
+
12
+ # IDEs and editors
13
+ /.idea
14
+ .project
15
+ .classpath
16
+ .c9/
17
+ *.launch
18
+ .settings/
19
+ *.sublime-workspace
20
+
21
+ # IDE - VSCode
22
+ .vscode/*
23
+ !.vscode/settings.json
24
+ !.vscode/tasks.json
25
+ !.vscode/launch.json
26
+ !.vscode/extensions.json
27
+
28
+ # misc
29
+ /.sass-cache
30
+ /connect.lock
31
+ /coverage
32
+ /libpeerconnection.log
33
+ npm-debug.log
34
+ testem.log
35
+ /typings
36
+ yarn-error.log
37
+
38
+ # e2e
39
+ /e2e/*.js
40
+ /e2e/*.map
41
+ **/src/**/*.js
42
+ **/src/**/*.map
43
+
44
+ # System Files
45
+ .DS_Store
46
+ Thumbs.db
@@ -0,0 +1,7 @@
1
+ const karmaConfig = require('@eui/tools/karma/karma.conf.pkg');
2
+
3
+ module.exports = function (config) {
4
+ config.set(
5
+ karmaConfig.get(config, '@module.full.name@', {})
6
+ );
7
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
+ "dest": "./dist",
4
+ "lib": {
5
+ "entryFile": "src/index.ts"
6
+ }
7
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "@module.scope@/@module.name@",
3
+ "version": "1.0.0"
4
+ }
@@ -0,0 +1,5 @@
1
+ describe('First test', () => {
2
+ it('should work', () => {
3
+ expect(true).toBe(true);
4
+ });
5
+ });
@@ -0,0 +1,21 @@
1
+ // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
+
3
+ import 'zone.js/dist/zone';
4
+ import 'zone.js/dist/zone-testing';
5
+ import { getTestBed } from '@angular/core/testing';
6
+ import {
7
+ BrowserDynamicTestingModule,
8
+ platformBrowserDynamicTesting,
9
+ } from '@angular/platform-browser-dynamic/testing';
10
+
11
+ declare const require: any;
12
+
13
+ // First, initialize the Angular testing environment.
14
+ getTestBed().initTestEnvironment(
15
+ BrowserDynamicTestingModule,
16
+ platformBrowserDynamicTesting(),
17
+ );
18
+ // Then we find all the tests.
19
+ const context = require.context('./', true, /\.spec\.ts$/);
20
+ // And load the modules.
21
+ context.keys().map(context);
@@ -0,0 +1,32 @@
1
+ {
2
+ "extends": "../../tsconfig.build.json",
3
+ "compilerOptions": {
4
+ "outDir": "./out-tsc/lib",
5
+ "target": "ES2022",
6
+ "module": "ES2022",
7
+ "moduleResolution": "node",
8
+ "declaration": true,
9
+ "sourceMap": true,
10
+ "inlineSources": true,
11
+ "emitDecoratorMetadata": true,
12
+ "experimentalDecorators": true,
13
+ "importHelpers": true,
14
+ "types": [],
15
+ "lib": [
16
+ "ES2022",
17
+ "dom"
18
+ ]
19
+ },
20
+ "angularCompilerOptions": {
21
+ "annotateForClosureCompiler": true,
22
+ "skipTemplateCodegen": true,
23
+ "strictMetadataEmit": true,
24
+ "fullTemplateTypeCheck": true,
25
+ "strictInjectionParameters": true,
26
+ "enableResourceInlining": true
27
+ },
28
+ "exclude": [
29
+ "src/test.ts",
30
+ "**/*.spec.ts"
31
+ ]
32
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "extends": "../../tsconfig.build.json",
3
+ "compilerOptions": {
4
+ "outDir": "./out-tsc/spec",
5
+ "types": [
6
+ "jasmine",
7
+ "node"
8
+ ]
9
+ },
10
+ "files": [
11
+ "src/test.ts"
12
+ ],
13
+ "include": [
14
+ "**/*.spec.ts",
15
+ "**/*.d.ts"
16
+ ]
17
+ }
@@ -117,7 +117,7 @@ module.exports.registerCsdrPackage = (pkg, rootPkgScope, rootPkgName, euiVersion
117
117
 
118
118
  if (remoteConfig.options.participant) {
119
119
  moduleJson.skeletonConfig.options.participant = remoteConfig.options.participant;
120
- moduleJson.skeletonConfig.blockContainerName = `${rootPkgScope.substr(1)}-${rootPkgName}-ct`;
120
+ moduleJson.skeletonConfig.blockContainerName = `${rootPkgScope.substr(1)}-participant-cp`;
121
121
  }
122
122
  }
123
123
  }