@wavemaker/angular-codegen 11.10.0-next.24983 → 11.10.0-next.27705

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.
Files changed (187) hide show
  1. {angular-codegen → package}/angular-app/angular.json +36 -10
  2. {angular-codegen → package}/angular-app/build-scripts/build.js +1 -0
  3. {angular-codegen → package}/angular-app/build-scripts/post-build.js +18 -15
  4. package/angular-app/dependency-report.html +124 -0
  5. package/angular-app/generate-dependency-report.js +240 -0
  6. package/angular-app/npm-shrinkwrap.json +25427 -0
  7. {angular-codegen → package}/angular-app/package-lock.json +11004 -9349
  8. {angular-codegen → package}/angular-app/package.json +38 -26
  9. package/angular-app/src/assets/styles/css/wm-style.css +1 -0
  10. package/angular-app/src/framework/services/customwidget-config-provider.service.ts +13 -0
  11. package/angular-app/src/framework/util/page-util.ts +7 -0
  12. package/angular-app/src/main.ts +67 -0
  13. {angular-codegen → package}/angular-app/src/setup-jest.js +4 -1
  14. {angular-codegen → package}/angular-app/tsconfig.json +3 -0
  15. package/build-angular-app.js +463 -0
  16. package/dependencies/custom-widgets-bundle.cjs.js +415 -0
  17. {angular-codegen → package}/dependencies/expression-parser.cjs.js +13909 -17363
  18. {angular-codegen → package}/dependencies/pipe-provider.cjs.js +38215 -37593
  19. {angular-codegen → package}/dependencies/transpilation-mobile.cjs.js +23855 -23466
  20. {angular-codegen → package}/dependencies/transpilation-web.cjs.js +23872 -23482
  21. {angular-codegen → package}/download-packages.js +13 -1
  22. {angular-codegen → package}/generate-angular-app.js +3 -1
  23. package/npm-shrinkwrap.json +8071 -0
  24. package/package-lock.json +8071 -0
  25. {angular-codegen → package}/package.json +8 -3
  26. package/src/codegen-args-cli.js +1 -0
  27. package/src/codegen-cli.js +1 -0
  28. package/src/codegen.js +1 -0
  29. package/src/copy-utils.js +1 -0
  30. package/src/gen-app-skeleton.js +1 -0
  31. package/src/gen-components.js +1 -0
  32. package/src/gen-customwidget-config.js +1 -0
  33. package/src/gen-index-html.js +1 -0
  34. package/src/handlebar-helpers.js +1 -0
  35. package/src/pages-util.js +1 -0
  36. {angular-codegen → package}/src/project-meta.js +1 -1
  37. package/src/update-angular-json.js +1 -0
  38. package/src/wm-utils.js +1 -0
  39. {angular-codegen → package}/templates/app.module.ts.hbs +5 -1
  40. package/templates/component.config.ts.hbs +1 -0
  41. package/templates/customwidget/customwidget-config.ts.hbs +6 -0
  42. package/templates/customwidget/customwidget.component.script.js.hbs +3 -0
  43. package/templates/customwidget/customwidget.component.ts.hbs +43 -0
  44. {angular-codegen → package}/templates/page/page.module.ts.hbs +11 -0
  45. angular-codegen/angular-app/src/assets/styles/css/wm-style.css +0 -1
  46. angular-codegen/angular-app/src/framework/util/page-util.ts +0 -5
  47. angular-codegen/angular-app/src/main.ts +0 -30
  48. angular-codegen/build-angular-app.js +0 -102
  49. angular-codegen/package-lock.json +0 -6494
  50. angular-codegen/src/codegen-args-cli.js +0 -1
  51. angular-codegen/src/codegen-cli.js +0 -1
  52. angular-codegen/src/codegen.js +0 -1
  53. angular-codegen/src/gen-app-skeleton.js +0 -1
  54. angular-codegen/src/gen-components.js +0 -1
  55. angular-codegen/src/gen-index-html.js +0 -1
  56. angular-codegen/src/handlebar-helpers.js +0 -1
  57. angular-codegen/src/pages-util.js +0 -1
  58. angular-codegen/src/update-angular-json.js +0 -1
  59. angular-codegen/src/wm-utils.js +0 -1
  60. {angular-codegen → package}/.npmrc +0 -0
  61. {angular-codegen → package}/angular-app/.npmrc +0 -0
  62. {angular-codegen → package}/angular-app/build-scripts/index-html-transform.js +0 -0
  63. {angular-codegen → package}/angular-app/build-scripts/optimize-css.gulpfile.js +0 -0
  64. {angular-codegen → package}/angular-app/build-scripts/update-version.js +0 -0
  65. {angular-codegen → package}/angular-app/src/.browserslistrc +0 -0
  66. {angular-codegen → package}/angular-app/src/app/app-codegen.module.ts +0 -0
  67. {angular-codegen → package}/angular-app/src/app/app.component.css +0 -0
  68. {angular-codegen → package}/angular-app/src/app/app.component.script.js +0 -0
  69. {angular-codegen → package}/angular-app/src/app/app.component.variables.ts +0 -0
  70. {angular-codegen → package}/angular-app/src/app/app.routes.ts +0 -0
  71. {angular-codegen → package}/angular-app/src/app/lazy-load-scripts.resolve.ts +0 -0
  72. {angular-codegen → package}/angular-app/src/app/prefabs/prefab-config.js +0 -0
  73. {angular-codegen → package}/angular-app/src/app/wm-project-properties.ts +0 -0
  74. {angular-codegen → package}/angular-app/src/assets/.gitkeep +0 -0
  75. {angular-codegen → package}/angular-app/src/assets/print.css +0 -0
  76. {angular-codegen → package}/angular-app/src/assets/styles/css/bootstrap.css.map +0 -0
  77. {angular-codegen → package}/angular-app/src/assets/styles/css/font/summernote.eot +0 -0
  78. {angular-codegen → package}/angular-app/src/assets/styles/css/font/summernote.ttf +0 -0
  79. {angular-codegen → package}/angular-app/src/assets/styles/css/font/summernote.woff +0 -0
  80. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  81. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  82. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  83. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  84. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  85. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  86. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  87. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  88. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_222222_256x240.png +0 -0
  89. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_2e83ff_256x240.png +0 -0
  90. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_444444_256x240.png +0 -0
  91. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_454545_256x240.png +0 -0
  92. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_555555_256x240.png +0 -0
  93. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_777620_256x240.png +0 -0
  94. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_777777_256x240.png +0 -0
  95. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_888888_256x240.png +0 -0
  96. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_cc0000_256x240.png +0 -0
  97. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_cd0a0a_256x240.png +0 -0
  98. {angular-codegen → package}/angular-app/src/assets/styles/css/images/ui-icons_ffffff_256x240.png +0 -0
  99. {angular-codegen → package}/angular-app/src/assets/styles/css/wm-responsive.css +0 -0
  100. {angular-codegen → package}/angular-app/src/assets/styles/fonts/FontAwesome.otf +0 -0
  101. {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.eot +0 -0
  102. {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.svg +0 -0
  103. {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.ttf +0 -0
  104. {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.woff +0 -0
  105. {angular-codegen → package}/angular-app/src/assets/styles/fonts/fontawesome-webfont.woff2 +0 -0
  106. {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.eot +0 -0
  107. {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.svg +0 -0
  108. {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.ttf +0 -0
  109. {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.woff +0 -0
  110. {angular-codegen → package}/angular-app/src/assets/styles/fonts/glyphicons-halflings-regular.woff2 +0 -0
  111. {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.eot +0 -0
  112. {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.ttf +0 -0
  113. {angular-codegen → package}/angular-app/src/assets/styles/fonts/wavicon.woff +0 -0
  114. {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.eot +0 -0
  115. {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.ttf +0 -0
  116. {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.woff +0 -0
  117. {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.eot +0 -0
  118. {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.ttf +0 -0
  119. {angular-codegen → package}/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.woff +0 -0
  120. {angular-codegen → package}/angular-app/src/assets/styles/images/live-sync-icon.png +0 -0
  121. {angular-codegen → package}/angular-app/src/assets/styles/images/live-sync-touch-icon.png +0 -0
  122. {angular-codegen → package}/angular-app/src/assets/styles/images/loader.gif +0 -0
  123. {angular-codegen → package}/angular-app/src/assets/styles/images/spinner-small.gif +0 -0
  124. {angular-codegen → package}/angular-app/src/assets/styles/images/ui-icons.png +0 -0
  125. {angular-codegen → package}/angular-app/src/environments/environment.dev.ts +0 -0
  126. {angular-codegen → package}/angular-app/src/environments/environment.prod.ts +0 -0
  127. {angular-codegen → package}/angular-app/src/environments/environment.ts +0 -0
  128. {angular-codegen → package}/angular-app/src/framework/angular1.polyfills.ts +0 -0
  129. {angular-codegen → package}/angular-app/src/framework/services/app-extension.service.ts +0 -0
  130. {angular-codegen → package}/angular-app/src/framework/services/app-js-provider.service.ts +0 -0
  131. {angular-codegen → package}/angular-app/src/framework/services/app-variables-provider.service.ts +0 -0
  132. {angular-codegen → package}/angular-app/src/framework/services/component-ref-provider.service.ts +0 -0
  133. {angular-codegen → package}/angular-app/src/framework/services/lazy-component-ref-provider.service.ts +0 -0
  134. {angular-codegen → package}/angular-app/src/framework/services/prefab-config-provider.service.ts +0 -0
  135. {angular-codegen → package}/angular-app/src/framework/util/lazy-module-routes.ts +0 -0
  136. {angular-codegen → package}/angular-app/src/index.html +0 -0
  137. {angular-codegen → package}/angular-app/src/polyfills.ts +0 -0
  138. {angular-codegen → package}/angular-app/src/styles.css +0 -0
  139. {angular-codegen → package}/angular-app/src/tsconfig.app.json +0 -0
  140. {angular-codegen → package}/angular-app/src/tslint.json +0 -0
  141. {angular-codegen → package}/angular-app/tsconfig.web-app.json +0 -0
  142. {angular-codegen → package}/angular-app/wm-custom-webpack.config.js +0 -0
  143. {angular-codegen → package}/build-util.js +0 -0
  144. {angular-codegen → package}/dependencies/app.component.html +0 -0
  145. {angular-codegen → package}/pwa-assets/icons/icon-128x128.png +0 -0
  146. {angular-codegen → package}/pwa-assets/icons/icon-144x144.png +0 -0
  147. {angular-codegen → package}/pwa-assets/icons/icon-152x152.png +0 -0
  148. {angular-codegen → package}/pwa-assets/icons/icon-192x192.png +0 -0
  149. {angular-codegen → package}/pwa-assets/icons/icon-384x384.png +0 -0
  150. {angular-codegen → package}/pwa-assets/icons/icon-512x512.png +0 -0
  151. {angular-codegen → package}/pwa-assets/icons/icon-72x72.png +0 -0
  152. {angular-codegen → package}/pwa-assets/icons/icon-96x96.png +0 -0
  153. {angular-codegen → package}/pwa-assets/manifest.json +0 -0
  154. {angular-codegen → package}/pwa-assets/ngsw-config.json +0 -0
  155. {angular-codegen → package}/pwa-assets/wmsw-worker.js +0 -0
  156. {angular-codegen → package}/src/expr-parser-utils.js +0 -0
  157. {angular-codegen → package}/src/gen-app-codegen-module.js +0 -0
  158. {angular-codegen → package}/src/gen-app-js.js +0 -0
  159. {angular-codegen → package}/src/gen-app-prefabs-module.js +0 -0
  160. {angular-codegen → package}/src/gen-app-routes.js +0 -0
  161. {angular-codegen → package}/src/gen-app-variables.js +0 -0
  162. {angular-codegen → package}/src/gen-layouts.js +0 -0
  163. {angular-codegen → package}/src/gen-lazy-module-routes.js +0 -0
  164. {angular-codegen → package}/src/gen-prefabs.js +0 -0
  165. {angular-codegen → package}/src/gen-pwa-files.js +0 -0
  166. {angular-codegen → package}/src/gen-tsconfig.js +0 -0
  167. {angular-codegen → package}/src/gen-wm-project-properties.js +0 -0
  168. {angular-codegen → package}/templates/app-codegen.module.ts.hbs +0 -0
  169. {angular-codegen → package}/templates/app-prefabs.module.ts.hbs +0 -0
  170. {angular-codegen → package}/templates/app-routes.ts.hbs +0 -0
  171. {angular-codegen → package}/templates/app.component.script.js.hbs +0 -0
  172. {angular-codegen → package}/templates/component.expressions.ts.hbs +0 -0
  173. {angular-codegen → package}/templates/component.variables.ts.hbs +0 -0
  174. {angular-codegen → package}/templates/expr-vs-fn.hbs +0 -0
  175. {angular-codegen → package}/templates/layout/layout.component.ts.hbs +0 -0
  176. {angular-codegen → package}/templates/layout/layout.module.ts.hbs +0 -0
  177. {angular-codegen → package}/templates/lazy-module-routes.ts.hbs +0 -0
  178. {angular-codegen → package}/templates/page/page.component.script.js.hbs +0 -0
  179. {angular-codegen → package}/templates/page/page.component.ts.hbs +0 -0
  180. {angular-codegen → package}/templates/partial/partial.component.script.js.hbs +0 -0
  181. {angular-codegen → package}/templates/partial/partial.component.ts.hbs +0 -0
  182. {angular-codegen → package}/templates/partial/partial.module.ts.hbs +0 -0
  183. {angular-codegen → package}/templates/prefab/prefab-config.ts.hbs +0 -0
  184. {angular-codegen → package}/templates/prefab/prefab.component.script.js.hbs +0 -0
  185. {angular-codegen → package}/templates/prefab/prefab.component.ts.hbs +0 -0
  186. {angular-codegen → package}/templates/prefab/prefab.module.ts.hbs +0 -0
  187. {angular-codegen → package}/templates/wm-project-properties.ts.hbs +0 -0
@@ -1,5 +0,0 @@
1
- const prefabConfigs = new Map<string, any>();
2
-
3
- export const registerPrefabConfig = (prefabName: string, config: any) => prefabConfigs.set(prefabName, config);
4
- export const getPrefabConfig = prefabName => prefabConfigs.get(prefabName);
5
-
@@ -1,30 +0,0 @@
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
-
9
- initWmProjectProperties();
10
-
11
- if (environment.production) {
12
- enableProdMode();
13
- }
14
-
15
- document.addEventListener('DOMContentLoaded', () => {
16
- new Promise<Event | void>( resolve => {
17
- if (window['cordova']) {
18
- document.addEventListener('deviceready', resolve);
19
- } else {
20
- resolve();
21
- }
22
- }).then(() => platformBrowserDynamic().bootstrapModule(AppModule))
23
- .then((appModuleRef: NgModuleRef<AppModule>) => {
24
- const applicationRef = appModuleRef.injector.get(ApplicationRef);
25
- window.addEventListener('unload', () => {
26
- applicationRef.components.map(c => c && c.destroy());
27
- });
28
- console.timeEnd('bootstrap'), err => console.log(err);
29
- }, err => console.log(err));
30
- });
@@ -1,102 +0,0 @@
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
-
21
- /**
22
- * @TODO: This is a temporary workaround to extract deploy-url from 'ngBuildParams', need to be replaced in future.
23
- */
24
- const updateDeployUrl = (args) => {
25
- let buildArgs = args.ngBuildParams.split(' ');
26
- const deployParam = buildArgs.find(i => i.startsWith("--deploy-url="));
27
- if(!deployParam) {
28
- buildArgs.push("--deploy-url=ng-bundle/");
29
- } else {
30
- buildArgs.filter((param, index) => {
31
- if (param.includes('--deploy-url=_cdnUrl_')) {
32
- buildArgs[index] = "--deploy-url=_cdnUrl_/ng-bundle/"
33
- return true;
34
- }
35
- });
36
- }
37
- buildArgs.push(args.nodeVMArgs);
38
- return buildArgs.join(" ");
39
- };
40
-
41
- /**
42
- * Download the app runtime package
43
- * Symlink to reuse the existing node modules (If windows optimizeUIBuild will be false and install all node modules every build )
44
- * Run the ng build and post build for the project
45
- */
46
- const buildAngularApp = (args) => {
47
- let packageInfo = {
48
- name: 'app-ng-runtime',
49
- version: args.runtimeUIVersion,
50
- packageJsonFile: args.codegenPath + '/angular-app/package.json',
51
- successMsg: MSG_NG_RUNTIME_SUCCESS,
52
- infoMsg: MSG_NG_RUNTIME_LOG
53
-
54
- }
55
-
56
- try {
57
- // Symlink to reuse the existing node_modules
58
- if (args.optimizeUIBuild) {
59
- // Download app-ng-runtime node modules
60
- let pathNGRuntimePackage = downloadNPMPackage(packageInfo);
61
- fs.symlinkSync(pathNGRuntimePackage + '/node_modules', args.appTarget + '/node_modules', 'dir');
62
- } else {
63
- fs.copyFileSync(packageInfo.packageJsonFile, args.appTarget + '/package.json');
64
- executeSyncCmd('cd ' + args.appTarget + ' && npm install', null, MSG_NG_RUNTIME_LOG);
65
- }
66
- } catch (err) {
67
- console.log(MSG_NG_RUNTIME_LOG + 'FAILED the symlink for the node_modules', err);
68
- process.exit(err.code || err.pid);
69
- }
70
-
71
- let ngBuildParams = updateDeployUrl(args);
72
- 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';
73
- // Generating the angular build and post build process.
74
- executeSyncCmd('cd ' + args.appTarget + ' && node ./build-scripts/build.js ' + ngBuildParams, null, MSG_NG_RUNTIME_LOG, false, NG_BUILD_MSG);
75
- }
76
-
77
- const generateUiZip = async( sourceDir ) => {
78
- return new Promise((resolve, reject) => {
79
- const distDir = path.resolve(sourceDir + '/target/ui-build/output-files');
80
- const zipFile = path.resolve(sourceDir + '/target/ui-artifact.zip');
81
-
82
- const output = fs.createWriteStream(zipFile);
83
- const archive = archiver('zip', {
84
- zlib: {level: 9}
85
- });
86
- output.on('close', () => {
87
- console.log(`✅ ui-artifact.zip created successfully: ${zipFile}`);
88
- resolve();
89
- });
90
- archive.on('error', (err) => {
91
- reject(err);
92
- });
93
- archive.pipe(output);
94
- archive.directory(distDir, false);
95
- archive.finalize();
96
- });
97
- }
98
-
99
- module.exports = {
100
- buildAngularApp,
101
- generateUiZip
102
- }