@wavemaker/angular-codegen 11.14.1-rc.241 → 11.14.1-rc.6304

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.
@@ -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: 11/25/2025, 8:17:58 PM</p>
72
+ <p class="timestamp">Generated on: 11/26/2025, 1:28:56 PM</p>
73
73
  </div>
74
74
 
75
75
  <div class="section">
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-app",
3
- "version": "11.14.1-rc.241",
3
+ "version": "11.14.1-rc.6304",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@wavemaker/angular-app",
9
- "version": "11.14.1-rc.241",
9
+ "version": "11.14.1-rc.6304",
10
10
  "dependencies": {
11
11
  "@angular/animations": "18.2.13",
12
12
  "@angular/common": "18.2.13",
@@ -23,12 +23,12 @@
23
23
  "@fullcalendar/list": "6.1.18",
24
24
  "@fullcalendar/timegrid": "6.1.18",
25
25
  "@metrichor/jmespath": "0.3.1",
26
- "@wavemaker/app-ng-runtime": "11.14.1-rc.241",
27
- "@wavemaker/custom-widgets-m3": "11.14.1-rc.241",
26
+ "@wavemaker/app-ng-runtime": "11.14.1-rc.6304",
27
+ "@wavemaker/custom-widgets-m3": "11.14.1-rc.6304",
28
28
  "@wavemaker/focus-trap": "1.0.1",
29
- "@wavemaker/foundation-css": "11.14.1-rc.241",
30
- "@wavemaker/nvd3": "1.8.16",
31
- "@wavemaker/variables": "11.14.1-rc.241",
29
+ "@wavemaker/foundation-css": "11.14.1-rc.6304",
30
+ "@wavemaker/nvd3": "1.8.15",
31
+ "@wavemaker/variables": "11.14.1-rc.6304",
32
32
  "@ztree/ztree_v3": "3.5.48",
33
33
  "acorn": "^8.15.0",
34
34
  "angular-imask": "7.6.1",
@@ -8693,8 +8693,8 @@
8693
8693
  }
8694
8694
  },
8695
8695
  "node_modules/@wavemaker/app-ng-runtime": {
8696
- "version": "11.14.1-rc.241",
8697
- "integrity": "sha512-FlRphpC20abWD7Ygkt1BM6apyNNglvK4X5F9T0WKcnV6lbqY9M7adkfdH73vQg4FFS2NKR+7RyuCvpxlnx0l6g==",
8696
+ "version": "11.14.1-rc.6304",
8697
+ "integrity": "sha512-d0vWkIH/Qs9tlUEELH/ajWnkxfa8CEV0OpDfPPUgJ7maRQnVI3UvFc1Qk9+bJ3NKX0/kmm7aE760k7z+rfEIWg==",
8698
8698
  "license": "MIT",
8699
8699
  "engines": {
8700
8700
  "node": ">=18.16.1",
@@ -8702,8 +8702,8 @@
8702
8702
  }
8703
8703
  },
8704
8704
  "node_modules/@wavemaker/custom-widgets-m3": {
8705
- "version": "11.14.1-rc.241",
8706
- "integrity": "sha512-BnSNp6yZpLtJ3v40bBUMItEOCeBX+riO7/t8ePUQIbobUuMHu/Bg0MroLcb466PArG5dhw+jpAlAxfkB2sCXiw==",
8705
+ "version": "11.14.1-rc.6304",
8706
+ "integrity": "sha512-kKLq8hXQuySu/Qs8Ox02butmj4HGmXtv9oNdX89UdPy3Bc/6izzD9lfA1F5ypZmBI1WFr9kB8Sl3CZ3GLspcKg==",
8707
8707
  "license": "ISC"
8708
8708
  },
8709
8709
  "node_modules/@wavemaker/focus-trap": {
@@ -8716,24 +8716,24 @@
8716
8716
  }
8717
8717
  },
8718
8718
  "node_modules/@wavemaker/foundation-css": {
8719
- "version": "11.14.1-rc.241",
8720
- "integrity": "sha512-Fu8qa8v0Ipvc+nzQJE6LpJP9jGIbl0KE7v8TLV0qNm6lnz+lDebW5w0Cz26WHHL1Q21teFQNYgmIg/9Wi0KEQg==",
8719
+ "version": "11.14.1-rc.6304",
8720
+ "integrity": "sha512-SzlYBuEzoiLoA46NhTNQZrZ5E26w4KHdzXThA9ilHF1+yrrqUPYbDJXpktPhGZFfwK6dQtwVoH+UqKr9fIQ8Xg==",
8721
8721
  "license": "ISC",
8722
8722
  "dependencies": {
8723
8723
  "chroma-js": "^3.1.2"
8724
8724
  }
8725
8725
  },
8726
8726
  "node_modules/@wavemaker/nvd3": {
8727
- "version": "1.8.16",
8728
- "integrity": "sha512-gzgcW3Gr3MYUpYqbhWXVlUq8NhWpBFCz/QKF+Ekvi6pUjTHDLfe264HgiyrPs0PbCPsqN7Z/cFNbQTYJZC+fzQ==",
8727
+ "version": "1.8.15",
8728
+ "integrity": "sha512-ufRoz09lG1vAMfc+Qc0TC912m/bTmzQYTCJpaQ0T525i6J3+tjmT7dLbTLxRlA1KTsRFRHTaLi410R8RCYMjRg==",
8729
8729
  "license": "Apache-2.0",
8730
8730
  "peerDependencies": {
8731
8731
  "d3": "7.8.5"
8732
8732
  }
8733
8733
  },
8734
8734
  "node_modules/@wavemaker/variables": {
8735
- "version": "11.14.1-rc.241",
8736
- "integrity": "sha512-AXsQyKkK9YnT2BSGvJRlAF9jkPjYx42CoVf5pFP+GbUPIsJu/wIg98fsTyBWMY/eNOMvJDWd9PUibSy1uozIFA==",
8735
+ "version": "11.14.1-rc.6304",
8736
+ "integrity": "sha512-wgLAvWoP6Ezw9UHonONezoeHuGFCndg0duwmwKcqQ19Xp1FXmyoRSlHLkOmrw4lgGcdCRK/KU1JGFAPN3qsCBQ==",
8737
8737
  "license": "ISC",
8738
8738
  "dependencies": {
8739
8739
  "@metrichor/jmespath": "^0.3.1",
@@ -18108,8 +18108,8 @@
18108
18108
  }
18109
18109
  },
18110
18110
  "node_modules/node-forge": {
18111
- "version": "1.3.1",
18112
- "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
18111
+ "version": "1.3.2",
18112
+ "integrity": "sha512-6xKiQ+cph9KImrRh0VsjH2d8/GXA4FIMlgU4B757iI1ApvcyA9VlouP0yZJha01V+huImO+kKMU7ih+2+E14fw==",
18113
18113
  "dev": true,
18114
18114
  "license": "(BSD-3-Clause OR GPL-2.0)",
18115
18115
  "engines": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-app",
3
- "version": "11.14.1-rc.241",
3
+ "version": "11.14.1-rc.6304",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@wavemaker/angular-app",
9
- "version": "11.14.1-rc.241",
9
+ "version": "11.14.1-rc.6304",
10
10
  "dependencies": {
11
11
  "@angular/animations": "18.2.13",
12
12
  "@angular/common": "18.2.13",
@@ -23,12 +23,12 @@
23
23
  "@fullcalendar/list": "6.1.18",
24
24
  "@fullcalendar/timegrid": "6.1.18",
25
25
  "@metrichor/jmespath": "0.3.1",
26
- "@wavemaker/app-ng-runtime": "11.14.1-rc.241",
27
- "@wavemaker/custom-widgets-m3": "11.14.1-rc.241",
26
+ "@wavemaker/app-ng-runtime": "11.14.1-rc.6304",
27
+ "@wavemaker/custom-widgets-m3": "11.14.1-rc.6304",
28
28
  "@wavemaker/focus-trap": "1.0.1",
29
- "@wavemaker/foundation-css": "11.14.1-rc.241",
30
- "@wavemaker/nvd3": "1.8.16",
31
- "@wavemaker/variables": "11.14.1-rc.241",
29
+ "@wavemaker/foundation-css": "11.14.1-rc.6304",
30
+ "@wavemaker/nvd3": "1.8.15",
31
+ "@wavemaker/variables": "11.14.1-rc.6304",
32
32
  "@ztree/ztree_v3": "3.5.48",
33
33
  "acorn": "^8.15.0",
34
34
  "angular-imask": "7.6.1",
@@ -8693,8 +8693,8 @@
8693
8693
  }
8694
8694
  },
8695
8695
  "node_modules/@wavemaker/app-ng-runtime": {
8696
- "version": "11.14.1-rc.241",
8697
- "integrity": "sha512-FlRphpC20abWD7Ygkt1BM6apyNNglvK4X5F9T0WKcnV6lbqY9M7adkfdH73vQg4FFS2NKR+7RyuCvpxlnx0l6g==",
8696
+ "version": "11.14.1-rc.6304",
8697
+ "integrity": "sha512-d0vWkIH/Qs9tlUEELH/ajWnkxfa8CEV0OpDfPPUgJ7maRQnVI3UvFc1Qk9+bJ3NKX0/kmm7aE760k7z+rfEIWg==",
8698
8698
  "license": "MIT",
8699
8699
  "engines": {
8700
8700
  "node": ">=18.16.1",
@@ -8702,8 +8702,8 @@
8702
8702
  }
8703
8703
  },
8704
8704
  "node_modules/@wavemaker/custom-widgets-m3": {
8705
- "version": "11.14.1-rc.241",
8706
- "integrity": "sha512-BnSNp6yZpLtJ3v40bBUMItEOCeBX+riO7/t8ePUQIbobUuMHu/Bg0MroLcb466PArG5dhw+jpAlAxfkB2sCXiw==",
8705
+ "version": "11.14.1-rc.6304",
8706
+ "integrity": "sha512-kKLq8hXQuySu/Qs8Ox02butmj4HGmXtv9oNdX89UdPy3Bc/6izzD9lfA1F5ypZmBI1WFr9kB8Sl3CZ3GLspcKg==",
8707
8707
  "license": "ISC"
8708
8708
  },
8709
8709
  "node_modules/@wavemaker/focus-trap": {
@@ -8716,24 +8716,24 @@
8716
8716
  }
8717
8717
  },
8718
8718
  "node_modules/@wavemaker/foundation-css": {
8719
- "version": "11.14.1-rc.241",
8720
- "integrity": "sha512-Fu8qa8v0Ipvc+nzQJE6LpJP9jGIbl0KE7v8TLV0qNm6lnz+lDebW5w0Cz26WHHL1Q21teFQNYgmIg/9Wi0KEQg==",
8719
+ "version": "11.14.1-rc.6304",
8720
+ "integrity": "sha512-SzlYBuEzoiLoA46NhTNQZrZ5E26w4KHdzXThA9ilHF1+yrrqUPYbDJXpktPhGZFfwK6dQtwVoH+UqKr9fIQ8Xg==",
8721
8721
  "license": "ISC",
8722
8722
  "dependencies": {
8723
8723
  "chroma-js": "^3.1.2"
8724
8724
  }
8725
8725
  },
8726
8726
  "node_modules/@wavemaker/nvd3": {
8727
- "version": "1.8.16",
8728
- "integrity": "sha512-gzgcW3Gr3MYUpYqbhWXVlUq8NhWpBFCz/QKF+Ekvi6pUjTHDLfe264HgiyrPs0PbCPsqN7Z/cFNbQTYJZC+fzQ==",
8727
+ "version": "1.8.15",
8728
+ "integrity": "sha512-ufRoz09lG1vAMfc+Qc0TC912m/bTmzQYTCJpaQ0T525i6J3+tjmT7dLbTLxRlA1KTsRFRHTaLi410R8RCYMjRg==",
8729
8729
  "license": "Apache-2.0",
8730
8730
  "peerDependencies": {
8731
8731
  "d3": "7.8.5"
8732
8732
  }
8733
8733
  },
8734
8734
  "node_modules/@wavemaker/variables": {
8735
- "version": "11.14.1-rc.241",
8736
- "integrity": "sha512-AXsQyKkK9YnT2BSGvJRlAF9jkPjYx42CoVf5pFP+GbUPIsJu/wIg98fsTyBWMY/eNOMvJDWd9PUibSy1uozIFA==",
8735
+ "version": "11.14.1-rc.6304",
8736
+ "integrity": "sha512-wgLAvWoP6Ezw9UHonONezoeHuGFCndg0duwmwKcqQ19Xp1FXmyoRSlHLkOmrw4lgGcdCRK/KU1JGFAPN3qsCBQ==",
8737
8737
  "license": "ISC",
8738
8738
  "dependencies": {
8739
8739
  "@metrichor/jmespath": "^0.3.1",
@@ -18108,8 +18108,8 @@
18108
18108
  }
18109
18109
  },
18110
18110
  "node_modules/node-forge": {
18111
- "version": "1.3.1",
18112
- "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
18111
+ "version": "1.3.2",
18112
+ "integrity": "sha512-6xKiQ+cph9KImrRh0VsjH2d8/GXA4FIMlgU4B757iI1ApvcyA9VlouP0yZJha01V+huImO+kKMU7ih+2+E14fw==",
18113
18113
  "dev": true,
18114
18114
  "license": "(BSD-3-Clause OR GPL-2.0)",
18115
18115
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-app",
3
- "version": "11.14.1-rc.241",
3
+ "version": "11.14.1-rc.6304",
4
4
  "scripts": {
5
5
  "ng": "ng",
6
6
  "start": "./node_modules/.bin/ng serve",
@@ -36,11 +36,11 @@
36
36
  "@fullcalendar/list": "6.1.18",
37
37
  "@fullcalendar/timegrid": "6.1.18",
38
38
  "@metrichor/jmespath": "0.3.1",
39
- "@wavemaker/custom-widgets-m3": "11.14.1-rc.241",
39
+ "@wavemaker/custom-widgets-m3": "11.14.1-rc.6304",
40
40
  "@wavemaker/focus-trap": "1.0.1",
41
- "@wavemaker/foundation-css": "11.14.1-rc.241",
42
- "@wavemaker/nvd3": "1.8.16",
43
- "@wavemaker/variables": "11.14.1-rc.241",
41
+ "@wavemaker/foundation-css": "11.14.1-rc.6304",
42
+ "@wavemaker/nvd3": "1.8.15",
43
+ "@wavemaker/variables": "11.14.1-rc.6304",
44
44
  "@ztree/ztree_v3": "3.5.48",
45
45
  "acorn": "^8.15.0",
46
46
  "angular-imask": "7.6.1",
@@ -62,7 +62,7 @@
62
62
  "tslib": "2.8.1",
63
63
  "x2js": "3.4.4",
64
64
  "zone.js": "0.15.1",
65
- "@wavemaker/app-ng-runtime": "11.14.1-rc.241"
65
+ "@wavemaker/app-ng-runtime": "11.14.1-rc.6304"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
@@ -147964,8 +147964,8 @@ var Operation$1;
147964
147964
  const DataSource$1 = {
147965
147965
  Operation: Operation$1
147966
147966
  };
147967
- class App {
147968
- }
147967
+ let App$1 = class App {
147968
+ };
147969
147969
  let AbstractI18nService$1 = class AbstractI18nService {
147970
147970
  };
147971
147971
 
@@ -147983,6 +147983,7 @@ const REGEX$1 = {
147983
147983
  SUPPORTED_AUDIO_FORMAT: /\.(mp3|ogg|webm|wma|3gp|wav|m4a)$/i,
147984
147984
  SUPPORTED_VIDEO_FORMAT: /\.(mp4|ogg|webm|wmv|mpeg|mpg|avi|mov)$/i,
147985
147985
  VALID_WEB_URL: /^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,
147986
+ VALID_IMAGE_URL: /^(https?|blob|data|file|ftp):/i,
147986
147987
  REPLACE_PATTERN: /\$\{([^\}]+)\}/g,
147987
147988
  DATA_URL: /^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i,
147988
147989
  ISO_DATE_FORMAT: /(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d+)?([+-]\d{2}:?\d{2}|Z)$/
@@ -148205,6 +148206,9 @@ const isVideoFile$1 = (fileName) => {
148205
148206
  const isValidWebURL$1 = (url) => {
148206
148207
  return (REGEX$1.VALID_WEB_URL).test(url);
148207
148208
  };
148209
+ const isValidImageUrl$1 = (url) => {
148210
+ return (REGEX$1.VALID_IMAGE_URL).test(url?.trim());
148211
+ };
148208
148212
  /*This function returns the url to the resource after checking the validity of url*/
148209
148213
  const getResourceURL$1 = (urlString) => {
148210
148214
  return urlString;
@@ -149458,6 +149462,7 @@ var Utils$1 = /*#__PURE__*/Object.freeze({
149458
149462
  isPageable: isPageable$1,
149459
149463
  isSafari: isSafari$1,
149460
149464
  isTablet: isTablet$1,
149465
+ isValidImageUrl: isValidImageUrl$1,
149461
149466
  isValidWebURL: isValidWebURL$1,
149462
149467
  isVideoFile: isVideoFile$1,
149463
149468
  loadScript: loadScript$1,
@@ -150699,7 +150704,7 @@ class ToDatePipe extends WmPipe {
150699
150704
  this.app = app;
150700
150705
  this.customPipeManager = customPipeManager;
150701
150706
  }
150702
- static { this.ɵfac = function ToDatePipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ToDatePipe)(ɵɵdirectiveInject(DatePipe, 16), ɵɵdirectiveInject(AbstractI18nService$1, 16), ɵɵdirectiveInject(App, 16), ɵɵdirectiveInject(CustomPipeManager$1, 16)); }; }
150707
+ static { this.ɵfac = function ToDatePipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || ToDatePipe)(ɵɵdirectiveInject(DatePipe, 16), ɵɵdirectiveInject(AbstractI18nService$1, 16), ɵɵdirectiveInject(App$1, 16), ɵɵdirectiveInject(CustomPipeManager$1, 16)); }; }
150703
150708
  static { this.ɵpipe = /*@__PURE__*/ ɵɵdefinePipe({ name: "toDate", type: ToDatePipe, pure: true, standalone: true }); }
150704
150709
  }
150705
150710
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ToDatePipe, [{
@@ -150708,7 +150713,7 @@ class ToDatePipe extends WmPipe {
150708
150713
  standalone: true,
150709
150714
  name: 'toDate'
150710
150715
  }]
150711
- }], () => [{ type: DatePipe }, { type: AbstractI18nService$1 }, { type: App }, { type: CustomPipeManager$1 }], null); })();
150716
+ }], () => [{ type: DatePipe }, { type: AbstractI18nService$1 }, { type: App$1 }, { type: CustomPipeManager$1 }], null); })();
150712
150717
  class ToNumberPipe {
150713
150718
  transform(data, fracSize) {
150714
150719
  if (fracSize && !String(fracSize).match(/^(\d+)?\.((\d+)(-(\d+))?)?$/)) {
@@ -150818,7 +150823,7 @@ class CustomPipe {
150818
150823
  return data;
150819
150824
  }
150820
150825
  }
150821
- static { this.ɵfac = function CustomPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CustomPipe)(ɵɵdirectiveInject(App, 16), ɵɵdirectiveInject(CustomPipeManager$1, 16)); }; }
150826
+ static { this.ɵfac = function CustomPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CustomPipe)(ɵɵdirectiveInject(App$1, 16), ɵɵdirectiveInject(CustomPipeManager$1, 16)); }; }
150822
150827
  static { this.ɵpipe = /*@__PURE__*/ ɵɵdefinePipe({ name: "custom", type: CustomPipe, pure: true, standalone: true }); }
150823
150828
  }
150824
150829
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(CustomPipe, [{
@@ -150827,7 +150832,7 @@ class CustomPipe {
150827
150832
  standalone: true,
150828
150833
  name: 'custom'
150829
150834
  }]
150830
- }], () => [{ type: App }, { type: CustomPipeManager$1 }], null); })();
150835
+ }], () => [{ type: App$1 }, { type: CustomPipeManager$1 }], null); })();
150831
150836
  class TimeFromNowPipe {
150832
150837
  transform(data) {
150833
150838
  let timestamp;
@@ -203574,6 +203579,8 @@ var Operation;
203574
203579
  const DataSource = {
203575
203580
  Operation
203576
203581
  };
203582
+ class App {
203583
+ }
203577
203584
  class AbstractI18nService {
203578
203585
  }
203579
203586
 
@@ -203591,6 +203598,7 @@ const REGEX = {
203591
203598
  SUPPORTED_AUDIO_FORMAT: /\.(mp3|ogg|webm|wma|3gp|wav|m4a)$/i,
203592
203599
  SUPPORTED_VIDEO_FORMAT: /\.(mp4|ogg|webm|wmv|mpeg|mpg|avi|mov)$/i,
203593
203600
  VALID_WEB_URL: /^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,
203601
+ VALID_IMAGE_URL: /^(https?|blob|data|file|ftp):/i,
203594
203602
  REPLACE_PATTERN: /\$\{([^\}]+)\}/g,
203595
203603
  DATA_URL: /^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i,
203596
203604
  ISO_DATE_FORMAT: /(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d+)?([+-]\d{2}:?\d{2}|Z)$/
@@ -203813,6 +203821,9 @@ const isVideoFile = (fileName) => {
203813
203821
  const isValidWebURL = (url) => {
203814
203822
  return (REGEX.VALID_WEB_URL).test(url);
203815
203823
  };
203824
+ const isValidImageUrl = (url) => {
203825
+ return (REGEX.VALID_IMAGE_URL).test(url?.trim());
203826
+ };
203816
203827
  /*This function returns the url to the resource after checking the validity of url*/
203817
203828
  const getResourceURL = (urlString) => {
203818
203829
  return urlString;
@@ -205066,6 +205077,7 @@ var Utils = /*#__PURE__*/Object.freeze({
205066
205077
  isPageable: isPageable,
205067
205078
  isSafari: isSafari,
205068
205079
  isTablet: isTablet,
205080
+ isValidImageUrl: isValidImageUrl,
205069
205081
  isValidWebURL: isValidWebURL,
205070
205082
  isVideoFile: isVideoFile,
205071
205083
  loadScript: loadScript,
@@ -207905,7 +207917,7 @@ class PipeProvider {
207905
207917
  this.preparePipeMeta(CurrencyPipe$1, 'currency', true, [this._locale]),
207906
207918
  this.preparePipeMeta(DatePipe$1, 'date', true, [this._locale]),
207907
207919
  this.preparePipeMeta(ToDatePipe, 'toDate', true, [
207908
- new DatePipe$1(this._locale), undefined, this.injector.get(CustomPipeManager)
207920
+ new DatePipe$1(this._locale), undefined, this.injector.get(App), this.injector.get(CustomPipeManager)
207909
207921
  ]),
207910
207922
  this.preparePipeMeta(ToNumberPipe, 'toNumber', true, [
207911
207923
  new DecimalPipe$1(this._locale),
@@ -207922,7 +207934,7 @@ class PipeProvider {
207922
207934
  new DecimalPipe$1(this._locale)
207923
207935
  ]),
207924
207936
  this.preparePipeMeta(StringToNumberPipe, 'stringToNumber', true),
207925
- this.preparePipeMeta(CustomPipe, 'custom', true, [this.injector.get(CustomPipeManager)]),
207937
+ this.preparePipeMeta(CustomPipe, 'custom', true, [this.injector.get(App), this.injector.get(CustomPipeManager)]),
207926
207938
  this.preparePipeMeta(TrustAsPipe, 'trustAs', true, [this.domSanitizer]),
207927
207939
  this.preparePipeMeta(SanitizePipe, 'sanitize', true, [this.domSanitizer]),
207928
207940
  this.preparePipeMeta(TemplateReplacePipe, 'templateReplace', true),
@@ -100387,6 +100387,7 @@ const REGEX = {
100387
100387
  SUPPORTED_AUDIO_FORMAT: /\.(mp3|ogg|webm|wma|3gp|wav|m4a)$/i,
100388
100388
  SUPPORTED_VIDEO_FORMAT: /\.(mp4|ogg|webm|wmv|mpeg|mpg|avi|mov)$/i,
100389
100389
  VALID_WEB_URL: /^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,
100390
+ VALID_IMAGE_URL: /^(https?|blob|data|file|ftp):/i,
100390
100391
  REPLACE_PATTERN: /\$\{([^\}]+)\}/g,
100391
100392
  DATA_URL: /^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i,
100392
100393
  ISO_DATE_FORMAT: /(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d+)?([+-]\d{2}:?\d{2}|Z)$/
@@ -100609,6 +100610,9 @@ const isVideoFile = (fileName) => {
100609
100610
  const isValidWebURL = (url) => {
100610
100611
  return (REGEX.VALID_WEB_URL).test(url);
100611
100612
  };
100613
+ const isValidImageUrl = (url) => {
100614
+ return (REGEX.VALID_IMAGE_URL).test(url?.trim());
100615
+ };
100612
100616
  /*This function returns the url to the resource after checking the validity of url*/
100613
100617
  const getResourceURL = (urlString) => {
100614
100618
  return urlString;
@@ -101862,6 +101866,7 @@ var Utils = /*#__PURE__*/Object.freeze({
101862
101866
  isPageable: isPageable,
101863
101867
  isSafari: isSafari,
101864
101868
  isTablet: isTablet,
101869
+ isValidImageUrl: isValidImageUrl,
101865
101870
  isValidWebURL: isValidWebURL,
101866
101871
  isVideoFile: isVideoFile,
101867
101872
  loadScript: loadScript,
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.14.1-rc.241",
3
+ "version": "11.14.1-rc.6304",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@wavemaker/angular-codegen",
9
- "version": "11.14.1-rc.241",
9
+ "version": "11.14.1-rc.6304",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@wavemaker/angular-app": "11.14.1-rc.241",
12
+ "@wavemaker/angular-app": "11.14.1-rc.6304",
13
13
  "archiver": "^7.0.1",
14
14
  "cheerio": "1.0.0-rc.12",
15
15
  "decode-uri-component": "^0.2.0",
@@ -1376,8 +1376,8 @@
1376
1376
  "license": "MIT"
1377
1377
  },
1378
1378
  "node_modules/@wavemaker/angular-app": {
1379
- "version": "11.14.1-rc.241",
1380
- "integrity": "sha512-aTEMExpv6J7K91Q+myH3HDVWRbVPn/+ygjt35mbkorFzu5RCL3V0d78joPZ5dv+AIqf01rc9soTUTHRlLUNhow==",
1379
+ "version": "11.14.1-rc.6304",
1380
+ "integrity": "sha512-I8js0mcjmQc38oWVbfZKl7NoGQFMbyK0d8eYPrNfAV7lbGWa3tBYle1H/NN9xcNGG29VyCOHXbIR9nqhUOf6Pg==",
1381
1381
  "dependencies": {
1382
1382
  "@angular/animations": "18.2.13",
1383
1383
  "@angular/common": "18.2.13",
@@ -1394,12 +1394,12 @@
1394
1394
  "@fullcalendar/list": "6.1.18",
1395
1395
  "@fullcalendar/timegrid": "6.1.18",
1396
1396
  "@metrichor/jmespath": "0.3.1",
1397
- "@wavemaker/app-ng-runtime": "11.14.1-rc.241",
1398
- "@wavemaker/custom-widgets-m3": "11.14.1-rc.241",
1397
+ "@wavemaker/app-ng-runtime": "11.14.1-rc.6304",
1398
+ "@wavemaker/custom-widgets-m3": "11.14.1-rc.6304",
1399
1399
  "@wavemaker/focus-trap": "1.0.1",
1400
- "@wavemaker/foundation-css": "11.14.1-rc.241",
1401
- "@wavemaker/nvd3": "1.8.16",
1402
- "@wavemaker/variables": "11.14.1-rc.241",
1400
+ "@wavemaker/foundation-css": "11.14.1-rc.6304",
1401
+ "@wavemaker/nvd3": "1.8.15",
1402
+ "@wavemaker/variables": "11.14.1-rc.6304",
1403
1403
  "@ztree/ztree_v3": "3.5.48",
1404
1404
  "acorn": "^8.15.0",
1405
1405
  "angular-imask": "7.6.1",
@@ -1434,8 +1434,8 @@
1434
1434
  }
1435
1435
  },
1436
1436
  "node_modules/@wavemaker/app-ng-runtime": {
1437
- "version": "11.14.1-rc.241",
1438
- "integrity": "sha512-FlRphpC20abWD7Ygkt1BM6apyNNglvK4X5F9T0WKcnV6lbqY9M7adkfdH73vQg4FFS2NKR+7RyuCvpxlnx0l6g==",
1437
+ "version": "11.14.1-rc.6304",
1438
+ "integrity": "sha512-d0vWkIH/Qs9tlUEELH/ajWnkxfa8CEV0OpDfPPUgJ7maRQnVI3UvFc1Qk9+bJ3NKX0/kmm7aE760k7z+rfEIWg==",
1439
1439
  "license": "MIT",
1440
1440
  "engines": {
1441
1441
  "node": ">=18.16.1",
@@ -1443,8 +1443,8 @@
1443
1443
  }
1444
1444
  },
1445
1445
  "node_modules/@wavemaker/custom-widgets-m3": {
1446
- "version": "11.14.1-rc.241",
1447
- "integrity": "sha512-BnSNp6yZpLtJ3v40bBUMItEOCeBX+riO7/t8ePUQIbobUuMHu/Bg0MroLcb466PArG5dhw+jpAlAxfkB2sCXiw==",
1446
+ "version": "11.14.1-rc.6304",
1447
+ "integrity": "sha512-kKLq8hXQuySu/Qs8Ox02butmj4HGmXtv9oNdX89UdPy3Bc/6izzD9lfA1F5ypZmBI1WFr9kB8Sl3CZ3GLspcKg==",
1448
1448
  "license": "ISC"
1449
1449
  },
1450
1450
  "node_modules/@wavemaker/focus-trap": {
@@ -1457,24 +1457,24 @@
1457
1457
  }
1458
1458
  },
1459
1459
  "node_modules/@wavemaker/foundation-css": {
1460
- "version": "11.14.1-rc.241",
1461
- "integrity": "sha512-Fu8qa8v0Ipvc+nzQJE6LpJP9jGIbl0KE7v8TLV0qNm6lnz+lDebW5w0Cz26WHHL1Q21teFQNYgmIg/9Wi0KEQg==",
1460
+ "version": "11.14.1-rc.6304",
1461
+ "integrity": "sha512-SzlYBuEzoiLoA46NhTNQZrZ5E26w4KHdzXThA9ilHF1+yrrqUPYbDJXpktPhGZFfwK6dQtwVoH+UqKr9fIQ8Xg==",
1462
1462
  "license": "ISC",
1463
1463
  "dependencies": {
1464
1464
  "chroma-js": "^3.1.2"
1465
1465
  }
1466
1466
  },
1467
1467
  "node_modules/@wavemaker/nvd3": {
1468
- "version": "1.8.16",
1469
- "integrity": "sha512-gzgcW3Gr3MYUpYqbhWXVlUq8NhWpBFCz/QKF+Ekvi6pUjTHDLfe264HgiyrPs0PbCPsqN7Z/cFNbQTYJZC+fzQ==",
1468
+ "version": "1.8.15",
1469
+ "integrity": "sha512-ufRoz09lG1vAMfc+Qc0TC912m/bTmzQYTCJpaQ0T525i6J3+tjmT7dLbTLxRlA1KTsRFRHTaLi410R8RCYMjRg==",
1470
1470
  "license": "Apache-2.0",
1471
1471
  "peerDependencies": {
1472
1472
  "d3": "7.8.5"
1473
1473
  }
1474
1474
  },
1475
1475
  "node_modules/@wavemaker/variables": {
1476
- "version": "11.14.1-rc.241",
1477
- "integrity": "sha512-AXsQyKkK9YnT2BSGvJRlAF9jkPjYx42CoVf5pFP+GbUPIsJu/wIg98fsTyBWMY/eNOMvJDWd9PUibSy1uozIFA==",
1476
+ "version": "11.14.1-rc.6304",
1477
+ "integrity": "sha512-wgLAvWoP6Ezw9UHonONezoeHuGFCndg0duwmwKcqQ19Xp1FXmyoRSlHLkOmrw4lgGcdCRK/KU1JGFAPN3qsCBQ==",
1478
1478
  "license": "ISC",
1479
1479
  "dependencies": {
1480
1480
  "@metrichor/jmespath": "^0.3.1",
package/package-lock.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.14.1-rc.241",
3
+ "version": "11.14.1-rc.6304",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@wavemaker/angular-codegen",
9
- "version": "11.14.1-rc.241",
9
+ "version": "11.14.1-rc.6304",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@wavemaker/angular-app": "11.14.1-rc.241",
12
+ "@wavemaker/angular-app": "11.14.1-rc.6304",
13
13
  "archiver": "^7.0.1",
14
14
  "cheerio": "1.0.0-rc.12",
15
15
  "decode-uri-component": "^0.2.0",
@@ -1376,8 +1376,8 @@
1376
1376
  "license": "MIT"
1377
1377
  },
1378
1378
  "node_modules/@wavemaker/angular-app": {
1379
- "version": "11.14.1-rc.241",
1380
- "integrity": "sha512-aTEMExpv6J7K91Q+myH3HDVWRbVPn/+ygjt35mbkorFzu5RCL3V0d78joPZ5dv+AIqf01rc9soTUTHRlLUNhow==",
1379
+ "version": "11.14.1-rc.6304",
1380
+ "integrity": "sha512-I8js0mcjmQc38oWVbfZKl7NoGQFMbyK0d8eYPrNfAV7lbGWa3tBYle1H/NN9xcNGG29VyCOHXbIR9nqhUOf6Pg==",
1381
1381
  "dependencies": {
1382
1382
  "@angular/animations": "18.2.13",
1383
1383
  "@angular/common": "18.2.13",
@@ -1394,12 +1394,12 @@
1394
1394
  "@fullcalendar/list": "6.1.18",
1395
1395
  "@fullcalendar/timegrid": "6.1.18",
1396
1396
  "@metrichor/jmespath": "0.3.1",
1397
- "@wavemaker/app-ng-runtime": "11.14.1-rc.241",
1398
- "@wavemaker/custom-widgets-m3": "11.14.1-rc.241",
1397
+ "@wavemaker/app-ng-runtime": "11.14.1-rc.6304",
1398
+ "@wavemaker/custom-widgets-m3": "11.14.1-rc.6304",
1399
1399
  "@wavemaker/focus-trap": "1.0.1",
1400
- "@wavemaker/foundation-css": "11.14.1-rc.241",
1401
- "@wavemaker/nvd3": "1.8.16",
1402
- "@wavemaker/variables": "11.14.1-rc.241",
1400
+ "@wavemaker/foundation-css": "11.14.1-rc.6304",
1401
+ "@wavemaker/nvd3": "1.8.15",
1402
+ "@wavemaker/variables": "11.14.1-rc.6304",
1403
1403
  "@ztree/ztree_v3": "3.5.48",
1404
1404
  "acorn": "^8.15.0",
1405
1405
  "angular-imask": "7.6.1",
@@ -1434,8 +1434,8 @@
1434
1434
  }
1435
1435
  },
1436
1436
  "node_modules/@wavemaker/app-ng-runtime": {
1437
- "version": "11.14.1-rc.241",
1438
- "integrity": "sha512-FlRphpC20abWD7Ygkt1BM6apyNNglvK4X5F9T0WKcnV6lbqY9M7adkfdH73vQg4FFS2NKR+7RyuCvpxlnx0l6g==",
1437
+ "version": "11.14.1-rc.6304",
1438
+ "integrity": "sha512-d0vWkIH/Qs9tlUEELH/ajWnkxfa8CEV0OpDfPPUgJ7maRQnVI3UvFc1Qk9+bJ3NKX0/kmm7aE760k7z+rfEIWg==",
1439
1439
  "license": "MIT",
1440
1440
  "engines": {
1441
1441
  "node": ">=18.16.1",
@@ -1443,8 +1443,8 @@
1443
1443
  }
1444
1444
  },
1445
1445
  "node_modules/@wavemaker/custom-widgets-m3": {
1446
- "version": "11.14.1-rc.241",
1447
- "integrity": "sha512-BnSNp6yZpLtJ3v40bBUMItEOCeBX+riO7/t8ePUQIbobUuMHu/Bg0MroLcb466PArG5dhw+jpAlAxfkB2sCXiw==",
1446
+ "version": "11.14.1-rc.6304",
1447
+ "integrity": "sha512-kKLq8hXQuySu/Qs8Ox02butmj4HGmXtv9oNdX89UdPy3Bc/6izzD9lfA1F5ypZmBI1WFr9kB8Sl3CZ3GLspcKg==",
1448
1448
  "license": "ISC"
1449
1449
  },
1450
1450
  "node_modules/@wavemaker/focus-trap": {
@@ -1457,24 +1457,24 @@
1457
1457
  }
1458
1458
  },
1459
1459
  "node_modules/@wavemaker/foundation-css": {
1460
- "version": "11.14.1-rc.241",
1461
- "integrity": "sha512-Fu8qa8v0Ipvc+nzQJE6LpJP9jGIbl0KE7v8TLV0qNm6lnz+lDebW5w0Cz26WHHL1Q21teFQNYgmIg/9Wi0KEQg==",
1460
+ "version": "11.14.1-rc.6304",
1461
+ "integrity": "sha512-SzlYBuEzoiLoA46NhTNQZrZ5E26w4KHdzXThA9ilHF1+yrrqUPYbDJXpktPhGZFfwK6dQtwVoH+UqKr9fIQ8Xg==",
1462
1462
  "license": "ISC",
1463
1463
  "dependencies": {
1464
1464
  "chroma-js": "^3.1.2"
1465
1465
  }
1466
1466
  },
1467
1467
  "node_modules/@wavemaker/nvd3": {
1468
- "version": "1.8.16",
1469
- "integrity": "sha512-gzgcW3Gr3MYUpYqbhWXVlUq8NhWpBFCz/QKF+Ekvi6pUjTHDLfe264HgiyrPs0PbCPsqN7Z/cFNbQTYJZC+fzQ==",
1468
+ "version": "1.8.15",
1469
+ "integrity": "sha512-ufRoz09lG1vAMfc+Qc0TC912m/bTmzQYTCJpaQ0T525i6J3+tjmT7dLbTLxRlA1KTsRFRHTaLi410R8RCYMjRg==",
1470
1470
  "license": "Apache-2.0",
1471
1471
  "peerDependencies": {
1472
1472
  "d3": "7.8.5"
1473
1473
  }
1474
1474
  },
1475
1475
  "node_modules/@wavemaker/variables": {
1476
- "version": "11.14.1-rc.241",
1477
- "integrity": "sha512-AXsQyKkK9YnT2BSGvJRlAF9jkPjYx42CoVf5pFP+GbUPIsJu/wIg98fsTyBWMY/eNOMvJDWd9PUibSy1uozIFA==",
1476
+ "version": "11.14.1-rc.6304",
1477
+ "integrity": "sha512-wgLAvWoP6Ezw9UHonONezoeHuGFCndg0duwmwKcqQ19Xp1FXmyoRSlHLkOmrw4lgGcdCRK/KU1JGFAPN3qsCBQ==",
1478
1478
  "license": "ISC",
1479
1479
  "dependencies": {
1480
1480
  "@metrichor/jmespath": "^0.3.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "11.14.1-rc.241",
3
+ "version": "11.14.1-rc.6304",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  ".npmrc"
16
16
  ],
17
17
  "dependencies": {
18
- "@wavemaker/angular-app": "11.14.1-rc.241",
18
+ "@wavemaker/angular-app": "11.14.1-rc.6304",
19
19
  "archiver": "^7.0.1",
20
20
  "cheerio": "1.0.0-rc.12",
21
21
  "decode-uri-component": "^0.2.0",
@@ -1 +1 @@
1
- const path=require("path"),fs=require("fs"),{downloadNPMPackage:downloadNPMPackage}=require("../download-packages"),{isPrismProject:isPrismProject,DESIGN_TOKENS_DIR_NAME:DESIGN_TOKENS_DIR_NAME,OVERRIDE_TOKENS_PATH:OVERRIDE_TOKENS_PATH,APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH}=require("./wm-utils"),{getLegacyWmProjectProperties:getLegacyWmProjectProperties}=require("./project-meta"),groupFilesByMode=e=>{const s={default:[]};return fs.readdirSync(e).forEach(o=>{const t=path.join(e,o),r=fs.statSync(t);if(r.isDirectory()){const e=groupFilesByMode(t);for(const o in e)s[o]||(s[o]=[]),s[o].push(...e[o])}else if(r.isFile()&&".json"===path.extname(t)){const e=o.match(/\.([^.]+)\.json$/);if(e){const o=e[1];s[o]||(s[o]=[]),s[o].push(t)}else s.default.push(t)}}),s},generateModeConfigs=(e,s,o,t)=>{const r=o&&o.name||"css/variables",n=t&&t.name||"css/variables",i=[];for(const o in e){const t=e[o].flatMap(e=>{const o=e.replace(s+"/","");return[{destination:o.replace(/\.json$/,".css"),options:{outputReferences:!0,selector:":root"},format:r,filter:function(s){var o;const t=e=>e?e.replace(/\\/g,"/"):e;o=t(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath),e=t(e);var r=o&&-1!==o.indexOf("overrides")||s.filePath&&-1!==s.filePath.indexOf("overrides"),n=o&&(e.includes(o)||e.includes(t(s.filePath)))&&!s.path.includes("appearances")&&!s.path.includes("states");return r&&n}},{destination:o.replace(/\.json$/,"variant.css"),options:{outputReferences:!0,selector:":root"},format:n,filter:s=>{let o;const t=(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath)&&-1!==o.indexOf("overrides"),r=o&&(e.includes(o)||e.includes(s.filePath))&&(s.path.includes("appearances")||s.path.includes("states"));return t&&r}}]});i.push({mode:o,files:t})}return i},accessFile=e=>{const s=path.dirname(e);fs.existsSync(s)||(fs.mkdirSync(s,{recursive:!0}),console.log(`Directory created: ${s}`)),fs.access(e,fs.constants.F_OK,s=>{if(s){console.log(`${e} does not exist. Creating file...`);const s=JSON.stringify({});fs.writeFile(e,s,s=>{if(s)throw s;console.log(`${e} was created successfully.`)})}})};async function setupSymlink(e,s){try{await fs.promises.mkdir(path.dirname(s),{recursive:!0});try{fs.existsSync(s)&&await fs.promises.unlink(s)}catch(e){console.error("Error removing existing symlink:",e)}const o="win32"===process.platform?"junction":"dir";await fs.promises.symlink(e,s,o),console.log("Symlink created successfully at:",s)}catch(e){console.error("Error creating symlink:",s,e)}}const getStyleDictionaryConfig=(e,s,o,t)=>{t.endsWith("/")||(t+="/");let r="";return{log:{verbosity:"verbose"},source:[r="default"===o?`${t}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/!(*.*).json`:`${t}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/*.${o}.json`],include:[`${s.replace(/\\/g,"/")}/**/!(*.dark|*.light).json`,`${t.replace(/\\/g,"/")}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/global/**/*.json`],platforms:{css:{transformGroup:"css",prefix:"--wm",files:e}}}};async function removeSymlink(e){const s=path.resolve(e);try{fs.lstatSync(s).isSymbolicLink()?(await fs.promises.unlink(s),console.log("Symlink removed successfully:",s)):console.warn("Not a symlink, skipping unlink:",s)}catch(e){console.error("Error during symlink removal:",e)}}async function getCustomFormatters(e,s){try{const o=await import(`${e}/node_modules/style-dictionary/lib/utils/index.js`),{usesReferences:t,getReferences:r}=o,n=await import(`${s}/node_modules/@wavemaker/foundation-css/src/utils/style-dictionary-utils.js`),{cssVarCalcMixFormatter:i,componentVariantsFormatter:a}=n,c="web";return{cssVarCalcMixFormatter:i(t,r),componentVariantsFormatter:a(t,r,c)}}catch(e){return console.error("Failed to load CssVarCalcMixFormatter:",e),null}}function processCSSFiles(e,s){for(const{destination:o}of e)try{if(o.endsWith(".css")&&fs.existsSync(o)){const e=fs.readFileSync(o,"utf-8"),t=/(:root\s*\{[^}]*\})/,r=path.basename(o).split(".");let n=e;if(3===r.length&&"light"!==r[1]){const o=r[0],t=r[1];s+=(n=e.replace(/:root/g,`:root[${o}='${t}']`))+"\n"}else{const o=s.match(t),r=e.match(t);if(o&&r){const e=o[1],t=r[1].replace(/:root\s*\{|\}/g,"").trim(),n=e.replace("}",`\n${t}\n}`);s=s.replace(e,n)}else s+=n+"\n"}fs.unlink(o,()=>{})}}catch(e){console.error(`\nStyle dictionary, Error processing file ${o}:`,e)}return s}const generateOverrideCSS=async(e,s,o)=>{e=e||{};const t=await getLegacyWmProjectProperties(s);if(isPrismProject(t)){const t=path.join(s+"/src/main/webapp/",OVERRIDE_TOKENS_PATH),r=s+`/src/main/webapp/${APP_OVERRIDE_CSS_PATH}`;if(accessFile(r),fs.existsSync(t)){console.log("CODEGEN ANGULAR APP: generating override css...");let n={scope:"",name:"style-dictionary",version:"4.1.0",packageJsonFile:"",successMsg:"STYLE DICTIONARY SUCCESS",infoMsg:"STYLE DICTIONARY PACKAGE : ",skipPackageVersion:!1};n.baseDir=o;const i=await downloadNPMPackage(n);let a={scope:"@wavemaker",name:"foundation-css",version:e.runtimeUIVersion,packageJsonFile:"",successMsg:"Foundation-CSS SUCCESS",infoMsg:"Foundation-CSS PACKAGE : "};a.baseDir=o;const c=await downloadNPMPackage(a);console.log("FOUNDATION_CSS_PATH",c,"SourceDir",s),await(async()=>{const e=await import(`${i}/node_modules/style-dictionary/lib/StyleDictionary.js`).then(e=>e.default),o=path.join(c,"/node_modules/@wavemaker/foundation-css/src/tokens/web"),{cssVarCalcMixFormatter:n,componentVariantsFormatter:a}=await getCustomFormatters(i,c);n&&a||(n||console.error("cssVarCalcMixFormatter failed to load."),a||console.error("cssVariantFormatter failed to load.")),n&&e.registerFormat(n),a&&e.registerFormat(a);const l=path.resolve(s,"src","main","webapp",DESIGN_TOKENS_DIR_NAME,"temp-tokens"),d=groupFilesByMode(t),f=generateModeConfigs(d,s,n,a);let m="";try{console.log("\nSetting up foundation tokens symlink..."),await setupSymlink(o,l);for(const{mode:o,files:t}of f){console.log(`\nBuilding CSS for mode: ${o}...`);try{const n=getStyleDictionaryConfig(t,l,o,s);console.log(n,o);const i=new e(n);await i.buildPlatform("css"),console.log(`Style Dictionary build completed for mode: ${o}`),m=processCSSFiles(t,m),fs.writeFileSync(r,m),console.log(`CSS overrides generated successfully for mode: ${o}`)}catch(e){console.error(`Error during Style Dictionary build for mode: ${o}`,e)}}console.log("CODEGEN ANGULAR APP: generating overrides success !")}catch(e){console.error("Error setting up symlink or processing modes:",e)}finally{await removeSymlink(l)}})()}}};module.exports={generateOverrideCSS:generateOverrideCSS};
1
+ const path=require("path"),fs=require("fs"),{downloadNPMPackage:downloadNPMPackage}=require("../download-packages"),{isPrismProject:isPrismProject,DESIGN_TOKENS_DIR_NAME:DESIGN_TOKENS_DIR_NAME,OVERRIDE_TOKENS_PATH:OVERRIDE_TOKENS_PATH,APP_OVERRIDE_CSS_PATH:APP_OVERRIDE_CSS_PATH}=require("./wm-utils"),{getLegacyWmProjectProperties:getLegacyWmProjectProperties}=require("./project-meta"),groupFilesByMode=e=>{const s={default:[]};return fs.readdirSync(e).forEach(o=>{const t=path.join(e,o),r=fs.statSync(t);if(r.isDirectory()){const e=groupFilesByMode(t);for(const o in e)s[o]||(s[o]=[]),s[o].push(...e[o])}else if(r.isFile()&&".json"===path.extname(t)){const e=o.match(/\.([^.]+)\.json$/);if(e){const o=e[1];s[o]||(s[o]=[]),s[o].push(t)}else s.default.push(t)}}),s},generateModeConfigs=(e,s,o,t)=>{const r=o&&o.name||"css/variables",n=t&&t.name||"css/variables",i=[];for(const o in e){const t=e[o].flatMap(e=>{const o=e.replace(s+"/","");return[{destination:o.replace(/\.json$/,".css"),options:{outputReferences:!0,selector:":root"},format:r,filter:function(s){var o;const t=e=>e?e.replace(/\\/g,"/"):e;o=t(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath),e=t(e);var r=o&&-1!==o.indexOf("overrides")||s.filePath&&-1!==s.filePath.indexOf("overrides"),n=o&&(e.includes(o)||e.includes(t(s.filePath)))&&!s.path.includes("appearances")&&!s.path.includes("states");return r&&n}},{destination:o.replace(/\.json$/,"variant.css"),options:{outputReferences:!0,selector:":root"},format:n,filter:s=>{let o;const t=(o=s["@"]&&s["@"].filePath?s["@"].filePath:s.filePath)&&-1!==o.indexOf("overrides"),r=o&&(e.includes(o)||e.includes(s.filePath))&&(s.path.includes("appearances")||s.path.includes("states"));return t&&r}}]});i.push({mode:o,files:t})}return i},accessFile=e=>{const s=path.dirname(e);fs.existsSync(s)||(fs.mkdirSync(s,{recursive:!0}),console.log(`Directory created: ${s}`)),fs.access(e,fs.constants.F_OK,s=>{if(s){console.log(`${e} does not exist. Creating file...`);const s=JSON.stringify({});fs.writeFile(e,s,s=>{if(s)throw s;console.log(`${e} was created successfully.`)})}})};async function setupSymlink(e,s){try{await fs.promises.mkdir(path.dirname(s),{recursive:!0});try{fs.existsSync(s)&&await fs.promises.unlink(s)}catch(e){console.error("Error removing existing symlink:",e)}const o="win32"===process.platform?"junction":"dir";await fs.promises.symlink(e,s,o),console.log("Symlink created successfully at:",s)}catch(e){console.error("Error creating symlink:",s,e)}}const getStyleDictionaryConfig=(e,s,o,t)=>{t.endsWith("/")||(t+="/");let r="";return{log:{verbosity:"verbose"},source:[r="default"===o?`${t}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/!(*.*).json`:`${t}/src/main/webapp/${OVERRIDE_TOKENS_PATH}/**/*.${o}.json`],include:[path.join(s,"**","!(*.dark|*.light).json"),path.join(t,"src","main","webapp",OVERRIDE_TOKENS_PATH,"global","**","*.json")],platforms:{css:{transformGroup:"css",prefix:"--wm",files:e}}}};async function removeSymlink(e){const s=path.resolve(e);try{fs.lstatSync(s).isSymbolicLink()?(await fs.promises.unlink(s),console.log("Symlink removed successfully:",s)):console.warn("Not a symlink, skipping unlink:",s)}catch(e){console.error("Error during symlink removal:",e)}}async function getCustomFormatters(e,s){try{const o=await import(`${e}/node_modules/style-dictionary/lib/utils/index.js`),{usesReferences:t,getReferences:r}=o,n=await import(`${s}/node_modules/@wavemaker/foundation-css/src/utils/style-dictionary-utils.js`),{cssVarCalcMixFormatter:i,componentVariantsFormatter:a}=n,c="web";return{cssVarCalcMixFormatter:i(t,r),componentVariantsFormatter:a(t,r,c)}}catch(e){return console.error("Failed to load CssVarCalcMixFormatter:",e),null}}function processCSSFiles(e,s){for(const{destination:o}of e)try{if(o.endsWith(".css")&&fs.existsSync(o)){const e=fs.readFileSync(o,"utf-8"),t=/(:root\s*\{[^}]*\})/,r=path.basename(o).split(".");let n=e;if(3===r.length&&"light"!==r[1]){const o=r[0],t=r[1];s+=(n=e.replace(/:root/g,`:root[${o}='${t}']`))+"\n"}else{const o=s.match(t),r=e.match(t);if(o&&r){const e=o[1],t=r[1].replace(/:root\s*\{|\}/g,"").trim(),n=e.replace("}",`\n${t}\n}`);s=s.replace(e,n)}else s+=n+"\n"}fs.unlink(o,()=>{})}}catch(e){console.error(`\nStyle dictionary, Error processing file ${o}:`,e)}return s}const generateOverrideCSS=async(e,s,o)=>{e=e||{};const t=await getLegacyWmProjectProperties(s);if(isPrismProject(t)&&(e.generateOverrideCSS||"angular"===e.buildType)){const t=path.join(s+"/src/main/webapp/",OVERRIDE_TOKENS_PATH),r=s+`/src/main/webapp/${APP_OVERRIDE_CSS_PATH}`;if(accessFile(r),fs.existsSync(t)){console.log("CODEGEN ANGULAR APP: generating override css...");let n={scope:"",name:"style-dictionary",version:"4.1.0",packageJsonFile:"",successMsg:"STYLE DICTIONARY SUCCESS",infoMsg:"STYLE DICTIONARY PACKAGE : ",skipPackageVersion:!1};n.baseDir=o;const i=await downloadNPMPackage(n);let a={scope:"@wavemaker",name:"foundation-css",version:e.runtimeUIVersion,packageJsonFile:"",successMsg:"Foundation-CSS SUCCESS",infoMsg:"Foundation-CSS PACKAGE : "};a.baseDir=o;const c=await downloadNPMPackage(a);console.log("FOUNDATION_CSS_PATH",c,"SourceDir",s),await(async()=>{const e=await import(`${i}/node_modules/style-dictionary/lib/StyleDictionary.js`).then(e=>e.default),o=path.join(c,"/node_modules/@wavemaker/foundation-css/src/tokens/web"),{cssVarCalcMixFormatter:n,componentVariantsFormatter:a}=await getCustomFormatters(i,c);n&&a||(n||console.error("cssVarCalcMixFormatter failed to load."),a||console.error("cssVariantFormatter failed to load.")),n&&e.registerFormat(n),a&&e.registerFormat(a);const l=path.resolve(s,"src","main","webapp",DESIGN_TOKENS_DIR_NAME,"temp-tokens"),d=groupFilesByMode(t),f=generateModeConfigs(d,s,n,a);let m="";try{console.log("\nSetting up foundation tokens symlink..."),await setupSymlink(o,l);for(const{mode:o,files:t}of f){console.log(`\nBuilding CSS for mode: ${o}...`);try{const n=getStyleDictionaryConfig(t,l,o,s);console.log(n,o);const i=new e(n);await i.buildPlatform("css"),console.log(`Style Dictionary build completed for mode: ${o}`),m=processCSSFiles(t,m),fs.writeFileSync(r,m),console.log(`CSS overrides generated successfully for mode: ${o}`)}catch(e){console.error(`Error during Style Dictionary build for mode: ${o}`,e)}}console.log("CODEGEN ANGULAR APP: generating overrides success !")}catch(e){console.error("Error setting up symlink or processing modes:",e)}finally{await removeSymlink(l)}})()}}};module.exports={generateOverrideCSS:generateOverrideCSS};