@eui/tools 6.15.7 → 6.15.9

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.
@@ -1 +1 @@
1
- 6.15.7
1
+ 6.15.9
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.15.9 (2024-01-17)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * add extraUrls options for remote skeleton config v16 - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([d019d9fa](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/d019d9fa8b2a898d4ea92e5f2028f844d8e278d9))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.15.8 (2024-01-17)
11
+
12
+ ##### Chores
13
+
14
+ * **other:**
15
+ * removal of useless code MWP-10441 [MWP-10441](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-10441) ([ed31c546](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/ed31c546e19d2c40970a4c0f3d69a5a2eb3a309f))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.15.7 (2024-01-11)
2
20
 
3
21
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.15.7",
3
+ "version": "6.15.9",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -3,7 +3,11 @@ import { RouterModule, Routes } from '@angular/router';
3
3
 
4
4
  import { ELEMENT_ROUTES_TOKEN } from '@csdr/integration/element';
5
5
 
6
- import { routes } from '@root.npm.pkg@';
6
+ import {
7
+ routes,
8
+ // EXTRA_URLS_IMPORTS_PLACEHOLDER
9
+ } from '@root.npm.pkg@';
10
+
7
11
  // DON'T PAY ATTENTION TO IMPORT ERRORS HERE, those files are injected at serve/build time
8
12
  import { appConfig } from '../config/index';
9
13
  import { FallbackComponent } from './fallback.component';
@@ -15,6 +19,7 @@ const elementRoutes: Routes = [
15
19
  path: `${appConfig.global.baseUrl}@sub.route.url@`,
16
20
  children: routes,
17
21
  },
22
+ // EXTRA_URLS_ROUTES_PLACEHOLDER
18
23
  { path: '**', component: FallbackComponent },
19
24
  ];
20
25
 
@@ -106,6 +106,7 @@ const localeConfig: LocaleServiceConfig = {
106
106
  export const GLOBAL: GlobalConfig = {
107
107
  /* URL that needs to be used in the appRouting of the MWP */
108
108
  baseUrl: '@base.url@',
109
+ // EXTRA_URLS_CONFIG_PLACEHOLDER
109
110
  /* Element tag name that needs to be unique - make sure it doesn't collide with any other MWP element */
110
111
  elementName: '@element.name@',
111
112
  /* in case you are using NgRx give it a unique name (mostly for debugging) */
@@ -1,8 +1,6 @@
1
1
  import { NgModule } from '@angular/core';
2
2
  import { RouterModule, Routes } from '@angular/router';
3
3
 
4
- import { ELEMENT_ROUTES_TOKEN } from '@csdr/integration/element';
5
-
6
4
  import { routes } from '@root.npm.pkg@';
7
5
  // DON'T PAY ATTENTION TO IMPORT ERRORS HERE, those files are injected at serve/build time
8
6
  import { appConfig } from '../config/index';
@@ -23,9 +21,6 @@ const elementRoutes: Routes = [
23
21
  imports: [
24
22
  RouterModule.forRoot(elementRoutes),
25
23
  ],
26
- providers: [
27
- { provide: ELEMENT_ROUTES_TOKEN, useValue: elementRoutes },
28
- ],
29
24
  exports: [
30
25
  RouterModule,
31
26
  ],
@@ -1,8 +1,6 @@
1
1
  import { NgModule } from '@angular/core';
2
2
  import { RouterModule, Routes } from '@angular/router';
3
3
 
4
- import { ELEMENT_ROUTES_TOKEN } from '@csdr/integration/element';
5
-
6
4
  import { appConfig } from '../config/index'; // tslint:disable-line
7
5
  import { FallbackComponent } from './fallback.component'; // tslint:disable-line
8
6
  import { ModuleComponent } from './module.component';
@@ -15,9 +13,6 @@ const elementRoutes: Routes = [
15
13
  imports: [
16
14
  RouterModule.forRoot(elementRoutes),
17
15
  ],
18
- providers: [
19
- { provide: ELEMENT_ROUTES_TOKEN, useValue: elementRoutes },
20
- ],
21
16
  exports: [
22
17
  RouterModule,
23
18
  ],
@@ -215,6 +215,22 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
215
215
  }
216
216
  }
217
217
 
218
+
219
+ // extra routes
220
+ if (remote.skeletonConfig.extraUrls) {
221
+ let extraUrlsConfigPlaceholder = '', extraUrlsRoutesPlaceholder = '', extraUrlsImportsPlaceholder = '';
222
+ remote.skeletonConfig.extraUrls.forEach((url) => {
223
+ extraUrlsConfigPlaceholder += `${url.name}: '${url.path}', `;
224
+ extraUrlsRoutesPlaceholder += `{ path: appConfig.global.${url.name}, children: ${url.import} },`;
225
+ extraUrlsImportsPlaceholder += `${url.import},`;
226
+ });
227
+
228
+ tools.replaceInPath(remoteSrcPath, '// EXTRA_URLS_CONFIG_PLACEHOLDER', extraUrlsConfigPlaceholder);
229
+ tools.replaceInPath(remoteSrcPath, '// EXTRA_URLS_ROUTES_PLACEHOLDER', extraUrlsRoutesPlaceholder);
230
+ tools.replaceInPath(remoteSrcPath, '// EXTRA_URLS_IMPORTS_PLACEHOLDER', extraUrlsImportsPlaceholder);
231
+ }
232
+
233
+
218
234
  // checking options
219
235
 
220
236
  // if no options found, we inject default modules defs