@wavemaker/angular-codegen 11.13.0-rc.6255 → 11.14.0-rc.232
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/dependency-report.html +1 -1
- package/angular-app/npm-shrinkwrap.json +8027 -9700
- package/angular-app/package-lock.json +8027 -9700
- package/angular-app/package.json +58 -73
- package/angular-app/src/framework/services/lazy-component-ref-provider.service.ts +22 -30
- package/angular-app/src/setup-jest.js +6 -9
- package/angular-app/tsconfig.json +6 -6
- package/angular-app/tsconfig.web-app.json +2 -2
- package/angular-app/wm-custom-webpack.config.js +2 -63
- package/build-angular-app.js +3 -1
- package/dependencies/custom-widgets-bundle.cjs.js +2 -2
- package/dependencies/expression-parser.cjs.js +496 -17417
- package/dependencies/pipe-provider.cjs.js +56844 -80373
- package/dependencies/transpilation-web.cjs.js +4031 -15228
- package/npm-shrinkwrap.json +191 -362
- package/package-lock.json +191 -362
- package/package.json +4 -4
- package/src/codegen-args-cli.js +1 -1
- package/src/codegen-cli.js +1 -1
- package/src/codegen.js +1 -1
- package/src/gen-app-codegen-module.js +1 -1
- package/src/gen-app-override-css.js +1 -1
- package/src/gen-app-skeleton.js +1 -1
- package/src/gen-components.js +1 -1
- package/src/gen-lazy-module-routes.js +1 -1
- package/src/handlebar-helpers.js +1 -1
- package/src/pages-util.js +1 -1
- package/src/project-meta.js +1 -1
- package/src/update-angular-json.js +1 -1
- package/src/wm-utils.js +1 -1
- package/templates/app-routes.ts.hbs +0 -3
- package/templates/app.config.ts.hbs +88 -15
- package/templates/customwidget/customwidget.component.ts.hbs +1 -2
- package/templates/layout/layout.component.ts.hbs +6 -5
- package/templates/page/page.component.ts.hbs +0 -2
- package/templates/partial/partial.component.ts.hbs +19 -4
- package/templates/prefab/prefab.component.ts.hbs +22 -5
package/angular-app/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-app",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.14.0-rc.232",
|
|
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
|
-
"@
|
|
34
|
-
"@fullcalendar/
|
|
35
|
-
"@fullcalendar/
|
|
36
|
-
"@fullcalendar/
|
|
37
|
-
"@fullcalendar/
|
|
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.
|
|
39
|
+
"@wavemaker/custom-widgets-m3": "11.14.0-rc.232",
|
|
41
40
|
"@wavemaker/focus-trap": "1.0.1",
|
|
42
|
-
"@wavemaker/foundation-css": "11.
|
|
41
|
+
"@wavemaker/foundation-css": "11.14.0-rc.232",
|
|
43
42
|
"@wavemaker/nvd3": "1.8.13",
|
|
44
|
-
"@wavemaker/variables": "11.
|
|
43
|
+
"@wavemaker/variables": "11.14.0-rc.232",
|
|
45
44
|
"@ztree/ztree_v3": "3.5.48",
|
|
46
|
-
"angular-imask": "
|
|
47
|
-
"angular2-websocket": "0.9.
|
|
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.
|
|
54
|
-
"
|
|
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": "
|
|
61
|
-
"ngx-toastr": "
|
|
62
|
-
"rxjs": "
|
|
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
|
-
"
|
|
66
|
-
"tslib": "2.4.1",
|
|
61
|
+
"tslib": "2.8.1",
|
|
67
62
|
"x2js": "3.4.4",
|
|
68
|
-
"zone.js": "0.
|
|
69
|
-
"@wavemaker/app-ng-runtime": "11.
|
|
63
|
+
"zone.js": "0.15.1",
|
|
64
|
+
"@wavemaker/app-ng-runtime": "11.14.0-rc.232"
|
|
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.
|
|
75
|
-
"@angular-eslint/builder": "
|
|
76
|
-
"@angular-eslint/eslint-plugin": "
|
|
77
|
-
"@angular-eslint/eslint-plugin-template": "
|
|
78
|
-
"@angular-eslint/schematics": "
|
|
79
|
-
"@angular-eslint/template-parser": "
|
|
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
|
-
"@
|
|
84
|
-
"@
|
|
85
|
-
"@rollup/plugin-
|
|
86
|
-
"@rollup/plugin-
|
|
87
|
-
"@rollup/plugin-
|
|
88
|
-
"@rollup/plugin-
|
|
89
|
-
"@
|
|
90
|
-
"@types/
|
|
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": "
|
|
94
|
-
"@
|
|
95
|
-
"@typescript-eslint/
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
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": "
|
|
106
|
-
"jest": "^
|
|
95
|
+
"fs-extra": "11.3.1",
|
|
96
|
+
"jest": "^30.0.5",
|
|
107
97
|
"jest-canvas-mock": "^2.5.2",
|
|
108
|
-
"jest-
|
|
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
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
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.
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
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
|
-
"@
|
|
129
|
-
"@rollup/rollup-
|
|
130
|
-
"@rollup/rollup-
|
|
131
|
-
"@
|
|
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": "
|
|
135
|
-
"npm": "
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
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
|
|
51
|
-
|
|
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
|
-
|
|
54
|
-
|
|
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": "
|
|
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
|
-
"
|
|
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
|
|
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
|
|
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
|
|
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"
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const CompressionPlugin = require(`compression-webpack-plugin`);
|
|
2
2
|
const path = require(`path`);
|
|
3
|
-
const {ConcatSource} = require("webpack-sources");
|
|
4
|
-
|
|
5
3
|
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
|
|
6
4
|
|
|
7
5
|
const wmPropertiesPath = path.join(__dirname, '/src/app/wmProperties.js');
|
|
@@ -12,65 +10,7 @@ const localesToKeep = Object.values(WMAppProperties.supportedLanguages)
|
|
|
12
10
|
.map(lang => lang.moment)
|
|
13
11
|
.filter(locale => locale !== null);
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class ModifyCssAssetUrlsPlugin {
|
|
18
|
-
apply(compiler) {
|
|
19
|
-
compiler.hooks.compilation.tap('ModifyCssAssetUrlsPlugin', compilation => {
|
|
20
|
-
compilation.hooks.optimizeAssets.tapAsync('ModifyCssAssetUrlsPlugin', (assets, callback) => {
|
|
21
|
-
let publicPath = compilation.options.output.publicPath;
|
|
22
|
-
let isResourceWithDeployUrl = false;
|
|
23
|
-
for (const assetName in assets) {
|
|
24
|
-
if (!assets.hasOwnProperty(assetName)) continue;
|
|
25
|
-
|
|
26
|
-
const asset = assets[assetName];
|
|
27
|
-
if (asset.sourceAndMap) {
|
|
28
|
-
const sourceAndMap = asset.sourceAndMap();
|
|
29
|
-
let updatedSource = sourceAndMap.source;
|
|
30
|
-
// Handle potential non-string source (e.g., convert to string)
|
|
31
|
-
if (typeof updatedSource !== 'string') {
|
|
32
|
-
updatedSource = updatedSource.toString('utf-8');
|
|
33
|
-
}
|
|
34
|
-
let modifiedSource = updatedSource.replace(/url\((.*?)\)/g, (match, url) => {
|
|
35
|
-
isResourceWithDeployUrl = true;
|
|
36
|
-
|
|
37
|
-
let qUrl = url.slice(1, -1);
|
|
38
|
-
|
|
39
|
-
if (!qUrl.startsWith(publicPath)) {
|
|
40
|
-
return match;
|
|
41
|
-
} else {
|
|
42
|
-
const newUrl = this.modifyUrl(publicPath, qUrl);
|
|
43
|
-
let urlString = `url('${newUrl}')`;
|
|
44
|
-
return urlString;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
});
|
|
48
|
-
if (isResourceWithDeployUrl) {
|
|
49
|
-
isResourceWithDeployUrl = false;
|
|
50
|
-
assets[assetName] = new ConcatSource(modifiedSource);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
callback(null, assets);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
modifyUrl(publicPath, url) {
|
|
60
|
-
let qUrl = url;
|
|
61
|
-
let resourceName = qUrl;
|
|
62
|
-
try {
|
|
63
|
-
const parsedUrl = new URL(qUrl);
|
|
64
|
-
resourceName = parsedUrl.pathname.split('/').pop();
|
|
65
|
-
} catch (e) {
|
|
66
|
-
//this is relative url
|
|
67
|
-
let parts = qUrl.split('/');
|
|
68
|
-
resourceName = parts[parts.length - 1];
|
|
69
|
-
}
|
|
70
|
-
let newUrl = `ng-bundle/${resourceName}`;
|
|
71
|
-
return newUrl;
|
|
72
|
-
}
|
|
73
|
-
};
|
|
13
|
+
const includeMomentPlugin = WMAppProperties.languageBundleSources === "STATIC";
|
|
74
14
|
|
|
75
15
|
module.exports = {
|
|
76
16
|
resolve:{
|
|
@@ -79,7 +19,6 @@ module.exports = {
|
|
|
79
19
|
}
|
|
80
20
|
},
|
|
81
21
|
plugins:[
|
|
82
|
-
new ModifyCssAssetUrlsPlugin(),
|
|
83
22
|
new CompressionPlugin({
|
|
84
23
|
test: /\.(js|css|html|svg|txt|eot|otf|ttf|gif)$/,
|
|
85
24
|
filename: "[name].gzip[ext]",
|
|
@@ -91,7 +30,7 @@ module.exports = {
|
|
|
91
30
|
algorithm: "brotliCompress"
|
|
92
31
|
}),
|
|
93
32
|
// On STATIC WMAppProperties.languageBundleSources, required moment locales are included in the bundle
|
|
94
|
-
|
|
33
|
+
|
|
95
34
|
/**
|
|
96
35
|
* MomentLocalesPlugin is used to include only the required moment locales in the bundle.
|
|
97
36
|
*/
|
package/build-angular-app.js
CHANGED
|
@@ -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.
|
|
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);
|