@wavemaker-ai/angular-codegen 1.0.0-rc.647469 → 1.0.0-rc.647502
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/angular-app/build-scripts/build.js +19 -2
- package/angular-app/build-scripts/ngx-bootstrap-patch.mjs +287 -0
- package/angular-app/dependency-report.html +1 -1
- package/angular-app/npm-shrinkwrap.json +8517 -7142
- package/angular-app/package-lock.json +8517 -7142
- package/angular-app/package.json +51 -49
- package/angular-app/src/app/wmProperties.js +13 -0
- package/angular-app/src/framework/services/component-ref-provider.service.ts +47 -21
- package/angular-app/src/framework/services/lazy-component-ref-provider.service.ts +41 -18
- package/angular-app/src/setup-jest.js +1 -1
- package/angular-app/src/typings.d.ts +27 -0
- package/angular-app/tsconfig.json +1 -1
- package/dependencies/expression-parser.cjs.js +5785 -2710
- package/dependencies/pipe-provider.cjs.js +69396 -57750
- package/dependencies/transpilation-web.cjs.js +39789 -38908
- package/npm-shrinkwrap.json +144 -157
- package/package-lock.json +144 -157
- package/package.json +2 -2
- package/src/gen-index-html.js +1 -1
package/angular-app/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker-ai/angular-app",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.647502",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"ng": "ng",
|
|
6
6
|
"start": "./node_modules/.bin/ng serve",
|
|
@@ -21,28 +21,28 @@
|
|
|
21
21
|
".npmrc"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@angular/animations": "
|
|
25
|
-
"@angular/common": "
|
|
26
|
-
"@angular/compiler": "
|
|
27
|
-
"@angular/core": "
|
|
28
|
-
"@angular/forms": "
|
|
29
|
-
"@angular/platform-browser": "
|
|
30
|
-
"@angular/platform-browser-dynamic": "
|
|
31
|
-
"@angular/router": "
|
|
32
|
-
"@angular/service-worker": "
|
|
24
|
+
"@angular/animations": "20.3.19",
|
|
25
|
+
"@angular/common": "20.3.19",
|
|
26
|
+
"@angular/compiler": "20.3.19",
|
|
27
|
+
"@angular/core": "20.3.19",
|
|
28
|
+
"@angular/forms": "20.3.19",
|
|
29
|
+
"@angular/platform-browser": "20.3.19",
|
|
30
|
+
"@angular/platform-browser-dynamic": "20.3.19",
|
|
31
|
+
"@angular/router": "20.3.19",
|
|
32
|
+
"@angular/service-worker": "20.3.19",
|
|
33
33
|
"@fullcalendar/core": "6.1.18",
|
|
34
34
|
"@fullcalendar/daygrid": "6.1.18",
|
|
35
35
|
"@fullcalendar/interaction": "6.1.18",
|
|
36
36
|
"@fullcalendar/list": "6.1.18",
|
|
37
37
|
"@fullcalendar/timegrid": "6.1.18",
|
|
38
38
|
"@metrichor/jmespath": "0.3.1",
|
|
39
|
-
"@wavemaker-ai/custom-widgets-m3": "1.0.0-rc.
|
|
39
|
+
"@wavemaker-ai/custom-widgets-m3": "1.0.0-rc.647502",
|
|
40
40
|
"@wavemaker/focus-trap": "1.0.1",
|
|
41
|
-
"@wavemaker-ai/foundation-css": "1.0.0-rc.
|
|
41
|
+
"@wavemaker-ai/foundation-css": "1.0.0-rc.647502",
|
|
42
42
|
"@wavemaker/nvd3": "1.8.16",
|
|
43
|
-
"@wavemaker-ai/variables": "1.0.0-rc.
|
|
43
|
+
"@wavemaker-ai/variables": "1.0.0-rc.647502",
|
|
44
44
|
"@ztree/ztree_v3": "3.5.48",
|
|
45
|
-
"acorn": "
|
|
45
|
+
"acorn": "8.15.0",
|
|
46
46
|
"angular-imask": "7.6.1",
|
|
47
47
|
"angular2-websocket": "0.9.8",
|
|
48
48
|
"d3": "7.8.5",
|
|
@@ -50,80 +50,82 @@
|
|
|
50
50
|
"jquery": "3.7.1",
|
|
51
51
|
"jquery-ui": "1.14.1",
|
|
52
52
|
"jssha": "3.3.1",
|
|
53
|
-
"lodash-es": "4.
|
|
53
|
+
"lodash-es": "4.18.1",
|
|
54
54
|
"moment": "2.30.1",
|
|
55
|
-
"moment-timezone": "
|
|
55
|
+
"moment-timezone": "0.6.0",
|
|
56
56
|
"ng-circle-progress": "1.7.1",
|
|
57
|
-
"ngx-bootstrap": "
|
|
57
|
+
"ngx-bootstrap": "20.0.2",
|
|
58
58
|
"ngx-color-picker": "20.1.1",
|
|
59
|
-
"ngx-toastr": "19.
|
|
59
|
+
"ngx-toastr": "19.1.0",
|
|
60
60
|
"rxjs": "7.8.2",
|
|
61
61
|
"summernote": "0.9.1",
|
|
62
62
|
"tslib": "2.8.1",
|
|
63
63
|
"x2js": "3.4.4",
|
|
64
64
|
"zone.js": "0.15.1",
|
|
65
|
-
"@wavemaker-ai/app-ng-runtime": "1.0.0-rc.
|
|
65
|
+
"@wavemaker-ai/app-ng-runtime": "1.0.0-rc.647502"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@ampproject/rollup-plugin-closure-compiler": "
|
|
69
|
-
"@angular-builders/custom-webpack": "
|
|
70
|
-
"@angular-devkit/build-angular": "
|
|
68
|
+
"@ampproject/rollup-plugin-closure-compiler": "0.27.0",
|
|
69
|
+
"@angular-builders/custom-webpack": "20.0.0",
|
|
70
|
+
"@angular-devkit/build-angular": "20.3.19",
|
|
71
71
|
"@angular-eslint/builder": "20.1.1",
|
|
72
72
|
"@angular-eslint/eslint-plugin": "20.1.1",
|
|
73
73
|
"@angular-eslint/eslint-plugin-template": "20.1.1",
|
|
74
74
|
"@angular-eslint/schematics": "20.1.1",
|
|
75
75
|
"@angular-eslint/template-parser": "20.1.1",
|
|
76
|
-
"@angular/cli": "
|
|
77
|
-
"@angular/compiler-cli": "
|
|
78
|
-
"@angular/language-service": "
|
|
79
|
-
"@compodoc/compodoc": "
|
|
76
|
+
"@angular/cli": "20.3.19",
|
|
77
|
+
"@angular/compiler-cli": "20.3.19",
|
|
78
|
+
"@angular/language-service": "20.3.19",
|
|
79
|
+
"@compodoc/compodoc": "1.2.1",
|
|
80
80
|
"@rollup/plugin-alias": "5.1.1",
|
|
81
81
|
"@rollup/plugin-commonjs": "28.0.6",
|
|
82
82
|
"@rollup/plugin-multi-entry": "6.0.1",
|
|
83
83
|
"@rollup/plugin-node-resolve": "16.0.1",
|
|
84
|
-
"@rollup/plugin-typescript": "
|
|
85
|
-
"@types/jest": "
|
|
86
|
-
"@types/jquery": "
|
|
84
|
+
"@rollup/plugin-typescript": "12.3.0",
|
|
85
|
+
"@types/jest": "30.0.0",
|
|
86
|
+
"@types/jquery": "3.5.32",
|
|
87
87
|
"@types/lodash-es": "4.17.12",
|
|
88
|
-
"@types/node": "
|
|
88
|
+
"@types/node": "24.2.0",
|
|
89
89
|
"@typescript-eslint/eslint-plugin": "8.39.0",
|
|
90
90
|
"@typescript-eslint/parser": "8.39.0",
|
|
91
91
|
"cheerio": "1.1.2",
|
|
92
|
-
"compression-webpack-plugin": "
|
|
92
|
+
"compression-webpack-plugin": "12.0.0",
|
|
93
93
|
"core-js": "3.45.0",
|
|
94
|
-
"eslint": "
|
|
94
|
+
"eslint": "8.45.0",
|
|
95
95
|
"fs": "0.0.1-security",
|
|
96
96
|
"fs-extra": "11.3.1",
|
|
97
|
-
"jest": "
|
|
98
|
-
"jest-canvas-mock": "
|
|
99
|
-
"jest-environment-jsdom": "
|
|
100
|
-
"jest-preset-angular": "
|
|
97
|
+
"jest": "30.0.5",
|
|
98
|
+
"jest-canvas-mock": "2.5.2",
|
|
99
|
+
"jest-environment-jsdom": "30.0.5",
|
|
100
|
+
"jest-preset-angular": "15.0.0",
|
|
101
101
|
"license-checker": "25.0.1",
|
|
102
|
-
"moment-locales-webpack-plugin": "
|
|
103
|
-
"ng-packagr": "
|
|
104
|
-
"owasp-dependency-check": "0.
|
|
102
|
+
"moment-locales-webpack-plugin": "1.2.0",
|
|
103
|
+
"ng-packagr": "20.3.2",
|
|
104
|
+
"owasp-dependency-check": "1.0.1",
|
|
105
105
|
"rimraf": "6.0.1",
|
|
106
|
-
"rollup": "4.
|
|
106
|
+
"rollup": "4.60.1",
|
|
107
107
|
"sonarqube-scanner": "3.5.0",
|
|
108
|
-
"terser": "
|
|
109
|
-
"typescript": "5.
|
|
108
|
+
"terser": "5.43.1",
|
|
109
|
+
"typescript": "5.9.3",
|
|
110
110
|
"util": "0.12.5",
|
|
111
|
-
"yargs": "
|
|
111
|
+
"yargs": "18.0.0"
|
|
112
112
|
},
|
|
113
113
|
"optionalDependencies": {
|
|
114
114
|
"@lmdb/lmdb-linux-x64": "3.4.2",
|
|
115
|
-
"@rollup/rollup-darwin-arm64": "4.
|
|
116
|
-
"@rollup/rollup-linux-x64-gnu": "4.
|
|
117
|
-
"@rollup/rollup-win32-x64": "4.
|
|
115
|
+
"@rollup/rollup-darwin-arm64": "4.60.1",
|
|
116
|
+
"@rollup/rollup-linux-x64-gnu": "4.60.1",
|
|
117
|
+
"@rollup/rollup-win32-x64": "4.60.1"
|
|
118
118
|
},
|
|
119
119
|
"engines": {
|
|
120
120
|
"node": "22.18.0",
|
|
121
121
|
"npm": "10.9.3"
|
|
122
122
|
},
|
|
123
123
|
"overrides": {
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
"ajv": "8.18.0",
|
|
125
|
+
"picomatch": "4.0.4",
|
|
126
|
+
"postcss": "8.5.13",
|
|
127
|
+
"uuid": "14.0.0",
|
|
128
|
+
"vite": "7.3.2"
|
|
127
129
|
},
|
|
128
130
|
"engineStrict": true
|
|
129
131
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Default WMAppProperties - will be overridden by application-specific properties
|
|
2
|
+
export const WMAppProperties = {
|
|
3
|
+
name: 'wavemaker-ng-runtime',
|
|
4
|
+
type: 'APPLICATION',
|
|
5
|
+
platformType: 'WEB',
|
|
6
|
+
supportedLanguages: {
|
|
7
|
+
'en': { moment: 'en' }
|
|
8
|
+
},
|
|
9
|
+
languageBundleSources: 'STATIC',
|
|
10
|
+
preferredLanguage: 'en',
|
|
11
|
+
fontConfig: {}
|
|
12
|
+
};
|
|
13
|
+
|
|
@@ -1,44 +1,70 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Injectable, Inject, Type } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
import { ComponentRefProvider, ComponentType } from '@wm/runtime/base';
|
|
4
4
|
import { LazyComponentRefProviderService } from './lazy-component-ref-provider.service';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
interface ComponentCacheEntry {
|
|
7
|
+
ref: Type<unknown>;
|
|
8
|
+
componentFactory?: any; // Legacy support for non-standalone components
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const componentCache = new Map<ComponentType, Map<string, ComponentCacheEntry>>();
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
componentCache.set(ComponentType.PAGE, new Map<string, ComponentCacheEntry>());
|
|
14
|
+
componentCache.set(ComponentType.PARTIAL, new Map<string, ComponentCacheEntry>());
|
|
15
|
+
componentCache.set(ComponentType.PREFAB, new Map<string, ComponentCacheEntry>());
|
|
11
16
|
|
|
12
17
|
@Injectable()
|
|
13
18
|
export class ComponentRefProviderService extends ComponentRefProvider {
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Register a component class for dynamic instantiation
|
|
22
|
+
* @param name - Component name identifier
|
|
23
|
+
* @param type - Component type (PAGE, PARTIAL, PREFAB)
|
|
24
|
+
* @param ref - Component class reference
|
|
25
|
+
* @param componentFactory - Optional legacy component factory (for backward compatibility)
|
|
26
|
+
*/
|
|
27
|
+
static registerComponentRef(name: string, type: ComponentType, ref: Type<unknown>, componentFactory?: any): void {
|
|
28
|
+
componentCache.get(type).set(name, { ref, componentFactory });
|
|
17
29
|
}
|
|
18
30
|
|
|
19
|
-
constructor(
|
|
31
|
+
constructor(@Inject(LazyComponentRefProviderService) private lazyComponentLoader: LazyComponentRefProviderService) {
|
|
20
32
|
super();
|
|
21
33
|
}
|
|
22
34
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Get component class for dynamic instantiation
|
|
37
|
+
* Returns the component Type which can be used with ViewContainerRef.createComponent()
|
|
38
|
+
*
|
|
39
|
+
* @param componentName - Name of the component to load
|
|
40
|
+
* @param componentType - Type of component (PAGE, PARTIAL, PREFAB)
|
|
41
|
+
* @param options - Additional options (e.g., prefab name for partial resolution)
|
|
42
|
+
* @returns Promise resolving to component Type or null if not found
|
|
43
|
+
*/
|
|
44
|
+
public async getComponentFactoryRef(componentName: string, componentType: ComponentType, options?: Record<string, unknown>): Promise<Type<unknown> | null> {
|
|
45
|
+
const cachedEntry = componentCache.get(componentType)?.get(componentName);
|
|
46
|
+
|
|
47
|
+
// Try lazy loading for PARTIAL and PREFAB types if not in cache
|
|
48
|
+
if (!cachedEntry && (componentType === ComponentType.PARTIAL || componentType === ComponentType.PREFAB)) {
|
|
49
|
+
const lazyComponent = await this.lazyComponentLoader.getComponentFactoryRef(
|
|
27
50
|
componentName,
|
|
28
51
|
componentType,
|
|
29
52
|
options
|
|
30
53
|
);
|
|
31
|
-
if (
|
|
32
|
-
return
|
|
54
|
+
if (lazyComponent) {
|
|
55
|
+
return lazyComponent;
|
|
33
56
|
}
|
|
34
57
|
}
|
|
35
|
-
|
|
36
|
-
if
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
value.componentFactory = this.componentFactoryResolver.resolveComponentFactory(value.ref);
|
|
58
|
+
|
|
59
|
+
// Return null if component not found
|
|
60
|
+
if (!cachedEntry) {
|
|
61
|
+
console.warn(`Component not found: ${componentName} (type: ${componentType})`);
|
|
62
|
+
return null;
|
|
41
63
|
}
|
|
42
|
-
|
|
64
|
+
|
|
65
|
+
// Return component class (modern Angular 13+ approach for standalone components)
|
|
66
|
+
// For legacy components, the componentFactory would be used, but we return the ref
|
|
67
|
+
// as createComponent() handles both standalone and non-standalone components
|
|
68
|
+
return cachedEntry.ref;
|
|
43
69
|
}
|
|
44
70
|
}
|
|
@@ -1,35 +1,57 @@
|
|
|
1
|
-
import { Injectable,
|
|
1
|
+
import { Injectable, Type } from '@angular/core';
|
|
2
2
|
import { PartialRefProvider } from '@wm/core';
|
|
3
3
|
import { ComponentType } from '@wm/runtime/base';
|
|
4
4
|
import { partialLazyModules, prefabLazyModules, prefabPartialLazyModules } from '../util/lazy-module-routes';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
prefab
|
|
8
|
-
}
|
|
6
|
+
interface LazyLoadOptions {
|
|
7
|
+
prefab?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface LazyModule {
|
|
11
|
+
loadComponent: () => Promise<Type<unknown>>;
|
|
12
|
+
}
|
|
9
13
|
|
|
10
14
|
@Injectable({
|
|
11
15
|
providedIn: 'root'
|
|
12
16
|
})
|
|
13
17
|
export class LazyComponentRefProviderService extends PartialRefProvider {
|
|
14
|
-
constructor(
|
|
15
|
-
private componentFactoryResolver: ComponentFactoryResolver
|
|
16
|
-
) {
|
|
18
|
+
constructor() {
|
|
17
19
|
super();
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the appropriate lazy module based on component type and options
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
private getLazyModule(componentName: string, componentType: ComponentType, options?: LazyLoadOptions): LazyModule | undefined {
|
|
27
|
+
// Prefab-scoped partial (e.g., partial inside a prefab)
|
|
28
|
+
if (componentType === ComponentType.PARTIAL && options?.prefab) {
|
|
22
29
|
return prefabPartialLazyModules[`${options.prefab}_${componentName}`];
|
|
23
30
|
}
|
|
31
|
+
|
|
32
|
+
// Standard partial
|
|
24
33
|
if (componentType === ComponentType.PARTIAL) {
|
|
25
34
|
return partialLazyModules[componentName];
|
|
26
35
|
}
|
|
36
|
+
|
|
37
|
+
// Prefab
|
|
27
38
|
if (componentType === ComponentType.PREFAB) {
|
|
28
39
|
return prefabLazyModules[componentName];
|
|
29
40
|
}
|
|
41
|
+
|
|
42
|
+
return undefined;
|
|
30
43
|
}
|
|
31
44
|
|
|
32
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Lazy load and return a component class
|
|
47
|
+
* Returns the component Type which can be used with ViewContainerRef.createComponent()
|
|
48
|
+
*
|
|
49
|
+
* @param componentName - Name of the component to lazy load
|
|
50
|
+
* @param componentType - Type of component (PARTIAL, PREFAB)
|
|
51
|
+
* @param options - Additional options (e.g., prefab name for partial resolution)
|
|
52
|
+
* @returns Promise resolving to component Type or null if loading fails
|
|
53
|
+
*/
|
|
54
|
+
public async getComponentFactoryRef(componentName: string, componentType: ComponentType, options?: LazyLoadOptions): Promise<Type<unknown> | null> {
|
|
33
55
|
try {
|
|
34
56
|
const lazyModule = this.getLazyModule(componentName, componentType, options);
|
|
35
57
|
|
|
@@ -38,18 +60,19 @@ export class LazyComponentRefProviderService extends PartialRefProvider {
|
|
|
38
60
|
return null;
|
|
39
61
|
}
|
|
40
62
|
|
|
41
|
-
//
|
|
42
|
-
const
|
|
63
|
+
// Dynamically load the component class
|
|
64
|
+
const componentClass = await lazyModule.loadComponent();
|
|
43
65
|
|
|
44
|
-
if (!
|
|
45
|
-
console.error(`Failed to load component ${componentName}`);
|
|
66
|
+
if (!componentClass) {
|
|
67
|
+
console.error(`Failed to load component class: ${componentName}`);
|
|
46
68
|
return null;
|
|
47
69
|
}
|
|
48
70
|
|
|
49
|
-
//
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
71
|
+
// Return the component class directly (Angular 13+ standalone component approach)
|
|
72
|
+
// This can be used directly with ViewContainerRef.createComponent()
|
|
73
|
+
return componentClass;
|
|
74
|
+
} catch (error) {
|
|
75
|
+
console.error(`Error lazy loading component ${componentName}:`, error);
|
|
53
76
|
return null;
|
|
54
77
|
}
|
|
55
78
|
}
|
|
@@ -69,7 +69,7 @@ import "jquery-ui/ui/widgets/resizable.js";
|
|
|
69
69
|
import "jquery-ui/ui/widgets/sortable.js";
|
|
70
70
|
import "jquery-ui/ui/widgets/draggable.js";
|
|
71
71
|
import "jquery-ui/ui/widgets/droppable.js";
|
|
72
|
-
import "
|
|
72
|
+
import "projects/jquery.ui.touch-punch/jquery.ui.touch-punch.min.js";
|
|
73
73
|
import "moment-timezone/builds/moment-timezone.min.js";
|
|
74
74
|
import "iscroll/build/iscroll.js";
|
|
75
75
|
import "tabbable/dist/index.umd.min.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Global type declarations for jQuery extensions
|
|
2
|
+
// Using declaration merging to extend existing jQuery types
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
interface JQueryStatic {
|
|
6
|
+
ui?: {
|
|
7
|
+
widget?: any;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface JQuery {
|
|
13
|
+
DataTable?(options?: any): any;
|
|
14
|
+
destroy?(): void;
|
|
15
|
+
datatable?(method: string, ...args: any[]): any;
|
|
16
|
+
datatable?(options?: any): any;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Extend jQuery.fn namespace for DataTable plugin
|
|
20
|
+
namespace JQueryStatic {
|
|
21
|
+
interface fn {
|
|
22
|
+
DataTable?: any;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export {};
|