@wavemaker/angular-codegen 11.13.0-rc.222 → 11.14.0-rc.226

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 (36) hide show
  1. package/angular-app/dependency-report.html +1 -1
  2. package/angular-app/npm-shrinkwrap.json +8024 -9697
  3. package/angular-app/package-lock.json +8024 -9697
  4. package/angular-app/package.json +58 -73
  5. package/angular-app/src/framework/services/lazy-component-ref-provider.service.ts +22 -30
  6. package/angular-app/src/setup-jest.js +6 -9
  7. package/angular-app/tsconfig.json +6 -6
  8. package/angular-app/tsconfig.web-app.json +2 -2
  9. package/build-angular-app.js +3 -1
  10. package/dependencies/custom-widgets-bundle.cjs.js +2 -2
  11. package/dependencies/expression-parser.cjs.js +496 -17417
  12. package/dependencies/pipe-provider.cjs.js +56844 -80373
  13. package/dependencies/transpilation-web.cjs.js +4031 -15228
  14. package/npm-shrinkwrap.json +189 -360
  15. package/package-lock.json +189 -360
  16. package/package.json +4 -4
  17. package/src/codegen-args-cli.js +1 -1
  18. package/src/codegen-cli.js +1 -1
  19. package/src/codegen.js +1 -1
  20. package/src/gen-app-codegen-module.js +1 -1
  21. package/src/gen-app-override-css.js +1 -1
  22. package/src/gen-app-skeleton.js +1 -1
  23. package/src/gen-components.js +1 -1
  24. package/src/gen-lazy-module-routes.js +1 -1
  25. package/src/handlebar-helpers.js +1 -1
  26. package/src/pages-util.js +1 -1
  27. package/src/project-meta.js +1 -1
  28. package/src/update-angular-json.js +1 -1
  29. package/src/wm-utils.js +1 -1
  30. package/templates/app-routes.ts.hbs +0 -3
  31. package/templates/app.config.ts.hbs +88 -15
  32. package/templates/customwidget/customwidget.component.ts.hbs +1 -2
  33. package/templates/layout/layout.component.ts.hbs +6 -5
  34. package/templates/page/page.component.ts.hbs +0 -2
  35. package/templates/partial/partial.component.ts.hbs +19 -4
  36. package/templates/prefab/prefab.component.ts.hbs +22 -5
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-app",
3
- "version": "11.13.0-rc.222",
3
+ "version": "11.14.0-rc.226",
4
4
  "scripts": {
5
5
  "ng": "ng",
6
6
  "start": "./node_modules/.bin/ng serve",
@@ -30,109 +30,94 @@
30
30
  "@angular/platform-browser-dynamic": "18.2.13",
31
31
  "@angular/router": "18.2.13",
32
32
  "@angular/service-worker": "18.2.13",
33
- "@babel/runtime": "7.14.8",
34
- "@fullcalendar/core": "6.1.15",
35
- "@fullcalendar/daygrid": "6.1.15",
36
- "@fullcalendar/interaction": "6.1.15",
37
- "@fullcalendar/list": "6.1.15",
38
- "@fullcalendar/timegrid": "6.1.15",
33
+ "@fullcalendar/core": "6.1.18",
34
+ "@fullcalendar/daygrid": "6.1.18",
35
+ "@fullcalendar/interaction": "6.1.18",
36
+ "@fullcalendar/list": "6.1.18",
37
+ "@fullcalendar/timegrid": "6.1.18",
39
38
  "@metrichor/jmespath": "0.3.1",
40
- "@wavemaker/custom-widgets-m3": "11.13.0-rc.222",
39
+ "@wavemaker/custom-widgets-m3": "11.14.0-rc.226",
41
40
  "@wavemaker/focus-trap": "1.0.1",
42
- "@wavemaker/foundation-css": "11.13.0-rc.222",
41
+ "@wavemaker/foundation-css": "11.14.0-rc.226",
43
42
  "@wavemaker/nvd3": "1.8.13",
44
- "@wavemaker/variables": "11.13.0-rc.222",
43
+ "@wavemaker/variables": "11.14.0-rc.226",
45
44
  "@ztree/ztree_v3": "3.5.48",
46
- "angular-imask": "^7.6.1",
47
- "angular2-websocket": "0.9.7",
48
- "core-js": "3.35.1",
45
+ "angular-imask": "7.6.1",
46
+ "angular2-websocket": "0.9.8",
49
47
  "d3": "7.8.5",
50
- "esbuild-wasm": "^0.24.2",
51
48
  "iscroll": "5.2.0",
52
49
  "jquery": "3.7.1",
53
- "jquery-ui": "1.13.3",
54
- "js-cookie": "2.2.0",
55
- "jssha": "3.1.2",
56
- "lodash": "4.17.21",
50
+ "jquery-ui": "1.14.1",
51
+ "jssha": "3.3.1",
57
52
  "lodash-es": "4.17.21",
53
+ "moment": "2.30.1",
54
+ "moment-timezone": "^0.6.0",
58
55
  "ng-circle-progress": "1.7.1",
59
56
  "ngx-bootstrap": "9.0.0",
60
- "ngx-color-picker": "16.0.0",
61
- "ngx-toastr": "17.0.2",
62
- "rxjs": "6.6.0",
63
- "rxjs-compat": "6.4.0",
57
+ "ngx-color-picker": "20.1.1",
58
+ "ngx-toastr": "19.0.0",
59
+ "rxjs": "7.8.2",
64
60
  "summernote": "0.9.1",
65
- "ts-jest": "29.1.1",
66
- "tslib": "2.4.1",
61
+ "tslib": "2.8.1",
67
62
  "x2js": "3.4.4",
68
- "zone.js": "0.14.10",
69
- "@wavemaker/app-ng-runtime": "11.13.0-rc.222"
63
+ "zone.js": "0.15.1",
64
+ "@wavemaker/app-ng-runtime": "11.14.0-rc.226"
70
65
  },
71
66
  "devDependencies": {
72
67
  "@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
73
68
  "@angular-builders/custom-webpack": "18.0.0",
74
- "@angular-devkit/build-angular": "18.2.12",
75
- "@angular-eslint/builder": "16.2.0",
76
- "@angular-eslint/eslint-plugin": "16.2.0",
77
- "@angular-eslint/eslint-plugin-template": "16.2.0",
78
- "@angular-eslint/schematics": "16.2.0",
79
- "@angular-eslint/template-parser": "16.2.0",
69
+ "@angular-devkit/build-angular": "18.2.20",
70
+ "@angular-eslint/builder": "20.1.1",
71
+ "@angular-eslint/eslint-plugin": "20.1.1",
72
+ "@angular-eslint/eslint-plugin-template": "20.1.1",
73
+ "@angular-eslint/schematics": "20.1.1",
74
+ "@angular-eslint/template-parser": "20.1.1",
80
75
  "@angular/cli": "18.2.12",
81
76
  "@angular/compiler-cli": "18.2.13",
82
77
  "@angular/language-service": "18.2.13",
83
- "@babel/plugin-transform-runtime": "^7.14.5",
84
- "@compodoc/compodoc": "^1.1.25",
85
- "@rollup/plugin-alias": "4.0.2",
86
- "@rollup/plugin-commonjs": "24.0.0",
87
- "@rollup/plugin-multi-entry": "6.0.0",
88
- "@rollup/plugin-node-resolve": "15.0.1",
89
- "@rollup/plugin-typescript": "^8.3.3",
90
- "@types/jest": "^29.5.12",
91
- "@types/jquery": "3.3.22",
78
+ "@compodoc/compodoc": "^1.1.26",
79
+ "@rollup/plugin-alias": "5.1.1",
80
+ "@rollup/plugin-commonjs": "28.0.6",
81
+ "@rollup/plugin-multi-entry": "6.0.1",
82
+ "@rollup/plugin-node-resolve": "16.0.1",
83
+ "@rollup/plugin-typescript": "^12.1.4",
84
+ "@types/jest": "^30.0.0",
85
+ "@types/jquery": "^3.5.32",
92
86
  "@types/lodash-es": "4.17.12",
93
- "@types/node": "12.11.1",
94
- "@types/sizzle": "^2.3.3",
95
- "@typescript-eslint/eslint-plugin": "6.15.0",
96
- "@typescript-eslint/parser": "6.15.0",
97
- "acorn": "8.14.0",
98
- "babel-loader": "^9.1.2",
99
- "cheerio": "1.0.0-rc.12",
100
- "codelyzer": "5.1.2",
101
- "compression-webpack-plugin": "10.0.0",
102
- "dependency-cruiser": "16.8.0",
87
+ "@types/node": "^24.2.0",
88
+ "@typescript-eslint/eslint-plugin": "8.39.0",
89
+ "@typescript-eslint/parser": "8.39.0",
90
+ "cheerio": "1.1.2",
91
+ "compression-webpack-plugin": "11.1.0",
92
+ "core-js": "3.45.0",
103
93
  "eslint": "^8.45.0",
104
94
  "fs": "0.0.1-security",
105
- "fs-extra": "7.0.1",
106
- "jest": "^29.7.0",
95
+ "fs-extra": "11.3.1",
96
+ "jest": "^30.0.5",
107
97
  "jest-canvas-mock": "^2.5.2",
108
- "jest-preset-angular": "^14.1.0",
98
+ "jest-environment-jsdom": "^30.0.5",
99
+ "jest-preset-angular": "^15.0.0",
109
100
  "license-checker": "25.0.1",
110
- "moment": "2.29.4",
111
101
  "moment-locales-webpack-plugin": "^1.2.0",
112
- "moment-timezone": "^0.5.34",
113
102
  "ng-packagr": "17.3.0",
114
- "npm-run-all": "4.1.5",
115
- "owasp-dependency-check": "0.7.0",
116
- "rimraf": "2.6.3",
117
- "rollup": "4.28.1",
118
- "rollup-plugin-includepaths": "0.2.3",
103
+ "owasp-dependency-check": "0.8.1",
104
+ "rimraf": "6.0.1",
105
+ "rollup": "4.46.2",
119
106
  "sonarqube-scanner": "3.5.0",
120
- "terser": "^5.15.1",
121
- "ts-node": "7.0.1",
122
- "tslint": "~6.1.0",
123
- "typescript": "5.4.5",
124
- "util": "0.11.1",
125
- "yargs": "^17.3.1"
107
+ "terser": "^5.43.1",
108
+ "typescript": "5.5.4",
109
+ "util": "0.12.5",
110
+ "yargs": "^18.0.0"
126
111
  },
127
112
  "optionalDependencies": {
128
- "@rollup/rollup-darwin-arm64": "4.9.5",
129
- "@rollup/rollup-linux-x64-gnu": "4.9.5",
130
- "@rollup/rollup-win32-x64": "4.9.5",
131
- "@lmdb/lmdb-linux-x64": "3.0.13"
113
+ "@lmdb/lmdb-linux-x64": "3.4.2",
114
+ "@rollup/rollup-darwin-arm64": "4.46.2",
115
+ "@rollup/rollup-linux-x64-gnu": "4.46.2",
116
+ "@rollup/rollup-win32-x64": "4.9.5"
132
117
  },
133
118
  "engines": {
134
- "node": "~22.11.0",
135
- "npm": "~10.9.0"
119
+ "node": "22.18.0",
120
+ "npm": "10.9.3"
136
121
  },
137
122
  "engineStrict": true
138
123
  }
@@ -1,16 +1,8 @@
1
- import {
2
- Injectable,
3
- NgModuleRef,
4
- Type,
5
- Injector,
6
- Compiler,
7
- NgModuleFactory,
8
- } from '@angular/core';
1
+ import { Injectable, ComponentFactoryResolver } from '@angular/core';
9
2
  import { PartialRefProvider } from '@wm/core';
10
3
  import { ComponentType } from '@wm/runtime/base';
11
4
  import { partialLazyModules, prefabLazyModules, prefabPartialLazyModules } from '../util/lazy-module-routes';
12
5
 
13
- type ModuleWithRoot = Type<any> & { rootComponent: Type<any> };
14
6
  type Options = {
15
7
  prefab: string
16
8
  };
@@ -19,15 +11,15 @@ type Options = {
19
11
  providedIn: 'root'
20
12
  })
21
13
  export class LazyComponentRefProviderService extends PartialRefProvider {
22
- private moduleRef: NgModuleRef<any>;
23
-
24
- constructor(private injector: Injector, private compiler: Compiler) {
14
+ constructor(
15
+ private componentFactoryResolver: ComponentFactoryResolver
16
+ ) {
25
17
  super();
26
18
  }
27
19
 
28
20
  private getLazyModule(componentName: string, componentType: ComponentType, options?: Options) {
29
21
  if (componentType === ComponentType.PARTIAL && options && options.prefab) {
30
- return prefabPartialLazyModules[`${options.prefab}_${componentName}`];
22
+ return prefabPartialLazyModules[`${options.prefab}_${componentName}`];
31
23
  }
32
24
  if (componentType === ComponentType.PARTIAL) {
33
25
  return partialLazyModules[componentName];
@@ -37,27 +29,27 @@ export class LazyComponentRefProviderService extends PartialRefProvider {
37
29
  }
38
30
  }
39
31
 
40
- private async getModuleFactory(moduleOrFactory: NgModuleFactory<any> | Type<any>): Promise<NgModuleFactory<any>> {
41
- if (moduleOrFactory instanceof NgModuleFactory) {
42
- return moduleOrFactory;
43
- } else {
44
- return this.compiler.compileModuleAsync(moduleOrFactory);
45
- }
46
- }
47
-
48
32
  public async getComponentFactoryRef(componentName: string, componentType: ComponentType, options?: Options) {
49
33
  try {
50
- const moduleOrFactory = await this.getLazyModule(componentName, componentType, options).loadChildren();
51
- const moduleFactory = await this.getModuleFactory(moduleOrFactory);
34
+ const lazyModule = this.getLazyModule(componentName, componentType, options);
35
+
36
+ if (!lazyModule) {
37
+ console.error(`No lazy module found for ${componentName}`);
38
+ return null;
39
+ }
40
+
41
+ // Load the component
42
+ const loadedComponent = await lazyModule.loadComponent();
43
+
44
+ if (!loadedComponent) {
45
+ console.error(`Failed to load component ${componentName}`);
46
+ return null;
47
+ }
52
48
 
53
- this.moduleRef = moduleFactory.create(this.injector);
54
- const rootComponent = (moduleFactory.moduleType as ModuleWithRoot)
55
- .rootComponent;
56
- return this.moduleRef.componentFactoryResolver.resolveComponentFactory(
57
- rootComponent
58
- );
49
+ // For standalone components, create a component factory
50
+ return this.componentFactoryResolver.resolveComponentFactory(loadedComponent);
59
51
  } catch (e) {
60
- console.error(e);
52
+ console.error('Error in getComponentFactoryRef:', e);
61
53
  return null;
62
54
  }
63
55
  }
@@ -1,3 +1,4 @@
1
+
1
2
  // This file is automatically loaded when running `jest` commands
2
3
  import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
3
4
  import { ToastrModule } from 'ngx-toastr';
@@ -70,7 +71,6 @@ import "jquery-ui/ui/widgets/draggable.js";
70
71
  import "jquery-ui/ui/widgets/droppable.js";
71
72
  import "libraries/scripts/jquery.ui.touch-punch/jquery.ui.touch-punch.min.js";
72
73
  import "moment-timezone/builds/moment-timezone.min.js";
73
- import "hammerjs/hammer.min.js";
74
74
  import "iscroll/build/iscroll.js";
75
75
  import "tabbable/dist/index.umd.min.js";
76
76
  import "@wavemaker/focus-trap/dist/focus-trap.umd.min.js";
@@ -84,16 +84,11 @@ beforeEach(() => {
84
84
  ToastrModule.forRoot(),
85
85
  ],
86
86
  })
87
- Object.defineProperties(window, {
88
- location: {
89
- writable: true,
90
- value: {
91
- reload: jest.fn(),
92
- },
93
- },
94
- });
95
87
  });
96
88
 
89
+ // Mock window.location for tests
90
+ // We'll use a simpler approach that doesn't try to redefine read-only properties
91
+ // The tests will handle their own window.location mocking as needed
97
92
  // jest.setup.js
98
93
  Object.defineProperty(global.HTMLMediaElement.prototype, 'load', {
99
94
  configurable: true,
@@ -122,3 +117,5 @@ Object.defineProperty(global.HTMLMediaElement.prototype, 'addTextTrack', {
122
117
  writable: true,
123
118
  value: jest.fn(),
124
119
  });
120
+
121
+
@@ -7,7 +7,7 @@
7
7
  "sourceMap": true,
8
8
  "declaration": false,
9
9
  "target": "es2022",
10
- "module": "es2020",
10
+ "module": "es2022",
11
11
  "moduleResolution": "node",
12
12
  "esModuleInterop": true,
13
13
  "emitDecoratorMetadata": true,
@@ -16,7 +16,7 @@
16
16
  "node_modules/@types"
17
17
  ],
18
18
  "lib": [
19
- "es2018",
19
+ "es2022",
20
20
  "dom"
21
21
  ],
22
22
  "paths": {
@@ -44,11 +44,11 @@
44
44
  "@wm/components/base": [
45
45
  "node_modules/@wavemaker/app-ng-runtime/components/base"
46
46
  ],
47
- "@wm/components/basic": [
48
- "node_modules/@wavemaker/app-ng-runtime/components/basic/default"
47
+ "@wm/components/basic/*": [
48
+ "node_modules/@wavemaker/app-ng-runtime/components/basic/*"
49
49
  ],
50
- "@wm/components/input": [
51
- "node_modules/@wavemaker/app-ng-runtime/components/input/default"
50
+ "@wm/components/input/*": [
51
+ "node_modules/@wavemaker/app-ng-runtime/components/input/*"
52
52
  ],
53
53
  "@wm/components/page": [
54
54
  "node_modules/@wavemaker/app-ng-runtime/components/page/default"
@@ -34,8 +34,8 @@
34
34
  "@wm/core": [
35
35
  "node_modules/@wavemaker/app-ng-runtime/core"
36
36
  ],
37
- "@wm/components/basic": [
38
- "node_modules/@wavemaker/app-ng-runtime/components/basic/default"
37
+ "@wm/components/basic/*": [
38
+ "node_modules/@wavemaker/app-ng-runtime/components/basic/*"
39
39
  ],
40
40
  "@wm/components/input": [
41
41
  "node_modules/@wavemaker/app-ng-runtime/components/input/default"
@@ -363,6 +363,8 @@ const generateAngularApp = async (sourceDir, ngBuildParams, codegenPath, appTarg
363
363
  deployUrl = buildArgs["deploy-url"];
364
364
  }
365
365
  }
366
+ const { generateOverrideCSS } = require(codegenPath + 'src/gen-app-override-css.js');
367
+ await generateOverrideCSS(global.buildConfigObj, sourceDir, baseDir);
366
368
  const { generateCodegenAngularApp } = require(CODEGEN_PATH);
367
369
  console.log(MSG_CODEGEN_LOG + 'Generating the angular App...');
368
370
  let apiUrl = global.buildConfigObj.apiUrl && global.buildConfigObj.apiUrl.trim() !== "" ? global.buildConfigObj.apiUrl.trim() : "./";
@@ -468,7 +470,7 @@ const initBuild = async (buildConfigObj) => {
468
470
  if (buildConfigObj.generate_page) {
469
471
  // To generate the angular app specific page
470
472
  await generateAngularAppPage(sourceDir, appTarget, buildConfigObj.generate_page, CODEGEN_INSTALLATION);
471
- } else if (buildConfigObj.generateAngularApp) {
473
+ } else if (buildConfigObj.generateApp) {
472
474
  // TO generate the angular app
473
475
  console.log('Angular app generation mode');
474
476
  await generateAngularApp(sourceDir, getNgBuildParams(), CODEGEN_INSTALLATION, appTarget, baseDir);