@wavemaker-ai/angular-app 1.0.0-rc.309 → 1.0.0-rc.647469

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker-ai/angular-app",
3
- "version": "1.0.0-rc.309",
3
+ "version": "1.0.0-rc.647469",
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": "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",
24
+ "@angular/animations": "18.2.13",
25
+ "@angular/common": "18.2.13",
26
+ "@angular/compiler": "18.2.13",
27
+ "@angular/core": "18.2.13",
28
+ "@angular/forms": "18.2.13",
29
+ "@angular/platform-browser": "18.2.13",
30
+ "@angular/platform-browser-dynamic": "18.2.13",
31
+ "@angular/router": "18.2.13",
32
+ "@angular/service-worker": "18.2.13",
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.309",
39
+ "@wavemaker-ai/custom-widgets-m3": "1.0.0-rc.647469",
40
40
  "@wavemaker/focus-trap": "1.0.1",
41
- "@wavemaker-ai/foundation-css": "1.0.0-rc.309",
41
+ "@wavemaker-ai/foundation-css": "1.0.0-rc.647469",
42
42
  "@wavemaker/nvd3": "1.8.16",
43
- "@wavemaker-ai/variables": "1.0.0-rc.309",
43
+ "@wavemaker-ai/variables": "1.0.0-rc.647469",
44
44
  "@ztree/ztree_v3": "3.5.48",
45
- "acorn": "8.15.0",
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,82 +50,80 @@
50
50
  "jquery": "3.7.1",
51
51
  "jquery-ui": "1.14.1",
52
52
  "jssha": "3.3.1",
53
- "lodash-es": "4.18.1",
53
+ "lodash-es": "4.17.21",
54
54
  "moment": "2.30.1",
55
- "moment-timezone": "0.6.0",
55
+ "moment-timezone": "^0.6.0",
56
56
  "ng-circle-progress": "1.7.1",
57
- "ngx-bootstrap": "20.0.2",
57
+ "ngx-bootstrap": "9.0.0",
58
58
  "ngx-color-picker": "20.1.1",
59
- "ngx-toastr": "19.1.0",
59
+ "ngx-toastr": "19.0.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.309"
65
+ "@wavemaker-ai/app-ng-runtime": "1.0.0-rc.647469"
66
66
  },
67
67
  "devDependencies": {
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",
68
+ "@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
69
+ "@angular-builders/custom-webpack": "18.0.0",
70
+ "@angular-devkit/build-angular": "18.2.20",
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": "20.3.19",
77
- "@angular/compiler-cli": "20.3.19",
78
- "@angular/language-service": "20.3.19",
79
- "@compodoc/compodoc": "1.2.1",
76
+ "@angular/cli": "18.2.12",
77
+ "@angular/compiler-cli": "18.2.13",
78
+ "@angular/language-service": "18.2.13",
79
+ "@compodoc/compodoc": "^1.1.26",
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": "12.3.0",
85
- "@types/jest": "30.0.0",
86
- "@types/jquery": "3.5.32",
84
+ "@rollup/plugin-typescript": "^12.1.4",
85
+ "@types/jest": "^30.0.0",
86
+ "@types/jquery": "^3.5.32",
87
87
  "@types/lodash-es": "4.17.12",
88
- "@types/node": "24.2.0",
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": "12.0.0",
92
+ "compression-webpack-plugin": "11.1.0",
93
93
  "core-js": "3.45.0",
94
- "eslint": "8.45.0",
94
+ "eslint": "^8.45.0",
95
95
  "fs": "0.0.1-security",
96
96
  "fs-extra": "11.3.1",
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",
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": "1.2.0",
103
- "ng-packagr": "20.3.2",
104
- "owasp-dependency-check": "1.0.1",
102
+ "moment-locales-webpack-plugin": "^1.2.0",
103
+ "ng-packagr": "17.3.0",
104
+ "owasp-dependency-check": "0.8.1",
105
105
  "rimraf": "6.0.1",
106
- "rollup": "4.60.1",
106
+ "rollup": "4.46.2",
107
107
  "sonarqube-scanner": "3.5.0",
108
- "terser": "5.43.1",
109
- "typescript": "5.9.3",
108
+ "terser": "^5.43.1",
109
+ "typescript": "5.5.4",
110
110
  "util": "0.12.5",
111
- "yargs": "18.0.0"
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.60.1",
116
- "@rollup/rollup-linux-x64-gnu": "4.60.1",
117
- "@rollup/rollup-win32-x64": "4.60.1"
115
+ "@rollup/rollup-darwin-arm64": "4.46.2",
116
+ "@rollup/rollup-linux-x64-gnu": "4.46.2",
117
+ "@rollup/rollup-win32-x64": "4.9.5"
118
118
  },
119
119
  "engines": {
120
120
  "node": "22.18.0",
121
121
  "npm": "10.9.3"
122
122
  },
123
123
  "overrides": {
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"
124
+ "ng-packagr": {
125
+ "@rollup/wasm-node": "4.40.2"
126
+ }
129
127
  },
130
128
  "engineStrict": true
131
129
  }
@@ -1,70 +1,44 @@
1
- import { Injectable, Inject, Type } from '@angular/core';
1
+ import { ComponentFactoryResolver, Injectable, Inject } 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
- 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>>();
6
+ const componentRefCache = new Map<ComponentType, Map<string, any>>();
12
7
 
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>());
8
+ componentRefCache.set(ComponentType.PAGE, new Map<string, any>());
9
+ componentRefCache.set(ComponentType.PARTIAL, new Map<string, any>());
10
+ componentRefCache.set(ComponentType.PREFAB, new Map<string, any>());
16
11
 
17
12
  @Injectable()
18
13
  export class ComponentRefProviderService extends ComponentRefProvider {
19
14
 
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 });
15
+ static registerComponentRef(name: string, type: ComponentType, ref: any, componentFactory?: any) {
16
+ componentRefCache.get(type).set(name, {ref: ref, componentFactory: componentFactory});
29
17
  }
30
18
 
31
- constructor(@Inject(LazyComponentRefProviderService) private lazyComponentLoader: LazyComponentRefProviderService) {
19
+ constructor(private componentFactoryResolver: ComponentFactoryResolver, @Inject(LazyComponentRefProviderService) private lazyComponentRef) {
32
20
  super();
33
21
  }
34
22
 
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(
23
+ public async getComponentFactoryRef(componentName: string, componentType: ComponentType, options?: {}): Promise<any> {
24
+ const value = componentRefCache.get(componentType).get(componentName);
25
+ if (!value && (componentType === ComponentType.PARTIAL || componentType === ComponentType.PREFAB)) {
26
+ const partialRef = await this.lazyComponentRef.getComponentFactoryRef(
50
27
  componentName,
51
28
  componentType,
52
29
  options
53
30
  );
54
- if (lazyComponent) {
55
- return lazyComponent;
31
+ if (partialRef) {
32
+ return Promise.resolve(partialRef);
56
33
  }
57
34
  }
58
-
59
- // Return null if component not found
60
- if (!cachedEntry) {
61
- console.warn(`Component not found: ${componentName} (type: ${componentType})`);
62
- return null;
35
+ // Guard against undefined value
36
+ if (!value) {
37
+ return Promise.resolve(null);
38
+ }
39
+ if (!value.componentFactory) {
40
+ value.componentFactory = this.componentFactoryResolver.resolveComponentFactory(value.ref);
63
41
  }
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;
42
+ return Promise.resolve(value.componentFactory);
69
43
  }
70
44
  }
@@ -1,57 +1,35 @@
1
- import { Injectable, Type } from '@angular/core';
1
+ import { Injectable, ComponentFactoryResolver } 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
- interface LazyLoadOptions {
7
- prefab?: string;
8
- }
9
-
10
- interface LazyModule {
11
- loadComponent: () => Promise<Type<unknown>>;
12
- }
6
+ type Options = {
7
+ prefab: string
8
+ };
13
9
 
14
10
  @Injectable({
15
11
  providedIn: 'root'
16
12
  })
17
13
  export class LazyComponentRefProviderService extends PartialRefProvider {
18
- constructor() {
14
+ constructor(
15
+ private componentFactoryResolver: ComponentFactoryResolver
16
+ ) {
19
17
  super();
20
18
  }
21
19
 
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) {
20
+ private getLazyModule(componentName: string, componentType: ComponentType, options?: Options) {
21
+ if (componentType === ComponentType.PARTIAL && options && options.prefab) {
29
22
  return prefabPartialLazyModules[`${options.prefab}_${componentName}`];
30
23
  }
31
-
32
- // Standard partial
33
24
  if (componentType === ComponentType.PARTIAL) {
34
25
  return partialLazyModules[componentName];
35
26
  }
36
-
37
- // Prefab
38
27
  if (componentType === ComponentType.PREFAB) {
39
28
  return prefabLazyModules[componentName];
40
29
  }
41
-
42
- return undefined;
43
30
  }
44
31
 
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> {
32
+ public async getComponentFactoryRef(componentName: string, componentType: ComponentType, options?: Options) {
55
33
  try {
56
34
  const lazyModule = this.getLazyModule(componentName, componentType, options);
57
35
 
@@ -60,19 +38,18 @@ export class LazyComponentRefProviderService extends PartialRefProvider {
60
38
  return null;
61
39
  }
62
40
 
63
- // Dynamically load the component class
64
- const componentClass = await lazyModule.loadComponent();
41
+ // Load the component
42
+ const loadedComponent = await lazyModule.loadComponent();
65
43
 
66
- if (!componentClass) {
67
- console.error(`Failed to load component class: ${componentName}`);
44
+ if (!loadedComponent) {
45
+ console.error(`Failed to load component ${componentName}`);
68
46
  return null;
69
47
  }
70
48
 
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);
49
+ // For standalone components, create a component factory
50
+ return this.componentFactoryResolver.resolveComponentFactory(loadedComponent);
51
+ } catch (e) {
52
+ console.error('Error in getComponentFactoryRef:', e);
76
53
  return null;
77
54
  }
78
55
  }
package/src/setup-jest.js CHANGED
@@ -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 "projects/jquery.ui.touch-punch/jquery.ui.touch-punch.min.js";
72
+ import "libraries/scripts/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";
package/tsconfig.json CHANGED
@@ -89,6 +89,6 @@
89
89
  "angularCompilerOptions": {
90
90
  "compilationMode": "full",
91
91
  "strictMetadataEmit": false,
92
- "strictTemplates": false
92
+ "fullTemplateTypeCheck": false
93
93
  }
94
94
  }