@eui/tools 6.3.2 → 6.3.4
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 +18 -0
- package/package.json +1 -1
- package/scripts/csdr/cli/package-build-frontend.js +3 -2
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/dummy.scss +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/dummy.spec.ts +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/fallback.component.ts +11 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/module.component.ts +91 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/module.ts +87 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/reducers/custom-route-serializer.ts +28 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/reducers/index.ts +43 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/app/routing.module.ts +33 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/assets/.gitkeep +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/config/index.ts +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/config/modules.ts +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/environments/environment.prod.ts +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/environments/environment.ts +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/favicon.ico +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/index.html +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/main.ts +12 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/src/polyfills.ts +87 -0
- package/scripts/csdr/config/packages.js +4 -6
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui14/tsconfig.app.json +1 -1
- package/scripts/utils/tools.js +1 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/test.ts.TO_REPLACE +0 -20
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/angular.json +0 -84
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui15/dependencies-composite.json +0 -8
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.3.
|
|
1
|
+
6.3.4
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 6.3.4 (2023-01-31)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* adapted v15 remote CLI - fix wrong file replacement - EUI-7035 [EUI-7035](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7035) ([1856bc0e](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/1856bc0e32cd077f21cf1a2652c35f033c451cde))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 6.3.3 (2023-01-30)
|
|
11
|
+
|
|
12
|
+
##### Chores
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* use es2022 features for >= v14 - EUI-7067 [EUI-7067](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7067) ([f3667b86](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/f3667b8691706569e7ab40eaa0561a2d942f9304))
|
|
16
|
+
|
|
17
|
+
* * *
|
|
18
|
+
* * *
|
|
1
19
|
## 6.3.2 (2023-01-25)
|
|
2
20
|
|
|
3
21
|
##### Chores
|
package/package.json
CHANGED
|
@@ -42,7 +42,9 @@ const replaceExtensions = (targetPath) => {
|
|
|
42
42
|
|
|
43
43
|
.then(() => {
|
|
44
44
|
tools.logInfo('Executing post generation operations');
|
|
45
|
-
tools.
|
|
45
|
+
if (tools.isFileExists(path.join(targetPath, 'gitignore_TO_REPLACE'))) {
|
|
46
|
+
tools.move(path.join(targetPath, 'gitignore_TO_REPLACE'), path.join(targetPath, '.gitignore'));
|
|
47
|
+
}
|
|
46
48
|
if (tools.isFileExists(path.join(targetPath, 'package.json_TO_REPLACE'))) {
|
|
47
49
|
tools.move(path.join(targetPath, 'package.json_TO_REPLACE'), path.join(targetPath, 'package.json'));
|
|
48
50
|
}
|
|
@@ -87,7 +89,6 @@ const generateVirtualRemote = ({fullName, targetPath, rootPackagePath, pkg, args
|
|
|
87
89
|
|
|
88
90
|
// for the moment the virtual remotes are only activated for v15+
|
|
89
91
|
if (args.pkgFrontendVersion == constants.CONFIG_OPTIONS.pkgFrontendVersion.EUI15) {
|
|
90
|
-
tools.copydir(constants.FRONTEND_SKELETON_REMOTE_EUI10_PATH, targetPath, true);
|
|
91
92
|
tools.copydir(constants.FRONTEND_SKELETON_REMOTE_EUI15_PATH, targetPath, true);
|
|
92
93
|
}
|
|
93
94
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Component, OnInit, Inject, ElementRef, OnDestroy } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import { take } from 'rxjs/operators';
|
|
4
|
+
|
|
5
|
+
import { CONFIG_TOKEN } from '@eui/core';
|
|
6
|
+
import { ElementSetupService, ElementLifeCycleService } from '@csdr/integration/element';
|
|
7
|
+
|
|
8
|
+
enum ElementStatus {
|
|
9
|
+
Loading = 'loading',
|
|
10
|
+
Loaded = 'loaded',
|
|
11
|
+
Error = 'error',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
template: `
|
|
16
|
+
<eui-block-content *ngIf="moduleStatus === ElementStatus.Loading" [isBlocked]="true">
|
|
17
|
+
<div style="height: 100%"></div>
|
|
18
|
+
</eui-block-content>
|
|
19
|
+
<ng-container *ngIf="moduleStatus === ElementStatus.Loaded">
|
|
20
|
+
<router-outlet></router-outlet>
|
|
21
|
+
</ng-container>
|
|
22
|
+
<ng-container *ngIf="moduleStatus === ElementStatus.Error">
|
|
23
|
+
<div class="error-container">
|
|
24
|
+
<div>
|
|
25
|
+
<h1>Translations or user data for this module failed to load.</h1>
|
|
26
|
+
<p>Do you want to try again?</p>
|
|
27
|
+
<button euiButton euiPrimary (click)="loadData()">
|
|
28
|
+
<span euiLabel>{{ 'global.RELOAD' | translate }}</span>
|
|
29
|
+
</button>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</ng-container>
|
|
33
|
+
`,
|
|
34
|
+
styles: [`
|
|
35
|
+
.error-container {
|
|
36
|
+
width: 50vw;
|
|
37
|
+
height: 50vh;
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 50%;
|
|
40
|
+
left: 50%;
|
|
41
|
+
transform: translate(-50%, -50%);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.error-container div {
|
|
45
|
+
text-align: center
|
|
46
|
+
}
|
|
47
|
+
`],
|
|
48
|
+
})
|
|
49
|
+
export class ModuleComponent implements OnInit, OnDestroy {
|
|
50
|
+
ElementStatus = ElementStatus;
|
|
51
|
+
moduleStatus: ElementStatus;
|
|
52
|
+
|
|
53
|
+
constructor(private elRef: ElementRef,
|
|
54
|
+
@Inject(CONFIG_TOKEN) public config: any,
|
|
55
|
+
private elementLifeCycleService: ElementLifeCycleService,
|
|
56
|
+
private elementSetupService: ElementSetupService) {
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
ngOnInit() {
|
|
60
|
+
const elementData = this.elementLifeCycleService.getElementData(this.elRef);
|
|
61
|
+
this.elementLifeCycleService.setup(elementData);
|
|
62
|
+
this.loadData();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
ngOnDestroy(): void {
|
|
66
|
+
this.elementLifeCycleService.cleanup();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private loadData() {
|
|
70
|
+
this.setStatus(ElementStatus.Loading);
|
|
71
|
+
try {
|
|
72
|
+
this.elementSetupService.init()
|
|
73
|
+
.pipe(take(1))
|
|
74
|
+
.subscribe((loadStatus: { success: boolean; error?: string }) => {
|
|
75
|
+
if (!loadStatus.success) {
|
|
76
|
+
this.setStatus(ElementStatus.Error);
|
|
77
|
+
console.error(`[ELEMENT: ${this.config.global.elementName}] `, loadStatus.error);
|
|
78
|
+
} else {
|
|
79
|
+
this.setStatus(ElementStatus.Loaded);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
} catch (e) {
|
|
83
|
+
console.log(e);
|
|
84
|
+
this.setStatus(ElementStatus.Error);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private setStatus(status: ElementStatus) {
|
|
89
|
+
this.moduleStatus = status;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { NgModule, Injector, DoBootstrap, ApplicationRef } from '@angular/core';
|
|
2
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
3
|
+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
4
|
+
import { HttpClientModule } from '@angular/common/http';
|
|
5
|
+
import { createCustomElement } from '@angular/elements';
|
|
6
|
+
|
|
7
|
+
import { StoreModule } from '@ngrx/store';
|
|
8
|
+
import { EffectsModule } from '@ngrx/effects';
|
|
9
|
+
import { StoreRouterConnectingModule } from '@ngrx/router-store';
|
|
10
|
+
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
11
|
+
|
|
12
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
13
|
+
|
|
14
|
+
import {
|
|
15
|
+
CoreModule,
|
|
16
|
+
EUI_CONFIG_TOKEN,
|
|
17
|
+
translateConfig,
|
|
18
|
+
} from '@eui/core';
|
|
19
|
+
|
|
20
|
+
import { EUI_COMPONENTS_MODULES } from './eui-components';
|
|
21
|
+
|
|
22
|
+
import { CsdrCoreModule } from '@csdr/core';
|
|
23
|
+
|
|
24
|
+
import { TOKEN, reducerProvider, metaReducers } from './reducers/index';
|
|
25
|
+
import { CustomSerializer } from './reducers/custom-route-serializer';
|
|
26
|
+
|
|
27
|
+
import { environment } from '../environments/environment';
|
|
28
|
+
import { appConfig } from '../config';
|
|
29
|
+
|
|
30
|
+
import { Module as RootPackageCommonModule } from '@module.scope@/@module.name@';
|
|
31
|
+
import { DEFAULT_MAPPED_PROVIDERS } from '@csdr/integration/element';
|
|
32
|
+
import { RoutingModule } from './routing.module';
|
|
33
|
+
|
|
34
|
+
import { FallbackComponent } from './fallback.component';
|
|
35
|
+
import { ModuleComponent } from './module.component';
|
|
36
|
+
|
|
37
|
+
@NgModule({
|
|
38
|
+
imports: [
|
|
39
|
+
BrowserModule,
|
|
40
|
+
BrowserAnimationsModule,
|
|
41
|
+
HttpClientModule,
|
|
42
|
+
StoreRouterConnectingModule.forRoot({ stateKey: 'router', serializer: CustomSerializer }),
|
|
43
|
+
StoreModule.forRoot(TOKEN, { metaReducers }),
|
|
44
|
+
EffectsModule.forRoot([]),
|
|
45
|
+
StoreDevtoolsModule.instrument({ name: appConfig.global.storeName, maxAge: 150, logOnly: environment.production }),
|
|
46
|
+
TranslateModule.forRoot(translateConfig),
|
|
47
|
+
|
|
48
|
+
CoreModule.forRoot(),
|
|
49
|
+
CsdrCoreModule.forRoot(),
|
|
50
|
+
|
|
51
|
+
RootPackageCommonModule,
|
|
52
|
+
RoutingModule,
|
|
53
|
+
|
|
54
|
+
...EUI_COMPONENTS_MODULES,
|
|
55
|
+
],
|
|
56
|
+
declarations: [
|
|
57
|
+
FallbackComponent,
|
|
58
|
+
ModuleComponent,
|
|
59
|
+
],
|
|
60
|
+
entryComponents: [
|
|
61
|
+
FallbackComponent,
|
|
62
|
+
ModuleComponent,
|
|
63
|
+
],
|
|
64
|
+
providers: [
|
|
65
|
+
reducerProvider,
|
|
66
|
+
{
|
|
67
|
+
provide: EUI_CONFIG_TOKEN,
|
|
68
|
+
useValue: { appConfig: { ...appConfig, ...environment }, environment },
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
...DEFAULT_MAPPED_PROVIDERS,
|
|
72
|
+
],
|
|
73
|
+
})
|
|
74
|
+
export class AppModule implements DoBootstrap {
|
|
75
|
+
|
|
76
|
+
constructor(private injector: Injector) {
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
ngDoBootstrap(appRef: ApplicationRef): void {
|
|
80
|
+
const elementSampleEui = createCustomElement(ModuleComponent, { injector: this.injector });
|
|
81
|
+
try {
|
|
82
|
+
customElements.define(appConfig.global.elementName, elementSampleEui);
|
|
83
|
+
} catch (e) {
|
|
84
|
+
console.log(e);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Params, RouterStateSnapshot } from '@angular/router';
|
|
2
|
+
import { RouterStateSerializer } from '@ngrx/router-store';
|
|
3
|
+
|
|
4
|
+
export interface RouterStateUrl {
|
|
5
|
+
url: string;
|
|
6
|
+
params: Params;
|
|
7
|
+
queryParams: Params;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class CustomSerializer implements RouterStateSerializer<RouterStateUrl> {
|
|
11
|
+
serialize(routerState: RouterStateSnapshot): RouterStateUrl {
|
|
12
|
+
let route = routerState.root;
|
|
13
|
+
|
|
14
|
+
while (route.firstChild) {
|
|
15
|
+
route = route.firstChild;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const {
|
|
19
|
+
url,
|
|
20
|
+
root: { queryParams },
|
|
21
|
+
} = routerState;
|
|
22
|
+
const { params } = route;
|
|
23
|
+
|
|
24
|
+
// Only return an object including the URL, params and query params
|
|
25
|
+
// instead of the entire snapshot
|
|
26
|
+
return { url, params, queryParams };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
import { ActionReducer, ActionReducerMap, MetaReducer } from '@ngrx/store';
|
|
4
|
+
import * as fromRouter from '@ngrx/router-store';
|
|
5
|
+
import { storeFreeze } from 'ngrx-store-freeze';
|
|
6
|
+
import { reducers as coreReducers, CoreState, localStorageSync } from '@eui/core';
|
|
7
|
+
|
|
8
|
+
import { environment } from '../../environments/environment';
|
|
9
|
+
|
|
10
|
+
export interface AppState extends CoreState {
|
|
11
|
+
router: fromRouter.RouterReducerState<any>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// -----------------
|
|
15
|
+
// ------------ AOT
|
|
16
|
+
export const TOKEN = new InjectionToken<any>('AppReducers');
|
|
17
|
+
|
|
18
|
+
export function getReducers(): ActionReducerMap<AppState, any> {
|
|
19
|
+
return {
|
|
20
|
+
router: fromRouter.routerReducer,
|
|
21
|
+
...coreReducers,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const reducerProvider = [
|
|
26
|
+
{ provide: TOKEN, useFactory: getReducers },
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
// console.log all actions
|
|
30
|
+
export function logger(reducer: ActionReducer<AppState>): ActionReducer<AppState> {
|
|
31
|
+
return (state, action) => {
|
|
32
|
+
const result = reducer(state, action);
|
|
33
|
+
console.groupCollapsed(action.type);
|
|
34
|
+
console.log('prev state', state);
|
|
35
|
+
console.log('action', action);
|
|
36
|
+
console.log('next state', result);
|
|
37
|
+
console.groupEnd();
|
|
38
|
+
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const metaReducers: MetaReducer<AppState>[] = !environment.production ? [logger, localStorageSync, storeFreeze] : [localStorageSync];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { RouterModule, Routes } from '@angular/router';
|
|
3
|
+
|
|
4
|
+
import { ELEMENT_ROUTES_TOKEN } from '@csdr/integration/element';
|
|
5
|
+
|
|
6
|
+
import { routes } from '@module.scope@/@module.name@';
|
|
7
|
+
import { appConfig } from '../config/index';
|
|
8
|
+
import { FallbackComponent } from './fallback.component';
|
|
9
|
+
import { ModuleComponent } from './module.component';
|
|
10
|
+
|
|
11
|
+
const elementRoutes: Routes = [
|
|
12
|
+
{ path: '', component: ModuleComponent },
|
|
13
|
+
{
|
|
14
|
+
path: appConfig.global.baseUrl,
|
|
15
|
+
children: routes,
|
|
16
|
+
},
|
|
17
|
+
{ path: '**', component: FallbackComponent },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
// @dynamic
|
|
21
|
+
@NgModule({
|
|
22
|
+
imports: [
|
|
23
|
+
RouterModule.forRoot(elementRoutes),
|
|
24
|
+
],
|
|
25
|
+
providers: [
|
|
26
|
+
{ provide: ELEMENT_ROUTES_TOKEN, useValue: elementRoutes },
|
|
27
|
+
],
|
|
28
|
+
exports: [
|
|
29
|
+
RouterModule,
|
|
30
|
+
],
|
|
31
|
+
})
|
|
32
|
+
export class RoutingModule {
|
|
33
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GLOBAL } from './global';
|
|
2
|
+
import { MODULES } from './modules';
|
|
3
|
+
|
|
4
|
+
import { EuiAppConfig } from '@eui/core';
|
|
5
|
+
import { configMapping } from '@csdr/integration/element';
|
|
6
|
+
|
|
7
|
+
export const appConfig: EuiAppConfig = configMapping({
|
|
8
|
+
global: GLOBAL,
|
|
9
|
+
modules: MODULES,
|
|
10
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { enableProdMode } from '@angular/core';
|
|
2
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
3
|
+
|
|
4
|
+
import { AppModule } from './app/module';
|
|
5
|
+
import { environment } from './environments/environment';
|
|
6
|
+
|
|
7
|
+
if (environment.production) {
|
|
8
|
+
enableProdMode();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
platformBrowserDynamic().bootstrapModule(AppModule)
|
|
12
|
+
.catch(err => console.log(err));
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
4
|
+
* You can add your own extra polyfills to this file.
|
|
5
|
+
*
|
|
6
|
+
* This file is divided into 2 sections:
|
|
7
|
+
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
8
|
+
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
9
|
+
* file.
|
|
10
|
+
*
|
|
11
|
+
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
12
|
+
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
13
|
+
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
14
|
+
*
|
|
15
|
+
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/***************************************************************************************************
|
|
19
|
+
* BROWSER POLYFILLS
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
|
23
|
+
// import 'core-js/es6/symbol';
|
|
24
|
+
// import 'core-js/es6/object';
|
|
25
|
+
// import 'core-js/es6/function';
|
|
26
|
+
// import 'core-js/es6/parse-int';
|
|
27
|
+
// import 'core-js/es6/parse-float';
|
|
28
|
+
// import 'core-js/es6/number';
|
|
29
|
+
// import 'core-js/es6/math';
|
|
30
|
+
// import 'core-js/es6/string';
|
|
31
|
+
// import 'core-js/es6/date';
|
|
32
|
+
// import 'core-js/es6/array';
|
|
33
|
+
// import 'core-js/es6/regexp';
|
|
34
|
+
// import 'core-js/es6/map';
|
|
35
|
+
// import 'core-js/es6/weak-map';
|
|
36
|
+
// import 'core-js/es6/set';
|
|
37
|
+
|
|
38
|
+
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
|
39
|
+
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
|
40
|
+
|
|
41
|
+
/** IE10 and IE11 requires the following for the Reflect API. */
|
|
42
|
+
// import 'core-js/es6/reflect';
|
|
43
|
+
|
|
44
|
+
/** Evergreen browsers require these. **/
|
|
45
|
+
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
|
|
46
|
+
// import 'core-js/es7/reflect';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Web Animations `@angular/platform-browser/animations`
|
|
50
|
+
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
|
51
|
+
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
|
52
|
+
**/
|
|
53
|
+
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
57
|
+
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
61
|
+
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
62
|
+
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
63
|
+
|
|
64
|
+
/*
|
|
65
|
+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
66
|
+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
67
|
+
*/
|
|
68
|
+
// (window as any).__Zone_enable_cross_context_check = true;
|
|
69
|
+
|
|
70
|
+
/***************************************************************************************************
|
|
71
|
+
* Zone JS is required by default for Angular itself.
|
|
72
|
+
*/
|
|
73
|
+
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
|
74
|
+
|
|
75
|
+
/***************************************************************************************************
|
|
76
|
+
* APPLICATION IMPORTS
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Date, currency, decimal and percent pipes.
|
|
81
|
+
* Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
|
|
82
|
+
*/
|
|
83
|
+
// import 'intl'; // Run `npm install --save intl`.
|
|
84
|
+
/**
|
|
85
|
+
* Need to import at least one locale-data with intl.
|
|
86
|
+
*/
|
|
87
|
+
// import 'intl/locale-data/jsonp/en';
|
|
@@ -32,8 +32,8 @@ module.exports.getCsdrPackagesFull = (flattenChildren = true) => {
|
|
|
32
32
|
try {
|
|
33
33
|
outputPackages.push(this.getPackage(p, true));
|
|
34
34
|
} catch (e) {
|
|
35
|
-
tools.logInfo(`Package: ${p} is in local config but not found in global... should be cleaned up`);
|
|
36
|
-
console.log(e);
|
|
35
|
+
// tools.logInfo(`Package: ${p} is in local config but not found in global... should be cleaned up`);
|
|
36
|
+
// console.log(e);
|
|
37
37
|
}
|
|
38
38
|
})
|
|
39
39
|
return outputPackages;
|
|
@@ -48,8 +48,8 @@ const getPackages = module.exports.getPackages = () => {
|
|
|
48
48
|
try {
|
|
49
49
|
outputPackages.push(this.getPackage(p));
|
|
50
50
|
} catch (e) {
|
|
51
|
-
tools.logInfo(`Package: ${p} is in local config but not found in global... should be cleaned up`);
|
|
52
|
-
console.log(e);
|
|
51
|
+
// tools.logInfo(`Package: ${p} is in local config but not found in global... should be cleaned up`);
|
|
52
|
+
// console.log(e);
|
|
53
53
|
}
|
|
54
54
|
})
|
|
55
55
|
return outputPackages;
|
|
@@ -111,8 +111,6 @@ module.exports.getPackage = (pkgName, fromCsdrConfig, optional) => {
|
|
|
111
111
|
|
|
112
112
|
|
|
113
113
|
if (!pkg && !optional) {
|
|
114
|
-
tools.logInfo(`Package ${pkgName} cannot be found in your local installation, mount it with:`);
|
|
115
|
-
tools.logInfo(`npm run init -- --pkg ${pkgName} --pkgOnly`);
|
|
116
114
|
throw 'PACKAGE_NOT_FOUND';
|
|
117
115
|
}
|
|
118
116
|
|
package/scripts/utils/tools.js
CHANGED
|
@@ -470,7 +470,7 @@ function removeFilesExtension(rootPath, extension) {
|
|
|
470
470
|
files.forEach(function (file) {
|
|
471
471
|
const dir = path.dirname(file);
|
|
472
472
|
const filename = path.basename(file);
|
|
473
|
-
|
|
473
|
+
logInfo('remove extention for file : ' + filename + ' in ' + dir);
|
|
474
474
|
const filenameUpdate = filename.substr(0, filename.indexOf(extension));
|
|
475
475
|
fs.renameSync(file, dir + "/" + filenameUpdate);
|
|
476
476
|
processed++;
|
|
@@ -1,20 +0,0 @@
|
|
|
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-testing';
|
|
4
|
-
import { getTestBed } from '@angular/core/testing';
|
|
5
|
-
import {
|
|
6
|
-
BrowserDynamicTestingModule,
|
|
7
|
-
platformBrowserDynamicTesting,
|
|
8
|
-
} from '@angular/platform-browser-dynamic/testing';
|
|
9
|
-
|
|
10
|
-
declare const require: any;
|
|
11
|
-
|
|
12
|
-
// First, initialize the Angular testing environment.
|
|
13
|
-
getTestBed().initTestEnvironment(
|
|
14
|
-
BrowserDynamicTestingModule,
|
|
15
|
-
platformBrowserDynamicTesting(),
|
|
16
|
-
);
|
|
17
|
-
// Then we find all the tests.
|
|
18
|
-
const context = require.context('./', true, /\.spec\.ts$/);
|
|
19
|
-
// And load the modules.
|
|
20
|
-
context.keys().map(context);
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
-
"version": 1,
|
|
4
|
-
"newProjectRoot": "apps",
|
|
5
|
-
"projects": {
|
|
6
|
-
"@module.full.name@": {
|
|
7
|
-
"root": ".",
|
|
8
|
-
"sourceRoot": "src",
|
|
9
|
-
"projectType": "application",
|
|
10
|
-
"prefix": "app",
|
|
11
|
-
"schematics": {},
|
|
12
|
-
"architect": {
|
|
13
|
-
"build": {
|
|
14
|
-
"builder": "ngx-build-plus:build",
|
|
15
|
-
"options": {
|
|
16
|
-
"deployUrl": "/mwp/assets/elements/@module.full.name@/bundles/",
|
|
17
|
-
"outputPath": "dist",
|
|
18
|
-
"index": "src/index.html",
|
|
19
|
-
"main": "src/main.ts",
|
|
20
|
-
"polyfills": "src/polyfills.ts",
|
|
21
|
-
"tsConfig": "tsconfig.app.json",
|
|
22
|
-
"scripts": [
|
|
23
|
-
"./node_modules/@webcomponents/custom-elements/src/native-shim.js"
|
|
24
|
-
],
|
|
25
|
-
"assets": [
|
|
26
|
-
"src/assets"
|
|
27
|
-
],
|
|
28
|
-
"styles": [
|
|
29
|
-
"./node_modules/@eui/styles/dist/styles/eui.css"
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
|
-
"configurations": {
|
|
33
|
-
"production": {
|
|
34
|
-
"fileReplacements": [
|
|
35
|
-
{
|
|
36
|
-
"replace": "src/environments/environment.ts",
|
|
37
|
-
"with": "src/environments/environment.prod.ts"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"optimization": true,
|
|
41
|
-
"outputHashing": "all",
|
|
42
|
-
"sourceMap": false,
|
|
43
|
-
"extractCss": true,
|
|
44
|
-
"namedChunks": false,
|
|
45
|
-
"aot": true,
|
|
46
|
-
"extractLicenses": true,
|
|
47
|
-
"vendorChunk": false,
|
|
48
|
-
"buildOptimizer": true
|
|
49
|
-
},
|
|
50
|
-
"serve-dist": {
|
|
51
|
-
"outputPath": "serve-dist",
|
|
52
|
-
"wath": true
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
"serve": {
|
|
57
|
-
"builder": "./node_modules/@angular-devkit/build-angular:dev-server",
|
|
58
|
-
"options": {
|
|
59
|
-
"deployUrl": "/assets/elements/@module.full.name@/bundles/",
|
|
60
|
-
"browserTarget": "@module.full.name@:build:serve-dist"
|
|
61
|
-
},
|
|
62
|
-
"configurations": {
|
|
63
|
-
"production": {
|
|
64
|
-
"browserTarget": "@module.full.name@:build:production"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"test": {
|
|
69
|
-
"builder": "./node_modules/@angular-devkit/build-angular:karma",
|
|
70
|
-
"options": {
|
|
71
|
-
"main": "src/test.ts",
|
|
72
|
-
"polyfills": "src/polyfills.ts",
|
|
73
|
-
"tsConfig": "tsconfig.spec.json",
|
|
74
|
-
"karmaConfig": "karma.conf.js",
|
|
75
|
-
"scripts": []
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"cli": {
|
|
82
|
-
"analytics": false
|
|
83
|
-
}
|
|
84
|
-
}
|