@eui/tools 6.15.21 → 6.16.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 (59) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +18 -0
  3. package/package.json +1 -1
  4. package/sandbox.js +16 -4
  5. package/scripts/csdr/config/angular.js +5 -5
  6. package/scripts/csdr/init/remotes/18.x/base/angular.json +87 -0
  7. package/scripts/csdr/init/remotes/18.x/base/browserslist +6 -0
  8. package/scripts/csdr/init/remotes/18.x/base/package.json_TO_REPLACE +10 -0
  9. package/scripts/csdr/init/remotes/18.x/base/tsconfig.app.json +24 -0
  10. package/scripts/csdr/init/remotes/18.x/base/yarn.lock +14275 -0
  11. package/scripts/csdr/init/remotes/18.x/full/common/app/eui-components.ts +9 -0
  12. package/scripts/csdr/init/remotes/18.x/full/common/app/fallback.component.ts +10 -0
  13. package/scripts/csdr/init/remotes/18.x/full/common/app/module.component.ts +97 -0
  14. package/scripts/csdr/init/remotes/18.x/full/common/app/module.ts +96 -0
  15. package/scripts/csdr/init/remotes/18.x/full/common/app/reducers/custom-route-serializer.ts +28 -0
  16. package/scripts/csdr/init/remotes/18.x/full/common/app/reducers/index.ts +51 -0
  17. package/scripts/csdr/init/remotes/18.x/full/common/app/routing.module.ts +29 -0
  18. package/scripts/csdr/init/remotes/18.x/full/common/assets/.gitkeep +0 -0
  19. package/scripts/csdr/init/remotes/18.x/full/common/config/global.ts +54 -0
  20. package/scripts/csdr/init/remotes/18.x/full/common/config/index.ts +10 -0
  21. package/scripts/csdr/init/remotes/18.x/full/common/config/modules.ts +3 -0
  22. package/scripts/csdr/init/remotes/18.x/full/common/environments/environment.prod.ts +3 -0
  23. package/scripts/csdr/init/remotes/18.x/full/common/environments/environment.ts +3 -0
  24. package/scripts/csdr/init/remotes/18.x/full/common/favicon.ico +0 -0
  25. package/scripts/csdr/init/remotes/18.x/full/common/index.html +10 -0
  26. package/scripts/csdr/init/remotes/18.x/full/common/main.ts +12 -0
  27. package/scripts/csdr/init/remotes/18.x/full/common/polyfills.ts +88 -0
  28. package/scripts/csdr/init/remotes/18.x/full/options/ag-grid/main.ts +17 -0
  29. package/scripts/csdr/init/remotes/18.x/full/options/all-locales/config/global.ts +122 -0
  30. package/scripts/csdr/init/remotes/18.x/full/options/definitions/dynamic-forms.json +4 -0
  31. package/scripts/csdr/init/remotes/18.x/full/options/definitions/dynatrace.json +4 -0
  32. package/scripts/csdr/init/remotes/18.x/full/options/definitions/participant.json +3 -0
  33. package/scripts/csdr/init/remotes/18.x/full/options/definitions/user-reducers.json +3 -0
  34. package/scripts/csdr/init/remotes/18.x/full/options/definitions/zipkin.json +5 -0
  35. package/scripts/csdr/init/remotes/18.x/full/options/participant/app/module.component.ts +101 -0
  36. package/scripts/csdr/init/remotes/18.x/full/options/participant/app/routing.module.ts +21 -0
  37. package/scripts/csdr/init/remotes/18.x/full/options/participant/config/index.ts +10 -0
  38. package/scripts/csdr/init/remotes/18.x/full/options/user-reducers/app/reducers/index.ts +75 -0
  39. package/scripts/csdr/init/resources/18.x/browserslistrc +6 -0
  40. package/scripts/csdr/init/resources/18.x/resolutions.json +7 -0
  41. package/scripts/csdr/init/resources/18.x/yarn.lock +13395 -0
  42. package/scripts/csdr/metadata/package-utils.js +1 -1
  43. package/scripts/utils/build/package/build-package-utils.js +1 -1
  44. package/scripts/utils/build/package/styles.js +2 -1
  45. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/src/_generated/app/app.module.ts +52 -0
  46. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/src/_generated/app/core/reducers/index.ts +49 -0
  47. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/src/_generated/config/global.ts +4 -0
  48. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/src/_generated/config/index.ts +8 -0
  49. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/src/_generated/config/modules.ts +4 -0
  50. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/src/_generated/environments/environment.dev.ts +9 -0
  51. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/src/_generated/environments/environment.prod.ts +9 -0
  52. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/src/_generated/environments/environment.ts +21 -0
  53. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/src/_generated/favicon.ico +0 -0
  54. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/src/_generated/main.ts +21 -0
  55. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/src/_generated/polyfills.ts +86 -0
  56. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/tsconfig.app.json +28 -0
  57. package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui18/tsconfig.spec.json +9 -0
  58. package/scripts/utils/pre-build/injection/skeletons.js +3 -0
  59. package/scripts/utils/pre-build/projects.js +2 -0
@@ -41,7 +41,7 @@ const getPackageVersions = (module.exports.getPackageVersions = (pkg) => {
41
41
  version: v,
42
42
  major: v.split('.')[0],
43
43
  snapshot: v.indexOf('snapshot') > -1,
44
- hotfix: v.indexOf('snapshot') === -1 && v.indexOf('-rc.') === -1 && v.indexOf('-') > -1,
44
+ hotfix: v.indexOf('snapshot') === -1 && v.indexOf('-rc.') === -1 && v.indexOf('-next.') === -1 && v.indexOf('-') > -1,
45
45
  rc: v.indexOf('-rc.') > -1,
46
46
  date: json.time[v],
47
47
  };
@@ -217,7 +217,7 @@ module.exports.buildSubEntry = (pkg, subEntry) => {
217
217
  .then(() => {
218
218
  let packageEuiVersion = configUtils.packages.getPackageEuiVersion(pkg);
219
219
 
220
- if (packageEuiVersion === '15.x' || packageEuiVersion === '16.x' || packageEuiVersion === '17.x') {
220
+ if (packageEuiVersion === '15.x' || packageEuiVersion === '16.x' || packageEuiVersion === '17.x' || packageEuiVersion === '18.x') {
221
221
  const { skipTest } = tools.getArgs();
222
222
 
223
223
  if (!skipTest) {
@@ -181,7 +181,8 @@ const compileSassFile = (pkg, folder, filename, isNodeSassTildeImporterActive) =
181
181
  pkg.build.euiVersion === '14.x' ||
182
182
  pkg.build.euiVersion === '15.x' ||
183
183
  pkg.build.euiVersion === '16.x' ||
184
- pkg.build.euiVersion === '17.x'
184
+ pkg.build.euiVersion === '17.x' ||
185
+ pkg.build.euiVersion === '18.x'
185
186
  )) {
186
187
  return compileSassFileDartSass(folder, filename);
187
188
 
@@ -0,0 +1,52 @@
1
+ // ANGULAR & 3rd PARTIES
2
+ import { NgModule } from '@angular/core';
3
+ import { BrowserModule } from '@angular/platform-browser';
4
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
5
+ import { HttpClientModule } from '@angular/common/http';
6
+ import { StoreModule } from '@ngrx/store';
7
+ import { EffectsModule } from '@ngrx/effects';
8
+ import { StoreDevtoolsModule } from '@ngrx/store-devtools';
9
+ import { TranslateModule } from '@ngx-translate/core';
10
+
11
+ // eUI IMPORTS
12
+ import {
13
+ CoreModule, CoreModuleEffects, translateConfig, EUI_CONFIG_TOKEN,
14
+ } from '@eui/core';
15
+ import { EuiAllModule } from '@eui/components';
16
+
17
+ import { appConfig } from '../config/index';
18
+ import { environment } from '../environments/environment';
19
+
20
+ // APP ROUTES & ROOT COMPONENTS
21
+ import { AppRoutingModule } from '../../app/app-routing.module';
22
+ import { AppComponent } from '../../app/app.component';
23
+
24
+ import { TOKEN, reducerProvider, metaReducers, runtimeChecks } from './core/reducers/index';
25
+
26
+ // APP ROOT MODULE
27
+ @NgModule({
28
+ imports: [
29
+ BrowserModule,
30
+ BrowserAnimationsModule,
31
+ HttpClientModule,
32
+ StoreModule.forRoot(TOKEN, { metaReducers, runtimeChecks }),
33
+ StoreDevtoolsModule.instrument({ name: 'CSDR App', maxAge: 150, logOnly: environment.production }),
34
+ EffectsModule.forRoot([...CoreModuleEffects]),
35
+ TranslateModule.forRoot(translateConfig),
36
+ CoreModule.forRoot(),
37
+ AppRoutingModule,
38
+ EuiAllModule,
39
+ ],
40
+ declarations: [
41
+ AppComponent,
42
+ ],
43
+ providers: [
44
+ { provide: EUI_CONFIG_TOKEN, useValue: { appConfig: appConfig, environment: environment } },
45
+ reducerProvider,
46
+ ],
47
+ bootstrap: [
48
+ AppComponent,
49
+ ],
50
+ })
51
+ export class AppModule {
52
+ }
@@ -0,0 +1,49 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { ActionReducer, ActionReducerMap, MetaReducer, RuntimeChecks } from '@ngrx/store';
3
+ import * as fromRouter from '@ngrx/router-store';
4
+ import { storeFreeze } from 'ngrx-store-freeze';
5
+ import { reducers as coreReducers, CoreState, localStorageSync } from '@eui/core';
6
+
7
+ export interface AppState extends CoreState {
8
+ router: fromRouter.RouterReducerState<any>;
9
+ }
10
+
11
+ // -----------------
12
+ // ------------ AOT
13
+ export const TOKEN = new InjectionToken<any>('AppReducers');
14
+
15
+ export function getReducers(): ActionReducerMap<AppState, any> {
16
+ return {
17
+ router: fromRouter.routerReducer,
18
+ ...coreReducers,
19
+ };
20
+ }
21
+
22
+ export const reducerProvider = [
23
+ { provide: TOKEN, useFactory: getReducers },
24
+ ];
25
+
26
+ // console.log all actions
27
+ export function logger(reducer: ActionReducer<AppState>): ActionReducer<AppState> {
28
+ return (state, action) => {
29
+ const result = reducer(state, action);
30
+ console.groupCollapsed(action.type);
31
+ console.log('prev state', state);
32
+ console.log('action', action);
33
+ console.log('next state', result);
34
+ console.groupEnd();
35
+
36
+ return result;
37
+ };
38
+ }
39
+
40
+ export const metaReducers: MetaReducer<AppState>[] = [logger, localStorageSync, storeFreeze];
41
+
42
+ export const runtimeChecks: RuntimeChecks = {
43
+ strictStateSerializability: false,
44
+ strictActionSerializability: false,
45
+ strictStateImmutability: false,
46
+ strictActionImmutability: false,
47
+ strictActionWithinNgZone: false,
48
+ strictActionTypeUniqueness: false,
49
+ };
@@ -0,0 +1,4 @@
1
+ import { GlobalConfig } from '@eui/core';
2
+
3
+ export const GLOBAL: GlobalConfig = {
4
+ };
@@ -0,0 +1,8 @@
1
+ import { EuiAppConfig } from '@eui/core';
2
+ import { GLOBAL } from './global';
3
+ import { MODULES } from './modules';
4
+
5
+ export const appConfig: EuiAppConfig = {
6
+ global: GLOBAL,
7
+ modules: MODULES,
8
+ };
@@ -0,0 +1,4 @@
1
+ import { ModulesConfig } from '@eui/core';
2
+
3
+ export const MODULES: ModulesConfig = {
4
+ };
@@ -0,0 +1,9 @@
1
+ // activated by running :
2
+ // npm run build -- --configuration=dev
3
+ // OR
4
+ // npm run build-dev
5
+
6
+ export const environment = {
7
+ production: false,
8
+ enableDevToolRedux: true,
9
+ };
@@ -0,0 +1,9 @@
1
+ import { EuiEnvConfig } from '@eui/core';
2
+
3
+ export const environment: EuiEnvConfig = {
4
+ production: true,
5
+ enableDevToolRedux: false,
6
+ envDynamicConfig: {
7
+ uri: 'assets/config/env-json-config.json',
8
+ },
9
+ };
@@ -0,0 +1,21 @@
1
+ // used by serve / when no configuration is provided on the build script
2
+ // run npm run build
3
+
4
+ import { EuiEnvConfig } from '@eui/core';
5
+
6
+ export const environment: EuiEnvConfig = {
7
+ production: false,
8
+ enableDevToolRedux: true,
9
+ envDynamicConfig: {
10
+ uri: 'assets/config/env-json-config.json',
11
+ },
12
+ };
13
+
14
+ /*
15
+ * For easier debugging in development mode, you can import the following file
16
+ * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
17
+ *
18
+ * This import should be commented out in production mode because it will have a negative impact
19
+ * on performance if an error is thrown.
20
+ */
21
+ // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
@@ -0,0 +1,21 @@
1
+ import { enableProdMode } from '@angular/core';
2
+ import { preInitApp } from '@eui/core';
3
+ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
4
+
5
+ import { AppModule } from './app/app.module';
6
+ import { environment } from './environments/environment';
7
+ import { ApplicationRef } from '@angular/core';
8
+ import { enableDebugTools } from '@angular/platform-browser';
9
+
10
+ if (environment.production) {
11
+ enableProdMode();
12
+ }
13
+ preInitApp(environment).then(() => {
14
+ platformBrowserDynamic().bootstrapModule(AppModule)
15
+ .then(moduleRef => {
16
+ const applicationRef = moduleRef.injector.get(ApplicationRef);
17
+ const componentRef = applicationRef.components[0];
18
+ enableDebugTools(componentRef);
19
+ })
20
+ .catch(err => console.log(err));
21
+ });
@@ -0,0 +1,86 @@
1
+ /**
2
+ * This file includes polyfills needed by Angular and is loaded before the app.
3
+ * You can add your own extra polyfills to this file.
4
+ *
5
+ * This file is divided into 2 sections:
6
+ * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7
+ * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8
+ * file.
9
+ *
10
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13
+ *
14
+ * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15
+ */
16
+
17
+ /***************************************************************************************************
18
+ * BROWSER POLYFILLS
19
+ */
20
+
21
+ /** IE9, IE10 and IE11 requires all of the following polyfills. **/
22
+ // import 'core-js/es6/symbol';
23
+ // import 'core-js/es6/object';
24
+ // import 'core-js/es6/function';
25
+ // import 'core-js/es6/parse-int';
26
+ // import 'core-js/es6/parse-float';
27
+ // import 'core-js/es6/number';
28
+ // import 'core-js/es6/math';
29
+ // import 'core-js/es6/string';
30
+ // import 'core-js/es6/date';
31
+ // import 'core-js/es6/array';
32
+ // import 'core-js/es6/regexp';
33
+ // import 'core-js/es6/map';
34
+ // import 'core-js/es6/weak-map';
35
+ // import 'core-js/es6/set';
36
+
37
+ /** IE10 and IE11 requires the following for NgClass support on SVG elements */
38
+ // import 'classlist.js'; // Run `npm install --save classlist.js`.
39
+
40
+ /** IE10 and IE11 requires the following for the Reflect API. */
41
+ // import 'core-js/es6/reflect';
42
+
43
+ /** Evergreen browsers require these. **/
44
+ // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
45
+ // import 'core-js/es7/reflect';
46
+
47
+ /**
48
+ * Web Animations `@angular/platform-browser/animations`
49
+ * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
50
+ * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
51
+ **/
52
+ // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
53
+
54
+ /**
55
+ * By default, zone.js will patch all possible macroTask and DomEvents
56
+ * user can disable parts of macroTask/DomEvents patch by setting following flags
57
+ */
58
+
59
+ // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
60
+ // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
61
+ // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
62
+
63
+ /*
64
+ * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
65
+ * with the following flag, it will bypass `zone.js` patch for IE/Edge
66
+ */
67
+ // (window as any).__Zone_enable_cross_context_check = true;
68
+
69
+ /***************************************************************************************************
70
+ * Zone JS is required by default for Angular itself.
71
+ */
72
+ import 'zone.js'; // Included with Angular CLI.
73
+
74
+ /***************************************************************************************************
75
+ * APPLICATION IMPORTS
76
+ */
77
+
78
+ /**
79
+ * Date, currency, decimal and percent pipes.
80
+ * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
81
+ */
82
+ // import 'intl'; // Run `npm install --save intl`.
83
+ /**
84
+ * Need to import at least one locale-data with intl.
85
+ */
86
+ // import 'intl/locale-data/jsonp/en';
@@ -0,0 +1,28 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "types": [],
6
+ "target": "ES2022",
7
+ "module": "ES2022",
8
+ "lib": [
9
+ "ES2022",
10
+ "dom"
11
+ ],
12
+ "useDefineForClassFields": false
13
+ },
14
+ "angularCompilerOptions": {
15
+ "annotateForClosureCompiler": true,
16
+ "strictTemplates": true,
17
+ "strictInjectionParameters": true,
18
+ },
19
+ "exclude": [
20
+ "test.ts",
21
+ "**/*.spec.ts",
22
+ "_todo/**/*.ts",
23
+ "**/_todo/**/*.ts",
24
+ "src/assets/samples/**/*.ts",
25
+ "dist/assets/samples/**/*.ts"
26
+ ],
27
+ "include": ["**/*.ts"]
28
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "types": ["jasmine", "node"]
6
+ },
7
+ "files": ["src/test.ts", "src/polyfills.ts"],
8
+ "include": ["**/*.spec.ts", "**/*.d.ts"]
9
+ }
@@ -65,6 +65,9 @@ module.exports.injectCsdrFullSkeletonSources = (project, euiVersion) => {
65
65
  } else if (euiVersion === '17.x') {
66
66
  tools.copydir(path.join(__dirname, 'app-sources-full-skeleton-eui17'), project.folder, false);
67
67
 
68
+ } else if (euiVersion === '18.x') {
69
+ tools.copydir(path.join(__dirname, 'app-sources-full-skeleton-eui18'), project.folder, false);
70
+
68
71
  } else {
69
72
  tools.copydir(path.join(__dirname, 'app-sources-full-skeleton'), project.folder, false);
70
73
  tools.move(path.join(project.folder, 'src', '_generated', 'tst.ts'), path.join(project.folder, 'src', '_generated', 'test.ts'));
@@ -78,6 +78,8 @@ module.exports.preBuild = (project, envTarget, build, configEnvTarget) => {
78
78
  return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project, '16.x');
79
79
  } else if (project.build && project.build.euiVersion === '17.x') {
80
80
  return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project, '17.x');
81
+ } else if (project.build && project.build.euiVersion === '18.x') {
82
+ return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project, '18.x');
81
83
  } else {
82
84
  return injectionUtils.skeletons.injectCsdrFullSkeletonSources(project);
83
85
  }