@wavemaker/angular-codegen 11.14.1-12.6379 → 11.14.1-13.6377
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 +17 -17
- package/angular-app/package-lock.json +17 -17
- package/angular-app/package.json +6 -6
- package/dependencies/pipe-provider.cjs.js +402 -84
- package/dependencies/transpilation-web.cjs.js +196 -38
- 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
|
@@ -147299,11 +147299,11 @@ const CURRENCY_INFO = {
|
|
|
147299
147299
|
}
|
|
147300
147300
|
};
|
|
147301
147301
|
|
|
147302
|
-
const $RAF$1
|
|
147302
|
+
const $RAF$1 = window.requestAnimationFrame;
|
|
147303
147303
|
const $RAFQueue$1 = [];
|
|
147304
147304
|
const invokeLater$1 = fn => {
|
|
147305
147305
|
if (!$RAFQueue$1.length) {
|
|
147306
|
-
$RAF$1
|
|
147306
|
+
$RAF$1(() => {
|
|
147307
147307
|
$RAFQueue$1.forEach(f => f());
|
|
147308
147308
|
$RAFQueue$1.length = 0;
|
|
147309
147309
|
});
|
|
@@ -147845,70 +147845,223 @@ const getFnForEventExpr$1 = (expr) => {
|
|
|
147845
147845
|
return fnExecutor$1(expr, ExpressionType$2.Action);
|
|
147846
147846
|
};
|
|
147847
147847
|
|
|
147848
|
+
// Constants
|
|
147849
|
+
const WIDGET_ID_REGEX$1 = /^(widget-[^_]+)/;
|
|
147850
|
+
const WIDGET_PROPERTY_REGEX$1 = /^widget-[^_]+_(.+)$/;
|
|
147851
|
+
const ARRAY_INDEX_PLACEHOLDER$1 = '[$i]';
|
|
147852
|
+
const ARRAY_INDEX_ZERO$1 = '[0]';
|
|
147848
147853
|
const registry$1 = new Map();
|
|
147849
147854
|
const watchIdGenerator$1 = new IDGenerator$1('watch-id-');
|
|
147850
|
-
const FIRST_TIME_WATCH$1 = {};
|
|
147851
|
-
|
|
147855
|
+
const FIRST_TIME_WATCH$1 = Object.freeze({});
|
|
147856
|
+
/**
|
|
147857
|
+
* Extracts widget ID from identifier (e.g., "widget-id23_eventsource" -> "widget-id23")
|
|
147858
|
+
*/
|
|
147859
|
+
const getWidgetId$1 = (identifier) => {
|
|
147860
|
+
if (!identifier || typeof identifier !== 'string') {
|
|
147861
|
+
return null;
|
|
147862
|
+
}
|
|
147863
|
+
const match = identifier.match(WIDGET_ID_REGEX$1);
|
|
147864
|
+
return match ? match[1] : null;
|
|
147865
|
+
};
|
|
147866
|
+
/**
|
|
147867
|
+
* Extracts property name from identifier (e.g., "widget-id23_eventsource" -> "eventsource")
|
|
147868
|
+
*/
|
|
147869
|
+
const getPropertyName$1 = (identifier) => {
|
|
147870
|
+
if (!identifier || typeof identifier !== 'string') {
|
|
147871
|
+
return identifier;
|
|
147872
|
+
}
|
|
147873
|
+
const match = identifier.match(WIDGET_PROPERTY_REGEX$1);
|
|
147874
|
+
return match ? match[1] : identifier;
|
|
147875
|
+
};
|
|
147876
|
+
/**
|
|
147877
|
+
* Array consumer wrapper for array-based expressions
|
|
147878
|
+
*/
|
|
147852
147879
|
const arrayConsumer$1 = (listenerFn, restExpr, newVal, oldVal) => {
|
|
147853
|
-
|
|
147854
|
-
|
|
147855
|
-
|
|
147856
|
-
|
|
147857
|
-
|
|
147858
|
-
|
|
147859
|
-
|
|
147860
|
-
formattedData = flatten$2(formattedData);
|
|
147861
|
-
}
|
|
147862
|
-
listenerFn(formattedData, oldVal);
|
|
147880
|
+
if (!isArray$1(newVal)) {
|
|
147881
|
+
return;
|
|
147882
|
+
}
|
|
147883
|
+
let formattedData = newVal.map(datum => findValueOf$1(datum, restExpr));
|
|
147884
|
+
// Flatten if result is array of arrays
|
|
147885
|
+
if (isArray$1(formattedData[0])) {
|
|
147886
|
+
formattedData = flatten$2(formattedData);
|
|
147863
147887
|
}
|
|
147888
|
+
listenerFn(formattedData, oldVal);
|
|
147864
147889
|
};
|
|
147865
|
-
|
|
147866
|
-
|
|
147867
|
-
|
|
147868
|
-
|
|
147890
|
+
/**
|
|
147891
|
+
* Updates watch info for array expressions
|
|
147892
|
+
*/
|
|
147893
|
+
const getUpdatedWatchInfo$1 = (expr, acceptsArray, listener) => {
|
|
147894
|
+
const regex = /\[\$i\]/g;
|
|
147869
147895
|
if (!acceptsArray) {
|
|
147870
147896
|
return {
|
|
147871
|
-
|
|
147872
|
-
|
|
147897
|
+
expr: expr.replace(regex, ARRAY_INDEX_ZERO$1),
|
|
147898
|
+
listener
|
|
147873
147899
|
};
|
|
147874
147900
|
}
|
|
147875
|
-
|
|
147876
|
-
|
|
147877
|
-
|
|
147878
|
-
|
|
147879
|
-
|
|
147880
|
-
|
|
147901
|
+
const lastIndex = expr.lastIndexOf(ARRAY_INDEX_PLACEHOLDER$1);
|
|
147902
|
+
const baseExpr = expr.substring(0, lastIndex).replace(ARRAY_INDEX_PLACEHOLDER$1, ARRAY_INDEX_ZERO$1);
|
|
147903
|
+
const restExpr = expr.substring(lastIndex + 5);
|
|
147904
|
+
const arrayConsumerFn = restExpr
|
|
147905
|
+
? arrayConsumer$1.bind(undefined, listener, restExpr)
|
|
147906
|
+
: listener;
|
|
147881
147907
|
return {
|
|
147882
|
-
|
|
147883
|
-
|
|
147908
|
+
expr: baseExpr,
|
|
147909
|
+
listener: arrayConsumerFn
|
|
147884
147910
|
};
|
|
147885
147911
|
};
|
|
147912
|
+
/**
|
|
147913
|
+
* Determines if an expression is static (doesn't need to be watched)
|
|
147914
|
+
*/
|
|
147915
|
+
const STATIC_EXPRESSION_NAMES$1 = [
|
|
147916
|
+
"row.getProperty('investment')",
|
|
147917
|
+
"row.getProperty('factsheetLink')",
|
|
147918
|
+
"row.getProperty('isRebalanceEligible')"
|
|
147919
|
+
];
|
|
147920
|
+
const isStaticExpression$1 = (expr) => {
|
|
147921
|
+
if (typeof expr !== 'string') {
|
|
147922
|
+
return false;
|
|
147923
|
+
}
|
|
147924
|
+
const trimmedExpr = expr.trim();
|
|
147925
|
+
// Expressions that always evaluate to localization strings
|
|
147926
|
+
// if (trimmedExpr.includes('appLocale')) {
|
|
147927
|
+
// return true;
|
|
147928
|
+
// }
|
|
147929
|
+
// Hard-coded static expression names
|
|
147930
|
+
if (STATIC_EXPRESSION_NAMES$1.includes(trimmedExpr)) {
|
|
147931
|
+
return true;
|
|
147932
|
+
}
|
|
147933
|
+
return false;
|
|
147934
|
+
};
|
|
147935
|
+
/**
|
|
147936
|
+
* Gets the scope type from the scope object
|
|
147937
|
+
*/
|
|
147938
|
+
const getScopeType$1 = ($scope) => {
|
|
147939
|
+
if (!$scope) {
|
|
147940
|
+
return null;
|
|
147941
|
+
}
|
|
147942
|
+
if ($scope.pageName)
|
|
147943
|
+
return 'Page';
|
|
147944
|
+
if ($scope.prefabName)
|
|
147945
|
+
return 'Prefab';
|
|
147946
|
+
if ($scope.partialName)
|
|
147947
|
+
return 'Partial';
|
|
147948
|
+
// Check for App scope
|
|
147949
|
+
if ($scope.Variables !== undefined &&
|
|
147950
|
+
$scope.Actions !== undefined &&
|
|
147951
|
+
!$scope.pageName &&
|
|
147952
|
+
!$scope.prefabName &&
|
|
147953
|
+
!$scope.partialName) {
|
|
147954
|
+
return 'App';
|
|
147955
|
+
}
|
|
147956
|
+
if ($scope.constructor?.name === 'AppRef') {
|
|
147957
|
+
return 'App';
|
|
147958
|
+
}
|
|
147959
|
+
return null;
|
|
147960
|
+
};
|
|
147961
|
+
/**
|
|
147962
|
+
* Gets scope name based on scope type
|
|
147963
|
+
*/
|
|
147964
|
+
const getScopeName$1 = ($scope, scopeType) => {
|
|
147965
|
+
if (!scopeType || !$scope) {
|
|
147966
|
+
return null;
|
|
147967
|
+
}
|
|
147968
|
+
switch (scopeType) {
|
|
147969
|
+
case 'Prefab': return $scope.prefabName || null;
|
|
147970
|
+
case 'Partial': return $scope.partialName || null;
|
|
147971
|
+
case 'Page': return $scope.pageName || null;
|
|
147972
|
+
default: return null;
|
|
147973
|
+
}
|
|
147974
|
+
};
|
|
147975
|
+
/**
|
|
147976
|
+
* Main watch function
|
|
147977
|
+
*/
|
|
147886
147978
|
const $watch$1 = (expr, $scope, $locals, listener, identifier = watchIdGenerator$1.nextUid(), doNotClone = false, config = {}, isMuted) => {
|
|
147887
|
-
|
|
147888
|
-
|
|
147979
|
+
// Handle array expressions
|
|
147980
|
+
if (expr.includes(ARRAY_INDEX_PLACEHOLDER$1)) {
|
|
147981
|
+
const watchInfo = getUpdatedWatchInfo$1(expr, config.arrayType || config.isList || false, listener);
|
|
147889
147982
|
expr = watchInfo.expr;
|
|
147890
147983
|
listener = watchInfo.listener;
|
|
147891
147984
|
}
|
|
147985
|
+
// Handle static expressions
|
|
147986
|
+
if (isStaticExpression$1(expr)) {
|
|
147987
|
+
try {
|
|
147988
|
+
const fn = $parseExpr$1(expr);
|
|
147989
|
+
const staticValue = fn($scope, $locals);
|
|
147990
|
+
listener(staticValue, FIRST_TIME_WATCH$1);
|
|
147991
|
+
}
|
|
147992
|
+
catch (e) {
|
|
147993
|
+
console.warn(`Error evaluating static expression '${expr}':`, e);
|
|
147994
|
+
listener(undefined, FIRST_TIME_WATCH$1);
|
|
147995
|
+
}
|
|
147996
|
+
return () => { }; // No-op unsubscribe
|
|
147997
|
+
}
|
|
147892
147998
|
const fn = $parseExpr$1();
|
|
147893
|
-
|
|
147894
|
-
|
|
147999
|
+
const scopeType = getScopeType$1($scope);
|
|
148000
|
+
const scopeName = getScopeName$1($scope, scopeType);
|
|
148001
|
+
const destroyFn = () => $unwatch$1(identifier);
|
|
148002
|
+
const watchInfo = {
|
|
148003
|
+
fn: fn.bind(null, $scope, $locals),
|
|
147895
148004
|
listener,
|
|
147896
148005
|
expr,
|
|
147897
148006
|
last: FIRST_TIME_WATCH$1,
|
|
147898
148007
|
doNotClone,
|
|
147899
|
-
isMuted
|
|
147900
|
-
|
|
147901
|
-
|
|
148008
|
+
isMuted,
|
|
148009
|
+
scopeType,
|
|
148010
|
+
scopeName,
|
|
148011
|
+
destroyFn
|
|
148012
|
+
};
|
|
148013
|
+
// Store in registry
|
|
148014
|
+
const widgetId = getWidgetId$1(identifier);
|
|
148015
|
+
if (widgetId) {
|
|
148016
|
+
const propertyName = getPropertyName$1(identifier);
|
|
148017
|
+
if (!registry$1.has(widgetId)) {
|
|
148018
|
+
registry$1.set(widgetId, {});
|
|
148019
|
+
}
|
|
148020
|
+
const widgetGroup = registry$1.get(widgetId);
|
|
148021
|
+
widgetGroup[propertyName] = watchInfo;
|
|
148022
|
+
}
|
|
148023
|
+
else {
|
|
148024
|
+
registry$1.set(identifier, watchInfo);
|
|
148025
|
+
}
|
|
148026
|
+
return destroyFn;
|
|
148027
|
+
};
|
|
148028
|
+
/**
|
|
148029
|
+
* Unwatches a single identifier
|
|
148030
|
+
*/
|
|
148031
|
+
const $unwatch$1 = (identifier) => {
|
|
148032
|
+
const widgetId = getWidgetId$1(identifier);
|
|
148033
|
+
if (widgetId) {
|
|
148034
|
+
const propertyName = getPropertyName$1(identifier);
|
|
148035
|
+
const widgetGroup = registry$1.get(widgetId);
|
|
148036
|
+
//@ts-ignore
|
|
148037
|
+
if (widgetGroup && typeof widgetGroup === 'object' && !widgetGroup.fn) {
|
|
148038
|
+
const watchInfo = widgetGroup[propertyName];
|
|
148039
|
+
if (watchInfo) {
|
|
148040
|
+
delete widgetGroup[propertyName];
|
|
148041
|
+
// Clean up empty widget groups
|
|
148042
|
+
if (Object.keys(widgetGroup).length === 0) {
|
|
148043
|
+
registry$1.delete(widgetId);
|
|
148044
|
+
}
|
|
148045
|
+
return true;
|
|
148046
|
+
}
|
|
148047
|
+
}
|
|
148048
|
+
}
|
|
148049
|
+
// Fallback to direct lookup
|
|
148050
|
+
if (registry$1.has(identifier)) {
|
|
148051
|
+
registry$1.delete(identifier);
|
|
148052
|
+
return true;
|
|
148053
|
+
}
|
|
148054
|
+
return false;
|
|
147902
148055
|
};
|
|
147903
|
-
const $unwatch$1 = identifier => registry$1.delete(identifier);
|
|
147904
|
-
window.watchRegistry = registry$1;
|
|
147905
148056
|
const $appDigest$1 = (() => {
|
|
147906
|
-
return (force) => {
|
|
148057
|
+
return (force = false) => {
|
|
147907
148058
|
{
|
|
147908
148059
|
return;
|
|
147909
148060
|
}
|
|
147910
148061
|
};
|
|
147911
148062
|
})();
|
|
148063
|
+
// Export registry for debugging
|
|
148064
|
+
window.watchRegistry = registry$1;
|
|
147912
148065
|
|
|
147913
148066
|
var ComponentType$1;
|
|
147914
148067
|
(function (ComponentType) {
|
|
@@ -147964,8 +148117,8 @@ var Operation$1;
|
|
|
147964
148117
|
const DataSource$1 = {
|
|
147965
148118
|
Operation: Operation$1
|
|
147966
148119
|
};
|
|
147967
|
-
class App {
|
|
147968
|
-
}
|
|
148120
|
+
let App$1 = class App {
|
|
148121
|
+
};
|
|
147969
148122
|
let AbstractI18nService$1 = class AbstractI18nService {
|
|
147970
148123
|
};
|
|
147971
148124
|
|
|
@@ -147983,6 +148136,7 @@ const REGEX$1 = {
|
|
|
147983
148136
|
SUPPORTED_AUDIO_FORMAT: /\.(mp3|ogg|webm|wma|3gp|wav|m4a)$/i,
|
|
147984
148137
|
SUPPORTED_VIDEO_FORMAT: /\.(mp4|ogg|webm|wmv|mpeg|mpg|avi|mov)$/i,
|
|
147985
148138
|
VALID_WEB_URL: /^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,
|
|
148139
|
+
VALID_IMAGE_URL: /^(https?|blob|data|file|ftp):/i,
|
|
147986
148140
|
REPLACE_PATTERN: /\$\{([^\}]+)\}/g,
|
|
147987
148141
|
DATA_URL: /^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i,
|
|
147988
148142
|
ISO_DATE_FORMAT: /(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d+)?([+-]\d{2}:?\d{2}|Z)$/
|
|
@@ -148205,6 +148359,9 @@ const isVideoFile$1 = (fileName) => {
|
|
|
148205
148359
|
const isValidWebURL$1 = (url) => {
|
|
148206
148360
|
return (REGEX$1.VALID_WEB_URL).test(url);
|
|
148207
148361
|
};
|
|
148362
|
+
const isValidImageUrl$1 = (url) => {
|
|
148363
|
+
return (REGEX$1.VALID_IMAGE_URL).test(url?.trim());
|
|
148364
|
+
};
|
|
148208
148365
|
/*This function returns the url to the resource after checking the validity of url*/
|
|
148209
148366
|
const getResourceURL$1 = (urlString) => {
|
|
148210
148367
|
return urlString;
|
|
@@ -149458,6 +149615,7 @@ var Utils$1 = /*#__PURE__*/Object.freeze({
|
|
|
149458
149615
|
isPageable: isPageable$1,
|
|
149459
149616
|
isSafari: isSafari$1,
|
|
149460
149617
|
isTablet: isTablet$1,
|
|
149618
|
+
isValidImageUrl: isValidImageUrl$1,
|
|
149461
149619
|
isValidWebURL: isValidWebURL$1,
|
|
149462
149620
|
isVideoFile: isVideoFile$1,
|
|
149463
149621
|
loadScript: loadScript$1,
|
|
@@ -150699,7 +150857,7 @@ class ToDatePipe extends WmPipe {
|
|
|
150699
150857
|
this.app = app;
|
|
150700
150858
|
this.customPipeManager = customPipeManager;
|
|
150701
150859
|
}
|
|
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)); }; }
|
|
150860
|
+
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
150861
|
static { this.ɵpipe = /*@__PURE__*/ ɵɵdefinePipe({ name: "toDate", type: ToDatePipe, pure: true, standalone: true }); }
|
|
150704
150862
|
}
|
|
150705
150863
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(ToDatePipe, [{
|
|
@@ -150708,7 +150866,7 @@ class ToDatePipe extends WmPipe {
|
|
|
150708
150866
|
standalone: true,
|
|
150709
150867
|
name: 'toDate'
|
|
150710
150868
|
}]
|
|
150711
|
-
}], () => [{ type: DatePipe }, { type: AbstractI18nService$1 }, { type: App }, { type: CustomPipeManager$1 }], null); })();
|
|
150869
|
+
}], () => [{ type: DatePipe }, { type: AbstractI18nService$1 }, { type: App$1 }, { type: CustomPipeManager$1 }], null); })();
|
|
150712
150870
|
class ToNumberPipe {
|
|
150713
150871
|
transform(data, fracSize) {
|
|
150714
150872
|
if (fracSize && !String(fracSize).match(/^(\d+)?\.((\d+)(-(\d+))?)?$/)) {
|
|
@@ -150818,7 +150976,7 @@ class CustomPipe {
|
|
|
150818
150976
|
return data;
|
|
150819
150977
|
}
|
|
150820
150978
|
}
|
|
150821
|
-
static { this.ɵfac = function CustomPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CustomPipe)(ɵɵdirectiveInject(App, 16), ɵɵdirectiveInject(CustomPipeManager$1, 16)); }; }
|
|
150979
|
+
static { this.ɵfac = function CustomPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CustomPipe)(ɵɵdirectiveInject(App$1, 16), ɵɵdirectiveInject(CustomPipeManager$1, 16)); }; }
|
|
150822
150980
|
static { this.ɵpipe = /*@__PURE__*/ ɵɵdefinePipe({ name: "custom", type: CustomPipe, pure: true, standalone: true }); }
|
|
150823
150981
|
}
|
|
150824
150982
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(CustomPipe, [{
|
|
@@ -150827,7 +150985,7 @@ class CustomPipe {
|
|
|
150827
150985
|
standalone: true,
|
|
150828
150986
|
name: 'custom'
|
|
150829
150987
|
}]
|
|
150830
|
-
}], () => [{ type: App }, { type: CustomPipeManager$1 }], null); })();
|
|
150988
|
+
}], () => [{ type: App$1 }, { type: CustomPipeManager$1 }], null); })();
|
|
150831
150989
|
class TimeFromNowPipe {
|
|
150832
150990
|
transform(data) {
|
|
150833
150991
|
let timestamp;
|
|
@@ -202909,11 +203067,11 @@ var DEFAULT_FORMATS;
|
|
|
202909
203067
|
DEFAULT_FORMATS["DATE_TIME"] = "yyyy-MM-dd HH:mm:ss";
|
|
202910
203068
|
})(DEFAULT_FORMATS || (DEFAULT_FORMATS = {}));
|
|
202911
203069
|
|
|
202912
|
-
const $RAF
|
|
203070
|
+
const $RAF = window.requestAnimationFrame;
|
|
202913
203071
|
const $RAFQueue = [];
|
|
202914
203072
|
const invokeLater = fn => {
|
|
202915
203073
|
if (!$RAFQueue.length) {
|
|
202916
|
-
$RAF
|
|
203074
|
+
$RAF(() => {
|
|
202917
203075
|
$RAFQueue.forEach(f => f());
|
|
202918
203076
|
$RAFQueue.length = 0;
|
|
202919
203077
|
});
|
|
@@ -203455,70 +203613,223 @@ const getFnForEventExpr = (expr) => {
|
|
|
203455
203613
|
return fnExecutor(expr, ExpressionType.Action);
|
|
203456
203614
|
};
|
|
203457
203615
|
|
|
203616
|
+
// Constants
|
|
203617
|
+
const WIDGET_ID_REGEX = /^(widget-[^_]+)/;
|
|
203618
|
+
const WIDGET_PROPERTY_REGEX = /^widget-[^_]+_(.+)$/;
|
|
203619
|
+
const ARRAY_INDEX_PLACEHOLDER = '[$i]';
|
|
203620
|
+
const ARRAY_INDEX_ZERO = '[0]';
|
|
203458
203621
|
const registry = new Map();
|
|
203459
203622
|
const watchIdGenerator = new IDGenerator('watch-id-');
|
|
203460
|
-
const FIRST_TIME_WATCH = {};
|
|
203461
|
-
|
|
203623
|
+
const FIRST_TIME_WATCH = Object.freeze({});
|
|
203624
|
+
/**
|
|
203625
|
+
* Extracts widget ID from identifier (e.g., "widget-id23_eventsource" -> "widget-id23")
|
|
203626
|
+
*/
|
|
203627
|
+
const getWidgetId = (identifier) => {
|
|
203628
|
+
if (!identifier || typeof identifier !== 'string') {
|
|
203629
|
+
return null;
|
|
203630
|
+
}
|
|
203631
|
+
const match = identifier.match(WIDGET_ID_REGEX);
|
|
203632
|
+
return match ? match[1] : null;
|
|
203633
|
+
};
|
|
203634
|
+
/**
|
|
203635
|
+
* Extracts property name from identifier (e.g., "widget-id23_eventsource" -> "eventsource")
|
|
203636
|
+
*/
|
|
203637
|
+
const getPropertyName = (identifier) => {
|
|
203638
|
+
if (!identifier || typeof identifier !== 'string') {
|
|
203639
|
+
return identifier;
|
|
203640
|
+
}
|
|
203641
|
+
const match = identifier.match(WIDGET_PROPERTY_REGEX);
|
|
203642
|
+
return match ? match[1] : identifier;
|
|
203643
|
+
};
|
|
203644
|
+
/**
|
|
203645
|
+
* Array consumer wrapper for array-based expressions
|
|
203646
|
+
*/
|
|
203462
203647
|
const arrayConsumer = (listenerFn, restExpr, newVal, oldVal) => {
|
|
203463
|
-
|
|
203464
|
-
|
|
203465
|
-
formattedData = data.map(function (datum) {
|
|
203466
|
-
return findValueOf(datum, restExpr);
|
|
203467
|
-
});
|
|
203468
|
-
// If resulting structure is an array of array, flatten it
|
|
203469
|
-
if (isArray(formattedData[0])) {
|
|
203470
|
-
formattedData = flatten(formattedData);
|
|
203471
|
-
}
|
|
203472
|
-
listenerFn(formattedData, oldVal);
|
|
203648
|
+
if (!isArray(newVal)) {
|
|
203649
|
+
return;
|
|
203473
203650
|
}
|
|
203651
|
+
let formattedData = newVal.map(datum => findValueOf(datum, restExpr));
|
|
203652
|
+
// Flatten if result is array of arrays
|
|
203653
|
+
if (isArray(formattedData[0])) {
|
|
203654
|
+
formattedData = flatten(formattedData);
|
|
203655
|
+
}
|
|
203656
|
+
listenerFn(formattedData, oldVal);
|
|
203474
203657
|
};
|
|
203475
|
-
|
|
203476
|
-
|
|
203477
|
-
|
|
203478
|
-
|
|
203658
|
+
/**
|
|
203659
|
+
* Updates watch info for array expressions
|
|
203660
|
+
*/
|
|
203661
|
+
const getUpdatedWatchInfo = (expr, acceptsArray, listener) => {
|
|
203662
|
+
const regex = /\[\$i\]/g;
|
|
203479
203663
|
if (!acceptsArray) {
|
|
203480
203664
|
return {
|
|
203481
|
-
|
|
203482
|
-
|
|
203665
|
+
expr: expr.replace(regex, ARRAY_INDEX_ZERO),
|
|
203666
|
+
listener
|
|
203483
203667
|
};
|
|
203484
203668
|
}
|
|
203485
|
-
|
|
203486
|
-
|
|
203487
|
-
|
|
203488
|
-
|
|
203489
|
-
|
|
203490
|
-
|
|
203669
|
+
const lastIndex = expr.lastIndexOf(ARRAY_INDEX_PLACEHOLDER);
|
|
203670
|
+
const baseExpr = expr.substring(0, lastIndex).replace(ARRAY_INDEX_PLACEHOLDER, ARRAY_INDEX_ZERO);
|
|
203671
|
+
const restExpr = expr.substring(lastIndex + 5);
|
|
203672
|
+
const arrayConsumerFn = restExpr
|
|
203673
|
+
? arrayConsumer.bind(undefined, listener, restExpr)
|
|
203674
|
+
: listener;
|
|
203491
203675
|
return {
|
|
203492
|
-
|
|
203493
|
-
|
|
203676
|
+
expr: baseExpr,
|
|
203677
|
+
listener: arrayConsumerFn
|
|
203494
203678
|
};
|
|
203495
203679
|
};
|
|
203680
|
+
/**
|
|
203681
|
+
* Determines if an expression is static (doesn't need to be watched)
|
|
203682
|
+
*/
|
|
203683
|
+
const STATIC_EXPRESSION_NAMES = [
|
|
203684
|
+
"row.getProperty('investment')",
|
|
203685
|
+
"row.getProperty('factsheetLink')",
|
|
203686
|
+
"row.getProperty('isRebalanceEligible')"
|
|
203687
|
+
];
|
|
203688
|
+
const isStaticExpression = (expr) => {
|
|
203689
|
+
if (typeof expr !== 'string') {
|
|
203690
|
+
return false;
|
|
203691
|
+
}
|
|
203692
|
+
const trimmedExpr = expr.trim();
|
|
203693
|
+
// Expressions that always evaluate to localization strings
|
|
203694
|
+
// if (trimmedExpr.includes('appLocale')) {
|
|
203695
|
+
// return true;
|
|
203696
|
+
// }
|
|
203697
|
+
// Hard-coded static expression names
|
|
203698
|
+
if (STATIC_EXPRESSION_NAMES.includes(trimmedExpr)) {
|
|
203699
|
+
return true;
|
|
203700
|
+
}
|
|
203701
|
+
return false;
|
|
203702
|
+
};
|
|
203703
|
+
/**
|
|
203704
|
+
* Gets the scope type from the scope object
|
|
203705
|
+
*/
|
|
203706
|
+
const getScopeType = ($scope) => {
|
|
203707
|
+
if (!$scope) {
|
|
203708
|
+
return null;
|
|
203709
|
+
}
|
|
203710
|
+
if ($scope.pageName)
|
|
203711
|
+
return 'Page';
|
|
203712
|
+
if ($scope.prefabName)
|
|
203713
|
+
return 'Prefab';
|
|
203714
|
+
if ($scope.partialName)
|
|
203715
|
+
return 'Partial';
|
|
203716
|
+
// Check for App scope
|
|
203717
|
+
if ($scope.Variables !== undefined &&
|
|
203718
|
+
$scope.Actions !== undefined &&
|
|
203719
|
+
!$scope.pageName &&
|
|
203720
|
+
!$scope.prefabName &&
|
|
203721
|
+
!$scope.partialName) {
|
|
203722
|
+
return 'App';
|
|
203723
|
+
}
|
|
203724
|
+
if ($scope.constructor?.name === 'AppRef') {
|
|
203725
|
+
return 'App';
|
|
203726
|
+
}
|
|
203727
|
+
return null;
|
|
203728
|
+
};
|
|
203729
|
+
/**
|
|
203730
|
+
* Gets scope name based on scope type
|
|
203731
|
+
*/
|
|
203732
|
+
const getScopeName = ($scope, scopeType) => {
|
|
203733
|
+
if (!scopeType || !$scope) {
|
|
203734
|
+
return null;
|
|
203735
|
+
}
|
|
203736
|
+
switch (scopeType) {
|
|
203737
|
+
case 'Prefab': return $scope.prefabName || null;
|
|
203738
|
+
case 'Partial': return $scope.partialName || null;
|
|
203739
|
+
case 'Page': return $scope.pageName || null;
|
|
203740
|
+
default: return null;
|
|
203741
|
+
}
|
|
203742
|
+
};
|
|
203743
|
+
/**
|
|
203744
|
+
* Main watch function
|
|
203745
|
+
*/
|
|
203496
203746
|
const $watch = (expr, $scope, $locals, listener, identifier = watchIdGenerator.nextUid(), doNotClone = false, config = {}, isMuted) => {
|
|
203497
|
-
|
|
203498
|
-
|
|
203747
|
+
// Handle array expressions
|
|
203748
|
+
if (expr.includes(ARRAY_INDEX_PLACEHOLDER)) {
|
|
203749
|
+
const watchInfo = getUpdatedWatchInfo(expr, config.arrayType || config.isList || false, listener);
|
|
203499
203750
|
expr = watchInfo.expr;
|
|
203500
203751
|
listener = watchInfo.listener;
|
|
203501
203752
|
}
|
|
203753
|
+
// Handle static expressions
|
|
203754
|
+
if (isStaticExpression(expr)) {
|
|
203755
|
+
try {
|
|
203756
|
+
const fn = $parseExpr(expr);
|
|
203757
|
+
const staticValue = fn($scope, $locals);
|
|
203758
|
+
listener(staticValue, FIRST_TIME_WATCH);
|
|
203759
|
+
}
|
|
203760
|
+
catch (e) {
|
|
203761
|
+
console.warn(`Error evaluating static expression '${expr}':`, e);
|
|
203762
|
+
listener(undefined, FIRST_TIME_WATCH);
|
|
203763
|
+
}
|
|
203764
|
+
return () => { }; // No-op unsubscribe
|
|
203765
|
+
}
|
|
203502
203766
|
const fn = $parseExpr();
|
|
203503
|
-
|
|
203504
|
-
|
|
203767
|
+
const scopeType = getScopeType($scope);
|
|
203768
|
+
const scopeName = getScopeName($scope, scopeType);
|
|
203769
|
+
const destroyFn = () => $unwatch(identifier);
|
|
203770
|
+
const watchInfo = {
|
|
203771
|
+
fn: fn.bind(null, $scope, $locals),
|
|
203505
203772
|
listener,
|
|
203506
203773
|
expr,
|
|
203507
203774
|
last: FIRST_TIME_WATCH,
|
|
203508
203775
|
doNotClone,
|
|
203509
|
-
isMuted
|
|
203510
|
-
|
|
203511
|
-
|
|
203776
|
+
isMuted,
|
|
203777
|
+
scopeType,
|
|
203778
|
+
scopeName,
|
|
203779
|
+
destroyFn
|
|
203780
|
+
};
|
|
203781
|
+
// Store in registry
|
|
203782
|
+
const widgetId = getWidgetId(identifier);
|
|
203783
|
+
if (widgetId) {
|
|
203784
|
+
const propertyName = getPropertyName(identifier);
|
|
203785
|
+
if (!registry.has(widgetId)) {
|
|
203786
|
+
registry.set(widgetId, {});
|
|
203787
|
+
}
|
|
203788
|
+
const widgetGroup = registry.get(widgetId);
|
|
203789
|
+
widgetGroup[propertyName] = watchInfo;
|
|
203790
|
+
}
|
|
203791
|
+
else {
|
|
203792
|
+
registry.set(identifier, watchInfo);
|
|
203793
|
+
}
|
|
203794
|
+
return destroyFn;
|
|
203795
|
+
};
|
|
203796
|
+
/**
|
|
203797
|
+
* Unwatches a single identifier
|
|
203798
|
+
*/
|
|
203799
|
+
const $unwatch = (identifier) => {
|
|
203800
|
+
const widgetId = getWidgetId(identifier);
|
|
203801
|
+
if (widgetId) {
|
|
203802
|
+
const propertyName = getPropertyName(identifier);
|
|
203803
|
+
const widgetGroup = registry.get(widgetId);
|
|
203804
|
+
//@ts-ignore
|
|
203805
|
+
if (widgetGroup && typeof widgetGroup === 'object' && !widgetGroup.fn) {
|
|
203806
|
+
const watchInfo = widgetGroup[propertyName];
|
|
203807
|
+
if (watchInfo) {
|
|
203808
|
+
delete widgetGroup[propertyName];
|
|
203809
|
+
// Clean up empty widget groups
|
|
203810
|
+
if (Object.keys(widgetGroup).length === 0) {
|
|
203811
|
+
registry.delete(widgetId);
|
|
203812
|
+
}
|
|
203813
|
+
return true;
|
|
203814
|
+
}
|
|
203815
|
+
}
|
|
203816
|
+
}
|
|
203817
|
+
// Fallback to direct lookup
|
|
203818
|
+
if (registry.has(identifier)) {
|
|
203819
|
+
registry.delete(identifier);
|
|
203820
|
+
return true;
|
|
203821
|
+
}
|
|
203822
|
+
return false;
|
|
203512
203823
|
};
|
|
203513
|
-
const $unwatch = identifier => registry.delete(identifier);
|
|
203514
|
-
window.watchRegistry = registry;
|
|
203515
203824
|
const $appDigest = (() => {
|
|
203516
|
-
return (force) => {
|
|
203825
|
+
return (force = false) => {
|
|
203517
203826
|
{
|
|
203518
203827
|
return;
|
|
203519
203828
|
}
|
|
203520
203829
|
};
|
|
203521
203830
|
})();
|
|
203831
|
+
// Export registry for debugging
|
|
203832
|
+
window.watchRegistry = registry;
|
|
203522
203833
|
|
|
203523
203834
|
var ComponentType;
|
|
203524
203835
|
(function (ComponentType) {
|
|
@@ -203574,6 +203885,8 @@ var Operation;
|
|
|
203574
203885
|
const DataSource = {
|
|
203575
203886
|
Operation
|
|
203576
203887
|
};
|
|
203888
|
+
class App {
|
|
203889
|
+
}
|
|
203577
203890
|
class AbstractI18nService {
|
|
203578
203891
|
}
|
|
203579
203892
|
|
|
@@ -203591,6 +203904,7 @@ const REGEX = {
|
|
|
203591
203904
|
SUPPORTED_AUDIO_FORMAT: /\.(mp3|ogg|webm|wma|3gp|wav|m4a)$/i,
|
|
203592
203905
|
SUPPORTED_VIDEO_FORMAT: /\.(mp4|ogg|webm|wmv|mpeg|mpg|avi|mov)$/i,
|
|
203593
203906
|
VALID_WEB_URL: /^(http[s]?:\/\/)(www\.){0,1}[a-zA-Z0-9=:?\/\.\-]+(\.[a-zA-Z]{2,5}[\.]{0,1})?/,
|
|
203907
|
+
VALID_IMAGE_URL: /^(https?|blob|data|file|ftp):/i,
|
|
203594
203908
|
REPLACE_PATTERN: /\$\{([^\}]+)\}/g,
|
|
203595
203909
|
DATA_URL: /^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i,
|
|
203596
203910
|
ISO_DATE_FORMAT: /(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})(\.\d+)?([+-]\d{2}:?\d{2}|Z)$/
|
|
@@ -203813,6 +204127,9 @@ const isVideoFile = (fileName) => {
|
|
|
203813
204127
|
const isValidWebURL = (url) => {
|
|
203814
204128
|
return (REGEX.VALID_WEB_URL).test(url);
|
|
203815
204129
|
};
|
|
204130
|
+
const isValidImageUrl = (url) => {
|
|
204131
|
+
return (REGEX.VALID_IMAGE_URL).test(url?.trim());
|
|
204132
|
+
};
|
|
203816
204133
|
/*This function returns the url to the resource after checking the validity of url*/
|
|
203817
204134
|
const getResourceURL = (urlString) => {
|
|
203818
204135
|
return urlString;
|
|
@@ -205066,6 +205383,7 @@ var Utils = /*#__PURE__*/Object.freeze({
|
|
|
205066
205383
|
isPageable: isPageable,
|
|
205067
205384
|
isSafari: isSafari,
|
|
205068
205385
|
isTablet: isTablet,
|
|
205386
|
+
isValidImageUrl: isValidImageUrl,
|
|
205069
205387
|
isValidWebURL: isValidWebURL,
|
|
205070
205388
|
isVideoFile: isVideoFile,
|
|
205071
205389
|
loadScript: loadScript,
|
|
@@ -207905,7 +208223,7 @@ class PipeProvider {
|
|
|
207905
208223
|
this.preparePipeMeta(CurrencyPipe$1, 'currency', true, [this._locale]),
|
|
207906
208224
|
this.preparePipeMeta(DatePipe$1, 'date', true, [this._locale]),
|
|
207907
208225
|
this.preparePipeMeta(ToDatePipe, 'toDate', true, [
|
|
207908
|
-
new DatePipe$1(this._locale), undefined, this.injector.get(CustomPipeManager)
|
|
208226
|
+
new DatePipe$1(this._locale), undefined, this.injector.get(App), this.injector.get(CustomPipeManager)
|
|
207909
208227
|
]),
|
|
207910
208228
|
this.preparePipeMeta(ToNumberPipe, 'toNumber', true, [
|
|
207911
208229
|
new DecimalPipe$1(this._locale),
|
|
@@ -207922,7 +208240,7 @@ class PipeProvider {
|
|
|
207922
208240
|
new DecimalPipe$1(this._locale)
|
|
207923
208241
|
]),
|
|
207924
208242
|
this.preparePipeMeta(StringToNumberPipe, 'stringToNumber', true),
|
|
207925
|
-
this.preparePipeMeta(CustomPipe, 'custom', true, [this.injector.get(CustomPipeManager)]),
|
|
208243
|
+
this.preparePipeMeta(CustomPipe, 'custom', true, [this.injector.get(App), this.injector.get(CustomPipeManager)]),
|
|
207926
208244
|
this.preparePipeMeta(TrustAsPipe, 'trustAs', true, [this.domSanitizer]),
|
|
207927
208245
|
this.preparePipeMeta(SanitizePipe, 'sanitize', true, [this.domSanitizer]),
|
|
207928
208246
|
this.preparePipeMeta(TemplateReplacePipe, 'templateReplace', true),
|