@wavemaker/angular-app 12.0.0-next.141221 → 12.0.0-next.47809
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.json +5 -12
- package/build-scripts/build.js +1 -0
- package/build-scripts/post-build.js +15 -111
- package/dependencies/app.component.html +37 -25
- package/dependencies/custom-widgets-bundle.cjs.js +415 -0
- package/dependencies/expression-parser.cjs.js +31 -43
- package/dependencies/pipe-provider.cjs.js +25282 -769
- package/dependencies/transpilation-web.cjs.js +13921 -1459
- package/dependency-report.html +1 -1
- package/npm-shrinkwrap.json +1674 -1193
- package/package-lock.json +1674 -1193
- package/package.json +22 -21
- package/src/app/lazy-load-scripts.resolve.ts +2 -9
- package/src/framework/services/customwidget-config-provider.service.ts +13 -0
- package/src/framework/util/page-util.ts +3 -1
- package/src/index.html +1 -1
- package/src/main.ts +25 -31
- package/src/setup-jest.js +4 -1
- package/tsconfig.json +3 -30
- package/tsconfig.web-app.json +0 -21
- package/wm-custom-webpack.config.js +18 -0
- package/dependencies/transpilation-mobile.cjs.js +0 -93600
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-app",
|
|
3
|
-
"version": "12.0.0-next.
|
|
3
|
+
"version": "12.0.0-next.47809",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"ng": "ng",
|
|
6
6
|
"start": "./node_modules/.bin/ng serve",
|
|
@@ -30,32 +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",
|
|
40
|
+
"@wavemaker/custom-widgets-m3": "12.0.0-next.47809",
|
|
50
41
|
"@wavemaker/focus-trap": "1.0.1",
|
|
51
|
-
"@wavemaker/
|
|
52
|
-
"@wavemaker/
|
|
42
|
+
"@wavemaker/foundation-css": "12.0.0-next.47809",
|
|
43
|
+
"@wavemaker/nvd3": "1.8.13",
|
|
44
|
+
"@wavemaker/variables": "12.0.0-next.47809",
|
|
53
45
|
"@ztree/ztree_v3": "3.5.48",
|
|
54
46
|
"angular-imask": "^7.6.1",
|
|
55
47
|
"angular2-websocket": "0.9.7",
|
|
56
48
|
"core-js": "3.35.1",
|
|
57
49
|
"d3": "7.8.5",
|
|
58
|
-
"
|
|
50
|
+
"esbuild-wasm": "^0.24.2",
|
|
59
51
|
"hammerjs": "2.0.8",
|
|
60
52
|
"iscroll": "5.2.0",
|
|
61
53
|
"jquery": "3.7.1",
|
|
@@ -75,7 +67,7 @@
|
|
|
75
67
|
"tslib": "2.4.1",
|
|
76
68
|
"x2js": "3.4.4",
|
|
77
69
|
"zone.js": "0.14.10",
|
|
78
|
-
"@wavemaker/app-ng-runtime": "12.0.0-next.
|
|
70
|
+
"@wavemaker/app-ng-runtime": "12.0.0-next.47809"
|
|
79
71
|
},
|
|
80
72
|
"devDependencies": {
|
|
81
73
|
"@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
|
|
@@ -95,6 +87,7 @@
|
|
|
95
87
|
"@rollup/plugin-commonjs": "24.0.0",
|
|
96
88
|
"@rollup/plugin-multi-entry": "6.0.0",
|
|
97
89
|
"@rollup/plugin-node-resolve": "15.0.1",
|
|
90
|
+
"@rollup/plugin-typescript": "^8.3.3",
|
|
98
91
|
"@types/jest": "^29.5.12",
|
|
99
92
|
"@types/jquery": "3.3.22",
|
|
100
93
|
"@types/lodash-es": "4.17.12",
|
|
@@ -102,6 +95,7 @@
|
|
|
102
95
|
"@types/sizzle": "^2.3.3",
|
|
103
96
|
"@typescript-eslint/eslint-plugin": "6.15.0",
|
|
104
97
|
"@typescript-eslint/parser": "6.15.0",
|
|
98
|
+
"acorn": "8.14.0",
|
|
105
99
|
"babel-loader": "^9.1.2",
|
|
106
100
|
"cheerio": "1.0.0-rc.12",
|
|
107
101
|
"codelyzer": "5.1.2",
|
|
@@ -115,6 +109,7 @@
|
|
|
115
109
|
"jest-preset-angular": "^14.1.0",
|
|
116
110
|
"license-checker": "25.0.1",
|
|
117
111
|
"moment": "2.29.4",
|
|
112
|
+
"moment-locales-webpack-plugin": "^1.2.0",
|
|
118
113
|
"moment-timezone": "^0.5.34",
|
|
119
114
|
"ng-packagr": "17.3.0",
|
|
120
115
|
"npm-run-all": "4.1.5",
|
|
@@ -133,11 +128,17 @@
|
|
|
133
128
|
"optionalDependencies": {
|
|
134
129
|
"@rollup/rollup-darwin-arm64": "4.9.5",
|
|
135
130
|
"@rollup/rollup-linux-x64-gnu": "4.9.5",
|
|
136
|
-
"@rollup/rollup-win32-x64": "4.9.5"
|
|
131
|
+
"@rollup/rollup-win32-x64": "4.9.5",
|
|
132
|
+
"@lmdb/lmdb-linux-x64": "3.0.13"
|
|
137
133
|
},
|
|
138
134
|
"engines": {
|
|
139
135
|
"node": "~22.11.0",
|
|
140
136
|
"npm": "~10.9.0"
|
|
141
137
|
},
|
|
138
|
+
"overrides": {
|
|
139
|
+
"ng-packagr": {
|
|
140
|
+
"@rollup/wasm-node": "4.40.2"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
142
143
|
"engineStrict": true
|
|
143
144
|
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import { CustomwidgetConfigProvider } from '@wm/runtime/base';
|
|
4
|
+
|
|
5
|
+
import { getCustomWidgetConfig } from '../util/page-util';
|
|
6
|
+
|
|
7
|
+
@Injectable()
|
|
8
|
+
export class CustomwidgetConfigProviderService extends CustomwidgetConfigProvider {
|
|
9
|
+
|
|
10
|
+
public getConfig(widgetname: string): Promise<any> {
|
|
11
|
+
return Promise.resolve(getCustomWidgetConfig(widgetname));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
const prefabConfigs = new Map<string, any>();
|
|
2
|
+
const customWidgetConfigs = new Map<string, any>();
|
|
2
3
|
|
|
3
4
|
export const registerPrefabConfig = (prefabName: string, config: any) => prefabConfigs.set(prefabName, config);
|
|
4
5
|
export const getPrefabConfig = prefabName => prefabConfigs.get(prefabName);
|
|
5
|
-
|
|
6
|
+
export const registerCustomWidgetConfig = (customWidget: string, config: any) => customWidgetConfigs.set(customWidget, config);
|
|
7
|
+
export const getCustomWidgetConfig = customWidget => customWidgetConfigs.get(customWidget);
|
package/src/index.html
CHANGED
package/src/main.ts
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
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';
|
|
7
|
+
import { appConfig } from './app/app.config';
|
|
8
|
+
import { AppComponent } from '@wm/runtime/base';
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
// Format Accept-Language header
|
|
11
|
+
const formatAcceptHeader = (languages: string[]): string => {
|
|
12
|
+
const result: string[] = [];
|
|
13
|
+
const addedLanguages = new Set<string>(); // To track already added languages
|
|
15
14
|
let qValue = 1.0;
|
|
16
15
|
|
|
17
|
-
languages.forEach((lang:
|
|
16
|
+
languages.forEach((lang: string) => {
|
|
18
17
|
if (!addedLanguages.has(lang)) {
|
|
19
18
|
// Add the full language (e.g., en-US or en) if not already added
|
|
20
19
|
result.push(`${lang}${qValue === 1.0 ? '' : `;q=${qValue.toFixed(1)}`}`);
|
|
@@ -37,31 +36,26 @@ let formatAcceptHeader = (languages: any) => {
|
|
|
37
36
|
});
|
|
38
37
|
|
|
39
38
|
return result.join(',');
|
|
40
|
-
}
|
|
41
|
-
WMAppProperties['preferredLanguage'] = formatAcceptHeader(navigator.languages);
|
|
42
|
-
WMAppProperties['fontConfig'] = fontConfig;
|
|
43
|
-
|
|
39
|
+
};
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
// Initialize WMAppProperties
|
|
42
|
+
WMAppProperties['preferredLanguage'] = formatAcceptHeader((navigator as any).languages);
|
|
43
|
+
WMAppProperties['fontConfig'] = fontConfig;
|
|
44
|
+
(window as any)._WM_APP_PROPERTIES = WMAppProperties;
|
|
46
45
|
initWmProjectProperties();
|
|
47
46
|
|
|
48
47
|
if (environment.production) {
|
|
49
|
-
|
|
48
|
+
enableProdMode();
|
|
50
49
|
}
|
|
51
50
|
|
|
52
51
|
document.addEventListener('DOMContentLoaded', () => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
applicationRef.components.map(c => c && c.destroy());
|
|
64
|
-
});
|
|
65
|
-
console.timeEnd('bootstrap'), err => console.log(err);
|
|
66
|
-
}, err => console.log(err));
|
|
67
|
-
});
|
|
52
|
+
new Promise<Event | void>(resolve => {
|
|
53
|
+
resolve();
|
|
54
|
+
}).then(() => bootstrapApplication(AppComponent, appConfig))
|
|
55
|
+
.then((appRef: ApplicationRef) => {
|
|
56
|
+
window.addEventListener('unload', () => {
|
|
57
|
+
appRef.components.map(c => c?.destroy());
|
|
58
|
+
});
|
|
59
|
+
})
|
|
60
|
+
.catch(err => console.error('Error bootstrapping app:', err));
|
|
61
|
+
});
|
package/src/setup-jest.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
// This file is automatically loaded when running `jest` commands
|
|
2
|
+
import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
|
|
2
3
|
import { ToastrModule } from 'ngx-toastr';
|
|
3
4
|
import { TestBed } from '@angular/core/testing';
|
|
4
5
|
import _ from 'lodash-es';
|
|
5
6
|
import 'jest-canvas-mock';
|
|
6
7
|
|
|
8
|
+
setupZoneTestEnv();
|
|
9
|
+
|
|
7
10
|
// Mock global objects if necessary
|
|
8
11
|
global.jQuery = require("jquery");
|
|
9
12
|
global.$ = global.jQuery;
|
package/tsconfig.json
CHANGED
|
@@ -32,15 +32,15 @@
|
|
|
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
|
],
|
|
41
38
|
"@wavemaker/variables": [
|
|
42
39
|
"node_modules/@wavemaker/variables/"
|
|
43
40
|
],
|
|
41
|
+
"@wavemaker/custom-widgets-m3": [
|
|
42
|
+
"node_modules/@wavemaker/custom-widgets-m3/"
|
|
43
|
+
],
|
|
44
44
|
"@wm/components/base": [
|
|
45
45
|
"node_modules/@wavemaker/app-ng-runtime/components/base"
|
|
46
46
|
],
|
|
@@ -53,18 +53,9 @@
|
|
|
53
53
|
"@wm/components/page": [
|
|
54
54
|
"node_modules/@wavemaker/app-ng-runtime/components/page/default"
|
|
55
55
|
],
|
|
56
|
-
"@wm/mobile/components/basic": [
|
|
57
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components/basic/default"
|
|
58
|
-
],
|
|
59
|
-
"@wm/mobile/components/page": [
|
|
60
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components/page/default"
|
|
61
|
-
],
|
|
62
56
|
"@wm/components/dialogs": [
|
|
63
57
|
"node_modules/@wavemaker/app-ng-runtime/components/dialogs/default"
|
|
64
58
|
],
|
|
65
|
-
"@wm/mobile/components/*": [
|
|
66
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components/*"
|
|
67
|
-
],
|
|
68
59
|
"@wm/components/*": [
|
|
69
60
|
"node_modules/@wavemaker/app-ng-runtime/components/*"
|
|
70
61
|
],
|
|
@@ -86,29 +77,11 @@
|
|
|
86
77
|
"@wm/variables": [
|
|
87
78
|
"node_modules/@wavemaker/app-ng-runtime/variables"
|
|
88
79
|
],
|
|
89
|
-
"@wm/mobile/core": [
|
|
90
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/core"
|
|
91
|
-
],
|
|
92
|
-
"@wm/mobile/components": [
|
|
93
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components"
|
|
94
|
-
],
|
|
95
|
-
"@wm/mobile/offline": [
|
|
96
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/offline"
|
|
97
|
-
],
|
|
98
|
-
"@wm/mobile/variables": [
|
|
99
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/variables"
|
|
100
|
-
],
|
|
101
80
|
"@wm/runtime/base": [
|
|
102
81
|
"node_modules/@wavemaker/app-ng-runtime/runtime/base"
|
|
103
82
|
],
|
|
104
83
|
"@wm/runtime/dynamic": [
|
|
105
84
|
"node_modules/@wavemaker/app-ng-runtime/runtime/dynamic"
|
|
106
|
-
],
|
|
107
|
-
"@wm/mobile/runtime": [
|
|
108
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/runtime"
|
|
109
|
-
],
|
|
110
|
-
"@wm/mobile/runtime/dynamic": [
|
|
111
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/runtime-dynamic"
|
|
112
85
|
]
|
|
113
86
|
},
|
|
114
87
|
"useDefineForClassFields": false
|
package/tsconfig.web-app.json
CHANGED
|
@@ -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: {
|