@wavemaker/angular-codegen 11.10.5-rc.6096 → 11.11.0-next.27920
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/angular.json +4 -9
- package/angular-app/build-scripts/post-build.js +7 -47
- package/angular-app/dependency-report.html +1 -1
- package/angular-app/npm-shrinkwrap.json +187 -242
- package/angular-app/package-lock.json +187 -242
- package/angular-app/package.json +11 -21
- package/angular-app/src/app/bootstrap-wrapper.component.ts +10 -0
- package/angular-app/src/app/lazy-load-scripts.resolve.ts +2 -9
- package/angular-app/src/index.html +1 -0
- package/angular-app/src/main.ts +28 -32
- package/angular-app/tsconfig.json +0 -30
- package/angular-app/tsconfig.web-app.json +0 -21
- package/angular-app/wm-custom-webpack.config.js +18 -0
- package/dependencies/app.component.html +34 -26
- package/dependencies/pipe-provider.cjs.js +23477 -186
- package/dependencies/transpilation-web.cjs.js +12587 -816
- package/npm-shrinkwrap.json +85 -233
- package/package-lock.json +85 -233
- package/package.json +2 -2
- package/src/codegen.js +1 -1
- package/src/gen-app-codegen-module.js +1 -1
- package/src/gen-app-routes.js +1 -1
- package/src/gen-components.js +1 -1
- package/src/gen-index-html.js +1 -1
- package/src/gen-layouts.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 +2 -2
- package/templates/app.config.ts.hbs +128 -0
- package/templates/app.module.ts.hbs +0 -2
- package/templates/layout/layout.component.ts.hbs +26 -4
- package/templates/page/page.component.ts.hbs +36 -5
- package/dependencies/transpilation-mobile.cjs.js +0 -93554
package/angular-app/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-app",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.11.0-next.27920",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"ng": "ng",
|
|
6
6
|
"start": "./node_modules/.bin/ng serve",
|
|
@@ -30,35 +30,24 @@
|
|
|
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
|
-
"@awesome-cordova-plugins/app-version": "5.39.1",
|
|
34
|
-
"@awesome-cordova-plugins/barcode-scanner": "5.39.1",
|
|
35
|
-
"@awesome-cordova-plugins/calendar": "5.39.1",
|
|
36
|
-
"@awesome-cordova-plugins/camera": "5.39.1",
|
|
37
|
-
"@awesome-cordova-plugins/core": "5.39.1",
|
|
38
|
-
"@awesome-cordova-plugins/device": "5.39.1",
|
|
39
|
-
"@awesome-cordova-plugins/diagnostic": "5.39.1",
|
|
40
|
-
"@awesome-cordova-plugins/file": "5.39.1",
|
|
41
|
-
"@awesome-cordova-plugins/file-opener": "5.39.1",
|
|
42
|
-
"@awesome-cordova-plugins/geolocation": "5.39.1",
|
|
43
|
-
"@awesome-cordova-plugins/location-accuracy": "5.39.1",
|
|
44
|
-
"@awesome-cordova-plugins/media-capture": "5.39.1",
|
|
45
|
-
"@awesome-cordova-plugins/network": "5.39.1",
|
|
46
|
-
"@awesome-cordova-plugins/sqlite": "5.39.1",
|
|
47
|
-
"@awesome-cordova-plugins/vibration": "5.39.1",
|
|
48
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",
|
|
49
39
|
"@metrichor/jmespath": "0.3.1",
|
|
50
|
-
"@wavemaker/custom-widgets-m3": "11.
|
|
40
|
+
"@wavemaker/custom-widgets-m3": "11.11.0-next.27920",
|
|
51
41
|
"@wavemaker/focus-trap": "1.0.1",
|
|
52
|
-
"@wavemaker/foundation-css": "11.
|
|
42
|
+
"@wavemaker/foundation-css": "11.11.0-next.27920",
|
|
53
43
|
"@wavemaker/nvd3": "1.8.12",
|
|
54
|
-
"@wavemaker/variables": "11.
|
|
44
|
+
"@wavemaker/variables": "11.11.0-next.27920",
|
|
55
45
|
"@ztree/ztree_v3": "3.5.48",
|
|
56
46
|
"angular-imask": "^7.6.1",
|
|
57
47
|
"angular2-websocket": "0.9.7",
|
|
58
48
|
"core-js": "3.35.1",
|
|
59
49
|
"d3": "7.8.5",
|
|
60
50
|
"esbuild-wasm": "^0.24.2",
|
|
61
|
-
"fullcalendar": "5.3.1",
|
|
62
51
|
"hammerjs": "2.0.8",
|
|
63
52
|
"iscroll": "5.2.0",
|
|
64
53
|
"jquery": "3.7.1",
|
|
@@ -78,7 +67,7 @@
|
|
|
78
67
|
"tslib": "2.4.1",
|
|
79
68
|
"x2js": "3.4.4",
|
|
80
69
|
"zone.js": "0.14.10",
|
|
81
|
-
"@wavemaker/app-ng-runtime": "11.
|
|
70
|
+
"@wavemaker/app-ng-runtime": "11.11.0-next.27920"
|
|
82
71
|
},
|
|
83
72
|
"devDependencies": {
|
|
84
73
|
"@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
|
|
@@ -120,6 +109,7 @@
|
|
|
120
109
|
"jest-preset-angular": "^14.1.0",
|
|
121
110
|
"license-checker": "25.0.1",
|
|
122
111
|
"moment": "2.29.4",
|
|
112
|
+
"moment-locales-webpack-plugin": "^1.2.0",
|
|
123
113
|
"moment-timezone": "^0.5.34",
|
|
124
114
|
"ng-packagr": "17.3.0",
|
|
125
115
|
"npm-run-all": "4.1.5",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Component } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
standalone: true,
|
|
6
|
+
template: `<ng-content></ng-content>`,
|
|
7
|
+
imports: [CommonModule],
|
|
8
|
+
selector: 'bootstrap-wrapper',
|
|
9
|
+
})
|
|
10
|
+
export class BootstrapWrapperComponent { }
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ScriptLoaderService } from '@wm/core';
|
|
3
|
+
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
@Injectable()
|
|
@@ -8,13 +9,5 @@ export class LazyLoadScriptsResolve {
|
|
|
8
9
|
constructor(private scriptLoaderService: ScriptLoaderService) {}
|
|
9
10
|
|
|
10
11
|
async resolve() {
|
|
11
|
-
const scriptsToLoad = [];
|
|
12
|
-
if(isMobileApp()) {
|
|
13
|
-
scriptsToLoad.push('node_modules-hammerjs-hammer.min.js');
|
|
14
|
-
scriptsToLoad.push('node_modules-iscroll-build-iscroll.js');
|
|
15
|
-
}
|
|
16
|
-
if (scriptsToLoad.length > 0) {
|
|
17
|
-
await this.scriptLoaderService.load(...scriptsToLoad);
|
|
18
|
-
}
|
|
19
12
|
}
|
|
20
13
|
}
|
package/angular-app/src/main.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ApplicationRef, enableProdMode
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { AppModule } from './app/app.module';
|
|
1
|
+
import { ApplicationRef, enableProdMode } from '@angular/core';
|
|
2
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
|
5
3
|
import { environment } from './environments/environment';
|
|
6
|
-
|
|
7
4
|
import initWmProjectProperties from './app/wm-project-properties';
|
|
8
5
|
import { WMAppProperties } from './app/wmProperties';
|
|
9
6
|
import * as fontConfig from './font.config';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
import { appConfig } from './app/app.config';
|
|
8
|
+
import { AppComponent } from '@wm/runtime/base';
|
|
9
|
+
import { BootstrapWrapperComponent } from './app/bootstrap-wrapper.component';
|
|
10
|
+
|
|
11
|
+
// Format Accept-Language header
|
|
12
|
+
const formatAcceptHeader = (languages: string[]): string => {
|
|
13
|
+
const result: string[] = [];
|
|
14
|
+
const addedLanguages = new Set<string>(); // To track already added languages
|
|
15
15
|
let qValue = 1.0;
|
|
16
16
|
|
|
17
|
-
languages.forEach((lang:
|
|
17
|
+
languages.forEach((lang: string) => {
|
|
18
18
|
if (!addedLanguages.has(lang)) {
|
|
19
19
|
// Add the full language (e.g., en-US or en) if not already added
|
|
20
20
|
result.push(`${lang}${qValue === 1.0 ? '' : `;q=${qValue.toFixed(1)}`}`);
|
|
@@ -37,31 +37,27 @@ let formatAcceptHeader = (languages: any) => {
|
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
return result.join(',');
|
|
40
|
-
}
|
|
41
|
-
WMAppProperties['preferredLanguage'] = formatAcceptHeader(navigator.languages);
|
|
42
|
-
WMAppProperties['fontConfig'] = fontConfig;
|
|
40
|
+
};
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
(
|
|
42
|
+
// Initialize WMAppProperties
|
|
43
|
+
WMAppProperties['preferredLanguage'] = formatAcceptHeader((navigator as any).languages);
|
|
44
|
+
WMAppProperties['fontConfig'] = fontConfig;
|
|
45
|
+
(window as any)._WM_APP_PROPERTIES = WMAppProperties;
|
|
46
46
|
initWmProjectProperties();
|
|
47
47
|
|
|
48
48
|
if (environment.production) {
|
|
49
|
-
|
|
49
|
+
enableProdMode();
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
document.addEventListener('DOMContentLoaded', () => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
});
|
|
65
|
-
//console.timeEnd('bootstrap'), err => console.log(err);
|
|
66
|
-
}, err => console.log(err));
|
|
67
|
-
});
|
|
53
|
+
new Promise<Event | void>(resolve => {
|
|
54
|
+
resolve();
|
|
55
|
+
}).then(() => bootstrapApplication(AppComponent, appConfig))
|
|
56
|
+
.then((appRef: ApplicationRef) => {
|
|
57
|
+
appRef.bootstrap(BootstrapWrapperComponent);
|
|
58
|
+
window.addEventListener('unload', () => {
|
|
59
|
+
appRef.components.map(c => c?.destroy());
|
|
60
|
+
});
|
|
61
|
+
})
|
|
62
|
+
.catch(err => console.error('Error bootstrapping app:', err));
|
|
63
|
+
});
|
|
@@ -32,9 +32,6 @@
|
|
|
32
32
|
"@wm/build-task": [
|
|
33
33
|
"node_modules/@wavemaker/app-ng-runtime/build-task/"
|
|
34
34
|
],
|
|
35
|
-
"@wm/mobile-build-task": [
|
|
36
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile-build-task"
|
|
37
|
-
],
|
|
38
35
|
"@wm/core": [
|
|
39
36
|
"node_modules/@wavemaker/app-ng-runtime/core"
|
|
40
37
|
],
|
|
@@ -56,18 +53,9 @@
|
|
|
56
53
|
"@wm/components/page": [
|
|
57
54
|
"node_modules/@wavemaker/app-ng-runtime/components/page/default"
|
|
58
55
|
],
|
|
59
|
-
"@wm/mobile/components/basic": [
|
|
60
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components/basic/default"
|
|
61
|
-
],
|
|
62
|
-
"@wm/mobile/components/page": [
|
|
63
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components/page/default"
|
|
64
|
-
],
|
|
65
56
|
"@wm/components/dialogs": [
|
|
66
57
|
"node_modules/@wavemaker/app-ng-runtime/components/dialogs/default"
|
|
67
58
|
],
|
|
68
|
-
"@wm/mobile/components/*": [
|
|
69
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components/*"
|
|
70
|
-
],
|
|
71
59
|
"@wm/components/*": [
|
|
72
60
|
"node_modules/@wavemaker/app-ng-runtime/components/*"
|
|
73
61
|
],
|
|
@@ -89,29 +77,11 @@
|
|
|
89
77
|
"@wm/variables": [
|
|
90
78
|
"node_modules/@wavemaker/app-ng-runtime/variables"
|
|
91
79
|
],
|
|
92
|
-
"@wm/mobile/core": [
|
|
93
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/core"
|
|
94
|
-
],
|
|
95
|
-
"@wm/mobile/components": [
|
|
96
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components"
|
|
97
|
-
],
|
|
98
|
-
"@wm/mobile/offline": [
|
|
99
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/offline"
|
|
100
|
-
],
|
|
101
|
-
"@wm/mobile/variables": [
|
|
102
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/variables"
|
|
103
|
-
],
|
|
104
80
|
"@wm/runtime/base": [
|
|
105
81
|
"node_modules/@wavemaker/app-ng-runtime/runtime/base"
|
|
106
82
|
],
|
|
107
83
|
"@wm/runtime/dynamic": [
|
|
108
84
|
"node_modules/@wavemaker/app-ng-runtime/runtime/dynamic"
|
|
109
|
-
],
|
|
110
|
-
"@wm/mobile/runtime": [
|
|
111
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/runtime"
|
|
112
|
-
],
|
|
113
|
-
"@wm/mobile/runtime/dynamic": [
|
|
114
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/runtime-dynamic"
|
|
115
85
|
]
|
|
116
86
|
},
|
|
117
87
|
"useDefineForClassFields": false
|
|
@@ -31,9 +31,6 @@
|
|
|
31
31
|
"@wm/build-task": [
|
|
32
32
|
"node_modules/@wavemaker/app-ng-runtime/build-task/"
|
|
33
33
|
],
|
|
34
|
-
"@wm/mobile-build-task": [
|
|
35
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile-build-task"
|
|
36
|
-
],
|
|
37
34
|
"@wm/core": [
|
|
38
35
|
"node_modules/@wavemaker/app-ng-runtime/core"
|
|
39
36
|
],
|
|
@@ -70,29 +67,11 @@
|
|
|
70
67
|
"@wm/variables": [
|
|
71
68
|
"node_modules/@wavemaker/app-ng-runtime/variables"
|
|
72
69
|
],
|
|
73
|
-
"@wm/mobile/core": [
|
|
74
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/core"
|
|
75
|
-
],
|
|
76
|
-
"@wm/mobile/components": [
|
|
77
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components"
|
|
78
|
-
],
|
|
79
|
-
"@wm/mobile/offline": [
|
|
80
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/offline"
|
|
81
|
-
],
|
|
82
|
-
"@wm/mobile/variables": [
|
|
83
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/variables"
|
|
84
|
-
],
|
|
85
70
|
"@wm/runtime/base": [
|
|
86
71
|
"node_modules/@wavemaker/app-ng-runtime/runtime/base"
|
|
87
72
|
],
|
|
88
73
|
"@wm/runtime/dynamic": [
|
|
89
74
|
"node_modules/@wavemaker/app-ng-runtime/runtime/dynamic"
|
|
90
|
-
],
|
|
91
|
-
"@wm/mobile/runtime": [
|
|
92
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/placeholder/runtime"
|
|
93
|
-
],
|
|
94
|
-
"@wm/mobile/runtime-dynamic": [
|
|
95
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/placeholder/runtime/dynamic"
|
|
96
75
|
]
|
|
97
76
|
}
|
|
98
77
|
},
|
|
@@ -2,6 +2,18 @@ const CompressionPlugin = require(`compression-webpack-plugin`);
|
|
|
2
2
|
const path = require(`path`);
|
|
3
3
|
const {ConcatSource} = require("webpack-sources");
|
|
4
4
|
|
|
5
|
+
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
|
|
6
|
+
|
|
7
|
+
const wmPropertiesPath = path.join(__dirname, '/src/app/wmProperties.js');
|
|
8
|
+
|
|
9
|
+
const { WMAppProperties } = require(wmPropertiesPath);
|
|
10
|
+
|
|
11
|
+
const localesToKeep = Object.values(WMAppProperties.supportedLanguages)
|
|
12
|
+
.map(lang => lang.moment)
|
|
13
|
+
.filter(locale => locale !== null);
|
|
14
|
+
|
|
15
|
+
const includeMomentPlugin = WMAppProperties.languageBundleSources === "STATIC";
|
|
16
|
+
|
|
5
17
|
class ModifyCssAssetUrlsPlugin {
|
|
6
18
|
apply(compiler) {
|
|
7
19
|
compiler.hooks.compilation.tap('ModifyCssAssetUrlsPlugin', compilation => {
|
|
@@ -78,6 +90,12 @@ module.exports = {
|
|
|
78
90
|
filename: "[name].br[ext]",
|
|
79
91
|
algorithm: "brotliCompress"
|
|
80
92
|
}),
|
|
93
|
+
// On STATIC WMAppProperties.languageBundleSources, required moment locales are included in the bundle
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* MomentLocalesPlugin is used to include only the required moment locales in the bundle.
|
|
97
|
+
*/
|
|
98
|
+
...(includeMomentPlugin ? [ new MomentLocalesPlugin({ localesToKeep }) ] : [])
|
|
81
99
|
],
|
|
82
100
|
optimization: {
|
|
83
101
|
splitChunks: {
|
|
@@ -1,28 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
@if (startApp) {
|
|
2
|
+
<router-outlet></router-outlet>
|
|
3
|
+
@if (isApplicationType) {
|
|
4
|
+
<div wmContainer partialContainer content="Common" hidden class="ng-hide"></div>
|
|
5
|
+
}
|
|
6
|
+
<app-spinner name="globalspinner" classname="global-spinner" role="alert" aria-live="assertive" [attr.aria-label]="spinner.arialabel || 'Loading'" [show]="spinner.show" [spinnermessages]="spinner.messages"></app-spinner>
|
|
7
|
+
<div wmDialog name="oAuthLoginDialog" title="Application is requesting you to sign in with"
|
|
8
|
+
close.event="closeOAuthDialog()">
|
|
9
|
+
<ng-template #dialogBody>
|
|
10
|
+
<ul class="list-items">
|
|
11
|
+
@for (provider of providersConfig; track provider) {
|
|
12
|
+
<li class="list-item">
|
|
13
|
+
<button class="btn" (click)="provider.invoke()">{{provider.name}}</button>
|
|
14
|
+
</li>
|
|
15
|
+
}
|
|
16
|
+
</ul>
|
|
17
|
+
</ng-template>
|
|
18
|
+
</div>
|
|
19
|
+
<div wmConfirmDialog name="_app-confirm-dialog" title.bind="title" message.bind="message" oktext.bind="oktext"
|
|
20
|
+
canceltext.bind="canceltext" closable="false" iconclass.bind="iconclass"
|
|
21
|
+
escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>
|
|
22
|
+
@if (!isApplicationType) {
|
|
23
|
+
<div wmConfirmDialog name="PrefabConfirmDialog" title.bind="title" message.bind="text" oktext.bind="okButtonText"
|
|
24
|
+
canceltext.bind="cancelButtonText" closable="false" iconclass.bind="iconclass"
|
|
25
|
+
escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>
|
|
26
|
+
}
|
|
27
|
+
@if (!isApplicationType) {
|
|
28
|
+
<div wmAlertDialog name="PrefabAlertDialog" title.bind="title" message.bind="text" oktext.bind="okButtonText"
|
|
29
|
+
canceltext.bind="cancelButtonText" closable="false" iconclass.bind="iconclass"
|
|
30
|
+
escape.event="onEscape()" ok.event="onOk()" cancel.event="onCancel()" close.event="onClose()" opened.event="onOpen()"></div>
|
|
31
|
+
}
|
|
32
|
+
<div wmAppExt></div>
|
|
33
|
+
<i id="wm-mobile-display"></i>
|
|
34
|
+
}
|
|
27
35
|
<!--Dummy container to create the component dynamically-->
|
|
28
36
|
<ng-container #dynamicComponent></ng-container>
|