@eui/tools 4.17.9 → 4.18.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/.version.properties +1 -1
- package/CHANGELOG.md +41 -0
- package/package.json +1 -1
- package/sandbox.js +4 -1
- package/scripts/csdr/cli/app.js +21 -10
- package/scripts/csdr/cli/skeletons/app-eui10/angular-config.json +20 -0
- package/scripts/csdr/cli/skeletons/app-eui10/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/app-eui10/dependencies-composite.json +5 -0
- package/scripts/csdr/cli/skeletons/app-eui10/gitignore_TO_REPLACE +63 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/models/user.js +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/routes/index.js +5 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/app/routes/user_routes.js +24 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/db/db.json +12 -0
- package/scripts/csdr/cli/skeletons/app-eui10/mock/server.js +16 -0
- package/scripts/csdr/cli/skeletons/app-eui10/package.json +6 -0
- package/scripts/csdr/cli/skeletons/app-eui10/scripts.json +5 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app-routing.module.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app-starter.service.ts +68 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.component.html +29 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.component.ts +55 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/app.module.ts +27 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/core/components/.gitkeep +0 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/core/core.module.ts +84 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/core/reducers/index.ts +33 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home-routing.module.ts +15 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.component.ts +19 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/home/home.module.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page1/page1.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page1/page1.component.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page2/page2.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/components/page2/page2.component.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1-routing.module.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.component.ts +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1.module.ts +21 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2-routing.module.ts +16 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.component.html +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.component.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2.module.ts +17 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/shared/shared.module.ts +21 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/app/shared/testing/router.mock.ts +18 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/config/env-json-config.json +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/i18n/en.json +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/assets/i18n/fr.json +7 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/global.ts +20 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/index.ts +8 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/config/modules.ts +4 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/environments/environment.prod.ts +9 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/environments/environment.ts +9 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/index.html +21 -0
- package/scripts/csdr/cli/skeletons/app-eui10/src/styles.scss +1 -0
- package/scripts/csdr/cli/skeletons/app-eui10/tslint.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.component.ts +35 -16
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.ts +50 -9
- package/scripts/csdr/metadata/package-history.js +1 -1
- package/scripts/utils/build/package/styles.js +1 -1
- package/scripts/utils/pre-build/injection/externals.js +21 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Component } from '@angular/core';
|
|
2
|
+
import { UxAppShellService } from '@eui/core';
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
templateUrl: './home.component.html',
|
|
6
|
+
})
|
|
7
|
+
export class HomeComponent {
|
|
8
|
+
constructor(
|
|
9
|
+
private asService: UxAppShellService,
|
|
10
|
+
) {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
onUpdateAppName() {
|
|
14
|
+
this.asService.setState({
|
|
15
|
+
...this.asService.state,
|
|
16
|
+
appName: 'Updated app name'
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import { SharedModule } from '../../shared/shared.module';
|
|
4
|
+
|
|
5
|
+
import { HomeRoutingModule } from './home-routing.module';
|
|
6
|
+
|
|
7
|
+
import { HomeComponent } from './home.component';
|
|
8
|
+
|
|
9
|
+
@NgModule({
|
|
10
|
+
imports: [
|
|
11
|
+
SharedModule,
|
|
12
|
+
HomeRoutingModule,
|
|
13
|
+
],
|
|
14
|
+
declarations: [
|
|
15
|
+
HomeComponent,
|
|
16
|
+
],
|
|
17
|
+
})
|
|
18
|
+
export class Module {}
|
package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module1/module1-routing.module.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { RouterModule, Routes } from '@angular/router';
|
|
3
|
+
import { Page1Component } from './components/page1/page1.component';
|
|
4
|
+
import { Page2Component } from './components/page2/page2.component';
|
|
5
|
+
import { Module1Component } from './module1.component';
|
|
6
|
+
|
|
7
|
+
const routes: Routes = [
|
|
8
|
+
{ path: '', component: Module1Component },
|
|
9
|
+
{ path: 'page1', component: Page1Component },
|
|
10
|
+
{ path: 'page2', component: Page2Component },
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
@NgModule({
|
|
14
|
+
imports: [
|
|
15
|
+
RouterModule.forChild(routes)
|
|
16
|
+
],
|
|
17
|
+
})
|
|
18
|
+
export class Module1RoutingModule {}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { Module1RoutingModule } from './module1-routing.module';
|
|
3
|
+
import { Module1Component } from './module1.component';
|
|
4
|
+
import { Page1Component } from './components/page1/page1.component';
|
|
5
|
+
import { Page2Component } from './components/page2/page2.component';
|
|
6
|
+
|
|
7
|
+
import { SharedModule } from '../../shared/shared.module';
|
|
8
|
+
|
|
9
|
+
@NgModule({
|
|
10
|
+
imports: [
|
|
11
|
+
SharedModule,
|
|
12
|
+
Module1RoutingModule,
|
|
13
|
+
],
|
|
14
|
+
declarations: [
|
|
15
|
+
Module1Component,
|
|
16
|
+
Page1Component,
|
|
17
|
+
Page2Component,
|
|
18
|
+
],
|
|
19
|
+
})
|
|
20
|
+
export class Module {
|
|
21
|
+
}
|
package/scripts/csdr/cli/skeletons/app-eui10/src/app/features/module2/module2-routing.module.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { RouterModule, Routes } from '@angular/router';
|
|
3
|
+
import { Module2Component } from './module2.component';
|
|
4
|
+
|
|
5
|
+
const routes: Routes = [
|
|
6
|
+
{ path: '', component: Module2Component },
|
|
7
|
+
];
|
|
8
|
+
|
|
9
|
+
@NgModule({
|
|
10
|
+
imports: [
|
|
11
|
+
RouterModule.forChild([
|
|
12
|
+
{ path: '', component: Module2Component }
|
|
13
|
+
])
|
|
14
|
+
],
|
|
15
|
+
})
|
|
16
|
+
export class Module2RoutingModule {}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { Module2RoutingModule } from './module2-routing.module';
|
|
3
|
+
import { Module2Component } from './module2.component';
|
|
4
|
+
|
|
5
|
+
import { SharedModule } from '../../shared/shared.module';
|
|
6
|
+
|
|
7
|
+
@NgModule({
|
|
8
|
+
imports: [
|
|
9
|
+
SharedModule,
|
|
10
|
+
Module2RoutingModule,
|
|
11
|
+
],
|
|
12
|
+
declarations: [
|
|
13
|
+
Module2Component,
|
|
14
|
+
],
|
|
15
|
+
})
|
|
16
|
+
export class Module {
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
3
|
+
|
|
4
|
+
import { UxAllModule } from '@eui/components';
|
|
5
|
+
import { EuiAllModule } from '@eui/components-next';
|
|
6
|
+
|
|
7
|
+
@NgModule({
|
|
8
|
+
imports: [
|
|
9
|
+
UxAllModule,
|
|
10
|
+
EuiAllModule,
|
|
11
|
+
TranslateModule,
|
|
12
|
+
],
|
|
13
|
+
declarations: [
|
|
14
|
+
],
|
|
15
|
+
exports: [
|
|
16
|
+
UxAllModule,
|
|
17
|
+
EuiAllModule,
|
|
18
|
+
TranslateModule,
|
|
19
|
+
]
|
|
20
|
+
})
|
|
21
|
+
export class SharedModule {}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NavigationEnd } from '@angular/router';
|
|
2
|
+
import { Observable } from 'rxjs/Observable';
|
|
3
|
+
|
|
4
|
+
export class RouterMock {
|
|
5
|
+
routerState = { root: '' };
|
|
6
|
+
public navigationEnd = new NavigationEnd(0, 'http://url1', 'http://url2');
|
|
7
|
+
public events = new Observable(observer => {
|
|
8
|
+
observer.next(this.navigationEnd);
|
|
9
|
+
observer.complete();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
constructor() {}
|
|
13
|
+
|
|
14
|
+
createUrlTree() {}
|
|
15
|
+
|
|
16
|
+
serializeUrl() {}
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GlobalConfig } from '@eui/core';
|
|
2
|
+
|
|
3
|
+
export const GLOBAL: GlobalConfig = {
|
|
4
|
+
appTitle: 'CSDR-app',
|
|
5
|
+
i18n: {
|
|
6
|
+
i18nService: {
|
|
7
|
+
defaultLanguage: 'en',
|
|
8
|
+
languages: ['en', 'fr'],
|
|
9
|
+
},
|
|
10
|
+
i18nLoader: {
|
|
11
|
+
i18nFolders: ['i18n-eui', 'i18n'],
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
user: {
|
|
15
|
+
defaultUserPreferences: {
|
|
16
|
+
dashboard: { },
|
|
17
|
+
lang: 'en',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>@app.name@</title>
|
|
7
|
+
<base href="/">
|
|
8
|
+
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
10
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
11
|
+
</head>
|
|
12
|
+
|
|
13
|
+
<body>
|
|
14
|
+
<app-root>
|
|
15
|
+
<div id="loader-wrapper">
|
|
16
|
+
<div id="loader"></div>
|
|
17
|
+
</div>
|
|
18
|
+
</app-root>
|
|
19
|
+
</body>
|
|
20
|
+
|
|
21
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* You can add global styles to this file, and also import other style files */
|
package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.component.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Component, OnInit, Inject } from '@angular/core';
|
|
2
2
|
import { Router } from '@angular/router';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { take } from 'rxjs/operators';
|
|
5
5
|
|
|
6
|
-
import { CONFIG_TOKEN, I18nService,
|
|
6
|
+
import { CONFIG_TOKEN, I18nService, UserService } from '@eui/core';
|
|
7
|
+
import { ELEMENT_ROUTER_TOKEN, IRouterService, initialization } from '@csdr/integration';
|
|
7
8
|
|
|
8
9
|
import { appConfig } from '../config/index';
|
|
9
10
|
|
|
@@ -15,9 +16,23 @@ enum ElementStatus {
|
|
|
15
16
|
|
|
16
17
|
@Component({
|
|
17
18
|
template: `
|
|
19
|
+
<eui-block-content *ngIf="moduleStatus === ElementStatus.Loading" [isBlocked]="true">
|
|
20
|
+
<div style="height: 100%"></div>
|
|
21
|
+
</eui-block-content>
|
|
18
22
|
<ng-container *ngIf="moduleStatus === ElementStatus.Loaded">
|
|
19
23
|
<router-outlet></router-outlet>
|
|
20
24
|
</ng-container>
|
|
25
|
+
<ng-container *ngIf="moduleStatus === ElementStatus.Error">
|
|
26
|
+
<div class="error-container">
|
|
27
|
+
<div>
|
|
28
|
+
<h1>Translations or user data for this module failed to load.</h1>
|
|
29
|
+
<p>Do you want to try again?</p>
|
|
30
|
+
<button euiButton euiPrimary (click)="loadData()">
|
|
31
|
+
<span euiLabel>{{ 'global.RELOAD' | translate }}</span>
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</ng-container>
|
|
21
36
|
`,
|
|
22
37
|
styles: [`
|
|
23
38
|
.error-container {
|
|
@@ -42,27 +57,31 @@ export class ModuleComponent implements OnInit {
|
|
|
42
57
|
@Inject(ELEMENT_ROUTER_TOKEN) private routerService: IRouterService,
|
|
43
58
|
@Inject(CONFIG_TOKEN) public config: any,
|
|
44
59
|
private i18nService: I18nService,
|
|
45
|
-
private
|
|
46
|
-
console.log(this.uxAppShellService.isGrowlSticky);
|
|
60
|
+
private userService: UserService) {
|
|
47
61
|
}
|
|
48
62
|
|
|
49
63
|
public ngOnInit() {
|
|
50
64
|
this.router.navigate([this.routerService.getUrl()], { replaceUrl: true });
|
|
51
|
-
this.
|
|
65
|
+
this.loadData();
|
|
52
66
|
}
|
|
53
67
|
|
|
54
|
-
private
|
|
68
|
+
private loadData() {
|
|
55
69
|
this.setStatus(ElementStatus.Loading);
|
|
56
|
-
|
|
57
|
-
.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
70
|
+
try {
|
|
71
|
+
initialization(this.i18nService, this.userService)
|
|
72
|
+
.pipe(take(1))
|
|
73
|
+
.subscribe((loadStatus: { success: boolean, error?: string }) => {
|
|
74
|
+
if (!loadStatus.success) {
|
|
75
|
+
this.setStatus(ElementStatus.Error);
|
|
76
|
+
console.error(`[ELEMENT: ${appConfig.global.elementName}] `, loadStatus.error);
|
|
77
|
+
} else {
|
|
78
|
+
this.setStatus(ElementStatus.Loaded);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
} catch (e) {
|
|
82
|
+
console.log(e);
|
|
83
|
+
this.setStatus(ElementStatus.Error);
|
|
84
|
+
}
|
|
66
85
|
}
|
|
67
86
|
|
|
68
87
|
private setStatus(status: ElementStatus) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
|
1
2
|
import { NgModule, Injector, NgZone, PLATFORM_ID } from '@angular/core';
|
|
2
3
|
import { BrowserModule } from '@angular/platform-browser';
|
|
3
4
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
@@ -11,7 +12,7 @@ import { EffectsModule } from '@ngrx/effects';
|
|
|
11
12
|
import { StoreRouterConnectingModule } from '@ngrx/router-store';
|
|
12
13
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
13
14
|
|
|
14
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
15
|
+
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
15
16
|
|
|
16
17
|
import {
|
|
17
18
|
CachePreventionInterceptor,
|
|
@@ -21,14 +22,22 @@ import {
|
|
|
21
22
|
CsrfPreventionInterceptor,
|
|
22
23
|
EUI_CONFIG_TOKEN,
|
|
23
24
|
EuLoginSessionTimeoutHandlingInterceptor,
|
|
25
|
+
GLOBAL_CONFIG_TOKEN,
|
|
24
26
|
I18nService,
|
|
27
|
+
LogService,
|
|
25
28
|
OpenIdConnectInterceptor,
|
|
29
|
+
StorageService,
|
|
26
30
|
StoreService,
|
|
27
31
|
translateConfig,
|
|
28
32
|
UserService,
|
|
29
33
|
UxAppShellService,
|
|
30
34
|
} from '@eui/core';
|
|
31
|
-
import {
|
|
35
|
+
import {
|
|
36
|
+
EuiBlockContentComponentModule,
|
|
37
|
+
EuiButtonModule,
|
|
38
|
+
EuiLabelModule,
|
|
39
|
+
} from '@eui/components-next';
|
|
40
|
+
import { LanguageInterceptor, PushNotificationsService } from '@csdr/core';
|
|
32
41
|
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
33
42
|
// import { TRACE_LOCAL_SERVICE_NAME, ZipkinHttpInterceptor, ZipkinTraceManager } from '@csdr/zipkin-tracing';
|
|
34
43
|
|
|
@@ -42,11 +51,14 @@ import { appConfig } from '../config';
|
|
|
42
51
|
// import { TaskMgrCommonModule } from '@cc/task-manager';
|
|
43
52
|
import {
|
|
44
53
|
ELEMENT_ROUTER_TOKEN,
|
|
45
|
-
|
|
54
|
+
I18N_SERVICE_HOST_TOKEN,
|
|
55
|
+
I18nServiceMapping,
|
|
56
|
+
PUSH_NOTIFICATION_SERVICE_HOST_TOKEN,
|
|
57
|
+
PushNotificationServiceMapping,
|
|
46
58
|
USER_SERVICE_HOST_TOKEN,
|
|
47
|
-
|
|
48
|
-
UX_SERVICE_HOST_TOKEN,
|
|
59
|
+
UserServiceMapping,
|
|
49
60
|
UX_APP_SHELL_SERVICE_HOST_TOKEN,
|
|
61
|
+
UX_SERVICE_HOST_TOKEN,
|
|
50
62
|
UxAppShellServiceMapping,
|
|
51
63
|
} from '@csdr/integration';
|
|
52
64
|
import { RoutingModule } from './routing.module';
|
|
@@ -70,6 +82,10 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
70
82
|
|
|
71
83
|
CoreModule.forRoot(),
|
|
72
84
|
|
|
85
|
+
EuiBlockContentComponentModule,
|
|
86
|
+
EuiButtonModule,
|
|
87
|
+
EuiLabelModule,
|
|
88
|
+
|
|
73
89
|
// TODO[REMOTE-SETUP] adapt to wrapped package import
|
|
74
90
|
// TaskMgrCommonModule,
|
|
75
91
|
RoutingModule,
|
|
@@ -87,6 +103,13 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
87
103
|
provide: EUI_CONFIG_TOKEN,
|
|
88
104
|
useValue: { appConfig: { ...appConfig, ...environment }, environment },
|
|
89
105
|
},
|
|
106
|
+
// TODO[REMOTE-SETUP] uncomment if LanguageInterceptor is used
|
|
107
|
+
// {
|
|
108
|
+
// provide: HTTP_INTERCEPTORS,
|
|
109
|
+
// useClass: LanguageInterceptor,
|
|
110
|
+
// deps: [CONFIG_TOKEN, StorageService],
|
|
111
|
+
// multi: true,
|
|
112
|
+
// },
|
|
90
113
|
{
|
|
91
114
|
provide: HTTP_INTERCEPTORS,
|
|
92
115
|
useClass: CorsSecurityInterceptor,
|
|
@@ -122,18 +145,36 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
122
145
|
// },
|
|
123
146
|
|
|
124
147
|
// used in the el-mappers
|
|
148
|
+
{ provide: I18N_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['I18nService'] },
|
|
149
|
+
{ provide: PUSH_NOTIFICATION_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['PushNotificationsService'] },
|
|
125
150
|
{ provide: USER_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['UserService'] },
|
|
126
151
|
{ provide: UX_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['UxService'] },
|
|
127
152
|
{ provide: UX_APP_SHELL_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['UxAppShellService'] },
|
|
153
|
+
// TODO[REMOTE-SETUP] uncomment if LanguageInterceptor or StorageService is used
|
|
154
|
+
// { provide: StorageService, useFactory: () => window['PROVIDERS']['StorageService'] },
|
|
128
155
|
|
|
156
|
+
{
|
|
157
|
+
provide: I18nService,
|
|
158
|
+
useFactory: (
|
|
159
|
+
config: any,
|
|
160
|
+
translateService: TranslateService,
|
|
161
|
+
logService: LogService,
|
|
162
|
+
store: StoreService,
|
|
163
|
+
document: Document,
|
|
164
|
+
hostI18nService: any) => new I18nServiceMapping(
|
|
165
|
+
config, translateService, logService, store, document, hostI18nService),
|
|
166
|
+
deps: [GLOBAL_CONFIG_TOKEN, TranslateService, LogService, StoreService, DOCUMENT, I18N_SERVICE_HOST_TOKEN],
|
|
167
|
+
},
|
|
129
168
|
{
|
|
130
169
|
provide: PushNotificationsService,
|
|
131
|
-
useFactory: (
|
|
132
|
-
|
|
170
|
+
useFactory: (
|
|
171
|
+
zone: NgZone,
|
|
172
|
+
hostPushNotificationService: any) => new PushNotificationServiceMapping(zone, hostPushNotificationService),
|
|
173
|
+
deps: [NgZone, PUSH_NOTIFICATION_SERVICE_HOST_TOKEN],
|
|
133
174
|
},
|
|
134
175
|
{
|
|
135
176
|
provide: UserService,
|
|
136
|
-
useFactory: (storeService: StoreService, hostUserService: any) => new
|
|
177
|
+
useFactory: (storeService: StoreService, hostUserService: any) => new UserServiceMapping(storeService, hostUserService),
|
|
137
178
|
deps: [StoreService, USER_SERVICE_HOST_TOKEN],
|
|
138
179
|
},
|
|
139
180
|
{
|
|
@@ -147,7 +188,7 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
147
188
|
iI18nService: I18nService,
|
|
148
189
|
hostUxService: any,
|
|
149
190
|
hostUxAppShellService: any) => new UxAppShellServiceMapping(
|
|
150
|
-
|
|
191
|
+
config, http, platformId, router, storeService, iI18nService, hostUxService, hostUxAppShellService),
|
|
151
192
|
deps: [CONFIG_TOKEN, HttpClient, PLATFORM_ID, Router, StoreService, I18nService,
|
|
152
193
|
UX_SERVICE_HOST_TOKEN, UX_APP_SHELL_SERVICE_HOST_TOKEN],
|
|
153
194
|
},
|
|
@@ -128,7 +128,7 @@ const getDiffBetweenBuildVersions = (pkg, fromBuildMetadata, toBuildMetadata) =>
|
|
|
128
128
|
|
|
129
129
|
if (!fromBuildMetadata) {
|
|
130
130
|
tools.logWarning('No previous metadata found for package...skipping');
|
|
131
|
-
return
|
|
131
|
+
return null;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
return Promise.resolve()
|
|
@@ -141,7 +141,7 @@ const compileSassFileDartSass = (folder, filename) => {
|
|
|
141
141
|
fs.writeFileSync(finalDest, postcssResult.css);
|
|
142
142
|
|
|
143
143
|
if (postcssResult.map) {
|
|
144
|
-
fs.writeFileSync(`${finalDest}.map`, postcssResult.map);
|
|
144
|
+
fs.writeFileSync(`${finalDest}.map`, postcssResult.map.toString());
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
147
|
})
|
|
@@ -252,16 +252,35 @@ module.exports.remapRoutesByEnvConfig = (project, envTarget, build) => {
|
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
// get routes file content and replace tokens
|
|
256
255
|
let routesFileContent = tools.getFileContent(routesFilePath);
|
|
256
|
+
|
|
257
|
+
// get routes file content and replace tokens
|
|
257
258
|
routesRemapping.forEach((route) => {
|
|
258
259
|
tools.logInfo(`checking replacement for : ${JSON.stringify(route)}`);
|
|
259
260
|
const tokenToSearch = `./features/${route.featureModule}-lib.module#Module`;
|
|
260
261
|
if (routesFileContent.indexOf(tokenToSearch) > -1) {
|
|
261
|
-
tools.logInfo(`token ${tokenToSearch} found...replacing`);
|
|
262
|
+
tools.logInfo(`token ${tokenToSearch} found...replacing by ${route.routeModuleDef}`);
|
|
262
263
|
routesFileContent = tools.replaceAll(routesFileContent, tokenToSearch, route.routeModuleDef);
|
|
263
264
|
}
|
|
264
265
|
})
|
|
266
|
+
|
|
267
|
+
// extra physical routes remapping
|
|
268
|
+
const extraRoutesRemapping = config.extraRoutesRemapping;
|
|
269
|
+
if (!extraRoutesRemapping) {
|
|
270
|
+
tools.logWarning('No extra routes remapping found in current config...skipping');
|
|
271
|
+
|
|
272
|
+
} else {
|
|
273
|
+
tools.logInfo('Extra routes remapping');
|
|
274
|
+
extraRoutesRemapping.forEach((route) => {
|
|
275
|
+
tools.logInfo(`checking replacement ${JSON.stringify(route)}`);
|
|
276
|
+
const tokenToSearch = route.currentRoute;
|
|
277
|
+
if (routesFileContent.indexOf(tokenToSearch) > -1) {
|
|
278
|
+
tools.logInfo(`token ${tokenToSearch} found...replacing by ${route.updatedRoute}`);
|
|
279
|
+
routesFileContent = tools.replaceAll(routesFileContent, tokenToSearch, route.updatedRoute);
|
|
280
|
+
}
|
|
281
|
+
})
|
|
282
|
+
}
|
|
283
|
+
|
|
265
284
|
return tools.writeFileContent(routesFilePath, routesFileContent);
|
|
266
285
|
})
|
|
267
286
|
.then(() => {
|