@wavemaker/angular-codegen 11.10.5-rc.6100 → 11.11.0-1.6140

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 (38) hide show
  1. package/angular-app/angular.json +4 -11
  2. package/angular-app/build-scripts/post-build.js +7 -47
  3. package/angular-app/dependency-report.html +1 -1
  4. package/angular-app/npm-shrinkwrap.json +510 -650
  5. package/angular-app/package-lock.json +510 -650
  6. package/angular-app/package.json +11 -21
  7. package/angular-app/src/app/lazy-load-scripts.resolve.ts +2 -9
  8. package/angular-app/src/assets/styles/css/wm-style.css +1 -1
  9. package/angular-app/src/index.html +1 -1
  10. package/angular-app/src/main.ts +25 -31
  11. package/angular-app/tsconfig.json +0 -30
  12. package/angular-app/tsconfig.web-app.json +0 -21
  13. package/angular-app/wm-custom-webpack.config.js +18 -0
  14. package/build-angular-app.js +11 -7
  15. package/dependencies/app.component.html +34 -26
  16. package/dependencies/pipe-provider.cjs.js +24962 -186
  17. package/dependencies/transpilation-web.cjs.js +13329 -816
  18. package/download-packages.js +99 -31
  19. package/npm-shrinkwrap.json +180 -323
  20. package/package-lock.json +180 -323
  21. package/package.json +2 -2
  22. package/src/codegen.js +1 -1
  23. package/src/gen-app-codegen-module.js +1 -1
  24. package/src/gen-app-override-css.js +1 -1
  25. package/src/gen-app-routes.js +1 -1
  26. package/src/gen-components.js +1 -1
  27. package/src/gen-layouts.js +1 -1
  28. package/src/handlebar-helpers.js +1 -1
  29. package/src/pages-util.js +1 -1
  30. package/src/project-meta.js +1 -1
  31. package/src/update-angular-json.js +1 -1
  32. package/src/wm-utils.js +1 -1
  33. package/templates/app-routes.ts.hbs +2 -2
  34. package/templates/app.config.ts.hbs +128 -0
  35. package/templates/app.module.ts.hbs +0 -2
  36. package/templates/layout/layout.component.ts.hbs +26 -4
  37. package/templates/page/page.component.ts.hbs +36 -5
  38. package/dependencies/transpilation-mobile.cjs.js +0 -93554
@@ -32,13 +32,13 @@
32
32
  "src/assets",
33
33
  {
34
34
  "glob": "**/*",
35
- "input": "libraries/locales/",
36
- "output": "/locales/"
35
+ "input": "libraries/locales/moment-timezone",
36
+ "output": "/locales/moment-timezone"
37
37
  },
38
38
  {
39
39
  "glob": "**/*",
40
- "input": "node_modules/@wavemaker/app-ng-runtime/locales/",
41
- "output": "/locales/"
40
+ "input": "node_modules/@wavemaker/app-ng-runtime/locales/moment-timezone",
41
+ "output": "/locales/moment-timezone"
42
42
  },
43
43
  {
44
44
  "glob": "**/*",
@@ -75,7 +75,6 @@
75
75
  }
76
76
  ],
77
77
  "scripts": [
78
- "./node_modules/x2js/x2js.js",
79
78
  "./node_modules/d3/dist/d3.min.js",
80
79
  "./node_modules/@wavemaker/nvd3/build/nv.d3.min.js",
81
80
  "./node_modules/jquery/dist/jquery.min.js",
@@ -94,9 +93,6 @@
94
93
  "./node_modules/@wavemaker/app-ng-runtime/scripts/datatable/datatable.js",
95
94
  "./node_modules/@wavemaker/app-ng-runtime/scripts/swipey/swipey.jquery.plugin.js",
96
95
  "./node_modules/@wavemaker/app-ng-runtime/scripts/jquery.ui.touch-punch/jquery.ui.touch-punch.min.js",
97
- "./node_modules/moment/min/moment.min.js",
98
- "./node_modules/moment-timezone/builds/moment-timezone.min.js",
99
- "./node_modules/fullcalendar/main.min.js",
100
96
  "./node_modules/summernote/dist/summernote-lite.min.js",
101
97
  "./node_modules/hammerjs/hammer.min.js",
102
98
  "./node_modules/iscroll/build/iscroll.js",
@@ -243,9 +239,6 @@
243
239
  "./node_modules/jquery-ui/ui/widgets/sortable.js",
244
240
  "./node_modules/jquery-ui/ui/widgets/droppable.js",
245
241
  "./libraries/scripts/datatable/datatable.js",
246
- "./node_modules/moment/min/moment.min.js",
247
- "./node_modules/moment-timezone/builds/moment-timezone.min.js",
248
- "./node_modules/fullcalendar/main.min.js",
249
242
  "./node_modules/summernote/dist/summernote-lite.min.js",
250
243
  "./node_modules/hammerjs/hammer.min.js",
251
244
  "./node_modules/iscroll/build/iscroll.js",
@@ -34,40 +34,10 @@ const generateHashForScripts = (updatedFilenames) => {
34
34
  });
35
35
  });
36
36
  };
37
- let isMobileProject = false;
38
37
  let isProdBuild;
39
38
  let isDevBuild;
40
39
  let $;
41
40
 
42
- const setMobileProjectType = (angularJson) => {
43
- let styles = angularJson['projects']['angular-app']['architect']['build']['options']['styles'];
44
- const androidStyles = styles.find((style) => {
45
- let isObject = typeof (style) === 'object';
46
- if (isObject) {
47
- return style.bundleName === 'wm-android-styles';
48
- }
49
- return false;
50
- });
51
- isMobileProject = androidStyles ? true : false;
52
- return isMobileProject;
53
- }
54
- const addMobileSpecificStyles = async (deployUrl) => {
55
- if (isDevBuild) {
56
- $("body").append(
57
- `<script type="text/javascript" defer="true" src="${deployUrl}wm-android-styles.js"></script>`
58
- );
59
- }
60
-
61
- if (isProdBuild) {
62
- $("head").append(
63
- `<link rel="stylesheet" theme="wmtheme" href="${deployUrl}wm-android-styles.css" >`
64
- );
65
- $("head").append(
66
- `<link rel="stylesheet" theme="wmtheme" href="${deployUrl}wm-ios-styles.css" >`
67
- );
68
- }
69
- }
70
-
71
41
  const addScriptForWMStylesPath = (wm_styles_path) => {
72
42
  // wm_styles_path will not be present for mobile apps
73
43
  if (wm_styles_path) {
@@ -226,14 +196,8 @@ const generateSha1 = (content) => {
226
196
  let outputPath = global.opPath = args['output-path'] || build['options']['outputPath']
227
197
  const contents = await readFile(`./dist/index.html`, `utf8`);
228
198
  $ = cheerio.load(contents);
229
- setMobileProjectType(angularJson);
230
- if (!isMobileProject) {
231
- isProdBuild = fs.existsSync(`${process.cwd()}/${outputPath}/wm-styles.css`);
232
- isDevBuild = fs.existsSync(`${process.cwd()}/${outputPath}/wm-styles.js`);
233
- } else {
234
- isDevBuild = fs.existsSync(`${process.cwd()}/${outputPath}/wm-android-styles.js`);
235
- isProdBuild = fs.existsSync(`${process.cwd()}/${outputPath}/wm-android-styles.css`);
236
- }
199
+ isProdBuild = fs.existsSync(`${process.cwd()}/${outputPath}/wm-styles.css`);
200
+ isDevBuild = fs.existsSync(`${process.cwd()}/${outputPath}/wm-styles.js`);
237
201
 
238
202
  if (isProdBuild) {
239
203
  const isOptimizeCss = $('meta[optimizecss]').length;
@@ -250,16 +214,12 @@ const generateSha1 = (content) => {
250
214
  const updatedFileHashes = {}
251
215
  let wm_styles_path;
252
216
 
253
- if (isMobileProject) {
254
- await addMobileSpecificStyles(deployUrl);
217
+ if (isDevBuild) {
218
+ wm_styles_path = `${deployUrl}wm-styles.js`;
255
219
  } else {
256
- if (isDevBuild) {
257
- wm_styles_path = `${deployUrl}wm-styles.js`;
258
- } else {
259
- const fileName = 'wm-styles';
260
- const updatedFileName = `${fileName}.css`
261
- wm_styles_path = `${deployUrl}${updatedFileName}`;
262
- }
220
+ const fileName = 'wm-styles';
221
+ const updatedFileName = `${fileName}.css`
222
+ wm_styles_path = `${deployUrl}${updatedFileName}`;
263
223
  }
264
224
 
265
225
  addScriptForWMStylesPath(wm_styles_path);
@@ -69,7 +69,7 @@
69
69
  <body>
70
70
  <div class="header">
71
71
  <h1>Angular Project Dependencies Report</h1>
72
- <p class="timestamp">Generated on: 4/1/2025, 12:30:17 PM</p>
72
+ <p class="timestamp">Generated on: 5/7/2025, 8:38:03 PM</p>
73
73
  </div>
74
74
 
75
75
  <div class="section">