@wavemaker/angular-codegen 11.14.1-rc.6310 → 11.14.2-rc.6311
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.
- package/angular-app/dependency-report.html +1 -1
- package/angular-app/npm-shrinkwrap.json +19 -19
- package/angular-app/package-lock.json +19 -19
- package/angular-app/package.json +6 -6
- package/angular-app/src/framework/services/component-ref-provider.service.ts +4 -0
- package/angular-app/src/main.ts +13 -4
- package/dependencies/pipe-provider.cjs.js +489 -108
- package/dependencies/transpilation-web.cjs.js +236 -48
- package/npm-shrinkwrap.json +20 -20
- package/package-lock.json +20 -20
- package/package.json +2 -2
- package/src/gen-app-override-css.js +1 -1
|
@@ -99707,11 +99707,11 @@ const getRowActionAttrs = attrs => {
|
|
|
99707
99707
|
return tmpl;
|
|
99708
99708
|
};
|
|
99709
99709
|
|
|
99710
|
-
const $RAF
|
|
99710
|
+
const $RAF = window.requestAnimationFrame;
|
|
99711
99711
|
const $RAFQueue = [];
|
|
99712
99712
|
const invokeLater = fn => {
|
|
99713
99713
|
if (!$RAFQueue.length) {
|
|
99714
|
-
$RAF
|
|
99714
|
+
$RAF(() => {
|
|
99715
99715
|
$RAFQueue.forEach(f => f());
|
|
99716
99716
|
$RAFQueue.length = 0;
|
|
99717
99717
|
});
|
|
@@ -99719,7 +99719,23 @@ const invokeLater = fn => {
|
|
|
99719
99719
|
$RAFQueue.push(fn);
|
|
99720
99720
|
};
|
|
99721
99721
|
const setAttr = (node, attrName, val, sync) => {
|
|
99722
|
-
const task = () =>
|
|
99722
|
+
const task = () => {
|
|
99723
|
+
if (node instanceof Element) {
|
|
99724
|
+
// Handle tabindex specifically - ensure it's a valid string representation
|
|
99725
|
+
if (attrName === 'tabindex') {
|
|
99726
|
+
// Convert to string, handling 0, null, undefined, and NaN
|
|
99727
|
+
if (val === null || val === undefined || (typeof val === 'number' && isNaN(val))) {
|
|
99728
|
+
node.removeAttribute(attrName);
|
|
99729
|
+
}
|
|
99730
|
+
else {
|
|
99731
|
+
node.setAttribute(attrName, String(val));
|
|
99732
|
+
}
|
|
99733
|
+
}
|
|
99734
|
+
else {
|
|
99735
|
+
node.setAttribute(attrName, val);
|
|
99736
|
+
}
|
|
99737
|
+
}
|
|
99738
|
+
};
|
|
99723
99739
|
invokeLater(task);
|
|
99724
99740
|
};
|
|
99725
99741
|
|
|
@@ -100253,70 +100269,220 @@ const getFnForEventExpr = (expr) => {
|
|
|
100253
100269
|
return fnExecutor(expr, ExpressionType.Action);
|
|
100254
100270
|
};
|
|
100255
100271
|
|
|
100272
|
+
// Constants
|
|
100273
|
+
const WIDGET_ID_REGEX = /^(widget-[^_]+)/;
|
|
100274
|
+
const WIDGET_PROPERTY_REGEX = /^widget-[^_]+_(.+)$/;
|
|
100275
|
+
const ARRAY_INDEX_PLACEHOLDER = '[$i]';
|
|
100276
|
+
const ARRAY_INDEX_ZERO = '[0]';
|
|
100256
100277
|
const registry = new Map();
|
|
100257
100278
|
const watchIdGenerator = new IDGenerator('watch-id-');
|
|
100258
|
-
const FIRST_TIME_WATCH = {};
|
|
100259
|
-
|
|
100279
|
+
const FIRST_TIME_WATCH = Object.freeze({});
|
|
100280
|
+
/**
|
|
100281
|
+
* Extracts widget ID from identifier (e.g., "widget-id23_eventsource" -> "widget-id23")
|
|
100282
|
+
*/
|
|
100283
|
+
const getWidgetId = (identifier) => {
|
|
100284
|
+
if (!identifier || typeof identifier !== 'string') {
|
|
100285
|
+
return null;
|
|
100286
|
+
}
|
|
100287
|
+
const match = identifier.match(WIDGET_ID_REGEX);
|
|
100288
|
+
return match ? match[1] : null;
|
|
100289
|
+
};
|
|
100290
|
+
/**
|
|
100291
|
+
* Extracts property name from identifier (e.g., "widget-id23_eventsource" -> "eventsource")
|
|
100292
|
+
*/
|
|
100293
|
+
const getPropertyName = (identifier) => {
|
|
100294
|
+
if (!identifier || typeof identifier !== 'string') {
|
|
100295
|
+
return identifier;
|
|
100296
|
+
}
|
|
100297
|
+
const match = identifier.match(WIDGET_PROPERTY_REGEX);
|
|
100298
|
+
return match ? match[1] : identifier;
|
|
100299
|
+
};
|
|
100300
|
+
/**
|
|
100301
|
+
* Array consumer wrapper for array-based expressions
|
|
100302
|
+
*/
|
|
100260
100303
|
const arrayConsumer = (listenerFn, restExpr, newVal, oldVal) => {
|
|
100261
|
-
|
|
100262
|
-
|
|
100263
|
-
|
|
100264
|
-
|
|
100265
|
-
|
|
100266
|
-
|
|
100267
|
-
|
|
100268
|
-
formattedData = flatten$1(formattedData);
|
|
100269
|
-
}
|
|
100270
|
-
listenerFn(formattedData, oldVal);
|
|
100304
|
+
if (!isArray(newVal)) {
|
|
100305
|
+
return;
|
|
100306
|
+
}
|
|
100307
|
+
let formattedData = newVal.map(datum => findValueOf(datum, restExpr));
|
|
100308
|
+
// Flatten if result is array of arrays
|
|
100309
|
+
if (isArray(formattedData[0])) {
|
|
100310
|
+
formattedData = flatten$1(formattedData);
|
|
100271
100311
|
}
|
|
100312
|
+
listenerFn(formattedData, oldVal);
|
|
100272
100313
|
};
|
|
100273
|
-
|
|
100274
|
-
|
|
100275
|
-
|
|
100276
|
-
|
|
100314
|
+
/**
|
|
100315
|
+
* Updates watch info for array expressions
|
|
100316
|
+
*/
|
|
100317
|
+
const getUpdatedWatchInfo = (expr, acceptsArray, listener) => {
|
|
100318
|
+
const regex = /\[\$i\]/g;
|
|
100277
100319
|
if (!acceptsArray) {
|
|
100278
100320
|
return {
|
|
100279
|
-
|
|
100280
|
-
|
|
100321
|
+
expr: expr.replace(regex, ARRAY_INDEX_ZERO),
|
|
100322
|
+
listener
|
|
100281
100323
|
};
|
|
100282
100324
|
}
|
|
100283
|
-
|
|
100284
|
-
|
|
100285
|
-
|
|
100286
|
-
|
|
100287
|
-
|
|
100288
|
-
|
|
100325
|
+
const lastIndex = expr.lastIndexOf(ARRAY_INDEX_PLACEHOLDER);
|
|
100326
|
+
const baseExpr = expr.substring(0, lastIndex).replace(ARRAY_INDEX_PLACEHOLDER, ARRAY_INDEX_ZERO);
|
|
100327
|
+
const restExpr = expr.substring(lastIndex + 5);
|
|
100328
|
+
const arrayConsumerFn = restExpr
|
|
100329
|
+
? arrayConsumer.bind(undefined, listener, restExpr)
|
|
100330
|
+
: listener;
|
|
100289
100331
|
return {
|
|
100290
|
-
|
|
100291
|
-
|
|
100332
|
+
expr: baseExpr,
|
|
100333
|
+
listener: arrayConsumerFn
|
|
100292
100334
|
};
|
|
100293
100335
|
};
|
|
100336
|
+
/**
|
|
100337
|
+
* Determines if an expression is static (doesn't need to be watched)
|
|
100338
|
+
*/
|
|
100339
|
+
const STATIC_EXPRESSION_NAMES = [
|
|
100340
|
+
"row.getProperty('investment')",
|
|
100341
|
+
"row.getProperty('factsheetLink')",
|
|
100342
|
+
"row.getProperty('isRebalanceEligible')"
|
|
100343
|
+
];
|
|
100344
|
+
const isStaticExpression = (expr) => {
|
|
100345
|
+
if (typeof expr !== 'string') {
|
|
100346
|
+
return false;
|
|
100347
|
+
}
|
|
100348
|
+
const trimmedExpr = expr.trim();
|
|
100349
|
+
// Expressions that always evaluate to localization strings
|
|
100350
|
+
// if (trimmedExpr.includes('appLocale')) {
|
|
100351
|
+
// return true;
|
|
100352
|
+
// }
|
|
100353
|
+
// Hard-coded static expression names
|
|
100354
|
+
if (STATIC_EXPRESSION_NAMES.includes(trimmedExpr)) {
|
|
100355
|
+
return true;
|
|
100356
|
+
}
|
|
100357
|
+
return false;
|
|
100358
|
+
};
|
|
100359
|
+
/**
|
|
100360
|
+
* Gets the scope type from the scope object
|
|
100361
|
+
*/
|
|
100362
|
+
const getScopeType = ($scope) => {
|
|
100363
|
+
if (!$scope) {
|
|
100364
|
+
return null;
|
|
100365
|
+
}
|
|
100366
|
+
if ($scope.pageName)
|
|
100367
|
+
return 'Page';
|
|
100368
|
+
if ($scope.prefabName)
|
|
100369
|
+
return 'Prefab';
|
|
100370
|
+
if ($scope.partialName)
|
|
100371
|
+
return 'Partial';
|
|
100372
|
+
// Check for App scope
|
|
100373
|
+
if ($scope.Variables !== undefined &&
|
|
100374
|
+
$scope.Actions !== undefined &&
|
|
100375
|
+
!$scope.pageName &&
|
|
100376
|
+
!$scope.prefabName &&
|
|
100377
|
+
!$scope.partialName) {
|
|
100378
|
+
return 'App';
|
|
100379
|
+
}
|
|
100380
|
+
if ($scope.constructor?.name === 'AppRef') {
|
|
100381
|
+
return 'App';
|
|
100382
|
+
}
|
|
100383
|
+
return null;
|
|
100384
|
+
};
|
|
100385
|
+
/**
|
|
100386
|
+
* Gets scope name based on scope type
|
|
100387
|
+
*/
|
|
100388
|
+
const getScopeName = ($scope, scopeType) => {
|
|
100389
|
+
if (!scopeType || !$scope) {
|
|
100390
|
+
return null;
|
|
100391
|
+
}
|
|
100392
|
+
switch (scopeType) {
|
|
100393
|
+
case 'Prefab': return $scope.prefabName || null;
|
|
100394
|
+
case 'Partial': return $scope.partialName || null;
|
|
100395
|
+
case 'Page': return $scope.pageName || null;
|
|
100396
|
+
default: return null;
|
|
100397
|
+
}
|
|
100398
|
+
};
|
|
100399
|
+
/**
|
|
100400
|
+
* Main watch function
|
|
100401
|
+
*/
|
|
100294
100402
|
const $watch = (expr, $scope, $locals, listener, identifier = watchIdGenerator.nextUid(), doNotClone = false, config = {}, isMuted) => {
|
|
100295
|
-
|
|
100296
|
-
|
|
100403
|
+
// Handle array expressions
|
|
100404
|
+
if (expr.includes(ARRAY_INDEX_PLACEHOLDER)) {
|
|
100405
|
+
const watchInfo = getUpdatedWatchInfo(expr, config.arrayType || config.isList || false, listener);
|
|
100297
100406
|
expr = watchInfo.expr;
|
|
100298
100407
|
listener = watchInfo.listener;
|
|
100299
100408
|
}
|
|
100409
|
+
// Handle static expressions
|
|
100410
|
+
if (isStaticExpression(expr)) {
|
|
100411
|
+
try {
|
|
100412
|
+
const fn = $parseExpr(expr);
|
|
100413
|
+
const staticValue = fn($scope, $locals);
|
|
100414
|
+
listener(staticValue, FIRST_TIME_WATCH);
|
|
100415
|
+
}
|
|
100416
|
+
catch (e) {
|
|
100417
|
+
console.warn(`Error evaluating static expression '${expr}':`, e);
|
|
100418
|
+
listener(undefined, FIRST_TIME_WATCH);
|
|
100419
|
+
}
|
|
100420
|
+
return () => { }; // No-op unsubscribe
|
|
100421
|
+
}
|
|
100300
100422
|
const fn = $parseExpr();
|
|
100301
|
-
|
|
100302
|
-
|
|
100423
|
+
const scopeType = getScopeType($scope);
|
|
100424
|
+
const scopeName = getScopeName($scope, scopeType);
|
|
100425
|
+
const watchInfo = {
|
|
100426
|
+
fn: fn.bind(null, $scope, $locals),
|
|
100303
100427
|
listener,
|
|
100304
100428
|
expr,
|
|
100305
100429
|
last: FIRST_TIME_WATCH,
|
|
100306
100430
|
doNotClone,
|
|
100307
|
-
isMuted
|
|
100308
|
-
|
|
100431
|
+
isMuted,
|
|
100432
|
+
scopeType,
|
|
100433
|
+
scopeName
|
|
100434
|
+
};
|
|
100435
|
+
// Store in registry
|
|
100436
|
+
const widgetId = getWidgetId(identifier);
|
|
100437
|
+
if (widgetId) {
|
|
100438
|
+
const propertyName = getPropertyName(identifier);
|
|
100439
|
+
if (!registry.has(widgetId)) {
|
|
100440
|
+
registry.set(widgetId, {});
|
|
100441
|
+
}
|
|
100442
|
+
const widgetGroup = registry.get(widgetId);
|
|
100443
|
+
widgetGroup[propertyName] = watchInfo;
|
|
100444
|
+
}
|
|
100445
|
+
else {
|
|
100446
|
+
registry.set(identifier, watchInfo);
|
|
100447
|
+
}
|
|
100309
100448
|
return () => $unwatch(identifier);
|
|
100310
100449
|
};
|
|
100311
|
-
|
|
100312
|
-
|
|
100450
|
+
/**
|
|
100451
|
+
* Unwatches a single identifier
|
|
100452
|
+
*/
|
|
100453
|
+
const $unwatch = (identifier) => {
|
|
100454
|
+
const widgetId = getWidgetId(identifier);
|
|
100455
|
+
if (widgetId) {
|
|
100456
|
+
const propertyName = getPropertyName(identifier);
|
|
100457
|
+
const widgetGroup = registry.get(widgetId);
|
|
100458
|
+
if (widgetGroup && typeof widgetGroup === 'object' && !widgetGroup.fn) {
|
|
100459
|
+
const watchInfo = widgetGroup[propertyName];
|
|
100460
|
+
if (watchInfo) {
|
|
100461
|
+
delete widgetGroup[propertyName];
|
|
100462
|
+
// Clean up empty widget groups
|
|
100463
|
+
if (Object.keys(widgetGroup).length === 0) {
|
|
100464
|
+
registry.delete(widgetId);
|
|
100465
|
+
}
|
|
100466
|
+
return true;
|
|
100467
|
+
}
|
|
100468
|
+
}
|
|
100469
|
+
}
|
|
100470
|
+
// Fallback to direct lookup
|
|
100471
|
+
if (registry.has(identifier)) {
|
|
100472
|
+
registry.delete(identifier);
|
|
100473
|
+
return true;
|
|
100474
|
+
}
|
|
100475
|
+
return false;
|
|
100476
|
+
};
|
|
100313
100477
|
const $appDigest = (() => {
|
|
100314
|
-
return (force) => {
|
|
100478
|
+
return (force = false) => {
|
|
100315
100479
|
{
|
|
100316
100480
|
return;
|
|
100317
100481
|
}
|
|
100318
100482
|
};
|
|
100319
100483
|
})();
|
|
100484
|
+
// Export registry for debugging
|
|
100485
|
+
window.watchRegistry = registry;
|
|
100320
100486
|
|
|
100321
100487
|
var ComponentType;
|
|
100322
100488
|
(function (ComponentType) {
|
|
@@ -100387,6 +100553,7 @@ const REGEX = {
|
|
|
100387
100553
|
SUPPORTED_AUDIO_FORMAT: /\.(mp3|ogg|webm|wma|3gp|wav|m4a)$/i,
|
|
100388
100554
|
SUPPORTED_VIDEO_FORMAT: /\.(mp4|ogg|webm|wmv|mpeg|mpg|avi|mov)$/i,
|
|
100389
100555
|
VALID_WEB_URL: /^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,
|
|
100556
|
+
VALID_IMAGE_URL: /^(https?|blob|data|file|ftp):/i,
|
|
100390
100557
|
REPLACE_PATTERN: /\$\{([^\}]+)\}/g,
|
|
100391
100558
|
DATA_URL: /^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i,
|
|
100392
100559
|
ISO_DATE_FORMAT: /(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d+)?([+-]\d{2}:?\d{2}|Z)$/
|
|
@@ -100609,6 +100776,9 @@ const isVideoFile = (fileName) => {
|
|
|
100609
100776
|
const isValidWebURL = (url) => {
|
|
100610
100777
|
return (REGEX.VALID_WEB_URL).test(url);
|
|
100611
100778
|
};
|
|
100779
|
+
const isValidImageUrl = (url) => {
|
|
100780
|
+
return (REGEX.VALID_IMAGE_URL).test(url?.trim());
|
|
100781
|
+
};
|
|
100612
100782
|
/*This function returns the url to the resource after checking the validity of url*/
|
|
100613
100783
|
const getResourceURL = (urlString) => {
|
|
100614
100784
|
return urlString;
|
|
@@ -101862,6 +102032,7 @@ var Utils = /*#__PURE__*/Object.freeze({
|
|
|
101862
102032
|
isPageable: isPageable,
|
|
101863
102033
|
isSafari: isSafari,
|
|
101864
102034
|
isTablet: isTablet,
|
|
102035
|
+
isValidImageUrl: isValidImageUrl,
|
|
101865
102036
|
isValidWebURL: isValidWebURL,
|
|
101866
102037
|
isVideoFile: isVideoFile,
|
|
101867
102038
|
loadScript: loadScript,
|
|
@@ -101955,7 +102126,10 @@ class EventNotifier {
|
|
|
101955
102126
|
return noop;
|
|
101956
102127
|
}
|
|
101957
102128
|
destroy() {
|
|
101958
|
-
this._subject.
|
|
102129
|
+
this._subject.next(null); // optional
|
|
102130
|
+
this._subject.complete(); // clears all observers
|
|
102131
|
+
this._isInitialized = false;
|
|
102132
|
+
this._eventsBeforeInit = [];
|
|
101959
102133
|
}
|
|
101960
102134
|
}
|
|
101961
102135
|
let MINIMUM_TAB_WIDTH = 768;
|
|
@@ -101970,9 +102144,11 @@ class Viewport {
|
|
|
101970
102144
|
this.isTabletType = false;
|
|
101971
102145
|
this._eventNotifier = new EventNotifier(true);
|
|
101972
102146
|
this.setScreenType();
|
|
101973
|
-
|
|
101974
|
-
|
|
101975
|
-
|
|
102147
|
+
// MEMORY LEAK FIX: Store bound function reference for proper removal
|
|
102148
|
+
this.boundResizeFn = this.resizeFn.bind(this);
|
|
102149
|
+
window.addEventListener("resize" /* ViewportEvent.RESIZE */, this.boundResizeFn);
|
|
102150
|
+
this.mediaQuery = window.matchMedia('(orientation: portrait)');
|
|
102151
|
+
if (this.mediaQuery.matches) {
|
|
101976
102152
|
this.orientation.isPortrait = true;
|
|
101977
102153
|
}
|
|
101978
102154
|
else {
|
|
@@ -101980,8 +102156,10 @@ class Viewport {
|
|
|
101980
102156
|
}
|
|
101981
102157
|
// Add a media query change listener
|
|
101982
102158
|
// addEventListener is not supported ios browser
|
|
101983
|
-
if (
|
|
101984
|
-
|
|
102159
|
+
if (this.mediaQuery.addEventListener) {
|
|
102160
|
+
// MEMORY LEAK FIX: Store bound function reference for proper removal
|
|
102161
|
+
this.boundOrientationChange = ($event) => this.orientationChange($event, !$event.matches);
|
|
102162
|
+
this.mediaQuery.addEventListener('change', this.boundOrientationChange);
|
|
101985
102163
|
}
|
|
101986
102164
|
}
|
|
101987
102165
|
update(selectedViewPort) {
|
|
@@ -102008,14 +102186,14 @@ class Viewport {
|
|
|
102008
102186
|
return this._eventNotifier.subscribe(eventName, callback);
|
|
102009
102187
|
}
|
|
102010
102188
|
notify(eventName, ...data) {
|
|
102011
|
-
this._eventNotifier.notify
|
|
102189
|
+
this._eventNotifier.notify(eventName, ...data);
|
|
102012
102190
|
}
|
|
102013
102191
|
setScreenType() {
|
|
102014
102192
|
const $el = document.querySelector('.wm-app');
|
|
102015
102193
|
this.screenWidth = $el.clientWidth;
|
|
102016
102194
|
this.screenHeight = $el.clientHeight;
|
|
102017
|
-
this.screenWidth < this.screenHeight ? this.screenWidth : this.screenHeight;
|
|
102018
|
-
this.screenWidth > this.screenHeight ? this.screenWidth : this.screenHeight;
|
|
102195
|
+
// const minValue = this.screenWidth < this.screenHeight ? this.screenWidth : this.screenHeight;
|
|
102196
|
+
// const maxValue = this.screenWidth > this.screenHeight ? this.screenWidth : this.screenHeight;
|
|
102019
102197
|
this.isTabletType = false;
|
|
102020
102198
|
this.isMobileType = false;
|
|
102021
102199
|
if (get$1(this.selectedViewPort, 'deviceCategory')) {
|
|
@@ -102047,7 +102225,17 @@ class Viewport {
|
|
|
102047
102225
|
}
|
|
102048
102226
|
ngOnDestroy() {
|
|
102049
102227
|
this._eventNotifier.destroy();
|
|
102050
|
-
|
|
102228
|
+
// MEMORY LEAK FIX: Remove resize event listener using stored bound function reference
|
|
102229
|
+
if (this.boundResizeFn) {
|
|
102230
|
+
window.removeEventListener('resize', this.boundResizeFn);
|
|
102231
|
+
this.boundResizeFn = null;
|
|
102232
|
+
}
|
|
102233
|
+
// MEMORY LEAK FIX: Remove media query orientation change listener
|
|
102234
|
+
if (this.mediaQuery && this.boundOrientationChange && this.mediaQuery.removeEventListener) {
|
|
102235
|
+
this.mediaQuery.removeEventListener('change', this.boundOrientationChange);
|
|
102236
|
+
this.boundOrientationChange = null;
|
|
102237
|
+
}
|
|
102238
|
+
this.mediaQuery = null;
|
|
102051
102239
|
}
|
|
102052
102240
|
static { this.ɵfac = ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Viewport, deps: [], target: FactoryTarget.Injectable }); }
|
|
102053
102241
|
static { this.ɵprov = ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Viewport, providedIn: 'root' }); }
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wavemaker/angular-codegen",
|
|
3
|
-
"version": "11.14.
|
|
3
|
+
"version": "11.14.2-rc.6311",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@wavemaker/angular-codegen",
|
|
9
|
-
"version": "11.14.
|
|
9
|
+
"version": "11.14.2-rc.6311",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@wavemaker/angular-app": "11.14.
|
|
12
|
+
"@wavemaker/angular-app": "11.14.2-rc.6311",
|
|
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.
|
|
1380
|
-
"integrity": "sha512-
|
|
1379
|
+
"version": "11.14.2-rc.6311",
|
|
1380
|
+
"integrity": "sha512-UNvj5jg1muOFtZOnEW/Ay18CPpXnqW313X0E1dAQnJHouFG4RCdl4+PL4C2lf/uxa8QEqQzPzMsR+fZYwZ8Pog==",
|
|
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.
|
|
1398
|
-
"@wavemaker/custom-widgets-m3": "11.14.
|
|
1397
|
+
"@wavemaker/app-ng-runtime": "11.14.2-rc.6311",
|
|
1398
|
+
"@wavemaker/custom-widgets-m3": "11.14.2-rc.6311",
|
|
1399
1399
|
"@wavemaker/focus-trap": "1.0.1",
|
|
1400
|
-
"@wavemaker/foundation-css": "11.14.
|
|
1401
|
-
"@wavemaker/nvd3": "1.8.
|
|
1402
|
-
"@wavemaker/variables": "11.14.
|
|
1400
|
+
"@wavemaker/foundation-css": "11.14.2-rc.6311",
|
|
1401
|
+
"@wavemaker/nvd3": "1.8.16",
|
|
1402
|
+
"@wavemaker/variables": "11.14.2-rc.6311",
|
|
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.
|
|
1438
|
-
"integrity": "sha512-
|
|
1437
|
+
"version": "11.14.2-rc.6311",
|
|
1438
|
+
"integrity": "sha512-fyq/aZwUwWxGORiKJxjmGB1d7uxbnb5jQ51kg9IiLFJfEReRy4juS/dOjaof+FfOoQON2x72GKqAYARn1LsnpQ==",
|
|
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.
|
|
1447
|
-
"integrity": "sha512-
|
|
1446
|
+
"version": "11.14.2-rc.6311",
|
|
1447
|
+
"integrity": "sha512-JBab4nvAW3oeF4BFBHEhLVhAoQ2G9DLBvt2gns5mpePHFQHi6SadYQDtjJBISZEks4JaoWhy1G05jwFDK52dzw==",
|
|
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.
|
|
1461
|
-
"integrity": "sha512-
|
|
1460
|
+
"version": "11.14.2-rc.6311",
|
|
1461
|
+
"integrity": "sha512-RZPYwWipSso46C6Uk9w1tDOgUIE5Vvu+dNxTLTslEXp1IOip8BWQ7EnDIErHeyZxrEeQHN1ESTIZN3SyxDnTOA==",
|
|
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.
|
|
1469
|
-
"integrity": "sha512-
|
|
1468
|
+
"version": "1.8.16",
|
|
1469
|
+
"integrity": "sha512-gzgcW3Gr3MYUpYqbhWXVlUq8NhWpBFCz/QKF+Ekvi6pUjTHDLfe264HgiyrPs0PbCPsqN7Z/cFNbQTYJZC+fzQ==",
|
|
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.
|
|
1477
|
-
"integrity": "sha512-
|
|
1476
|
+
"version": "11.14.2-rc.6311",
|
|
1477
|
+
"integrity": "sha512-krkf2FYiiDVooQHcSnZ3nzIgZUxh6eIbF/WKgjyM2VZ9xC7By6q6+8cycXyqBgzTCciL00pXIETQe3joEueg8w==",
|
|
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.
|
|
3
|
+
"version": "11.14.2-rc.6311",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@wavemaker/angular-codegen",
|
|
9
|
-
"version": "11.14.
|
|
9
|
+
"version": "11.14.2-rc.6311",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@wavemaker/angular-app": "11.14.
|
|
12
|
+
"@wavemaker/angular-app": "11.14.2-rc.6311",
|
|
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.
|
|
1380
|
-
"integrity": "sha512-
|
|
1379
|
+
"version": "11.14.2-rc.6311",
|
|
1380
|
+
"integrity": "sha512-UNvj5jg1muOFtZOnEW/Ay18CPpXnqW313X0E1dAQnJHouFG4RCdl4+PL4C2lf/uxa8QEqQzPzMsR+fZYwZ8Pog==",
|
|
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.
|
|
1398
|
-
"@wavemaker/custom-widgets-m3": "11.14.
|
|
1397
|
+
"@wavemaker/app-ng-runtime": "11.14.2-rc.6311",
|
|
1398
|
+
"@wavemaker/custom-widgets-m3": "11.14.2-rc.6311",
|
|
1399
1399
|
"@wavemaker/focus-trap": "1.0.1",
|
|
1400
|
-
"@wavemaker/foundation-css": "11.14.
|
|
1401
|
-
"@wavemaker/nvd3": "1.8.
|
|
1402
|
-
"@wavemaker/variables": "11.14.
|
|
1400
|
+
"@wavemaker/foundation-css": "11.14.2-rc.6311",
|
|
1401
|
+
"@wavemaker/nvd3": "1.8.16",
|
|
1402
|
+
"@wavemaker/variables": "11.14.2-rc.6311",
|
|
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.
|
|
1438
|
-
"integrity": "sha512-
|
|
1437
|
+
"version": "11.14.2-rc.6311",
|
|
1438
|
+
"integrity": "sha512-fyq/aZwUwWxGORiKJxjmGB1d7uxbnb5jQ51kg9IiLFJfEReRy4juS/dOjaof+FfOoQON2x72GKqAYARn1LsnpQ==",
|
|
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.
|
|
1447
|
-
"integrity": "sha512-
|
|
1446
|
+
"version": "11.14.2-rc.6311",
|
|
1447
|
+
"integrity": "sha512-JBab4nvAW3oeF4BFBHEhLVhAoQ2G9DLBvt2gns5mpePHFQHi6SadYQDtjJBISZEks4JaoWhy1G05jwFDK52dzw==",
|
|
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.
|
|
1461
|
-
"integrity": "sha512-
|
|
1460
|
+
"version": "11.14.2-rc.6311",
|
|
1461
|
+
"integrity": "sha512-RZPYwWipSso46C6Uk9w1tDOgUIE5Vvu+dNxTLTslEXp1IOip8BWQ7EnDIErHeyZxrEeQHN1ESTIZN3SyxDnTOA==",
|
|
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.
|
|
1469
|
-
"integrity": "sha512-
|
|
1468
|
+
"version": "1.8.16",
|
|
1469
|
+
"integrity": "sha512-gzgcW3Gr3MYUpYqbhWXVlUq8NhWpBFCz/QKF+Ekvi6pUjTHDLfe264HgiyrPs0PbCPsqN7Z/cFNbQTYJZC+fzQ==",
|
|
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.
|
|
1477
|
-
"integrity": "sha512-
|
|
1476
|
+
"version": "11.14.2-rc.6311",
|
|
1477
|
+
"integrity": "sha512-krkf2FYiiDVooQHcSnZ3nzIgZUxh6eIbF/WKgjyM2VZ9xC7By6q6+8cycXyqBgzTCciL00pXIETQe3joEueg8w==",
|
|
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.
|
|
3
|
+
"version": "11.14.2-rc.6311",
|
|
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.
|
|
18
|
+
"@wavemaker/angular-app": "11.14.2-rc.6311",
|
|
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:[
|
|
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};
|