@wavemaker/angular-codegen 12.0.0-next.141219 → 12.0.0-next.141221
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 +35 -9
- {angular-codegen → package}/angular-app/build-scripts/post-build.js +2 -0
- package/angular-app/dependency-report.html +124 -0
- package/angular-app/generate-dependency-report.js +240 -0
- package/angular-app/npm-shrinkwrap.json +25284 -0
- {angular-codegen → package}/angular-app/package-lock.json +11372 -9860
- {angular-codegen → package}/angular-app/package.json +32 -25
- package/angular-app/src/main.ts +67 -0
- {angular-codegen → package}/angular-app/tsconfig.json +34 -44
- package/build-angular-app.js +123 -0
- {angular-codegen → package}/dependencies/expression-parser.cjs.js +13889 -17335
- {angular-codegen → package}/dependencies/pipe-provider.cjs.js +38114 -37502
- {angular-codegen → package}/dependencies/transpilation-mobile.cjs.js +23339 -23035
- {angular-codegen → package}/dependencies/transpilation-web.cjs.js +23345 -23038
- {angular-codegen → package}/download-packages.js +9 -0
- package/npm-shrinkwrap.json +8022 -0
- package/package-lock.json +8022 -0
- {angular-codegen → package}/package.json +7 -1
- package/src/codegen-cli.js +1 -0
- package/src/codegen.js +1 -0
- package/src/copy-utils.js +1 -0
- package/src/gen-app-skeleton.js +1 -0
- package/src/gen-index-html.js +1 -0
- package/src/update-angular-json.js +1 -0
- package/src/wm-utils.js +1 -0
- angular-codegen/angular-app/src/main.ts +0 -30
- angular-codegen/build-angular-app.js +0 -79
- angular-codegen/package-lock.json +0 -6059
- angular-codegen/src/codegen-cli.js +0 -1
- angular-codegen/src/codegen.js +0 -1
- angular-codegen/src/gen-app-skeleton.js +0 -1
- angular-codegen/src/gen-index-html.js +0 -1
- angular-codegen/src/update-angular-json.js +0 -1
- angular-codegen/src/wm-utils.js +0 -1
- {angular-codegen → package}/.npmrc +0 -0
- {angular-codegen → package}/angular-app/.npmrc +0 -0
- {angular-codegen → package}/angular-app/build-scripts/build.js +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/lazy-load-scripts.resolve.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/css/wm-style.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/framework/util/page-util.ts +0 -0
- {angular-codegen → package}/angular-app/src/index.html +0 -0
- {angular-codegen → package}/angular-app/src/polyfills.ts +0 -0
- {angular-codegen → package}/angular-app/src/setup-jest.js +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}/angular-app/tsconfig.web-app.json +0 -0
- {angular-codegen → package}/angular-app/wm-custom-webpack.config.js +0 -0
- {angular-codegen → package}/build-util.js +0 -0
- {angular-codegen → package}/dependencies/app.component.html +0 -0
- {angular-codegen → package}/generate-angular-app.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/codegen-args-cli.js +0 -0
- {angular-codegen → package}/src/expr-parser-utils.js +0 -0
- {angular-codegen → package}/src/gen-app-codegen-module.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-routes.js +0 -0
- {angular-codegen → package}/src/gen-app-variables.js +0 -0
- {angular-codegen → package}/src/gen-components.js +0 -0
- {angular-codegen → package}/src/gen-layouts.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}/src/handlebar-helpers.js +0 -0
- {angular-codegen → package}/src/pages-util.js +0 -0
- {angular-codegen → package}/src/project-meta.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-routes.ts.hbs +0 -0
- {angular-codegen → package}/templates/app.component.script.js.hbs +0 -0
- {angular-codegen → package}/templates/app.module.ts.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.component.ts.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/page/page.component.ts.hbs +0 -0
- {angular-codegen → package}/templates/page/page.module.ts.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "wavemaker-
|
|
3
|
-
"version": "0.0.
|
|
2
|
+
"name": "@wavemaker/angular-app",
|
|
3
|
+
"version": "12.0.0-next.141221",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"ng": "ng",
|
|
6
6
|
"start": "./node_modules/.bin/ng serve",
|
|
@@ -12,20 +12,24 @@
|
|
|
12
12
|
"test-prod": "jest --no-cache --no-color --ci --silent 2>&1 | sed 's/\\x1b\\[[0-9;]*m//g' > karma-test-report.txt",
|
|
13
13
|
"lint": "eslint src/",
|
|
14
14
|
"e2e": "./node_modules/.bin/ng e2e",
|
|
15
|
+
"generate-deps": "node generate-dependency-report.js",
|
|
15
16
|
"optimizecss": "gulp --gulpfile build-scripts/optimize-css.gulpfile.js",
|
|
16
17
|
"owasp": "owasp-dependency-check --project \"wavemaker-ng-runtime\" -f \"ALL\""
|
|
17
18
|
},
|
|
18
|
-
"
|
|
19
|
+
"files": [
|
|
20
|
+
"**/*",
|
|
21
|
+
".npmrc"
|
|
22
|
+
],
|
|
19
23
|
"dependencies": {
|
|
20
|
-
"@angular/animations": "
|
|
21
|
-
"@angular/common": "
|
|
22
|
-
"@angular/compiler": "
|
|
23
|
-
"@angular/core": "
|
|
24
|
-
"@angular/forms": "
|
|
25
|
-
"@angular/platform-browser": "
|
|
26
|
-
"@angular/platform-browser-dynamic": "
|
|
27
|
-
"@angular/router": "
|
|
28
|
-
"@angular/service-worker": "
|
|
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",
|
|
29
33
|
"@awesome-cordova-plugins/app-version": "5.39.1",
|
|
30
34
|
"@awesome-cordova-plugins/barcode-scanner": "5.39.1",
|
|
31
35
|
"@awesome-cordova-plugins/calendar": "5.39.1",
|
|
@@ -45,7 +49,7 @@
|
|
|
45
49
|
"@metrichor/jmespath": "0.3.1",
|
|
46
50
|
"@wavemaker/focus-trap": "1.0.1",
|
|
47
51
|
"@wavemaker/nvd3": "1.8.12",
|
|
48
|
-
"@wavemaker/variables": "12.0.0-next.
|
|
52
|
+
"@wavemaker/variables": "12.0.0-next.141221",
|
|
49
53
|
"@ztree/ztree_v3": "3.5.48",
|
|
50
54
|
"angular-imask": "^7.6.1",
|
|
51
55
|
"angular2-websocket": "0.9.7",
|
|
@@ -58,6 +62,7 @@
|
|
|
58
62
|
"jquery-ui": "1.13.3",
|
|
59
63
|
"js-cookie": "2.2.0",
|
|
60
64
|
"jssha": "3.1.2",
|
|
65
|
+
"lodash": "4.17.21",
|
|
61
66
|
"lodash-es": "4.17.21",
|
|
62
67
|
"ng-circle-progress": "1.7.1",
|
|
63
68
|
"ngx-bootstrap": "9.0.0",
|
|
@@ -65,25 +70,25 @@
|
|
|
65
70
|
"ngx-toastr": "17.0.2",
|
|
66
71
|
"rxjs": "6.6.0",
|
|
67
72
|
"rxjs-compat": "6.4.0",
|
|
68
|
-
"summernote": "0.
|
|
73
|
+
"summernote": "0.9.1",
|
|
69
74
|
"ts-jest": "29.1.1",
|
|
70
75
|
"tslib": "2.4.1",
|
|
71
76
|
"x2js": "3.4.4",
|
|
72
|
-
"zone.js": "0.14.
|
|
73
|
-
"@wavemaker/app-ng-runtime": "12.0.0-next.
|
|
77
|
+
"zone.js": "0.14.10",
|
|
78
|
+
"@wavemaker/app-ng-runtime": "12.0.0-next.141221"
|
|
74
79
|
},
|
|
75
80
|
"devDependencies": {
|
|
76
81
|
"@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
|
|
77
|
-
"@angular-builders/custom-webpack": "
|
|
78
|
-
"@angular-devkit/build-angular": "
|
|
82
|
+
"@angular-builders/custom-webpack": "18.0.0",
|
|
83
|
+
"@angular-devkit/build-angular": "18.2.12",
|
|
79
84
|
"@angular-eslint/builder": "16.2.0",
|
|
80
85
|
"@angular-eslint/eslint-plugin": "16.2.0",
|
|
81
86
|
"@angular-eslint/eslint-plugin-template": "16.2.0",
|
|
82
87
|
"@angular-eslint/schematics": "16.2.0",
|
|
83
88
|
"@angular-eslint/template-parser": "16.2.0",
|
|
84
|
-
"@angular/cli": "
|
|
85
|
-
"@angular/compiler-cli": "
|
|
86
|
-
"@angular/language-service": "
|
|
89
|
+
"@angular/cli": "18.2.12",
|
|
90
|
+
"@angular/compiler-cli": "18.2.13",
|
|
91
|
+
"@angular/language-service": "18.2.13",
|
|
87
92
|
"@babel/plugin-transform-runtime": "^7.14.5",
|
|
88
93
|
"@compodoc/compodoc": "^1.1.25",
|
|
89
94
|
"@rollup/plugin-alias": "4.0.2",
|
|
@@ -101,21 +106,23 @@
|
|
|
101
106
|
"cheerio": "1.0.0-rc.12",
|
|
102
107
|
"codelyzer": "5.1.2",
|
|
103
108
|
"compression-webpack-plugin": "10.0.0",
|
|
109
|
+
"dependency-cruiser": "16.8.0",
|
|
104
110
|
"eslint": "^8.45.0",
|
|
105
111
|
"fs": "0.0.1-security",
|
|
106
112
|
"fs-extra": "7.0.1",
|
|
107
113
|
"jest": "^29.7.0",
|
|
108
114
|
"jest-canvas-mock": "^2.5.2",
|
|
109
115
|
"jest-preset-angular": "^14.1.0",
|
|
116
|
+
"license-checker": "25.0.1",
|
|
110
117
|
"moment": "2.29.4",
|
|
111
118
|
"moment-timezone": "^0.5.34",
|
|
112
119
|
"ng-packagr": "17.3.0",
|
|
113
120
|
"npm-run-all": "4.1.5",
|
|
114
121
|
"owasp-dependency-check": "0.0.23",
|
|
115
122
|
"rimraf": "2.6.3",
|
|
116
|
-
"rollup": "4.
|
|
123
|
+
"rollup": "4.28.1",
|
|
117
124
|
"rollup-plugin-includepaths": "0.2.3",
|
|
118
|
-
"sonarqube-scanner": "4.
|
|
125
|
+
"sonarqube-scanner": "4.2.6",
|
|
119
126
|
"terser": "^5.15.1",
|
|
120
127
|
"ts-node": "7.0.1",
|
|
121
128
|
"tslint": "~6.1.0",
|
|
@@ -129,8 +136,8 @@
|
|
|
129
136
|
"@rollup/rollup-win32-x64": "4.9.5"
|
|
130
137
|
},
|
|
131
138
|
"engines": {
|
|
132
|
-
"node": "
|
|
133
|
-
"npm": "
|
|
139
|
+
"node": "~22.11.0",
|
|
140
|
+
"npm": "~10.9.0"
|
|
134
141
|
},
|
|
135
142
|
"engineStrict": true
|
|
136
143
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ApplicationRef, enableProdMode, NgModuleRef } from '@angular/core';
|
|
2
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
3
|
+
|
|
4
|
+
import { AppModule } from './app/app.module';
|
|
5
|
+
import { environment } from './environments/environment';
|
|
6
|
+
|
|
7
|
+
import initWmProjectProperties from './app/wm-project-properties';
|
|
8
|
+
import { WMAppProperties } from './app/wmProperties';
|
|
9
|
+
import * as fontConfig from './font.config';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
let formatAcceptHeader = (languages: any) => {
|
|
13
|
+
let result: string[] = [];
|
|
14
|
+
let addedLanguages = new Set<string>(); // To track already added languages
|
|
15
|
+
let qValue = 1.0;
|
|
16
|
+
|
|
17
|
+
languages.forEach((lang: any) => {
|
|
18
|
+
if (!addedLanguages.has(lang)) {
|
|
19
|
+
// Add the full language (e.g., en-US or en) if not already added
|
|
20
|
+
result.push(`${lang}${qValue === 1.0 ? '' : `;q=${qValue.toFixed(1)}`}`);
|
|
21
|
+
addedLanguages.add(lang);
|
|
22
|
+
// Decrease qValue for the next language
|
|
23
|
+
qValue = Math.max(0.1, qValue - 0.1); // Decrease qValue, minimum is 0.1
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// If language has a region code (e.g., en-US), also add the base language (e.g., en)
|
|
27
|
+
if (lang.includes('-')) {
|
|
28
|
+
const baseLang = lang.split('-')[0];
|
|
29
|
+
if (!addedLanguages.has(baseLang)) {
|
|
30
|
+
result.push(`${baseLang};q=${qValue.toFixed(1)}`);
|
|
31
|
+
addedLanguages.add(baseLang);
|
|
32
|
+
|
|
33
|
+
// Decrease qValue for the next language
|
|
34
|
+
qValue = Math.max(0.1, qValue - 0.1);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
return result.join(',');
|
|
40
|
+
}
|
|
41
|
+
WMAppProperties['preferredLanguage'] = formatAcceptHeader(navigator.languages);
|
|
42
|
+
WMAppProperties['fontConfig'] = fontConfig;
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
(window as any)._WM_APP_PROPERTIES = WMAppProperties
|
|
46
|
+
initWmProjectProperties();
|
|
47
|
+
|
|
48
|
+
if (environment.production) {
|
|
49
|
+
enableProdMode();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
53
|
+
new Promise<Event | void>( resolve => {
|
|
54
|
+
if (window['cordova']) {
|
|
55
|
+
document.addEventListener('deviceready', resolve);
|
|
56
|
+
} else {
|
|
57
|
+
resolve();
|
|
58
|
+
}
|
|
59
|
+
}).then(() => platformBrowserDynamic().bootstrapModule(AppModule))
|
|
60
|
+
.then((appModuleRef: NgModuleRef<AppModule>) => {
|
|
61
|
+
const applicationRef = appModuleRef.injector.get(ApplicationRef);
|
|
62
|
+
window.addEventListener('unload', () => {
|
|
63
|
+
applicationRef.components.map(c => c && c.destroy());
|
|
64
|
+
});
|
|
65
|
+
console.timeEnd('bootstrap'), err => console.log(err);
|
|
66
|
+
}, err => console.log(err));
|
|
67
|
+
});
|
|
@@ -2,19 +2,23 @@
|
|
|
2
2
|
"compileOnSave": false,
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"baseUrl": "./",
|
|
5
|
-
"outDir": "./dist/out-tsc",
|
|
6
5
|
"downlevelIteration": true,
|
|
7
|
-
"
|
|
6
|
+
"outDir": "./dist/out-tsc",
|
|
8
7
|
"sourceMap": true,
|
|
8
|
+
"declaration": false,
|
|
9
|
+
"target": "es2022",
|
|
10
|
+
"module": "es2020",
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"esModuleInterop": true,
|
|
9
13
|
"emitDecoratorMetadata": true,
|
|
10
14
|
"experimentalDecorators": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"moduleResolution": "node",
|
|
13
|
-
"target": "ES2022",
|
|
14
|
-
"module": "ES2022",
|
|
15
15
|
"typeRoots": [
|
|
16
16
|
"node_modules/@types"
|
|
17
17
|
],
|
|
18
|
+
"lib": [
|
|
19
|
+
"es2018",
|
|
20
|
+
"dom"
|
|
21
|
+
],
|
|
18
22
|
"paths": {
|
|
19
23
|
"rxjs/observable/throw": [
|
|
20
24
|
"node_modules/rxjs-compat/_esm2015/observable/throw"
|
|
@@ -32,31 +36,31 @@
|
|
|
32
36
|
"node_modules/@wavemaker/app-ng-runtime/mobile-build-task"
|
|
33
37
|
],
|
|
34
38
|
"@wm/core": [
|
|
35
|
-
"node_modules/@wavemaker/app-ng-runtime/core
|
|
39
|
+
"node_modules/@wavemaker/app-ng-runtime/core"
|
|
36
40
|
],
|
|
37
41
|
"@wavemaker/variables": [
|
|
38
42
|
"node_modules/@wavemaker/variables/"
|
|
39
43
|
],
|
|
40
44
|
"@wm/components/base": [
|
|
41
|
-
"node_modules/@wavemaker/app-ng-runtime/components/base
|
|
45
|
+
"node_modules/@wavemaker/app-ng-runtime/components/base"
|
|
42
46
|
],
|
|
43
47
|
"@wm/components/basic": [
|
|
44
|
-
"node_modules/@wavemaker/app-ng-runtime/components/basic/default
|
|
48
|
+
"node_modules/@wavemaker/app-ng-runtime/components/basic/default"
|
|
45
49
|
],
|
|
46
50
|
"@wm/components/input": [
|
|
47
|
-
"node_modules/@wavemaker/app-ng-runtime/components/input/default
|
|
51
|
+
"node_modules/@wavemaker/app-ng-runtime/components/input/default"
|
|
48
52
|
],
|
|
49
53
|
"@wm/components/page": [
|
|
50
|
-
"node_modules/@wavemaker/app-ng-runtime/components/page/default
|
|
54
|
+
"node_modules/@wavemaker/app-ng-runtime/components/page/default"
|
|
51
55
|
],
|
|
52
56
|
"@wm/mobile/components/basic": [
|
|
53
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components/basic/default
|
|
57
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/components/basic/default"
|
|
54
58
|
],
|
|
55
59
|
"@wm/mobile/components/page": [
|
|
56
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components/page/default
|
|
60
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/components/page/default"
|
|
57
61
|
],
|
|
58
62
|
"@wm/components/dialogs": [
|
|
59
|
-
"node_modules/@wavemaker/app-ng-runtime/components/dialogs/default
|
|
63
|
+
"node_modules/@wavemaker/app-ng-runtime/components/dialogs/default"
|
|
60
64
|
],
|
|
61
65
|
"@wm/mobile/components/*": [
|
|
62
66
|
"node_modules/@wavemaker/app-ng-runtime/mobile/components/*"
|
|
@@ -65,67 +69,53 @@
|
|
|
65
69
|
"node_modules/@wavemaker/app-ng-runtime/components/*"
|
|
66
70
|
],
|
|
67
71
|
"@wm/transpiler": [
|
|
68
|
-
"node_modules/@wavemaker/app-ng-runtime/transpiler
|
|
72
|
+
"node_modules/@wavemaker/app-ng-runtime/transpiler"
|
|
69
73
|
],
|
|
70
74
|
"@wm/security": [
|
|
71
|
-
"node_modules/@wavemaker/app-ng-runtime/security
|
|
75
|
+
"node_modules/@wavemaker/app-ng-runtime/security"
|
|
72
76
|
],
|
|
73
77
|
"@swipey": [
|
|
74
|
-
"node_modules/@wavemaker/app-ng-runtime/swipey
|
|
78
|
+
"node_modules/@wavemaker/app-ng-runtime/swipey"
|
|
75
79
|
],
|
|
76
80
|
"@wm/http": [
|
|
77
|
-
"node_modules/@wavemaker/app-ng-runtime/http
|
|
81
|
+
"node_modules/@wavemaker/app-ng-runtime/http"
|
|
78
82
|
],
|
|
79
83
|
"@wm/oAuth": [
|
|
80
|
-
"node_modules/@wavemaker/app-ng-runtime/oAuth
|
|
84
|
+
"node_modules/@wavemaker/app-ng-runtime/oAuth"
|
|
81
85
|
],
|
|
82
86
|
"@wm/variables": [
|
|
83
|
-
"node_modules/@wavemaker/app-ng-runtime/variables
|
|
87
|
+
"node_modules/@wavemaker/app-ng-runtime/variables"
|
|
84
88
|
],
|
|
85
89
|
"@wm/mobile/core": [
|
|
86
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/core
|
|
90
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/core"
|
|
87
91
|
],
|
|
88
92
|
"@wm/mobile/components": [
|
|
89
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/components
|
|
93
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/components"
|
|
90
94
|
],
|
|
91
95
|
"@wm/mobile/offline": [
|
|
92
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/offline
|
|
96
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/offline"
|
|
93
97
|
],
|
|
94
98
|
"@wm/mobile/variables": [
|
|
95
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/variables
|
|
99
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/variables"
|
|
96
100
|
],
|
|
97
101
|
"@wm/runtime/base": [
|
|
98
|
-
"node_modules/@wavemaker/app-ng-runtime/runtime/base
|
|
102
|
+
"node_modules/@wavemaker/app-ng-runtime/runtime/base"
|
|
99
103
|
],
|
|
100
104
|
"@wm/runtime/dynamic": [
|
|
101
|
-
"node_modules/@wavemaker/app-ng-runtime/runtime/dynamic
|
|
105
|
+
"node_modules/@wavemaker/app-ng-runtime/runtime/dynamic"
|
|
102
106
|
],
|
|
103
107
|
"@wm/mobile/runtime": [
|
|
104
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/runtime
|
|
108
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/runtime"
|
|
105
109
|
],
|
|
106
110
|
"@wm/mobile/runtime/dynamic": [
|
|
107
|
-
"node_modules/@wavemaker/app-ng-runtime/mobile/runtime-dynamic
|
|
111
|
+
"node_modules/@wavemaker/app-ng-runtime/mobile/runtime-dynamic"
|
|
108
112
|
]
|
|
109
113
|
},
|
|
110
|
-
"
|
|
111
|
-
"es2020",
|
|
112
|
-
"dom"
|
|
113
|
-
],
|
|
114
|
-
"useDefineForClassFields": false,
|
|
115
|
-
"resolveJsonModule": true
|
|
114
|
+
"useDefineForClassFields": false
|
|
116
115
|
},
|
|
117
116
|
"angularCompilerOptions": {
|
|
118
117
|
"compilationMode": "full",
|
|
119
118
|
"strictMetadataEmit": false,
|
|
120
|
-
"fullTemplateTypeCheck": false
|
|
121
|
-
"extendedDiagnostics": {
|
|
122
|
-
"checks": {
|
|
123
|
-
"optionalChainNotNullable": "suppress"
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"enableI18nLegacyMessageIdFormat": false,
|
|
127
|
-
"strictInjectionParameters": false,
|
|
128
|
-
"strictInputAccessModifiers": false,
|
|
129
|
-
"trace": true
|
|
119
|
+
"fullTemplateTypeCheck": false
|
|
130
120
|
}
|
|
131
121
|
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* Download and install the app-ng-runtime package
|
|
4
|
+
* Run the build and post build for the generated angular app.
|
|
5
|
+
*
|
|
6
|
+
* CONSOLE ARGUMENTS:-
|
|
7
|
+
* nodeVMArgs:String: Node environment params (Eg: '--max-old-space-size=2040')
|
|
8
|
+
* ngBuildParams:String: Anglar build params (Eg: '--prod=true --source-map=false')
|
|
9
|
+
* runtimeUIVersion:String: Runtime version (Eg: 10.6.6-next.10243)
|
|
10
|
+
* appSrc:String: Source folder to generate the angular app (current directory Eg: '.')
|
|
11
|
+
* appTarget:String: Target folder to save the generated app (Eg: 'target/ui-build/generated-app')
|
|
12
|
+
* codegenPath:String: Input to the codegen-CLI --> Codegen installation path to copy the angular-template-app
|
|
13
|
+
* optimizeUIBuild : By default this flag will be true. If it's windows platform we are making the flag to false, it means no optimisation for windows.
|
|
14
|
+
*/
|
|
15
|
+
const fs = require('fs');
|
|
16
|
+
const { downloadNPMPackage } = require('./download-packages');
|
|
17
|
+
const archiver = require('archiver');
|
|
18
|
+
const path = require("path");
|
|
19
|
+
const { executeSyncCmd, MSG_NG_RUNTIME_LOG, MSG_NG_RUNTIME_SUCCESS } = require('./build-util');
|
|
20
|
+
const os = require("os");
|
|
21
|
+
|
|
22
|
+
const NPM_PACKAGE_SCOPE = '@wavemaker';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @TODO: This is a temporary workaround to extract deploy-url from 'ngBuildParams', need to be replaced in future.
|
|
26
|
+
*/
|
|
27
|
+
const updateDeployUrl = (args) => {
|
|
28
|
+
let buildArgs = args.ngBuildParams.split(' ');
|
|
29
|
+
const deployParam = buildArgs.find(i => i.startsWith("--deploy-url="));
|
|
30
|
+
if(!deployParam) {
|
|
31
|
+
buildArgs.push("--deploy-url=ng-bundle/");
|
|
32
|
+
} else {
|
|
33
|
+
buildArgs.filter((param, index) => {
|
|
34
|
+
if (param.includes('--deploy-url=_cdnUrl_')) {
|
|
35
|
+
buildArgs[index] = "--deploy-url=_cdnUrl_/ng-bundle/"
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
buildArgs.push(args.nodeVMArgs);
|
|
41
|
+
return buildArgs.join(" ");
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Download the app runtime package
|
|
46
|
+
* Symlink to reuse the existing node modules (If windows optimizeUIBuild will be false and install all node modules every build )
|
|
47
|
+
* Run the ng build and post build for the project
|
|
48
|
+
*/
|
|
49
|
+
const buildAngularApp = (args) => {
|
|
50
|
+
const HOME_DIR = os.homedir(), ANGULAR_APP_TEMPLATE_NAME = "angular-app";
|
|
51
|
+
const TARBALL_DOWNLOAD_PATH = (HOME_DIR + '/.wm/node_modules') + '/' + ANGULAR_APP_TEMPLATE_NAME + '/' + args.runtimeUIVersion;
|
|
52
|
+
const PACKAGE_NAME = NPM_PACKAGE_SCOPE + '/' + ANGULAR_APP_TEMPLATE_NAME + '@' + args.runtimeUIVersion;
|
|
53
|
+
const TARBALL_NAME = 'wavemaker' + '-' + ANGULAR_APP_TEMPLATE_NAME + '-' + args.runtimeUIVersion + '.tgz';
|
|
54
|
+
|
|
55
|
+
fs.mkdirSync(TARBALL_DOWNLOAD_PATH, { recursive: true });
|
|
56
|
+
//npm pack will download the given package as a tar file
|
|
57
|
+
executeSyncCmd('cd ' + TARBALL_DOWNLOAD_PATH + ` && npm pack ${PACKAGE_NAME}`, null, `Downloading tarball - ${PACKAGE_NAME} to the location - ${TARBALL_DOWNLOAD_PATH}`);
|
|
58
|
+
executeSyncCmd('cd ' + TARBALL_DOWNLOAD_PATH + ` && tar -xvf ${TARBALL_NAME}`, null, `Unzipping the tarball - ${TARBALL_NAME}`);
|
|
59
|
+
|
|
60
|
+
let packageInfo = {
|
|
61
|
+
scope: NPM_PACKAGE_SCOPE,
|
|
62
|
+
name: ANGULAR_APP_TEMPLATE_NAME,
|
|
63
|
+
version: args.runtimeUIVersion,
|
|
64
|
+
packageJsonFile: `${TARBALL_DOWNLOAD_PATH}/package/package.json`,
|
|
65
|
+
packageJsonLockFile: `${TARBALL_DOWNLOAD_PATH}/package/package-lock.json`,
|
|
66
|
+
successMsg: MSG_NG_RUNTIME_SUCCESS,
|
|
67
|
+
infoMsg: MSG_NG_RUNTIME_LOG
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
try {
|
|
71
|
+
if (args.optimizeUIBuild) {
|
|
72
|
+
fs.copyFileSync(TARBALL_DOWNLOAD_PATH + `/package/package.json`, TARBALL_DOWNLOAD_PATH + '/package.json');
|
|
73
|
+
fs.copyFileSync(TARBALL_DOWNLOAD_PATH + `/package/package-lock.json`, TARBALL_DOWNLOAD_PATH + '/package-lock.json');
|
|
74
|
+
fs.copyFileSync(TARBALL_DOWNLOAD_PATH + `/package/.npmrc`, TARBALL_DOWNLOAD_PATH + '/.npmrc');
|
|
75
|
+
|
|
76
|
+
// Download angular-app node_modules
|
|
77
|
+
executeSyncCmd('cd ' + TARBALL_DOWNLOAD_PATH + ' && npm install --prefix ' + TARBALL_DOWNLOAD_PATH, null, "Installing app dependencies...");
|
|
78
|
+
|
|
79
|
+
// Symlink to reuse the existing node_modules
|
|
80
|
+
fs.symlinkSync(TARBALL_DOWNLOAD_PATH + `/node_modules`, args.appTarget + '/node_modules', 'dir');
|
|
81
|
+
} else {
|
|
82
|
+
fs.copyFileSync(TARBALL_DOWNLOAD_PATH + `/package/package/package.json`, args.appTarget + '/package.json');
|
|
83
|
+
fs.copyFileSync(TARBALL_DOWNLOAD_PATH + `/package/package-lock.json`, args.appTarget + '/package-lock.json');
|
|
84
|
+
fs.copyFileSync(TARBALL_DOWNLOAD_PATH + `/package/.npmrc`, args.appTarget + '/.npmrc');
|
|
85
|
+
executeSyncCmd('cd ' + args.appTarget + ` && npm install `, null, MSG_NG_RUNTIME_LOG);
|
|
86
|
+
}
|
|
87
|
+
} catch (err) {
|
|
88
|
+
console.log(MSG_NG_RUNTIME_LOG + 'FAILED the symlink for the node_modules', err);
|
|
89
|
+
process.exit(err.code || err.pid);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
let ngBuildParams = updateDeployUrl(args);
|
|
93
|
+
const NG_BUILD_MSG = 'NG BUILD MIGHT HAVE FAILED WITH HEAP OUT OF MEMORY, RE-EXECUTE THE BUILD BY INCREASING THE MAX-OLD-SPACE-SIZE ARGUMENT VALUE FOR BUILD.UI.NODE.ARGS PROPERTY IN DEPLOYMENT PROFILE';
|
|
94
|
+
// Generating the angular build and post build process.
|
|
95
|
+
executeSyncCmd('cd ' + args.appTarget + ' && node ./build-scripts/build.js ' + ngBuildParams, null, MSG_NG_RUNTIME_LOG, false, NG_BUILD_MSG);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const generateUiZip = async( sourceDir ) => {
|
|
99
|
+
return new Promise((resolve, reject) => {
|
|
100
|
+
const distDir = path.resolve(sourceDir + '/target/ui-build/output-files');
|
|
101
|
+
const zipFile = path.resolve(sourceDir + '/target/ui-artifact.zip');
|
|
102
|
+
|
|
103
|
+
const output = fs.createWriteStream(zipFile);
|
|
104
|
+
const archive = archiver('zip', {
|
|
105
|
+
zlib: {level: 9}
|
|
106
|
+
});
|
|
107
|
+
output.on('close', () => {
|
|
108
|
+
console.log(`✅ ui-artifact.zip created successfully: ${zipFile}`);
|
|
109
|
+
resolve();
|
|
110
|
+
});
|
|
111
|
+
archive.on('error', (err) => {
|
|
112
|
+
reject(err);
|
|
113
|
+
});
|
|
114
|
+
archive.pipe(output);
|
|
115
|
+
archive.directory(distDir, false);
|
|
116
|
+
archive.finalize();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
module.exports = {
|
|
121
|
+
buildAngularApp,
|
|
122
|
+
generateUiZip
|
|
123
|
+
}
|