@wavemaker/angular-app 11.14.1-13.6377 → 11.14.1-16.6404
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/dependencies/custom-widgets-bundle.cjs.js +1 -1
- package/dependencies/pipe-provider.cjs.js +98 -378
- package/dependencies/transpilation-web.cjs.js +49 -189
- package/dependency-report.html +1 -1
- package/npm-shrinkwrap.json +302 -288
- package/package-lock.json +302 -288
- package/package.json +5 -5
|
@@ -99707,11 +99707,11 @@ const getRowActionAttrs = attrs => {
|
|
|
99707
99707
|
return tmpl;
|
|
99708
99708
|
};
|
|
99709
99709
|
|
|
99710
|
-
const $RAF = window.requestAnimationFrame;
|
|
99710
|
+
const $RAF$1 = window.requestAnimationFrame;
|
|
99711
99711
|
const $RAFQueue = [];
|
|
99712
99712
|
const invokeLater = fn => {
|
|
99713
99713
|
if (!$RAFQueue.length) {
|
|
99714
|
-
$RAF(() => {
|
|
99714
|
+
$RAF$1(() => {
|
|
99715
99715
|
$RAFQueue.forEach(f => f());
|
|
99716
99716
|
$RAFQueue.length = 0;
|
|
99717
99717
|
});
|
|
@@ -100253,223 +100253,83 @@ const getFnForEventExpr = (expr) => {
|
|
|
100253
100253
|
return fnExecutor(expr, ExpressionType.Action);
|
|
100254
100254
|
};
|
|
100255
100255
|
|
|
100256
|
-
// Constants
|
|
100257
|
-
const WIDGET_ID_REGEX = /^(widget-[^_]+)/;
|
|
100258
|
-
const WIDGET_PROPERTY_REGEX = /^widget-[^_]+_(.+)$/;
|
|
100259
|
-
const ARRAY_INDEX_PLACEHOLDER = '[$i]';
|
|
100260
|
-
const ARRAY_INDEX_ZERO = '[0]';
|
|
100261
100256
|
const registry = new Map();
|
|
100262
100257
|
const watchIdGenerator = new IDGenerator('watch-id-');
|
|
100263
|
-
const FIRST_TIME_WATCH =
|
|
100264
|
-
|
|
100265
|
-
* Extracts widget ID from identifier (e.g., "widget-id23_eventsource" -> "widget-id23")
|
|
100266
|
-
*/
|
|
100267
|
-
const getWidgetId = (identifier) => {
|
|
100268
|
-
if (!identifier || typeof identifier !== 'string') {
|
|
100269
|
-
return null;
|
|
100270
|
-
}
|
|
100271
|
-
const match = identifier.match(WIDGET_ID_REGEX);
|
|
100272
|
-
return match ? match[1] : null;
|
|
100273
|
-
};
|
|
100274
|
-
/**
|
|
100275
|
-
* Extracts property name from identifier (e.g., "widget-id23_eventsource" -> "eventsource")
|
|
100276
|
-
*/
|
|
100277
|
-
const getPropertyName = (identifier) => {
|
|
100278
|
-
if (!identifier || typeof identifier !== 'string') {
|
|
100279
|
-
return identifier;
|
|
100280
|
-
}
|
|
100281
|
-
const match = identifier.match(WIDGET_PROPERTY_REGEX);
|
|
100282
|
-
return match ? match[1] : identifier;
|
|
100283
|
-
};
|
|
100284
|
-
/**
|
|
100285
|
-
* Array consumer wrapper for array-based expressions
|
|
100286
|
-
*/
|
|
100258
|
+
const FIRST_TIME_WATCH = {};
|
|
100259
|
+
Object.freeze(FIRST_TIME_WATCH);
|
|
100287
100260
|
const arrayConsumer = (listenerFn, restExpr, newVal, oldVal) => {
|
|
100288
|
-
|
|
100289
|
-
|
|
100290
|
-
|
|
100291
|
-
|
|
100292
|
-
|
|
100293
|
-
|
|
100294
|
-
|
|
100261
|
+
let data = newVal, formattedData;
|
|
100262
|
+
if (_.isArray(data)) {
|
|
100263
|
+
formattedData = data.map(function (datum) {
|
|
100264
|
+
return findValueOf(datum, restExpr);
|
|
100265
|
+
});
|
|
100266
|
+
// If resulting structure is an array of array, flatten it
|
|
100267
|
+
if (_.isArray(formattedData[0])) {
|
|
100268
|
+
formattedData = _.flatten(formattedData);
|
|
100269
|
+
}
|
|
100270
|
+
listenerFn(formattedData, oldVal);
|
|
100295
100271
|
}
|
|
100296
|
-
listenerFn(formattedData, oldVal);
|
|
100297
100272
|
};
|
|
100298
|
-
|
|
100299
|
-
|
|
100300
|
-
|
|
100301
|
-
|
|
100302
|
-
const regex = /\[\$i\]/g;
|
|
100273
|
+
const getUpdatedWatcInfo = (expr, acceptsArray, listener) => {
|
|
100274
|
+
// listener doesn't accept array
|
|
100275
|
+
// replace all `[$i]` with `[0]` and return the expression
|
|
100276
|
+
let regex = /\[\$i\]/g, $I = '[$i]', $0 = '[0]';
|
|
100303
100277
|
if (!acceptsArray) {
|
|
100304
100278
|
return {
|
|
100305
|
-
expr: expr.replace(regex,
|
|
100306
|
-
listener
|
|
100279
|
+
'expr': expr.replace(regex, $0),
|
|
100280
|
+
'listener': listener
|
|
100307
100281
|
};
|
|
100308
100282
|
}
|
|
100309
|
-
|
|
100310
|
-
|
|
100311
|
-
|
|
100312
|
-
|
|
100313
|
-
|
|
100314
|
-
|
|
100283
|
+
// listener accepts array
|
|
100284
|
+
// replace all except the last `[$i]` with `[0]` and return the expression.
|
|
100285
|
+
var index = expr.lastIndexOf($I), _expr = expr.substr(0, index).replace($I, $0), restExpr = expr.substr(index + 5), arrayConsumerFn = listener;
|
|
100286
|
+
if (restExpr) {
|
|
100287
|
+
arrayConsumerFn = arrayConsumer.bind(undefined, listener, restExpr);
|
|
100288
|
+
}
|
|
100315
100289
|
return {
|
|
100316
|
-
expr:
|
|
100317
|
-
listener: arrayConsumerFn
|
|
100290
|
+
'expr': _expr,
|
|
100291
|
+
'listener': arrayConsumerFn
|
|
100318
100292
|
};
|
|
100319
100293
|
};
|
|
100320
|
-
/**
|
|
100321
|
-
* Determines if an expression is static (doesn't need to be watched)
|
|
100322
|
-
*/
|
|
100323
|
-
const STATIC_EXPRESSION_NAMES = [
|
|
100324
|
-
"row.getProperty('investment')",
|
|
100325
|
-
"row.getProperty('factsheetLink')",
|
|
100326
|
-
"row.getProperty('isRebalanceEligible')"
|
|
100327
|
-
];
|
|
100328
|
-
const isStaticExpression = (expr) => {
|
|
100329
|
-
if (typeof expr !== 'string') {
|
|
100330
|
-
return false;
|
|
100331
|
-
}
|
|
100332
|
-
const trimmedExpr = expr.trim();
|
|
100333
|
-
// Expressions that always evaluate to localization strings
|
|
100334
|
-
// if (trimmedExpr.includes('appLocale')) {
|
|
100335
|
-
// return true;
|
|
100336
|
-
// }
|
|
100337
|
-
// Hard-coded static expression names
|
|
100338
|
-
if (STATIC_EXPRESSION_NAMES.includes(trimmedExpr)) {
|
|
100339
|
-
return true;
|
|
100340
|
-
}
|
|
100341
|
-
return false;
|
|
100342
|
-
};
|
|
100343
|
-
/**
|
|
100344
|
-
* Gets the scope type from the scope object
|
|
100345
|
-
*/
|
|
100346
|
-
const getScopeType = ($scope) => {
|
|
100347
|
-
if (!$scope) {
|
|
100348
|
-
return null;
|
|
100349
|
-
}
|
|
100350
|
-
if ($scope.pageName)
|
|
100351
|
-
return 'Page';
|
|
100352
|
-
if ($scope.prefabName)
|
|
100353
|
-
return 'Prefab';
|
|
100354
|
-
if ($scope.partialName)
|
|
100355
|
-
return 'Partial';
|
|
100356
|
-
// Check for App scope
|
|
100357
|
-
if ($scope.Variables !== undefined &&
|
|
100358
|
-
$scope.Actions !== undefined &&
|
|
100359
|
-
!$scope.pageName &&
|
|
100360
|
-
!$scope.prefabName &&
|
|
100361
|
-
!$scope.partialName) {
|
|
100362
|
-
return 'App';
|
|
100363
|
-
}
|
|
100364
|
-
if ($scope.constructor?.name === 'AppRef') {
|
|
100365
|
-
return 'App';
|
|
100366
|
-
}
|
|
100367
|
-
return null;
|
|
100368
|
-
};
|
|
100369
|
-
/**
|
|
100370
|
-
* Gets scope name based on scope type
|
|
100371
|
-
*/
|
|
100372
|
-
const getScopeName = ($scope, scopeType) => {
|
|
100373
|
-
if (!scopeType || !$scope) {
|
|
100374
|
-
return null;
|
|
100375
|
-
}
|
|
100376
|
-
switch (scopeType) {
|
|
100377
|
-
case 'Prefab': return $scope.prefabName || null;
|
|
100378
|
-
case 'Partial': return $scope.partialName || null;
|
|
100379
|
-
case 'Page': return $scope.pageName || null;
|
|
100380
|
-
default: return null;
|
|
100381
|
-
}
|
|
100382
|
-
};
|
|
100383
|
-
/**
|
|
100384
|
-
* Main watch function
|
|
100385
|
-
*/
|
|
100386
100294
|
const $watch = (expr, $scope, $locals, listener, identifier = watchIdGenerator.nextUid(), doNotClone = false, config = {}, isMuted) => {
|
|
100387
|
-
|
|
100388
|
-
|
|
100389
|
-
const watchInfo = getUpdatedWatchInfo(expr, config.arrayType || config.isList || false, listener);
|
|
100295
|
+
if (expr.indexOf('[$i]') !== -1) {
|
|
100296
|
+
let watchInfo = getUpdatedWatcInfo(expr, config && (config.arrayType || config.isList), listener);
|
|
100390
100297
|
expr = watchInfo.expr;
|
|
100391
100298
|
listener = watchInfo.listener;
|
|
100392
100299
|
}
|
|
100393
|
-
// Handle static expressions
|
|
100394
|
-
if (isStaticExpression(expr)) {
|
|
100395
|
-
try {
|
|
100396
|
-
const fn = $parseExpr(expr);
|
|
100397
|
-
const staticValue = fn($scope, $locals);
|
|
100398
|
-
listener(staticValue, FIRST_TIME_WATCH);
|
|
100399
|
-
}
|
|
100400
|
-
catch (e) {
|
|
100401
|
-
console.warn(`Error evaluating static expression '${expr}':`, e);
|
|
100402
|
-
listener(undefined, FIRST_TIME_WATCH);
|
|
100403
|
-
}
|
|
100404
|
-
return () => { }; // No-op unsubscribe
|
|
100405
|
-
}
|
|
100406
100300
|
const fn = $parseExpr();
|
|
100407
|
-
|
|
100408
|
-
|
|
100409
|
-
const destroyFn = () => $unwatch(identifier);
|
|
100410
|
-
const watchInfo = {
|
|
100411
|
-
fn: fn.bind(null, $scope, $locals),
|
|
100301
|
+
registry.set(identifier, {
|
|
100302
|
+
fn: fn.bind(expr, $scope, $locals),
|
|
100412
100303
|
listener,
|
|
100413
100304
|
expr,
|
|
100414
100305
|
last: FIRST_TIME_WATCH,
|
|
100415
100306
|
doNotClone,
|
|
100416
|
-
isMuted
|
|
100417
|
-
|
|
100418
|
-
|
|
100419
|
-
destroyFn
|
|
100420
|
-
};
|
|
100421
|
-
// Store in registry
|
|
100422
|
-
const widgetId = getWidgetId(identifier);
|
|
100423
|
-
if (widgetId) {
|
|
100424
|
-
const propertyName = getPropertyName(identifier);
|
|
100425
|
-
if (!registry.has(widgetId)) {
|
|
100426
|
-
registry.set(widgetId, {});
|
|
100427
|
-
}
|
|
100428
|
-
const widgetGroup = registry.get(widgetId);
|
|
100429
|
-
widgetGroup[propertyName] = watchInfo;
|
|
100430
|
-
}
|
|
100431
|
-
else {
|
|
100432
|
-
registry.set(identifier, watchInfo);
|
|
100433
|
-
}
|
|
100434
|
-
return destroyFn;
|
|
100307
|
+
isMuted: isMuted
|
|
100308
|
+
});
|
|
100309
|
+
return () => $unwatch(identifier);
|
|
100435
100310
|
};
|
|
100436
|
-
|
|
100437
|
-
|
|
100438
|
-
|
|
100439
|
-
const $
|
|
100440
|
-
|
|
100441
|
-
|
|
100442
|
-
|
|
100443
|
-
|
|
100444
|
-
|
|
100445
|
-
|
|
100446
|
-
|
|
100447
|
-
if (watchInfo) {
|
|
100448
|
-
delete widgetGroup[propertyName];
|
|
100449
|
-
// Clean up empty widget groups
|
|
100450
|
-
if (Object.keys(widgetGroup).length === 0) {
|
|
100451
|
-
registry.delete(widgetId);
|
|
100452
|
-
}
|
|
100453
|
-
return true;
|
|
100454
|
-
}
|
|
100311
|
+
const $unwatch = identifier => registry.delete(identifier);
|
|
100312
|
+
window.watchRegistry = registry;
|
|
100313
|
+
window.__WM_DEBUG_WATCHERS__ = false;
|
|
100314
|
+
/*export const $invokeWatchers = (force?: boolean, ignoreMuted?: boolean) => {
|
|
100315
|
+
if (force) {
|
|
100316
|
+
triggerWatchers(ignoreMuted);
|
|
100317
|
+
} else {
|
|
100318
|
+
|
|
100319
|
+
if (skipWatchers) {
|
|
100320
|
+
skipWatchers = false;
|
|
100321
|
+
return;
|
|
100455
100322
|
}
|
|
100323
|
+
debouncedTriggerWatchers();
|
|
100456
100324
|
}
|
|
100457
|
-
|
|
100458
|
-
if (registry.has(identifier)) {
|
|
100459
|
-
registry.delete(identifier);
|
|
100460
|
-
return true;
|
|
100461
|
-
}
|
|
100462
|
-
return false;
|
|
100463
|
-
};
|
|
100325
|
+
};*/
|
|
100464
100326
|
const $appDigest = (() => {
|
|
100465
|
-
return (force
|
|
100327
|
+
return (force) => {
|
|
100466
100328
|
{
|
|
100467
100329
|
return;
|
|
100468
100330
|
}
|
|
100469
100331
|
};
|
|
100470
100332
|
})();
|
|
100471
|
-
// Export registry for debugging
|
|
100472
|
-
window.watchRegistry = registry;
|
|
100473
100333
|
|
|
100474
100334
|
var ComponentType;
|
|
100475
100335
|
(function (ComponentType) {
|
package/dependency-report.html
CHANGED