@wavemaker/angular-codegen 12.0.0-next.45752 → 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.
- {angular-codegen → package}/angular-app/angular.json +52 -19
- {angular-codegen → package}/angular-app/build-scripts/build.js +1 -0
- {angular-codegen → package}/angular-app/build-scripts/post-build.js +16 -110
- package/angular-app/dependency-report.html +124 -0
- package/angular-app/generate-dependency-report.js +240 -0
- package/angular-app/npm-shrinkwrap.json +25765 -0
- {angular-codegen → package}/angular-app/package-lock.json +13848 -9419
- {angular-codegen → package}/angular-app/package.json +61 -45
- package/angular-app/src/app/lazy-load-scripts.resolve.ts +13 -0
- package/angular-app/src/assets/styles/css/wm-style.css +1 -0
- package/angular-app/src/framework/services/customwidget-config-provider.service.ts +13 -0
- package/angular-app/src/framework/util/page-util.ts +7 -0
- {angular-codegen → package}/angular-app/src/index.html +1 -1
- package/angular-app/src/main.ts +61 -0
- {angular-codegen → package}/angular-app/src/setup-jest.js +4 -1
- angular-codegen/angular-app/tsconfig.web-app.json → package/angular-app/tsconfig.json +15 -23
- package/angular-app/tsconfig.web-app.json +81 -0
- {angular-codegen → package}/angular-app/wm-custom-webpack.config.js +18 -0
- package/build-angular-app.js +501 -0
- package/dependencies/app.component.html +40 -0
- package/dependencies/custom-widgets-bundle.cjs.js +415 -0
- {angular-codegen → package}/dependencies/expression-parser.cjs.js +13920 -17378
- {angular-codegen → package}/dependencies/pipe-provider.cjs.js +60097 -46994
- {angular-codegen → package}/dependencies/transpilation-web.cjs.js +31302 -24536
- package/download-packages.js +149 -0
- {angular-codegen → package}/generate-angular-app.js +3 -1
- package/npm-shrinkwrap.json +8121 -0
- package/package-lock.json +8121 -0
- {angular-codegen → package}/package.json +10 -4
- package/src/codegen-args-cli.js +1 -0
- package/src/codegen-cli.js +1 -0
- package/src/codegen.js +1 -0
- package/src/copy-utils.js +1 -0
- package/src/eslintrc_config.js +1 -0
- package/src/gen-app-codegen-module.js +1 -0
- package/src/gen-app-override-css.js +1 -0
- package/src/gen-app-routes.js +1 -0
- package/src/gen-app-skeleton.js +1 -0
- package/src/gen-components.js +1 -0
- package/src/gen-customwidget-config.js +1 -0
- package/src/gen-index-html.js +1 -0
- package/src/gen-layouts.js +1 -0
- package/src/handlebar-helpers.js +1 -0
- package/src/pages-util.js +1 -0
- package/src/project-meta.js +1 -0
- package/src/update-angular-json.js +1 -0
- package/src/wm-utils.js +1 -0
- {angular-codegen → package}/templates/app-routes.ts.hbs +2 -2
- package/templates/app.config.ts.hbs +128 -0
- {angular-codegen → package}/templates/app.module.ts.hbs +5 -3
- package/templates/component.config.ts.hbs +1 -0
- package/templates/customwidget/customwidget-config.ts.hbs +6 -0
- package/templates/customwidget/customwidget.component.script.js.hbs +3 -0
- package/templates/customwidget/customwidget.component.ts.hbs +43 -0
- {angular-codegen → package}/templates/layout/layout.component.ts.hbs +26 -4
- package/templates/page/page.component.ts.hbs +76 -0
- {angular-codegen → package}/templates/page/page.module.ts.hbs +12 -1
- angular-codegen/angular-app/src/app/lazy-load-scripts.resolve.ts +0 -20
- angular-codegen/angular-app/src/assets/styles/css/wm-style.css +0 -1
- angular-codegen/angular-app/src/framework/util/page-util.ts +0 -5
- angular-codegen/angular-app/src/main.ts +0 -30
- angular-codegen/angular-app/tsconfig.json +0 -131
- angular-codegen/build-angular-app.js +0 -79
- angular-codegen/dependencies/app.component.html +0 -28
- angular-codegen/dependencies/transpilation-mobile.cjs.js +0 -94054
- angular-codegen/download-packages.js +0 -69
- angular-codegen/package-lock.json +0 -5746
- angular-codegen/src/codegen-args-cli.js +0 -1
- angular-codegen/src/codegen-cli.js +0 -1
- angular-codegen/src/codegen.js +0 -1
- angular-codegen/src/gen-app-codegen-module.js +0 -1
- angular-codegen/src/gen-app-routes.js +0 -1
- angular-codegen/src/gen-app-skeleton.js +0 -1
- angular-codegen/src/gen-components.js +0 -1
- angular-codegen/src/gen-index-html.js +0 -1
- angular-codegen/src/gen-layouts.js +0 -1
- angular-codegen/src/handlebar-helpers.js +0 -1
- angular-codegen/src/pages-util.js +0 -1
- angular-codegen/src/project-meta.js +0 -1
- angular-codegen/src/update-angular-json.js +0 -1
- angular-codegen/src/wm-utils.js +0 -1
- angular-codegen/templates/page/page.component.ts.hbs +0 -45
- {angular-codegen → package}/.npmrc +0 -0
- {angular-codegen → package}/angular-app/.npmrc +0 -0
- {angular-codegen → package}/angular-app/build-scripts/index-html-transform.js +0 -0
- {angular-codegen → package}/angular-app/build-scripts/optimize-css.gulpfile.js +0 -0
- {angular-codegen → package}/angular-app/build-scripts/update-version.js +0 -0
- {angular-codegen → package}/angular-app/src/.browserslistrc +0 -0
- {angular-codegen → package}/angular-app/src/app/app-codegen.module.ts +0 -0
- {angular-codegen → package}/angular-app/src/app/app.component.css +0 -0
- {angular-codegen → package}/angular-app/src/app/app.component.script.js +0 -0
- {angular-codegen → package}/angular-app/src/app/app.component.variables.ts +0 -0
- {angular-codegen → package}/angular-app/src/app/app.routes.ts +0 -0
- {angular-codegen → package}/angular-app/src/app/prefabs/prefab-config.js +0 -0
- {angular-codegen → package}/angular-app/src/app/wm-project-properties.ts +0 -0
- {angular-codegen → package}/angular-app/src/assets/.gitkeep +0 -0
- {angular-codegen → package}/angular-app/src/assets/print.css +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/bootstrap.css.map +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/font/summernote.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/font/summernote.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/font/summernote.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_222222_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_2e83ff_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_444444_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_454545_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_555555_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_777620_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_777777_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_888888_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_cc0000_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_cd0a0a_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_ffffff_256x240.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/css/wm-responsive.css +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/FontAwesome.otf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.svg +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.woff2 +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.svg +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.woff2 +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.eot +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.ttf +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.woff +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/live-sync-icon.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/live-sync-touch-icon.png +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/loader.gif +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/spinner-small.gif +0 -0
- {angular-codegen → package}/angular-app/src/assets/styles/images/ui-icons.png +0 -0
- {angular-codegen → package}/angular-app/src/environments/environment.dev.ts +0 -0
- {angular-codegen → package}/angular-app/src/environments/environment.prod.ts +0 -0
- {angular-codegen → package}/angular-app/src/environments/environment.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/angular1.polyfills.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/app-extension.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/app-js-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/app-variables-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/component-ref-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/lazy-component-ref-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/services/prefab-config-provider.service.ts +0 -0
- {angular-codegen → package}/angular-app/src/framework/util/lazy-module-routes.ts +0 -0
- {angular-codegen → package}/angular-app/src/polyfills.ts +0 -0
- {angular-codegen → package}/angular-app/src/styles.css +0 -0
- {angular-codegen → package}/angular-app/src/tsconfig.app.json +0 -0
- {angular-codegen → package}/angular-app/src/tslint.json +0 -0
- {angular-codegen → package}/build-util.js +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-128x128.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-144x144.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-152x152.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-192x192.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-384x384.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-512x512.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-72x72.png +0 -0
- {angular-codegen → package}/pwa-assets/icons/icon-96x96.png +0 -0
- {angular-codegen → package}/pwa-assets/manifest.json +0 -0
- {angular-codegen → package}/pwa-assets/ngsw-config.json +0 -0
- {angular-codegen → package}/pwa-assets/wmsw-worker.js +0 -0
- {angular-codegen → package}/src/expr-parser-utils.js +0 -0
- {angular-codegen → package}/src/gen-app-js.js +0 -0
- {angular-codegen → package}/src/gen-app-prefabs-module.js +0 -0
- {angular-codegen → package}/src/gen-app-variables.js +0 -0
- {angular-codegen → package}/src/gen-lazy-module-routes.js +0 -0
- {angular-codegen → package}/src/gen-prefabs.js +0 -0
- {angular-codegen → package}/src/gen-pwa-files.js +0 -0
- {angular-codegen → package}/src/gen-tsconfig.js +0 -0
- {angular-codegen → package}/src/gen-wm-project-properties.js +0 -0
- {angular-codegen → package}/templates/app-codegen.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/app-prefabs.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/app.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/component.expressions.ts.hbs +0 -0
- {angular-codegen → package}/templates/component.variables.ts.hbs +0 -0
- {angular-codegen → package}/templates/expr-vs-fn.hbs +0 -0
- {angular-codegen → package}/templates/layout/layout.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/lazy-module-routes.ts.hbs +0 -0
- {angular-codegen → package}/templates/page/page.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/partial/partial.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/partial/partial.component.ts.hbs +0 -0
- {angular-codegen → package}/templates/partial/partial.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/prefab/prefab-config.ts.hbs +0 -0
- {angular-codegen → package}/templates/prefab/prefab.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/prefab/prefab.component.ts.hbs +0 -0
- {angular-codegen → package}/templates/prefab/prefab.module.ts.hbs +0 -0
- {angular-codegen → package}/templates/wm-project-properties.ts.hbs +0 -0
@@ -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
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
const prefabConfigs = new Map<string, any>();
|
2
|
+
const customWidgetConfigs = new Map<string, any>();
|
3
|
+
|
4
|
+
export const registerPrefabConfig = (prefabName: string, config: any) => prefabConfigs.set(prefabName, config);
|
5
|
+
export const getPrefabConfig = prefabName => prefabConfigs.get(prefabName);
|
6
|
+
export const registerCustomWidgetConfig = (customWidget: string, config: any) => customWidgetConfigs.set(customWidget, config);
|
7
|
+
export const getCustomWidgetConfig = customWidget => customWidgetConfigs.get(customWidget);
|
@@ -0,0 +1,61 @@
|
|
1
|
+
import { ApplicationRef, enableProdMode } from '@angular/core';
|
2
|
+
import { bootstrapApplication } from '@angular/platform-browser';
|
3
|
+
import { environment } from './environments/environment';
|
4
|
+
import initWmProjectProperties from './app/wm-project-properties';
|
5
|
+
import { WMAppProperties } from './app/wmProperties';
|
6
|
+
import * as fontConfig from './font.config';
|
7
|
+
import { appConfig } from './app/app.config';
|
8
|
+
import { AppComponent } from '@wm/runtime/base';
|
9
|
+
|
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
|
14
|
+
let qValue = 1.0;
|
15
|
+
|
16
|
+
languages.forEach((lang: string) => {
|
17
|
+
if (!addedLanguages.has(lang)) {
|
18
|
+
// Add the full language (e.g., en-US or en) if not already added
|
19
|
+
result.push(`${lang}${qValue === 1.0 ? '' : `;q=${qValue.toFixed(1)}`}`);
|
20
|
+
addedLanguages.add(lang);
|
21
|
+
// Decrease qValue for the next language
|
22
|
+
qValue = Math.max(0.1, qValue - 0.1); // Decrease qValue, minimum is 0.1
|
23
|
+
}
|
24
|
+
|
25
|
+
// If language has a region code (e.g., en-US), also add the base language (e.g., en)
|
26
|
+
if (lang.includes('-')) {
|
27
|
+
const baseLang = lang.split('-')[0];
|
28
|
+
if (!addedLanguages.has(baseLang)) {
|
29
|
+
result.push(`${baseLang};q=${qValue.toFixed(1)}`);
|
30
|
+
addedLanguages.add(baseLang);
|
31
|
+
|
32
|
+
// Decrease qValue for the next language
|
33
|
+
qValue = Math.max(0.1, qValue - 0.1);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
});
|
37
|
+
|
38
|
+
return result.join(',');
|
39
|
+
};
|
40
|
+
|
41
|
+
// Initialize WMAppProperties
|
42
|
+
WMAppProperties['preferredLanguage'] = formatAcceptHeader((navigator as any).languages);
|
43
|
+
WMAppProperties['fontConfig'] = fontConfig;
|
44
|
+
(window as any)._WM_APP_PROPERTIES = WMAppProperties;
|
45
|
+
initWmProjectProperties();
|
46
|
+
|
47
|
+
if (environment.production) {
|
48
|
+
enableProdMode();
|
49
|
+
}
|
50
|
+
|
51
|
+
document.addEventListener('DOMContentLoaded', () => {
|
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
|
+
});
|
@@ -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;
|
@@ -9,6 +9,7 @@
|
|
9
9
|
"target": "es2022",
|
10
10
|
"module": "es2020",
|
11
11
|
"moduleResolution": "node",
|
12
|
+
"esModuleInterop": true,
|
12
13
|
"emitDecoratorMetadata": true,
|
13
14
|
"experimentalDecorators": true,
|
14
15
|
"typeRoots": [
|
@@ -31,12 +32,18 @@
|
|
31
32
|
"@wm/build-task": [
|
32
33
|
"node_modules/@wavemaker/app-ng-runtime/build-task/"
|
33
34
|
],
|
34
|
-
"@wm/mobile-build-task": [
|
35
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile-build-task"
|
36
|
-
],
|
37
35
|
"@wm/core": [
|
38
36
|
"node_modules/@wavemaker/app-ng-runtime/core"
|
39
37
|
],
|
38
|
+
"@wavemaker/variables": [
|
39
|
+
"node_modules/@wavemaker/variables/"
|
40
|
+
],
|
41
|
+
"@wavemaker/custom-widgets-m3": [
|
42
|
+
"node_modules/@wavemaker/custom-widgets-m3/"
|
43
|
+
],
|
44
|
+
"@wm/components/base": [
|
45
|
+
"node_modules/@wavemaker/app-ng-runtime/components/base"
|
46
|
+
],
|
40
47
|
"@wm/components/basic": [
|
41
48
|
"node_modules/@wavemaker/app-ng-runtime/components/basic/default"
|
42
49
|
],
|
@@ -70,33 +77,18 @@
|
|
70
77
|
"@wm/variables": [
|
71
78
|
"node_modules/@wavemaker/app-ng-runtime/variables"
|
72
79
|
],
|
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
80
|
"@wm/runtime/base": [
|
86
81
|
"node_modules/@wavemaker/app-ng-runtime/runtime/base"
|
87
82
|
],
|
88
83
|
"@wm/runtime/dynamic": [
|
89
84
|
"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
85
|
]
|
97
|
-
}
|
86
|
+
},
|
87
|
+
"useDefineForClassFields": false
|
98
88
|
},
|
99
89
|
"angularCompilerOptions": {
|
100
|
-
"compilationMode": "full"
|
90
|
+
"compilationMode": "full",
|
91
|
+
"strictMetadataEmit": false,
|
92
|
+
"fullTemplateTypeCheck": false
|
101
93
|
}
|
102
94
|
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
{
|
2
|
+
"compileOnSave": false,
|
3
|
+
"compilerOptions": {
|
4
|
+
"baseUrl": "./",
|
5
|
+
"downlevelIteration": true,
|
6
|
+
"outDir": "./dist/out-tsc",
|
7
|
+
"sourceMap": true,
|
8
|
+
"declaration": false,
|
9
|
+
"target": "es2022",
|
10
|
+
"module": "es2020",
|
11
|
+
"moduleResolution": "node",
|
12
|
+
"emitDecoratorMetadata": true,
|
13
|
+
"experimentalDecorators": true,
|
14
|
+
"typeRoots": [
|
15
|
+
"node_modules/@types"
|
16
|
+
],
|
17
|
+
"lib": [
|
18
|
+
"es2018",
|
19
|
+
"dom"
|
20
|
+
],
|
21
|
+
"paths": {
|
22
|
+
"rxjs/observable/throw": [
|
23
|
+
"node_modules/rxjs-compat/_esm2015/observable/throw"
|
24
|
+
],
|
25
|
+
"rxjs/observable/*": [
|
26
|
+
"node_modules/rxjs-compat/_esm2015/observable/*"
|
27
|
+
],
|
28
|
+
"rxjs/Observable": [
|
29
|
+
"node_modules/rxjs-compat/_esm2015/Observable"
|
30
|
+
],
|
31
|
+
"@wm/build-task": [
|
32
|
+
"node_modules/@wavemaker/app-ng-runtime/build-task/"
|
33
|
+
],
|
34
|
+
"@wm/core": [
|
35
|
+
"node_modules/@wavemaker/app-ng-runtime/core"
|
36
|
+
],
|
37
|
+
"@wm/components/basic": [
|
38
|
+
"node_modules/@wavemaker/app-ng-runtime/components/basic/default"
|
39
|
+
],
|
40
|
+
"@wm/components/input": [
|
41
|
+
"node_modules/@wavemaker/app-ng-runtime/components/input/default"
|
42
|
+
],
|
43
|
+
"@wm/components/page": [
|
44
|
+
"node_modules/@wavemaker/app-ng-runtime/components/page/default"
|
45
|
+
],
|
46
|
+
"@wm/components/dialogs": [
|
47
|
+
"node_modules/@wavemaker/app-ng-runtime/components/dialogs/default"
|
48
|
+
],
|
49
|
+
"@wm/components/*": [
|
50
|
+
"node_modules/@wavemaker/app-ng-runtime/components/*"
|
51
|
+
],
|
52
|
+
"@wm/transpiler": [
|
53
|
+
"node_modules/@wavemaker/app-ng-runtime/transpiler"
|
54
|
+
],
|
55
|
+
"@wm/security": [
|
56
|
+
"node_modules/@wavemaker/app-ng-runtime/security"
|
57
|
+
],
|
58
|
+
"@swipey": [
|
59
|
+
"node_modules/@wavemaker/app-ng-runtime/swipey"
|
60
|
+
],
|
61
|
+
"@wm/http": [
|
62
|
+
"node_modules/@wavemaker/app-ng-runtime/http"
|
63
|
+
],
|
64
|
+
"@wm/oAuth": [
|
65
|
+
"node_modules/@wavemaker/app-ng-runtime/oAuth"
|
66
|
+
],
|
67
|
+
"@wm/variables": [
|
68
|
+
"node_modules/@wavemaker/app-ng-runtime/variables"
|
69
|
+
],
|
70
|
+
"@wm/runtime/base": [
|
71
|
+
"node_modules/@wavemaker/app-ng-runtime/runtime/base"
|
72
|
+
],
|
73
|
+
"@wm/runtime/dynamic": [
|
74
|
+
"node_modules/@wavemaker/app-ng-runtime/runtime/dynamic"
|
75
|
+
]
|
76
|
+
}
|
77
|
+
},
|
78
|
+
"angularCompilerOptions": {
|
79
|
+
"compilationMode": "full"
|
80
|
+
}
|
81
|
+
}
|
@@ -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: {
|