@wavemaker/angular-app 11.15.0-rc.6403 → 11.15.1-rc.6451
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 +7 -7
- package/dependencies/pipe-provider.cjs.js +102 -382
- package/dependencies/transpilation-web.cjs.js +55 -193
- package/dependency-report.html +1 -1
- package/npm-shrinkwrap.json +717 -579
- package/package-lock.json +717 -579
- package/package.json +5 -5
|
@@ -142712,7 +142712,7 @@ function requireMomentTimezone$1 () {
|
|
|
142712
142712
|
hasRequiredMomentTimezone$1 = 1;
|
|
142713
142713
|
(function (module) {
|
|
142714
142714
|
//! moment-timezone.js
|
|
142715
|
-
//! version : 0.6.
|
|
142715
|
+
//! version : 0.6.1
|
|
142716
142716
|
//! Copyright (c) JS Foundation and other contributors
|
|
142717
142717
|
//! license : MIT
|
|
142718
142718
|
//! github.com/moment/moment-timezone
|
|
@@ -142738,7 +142738,7 @@ function requireMomentTimezone$1 () {
|
|
|
142738
142738
|
// return moment;
|
|
142739
142739
|
// }
|
|
142740
142740
|
|
|
142741
|
-
var VERSION = "0.6.
|
|
142741
|
+
var VERSION = "0.6.1",
|
|
142742
142742
|
zones = {},
|
|
142743
142743
|
links = {},
|
|
142744
142744
|
countries = {},
|
|
@@ -147300,11 +147300,11 @@ const CURRENCY_INFO = {
|
|
|
147300
147300
|
}
|
|
147301
147301
|
};
|
|
147302
147302
|
|
|
147303
|
-
const $RAF$1 = window.requestAnimationFrame;
|
|
147303
|
+
const $RAF$1$1 = window.requestAnimationFrame;
|
|
147304
147304
|
const $RAFQueue$1 = [];
|
|
147305
147305
|
const invokeLater$1 = fn => {
|
|
147306
147306
|
if (!$RAFQueue$1.length) {
|
|
147307
|
-
$RAF$1(() => {
|
|
147307
|
+
$RAF$1$1(() => {
|
|
147308
147308
|
$RAFQueue$1.forEach(f => f());
|
|
147309
147309
|
$RAFQueue$1.length = 0;
|
|
147310
147310
|
});
|
|
@@ -147862,223 +147862,83 @@ const getFnForEventExpr$1 = (expr) => {
|
|
|
147862
147862
|
return fnExecutor$1(expr, ExpressionType$2.Action);
|
|
147863
147863
|
};
|
|
147864
147864
|
|
|
147865
|
-
// Constants
|
|
147866
|
-
const WIDGET_ID_REGEX$1 = /^(widget-[^_]+)/;
|
|
147867
|
-
const WIDGET_PROPERTY_REGEX$1 = /^widget-[^_]+_(.+)$/;
|
|
147868
|
-
const ARRAY_INDEX_PLACEHOLDER$1 = '[$i]';
|
|
147869
|
-
const ARRAY_INDEX_ZERO$1 = '[0]';
|
|
147870
147865
|
const registry$1 = new Map();
|
|
147871
147866
|
const watchIdGenerator$1 = new IDGenerator$1('watch-id-');
|
|
147872
|
-
const FIRST_TIME_WATCH$1 =
|
|
147873
|
-
|
|
147874
|
-
* Extracts widget ID from identifier (e.g., "widget-id23_eventsource" -> "widget-id23")
|
|
147875
|
-
*/
|
|
147876
|
-
const getWidgetId$1 = (identifier) => {
|
|
147877
|
-
if (!identifier || typeof identifier !== 'string') {
|
|
147878
|
-
return null;
|
|
147879
|
-
}
|
|
147880
|
-
const match = identifier.match(WIDGET_ID_REGEX$1);
|
|
147881
|
-
return match ? match[1] : null;
|
|
147882
|
-
};
|
|
147883
|
-
/**
|
|
147884
|
-
* Extracts property name from identifier (e.g., "widget-id23_eventsource" -> "eventsource")
|
|
147885
|
-
*/
|
|
147886
|
-
const getPropertyName$1 = (identifier) => {
|
|
147887
|
-
if (!identifier || typeof identifier !== 'string') {
|
|
147888
|
-
return identifier;
|
|
147889
|
-
}
|
|
147890
|
-
const match = identifier.match(WIDGET_PROPERTY_REGEX$1);
|
|
147891
|
-
return match ? match[1] : identifier;
|
|
147892
|
-
};
|
|
147893
|
-
/**
|
|
147894
|
-
* Array consumer wrapper for array-based expressions
|
|
147895
|
-
*/
|
|
147867
|
+
const FIRST_TIME_WATCH$1 = {};
|
|
147868
|
+
Object.freeze(FIRST_TIME_WATCH$1);
|
|
147896
147869
|
const arrayConsumer$1 = (listenerFn, restExpr, newVal, oldVal) => {
|
|
147897
|
-
|
|
147898
|
-
|
|
147899
|
-
|
|
147900
|
-
|
|
147901
|
-
|
|
147902
|
-
|
|
147903
|
-
|
|
147870
|
+
let data = newVal, formattedData;
|
|
147871
|
+
if (isArray$1(data)) {
|
|
147872
|
+
formattedData = data.map(function (datum) {
|
|
147873
|
+
return findValueOf$1(datum, restExpr);
|
|
147874
|
+
});
|
|
147875
|
+
// If resulting structure is an array of array, flatten it
|
|
147876
|
+
if (isArray$1(formattedData[0])) {
|
|
147877
|
+
formattedData = flatten$2(formattedData);
|
|
147878
|
+
}
|
|
147879
|
+
listenerFn(formattedData, oldVal);
|
|
147904
147880
|
}
|
|
147905
|
-
listenerFn(formattedData, oldVal);
|
|
147906
147881
|
};
|
|
147907
|
-
|
|
147908
|
-
|
|
147909
|
-
|
|
147910
|
-
|
|
147911
|
-
const regex = /\[\$i\]/g;
|
|
147882
|
+
const getUpdatedWatcInfo$1 = (expr, acceptsArray, listener) => {
|
|
147883
|
+
// listener doesn't accept array
|
|
147884
|
+
// replace all `[$i]` with `[0]` and return the expression
|
|
147885
|
+
let regex = /\[\$i\]/g, $I = '[$i]', $0 = '[0]';
|
|
147912
147886
|
if (!acceptsArray) {
|
|
147913
147887
|
return {
|
|
147914
|
-
expr: expr.replace(regex,
|
|
147915
|
-
listener
|
|
147888
|
+
'expr': expr.replace(regex, $0),
|
|
147889
|
+
'listener': listener
|
|
147916
147890
|
};
|
|
147917
147891
|
}
|
|
147918
|
-
|
|
147919
|
-
|
|
147920
|
-
|
|
147921
|
-
|
|
147922
|
-
|
|
147923
|
-
|
|
147892
|
+
// listener accepts array
|
|
147893
|
+
// replace all except the last `[$i]` with `[0]` and return the expression.
|
|
147894
|
+
var index = expr.lastIndexOf($I), _expr = expr.substr(0, index).replace($I, $0), restExpr = expr.substr(index + 5), arrayConsumerFn = listener;
|
|
147895
|
+
if (restExpr) {
|
|
147896
|
+
arrayConsumerFn = arrayConsumer$1.bind(undefined, listener, restExpr);
|
|
147897
|
+
}
|
|
147924
147898
|
return {
|
|
147925
|
-
expr:
|
|
147926
|
-
listener: arrayConsumerFn
|
|
147899
|
+
'expr': _expr,
|
|
147900
|
+
'listener': arrayConsumerFn
|
|
147927
147901
|
};
|
|
147928
147902
|
};
|
|
147929
|
-
/**
|
|
147930
|
-
* Determines if an expression is static (doesn't need to be watched)
|
|
147931
|
-
*/
|
|
147932
|
-
const STATIC_EXPRESSION_NAMES$1 = [
|
|
147933
|
-
"row.getProperty('investment')",
|
|
147934
|
-
"row.getProperty('factsheetLink')",
|
|
147935
|
-
"row.getProperty('isRebalanceEligible')"
|
|
147936
|
-
];
|
|
147937
|
-
const isStaticExpression$1 = (expr) => {
|
|
147938
|
-
if (typeof expr !== 'string') {
|
|
147939
|
-
return false;
|
|
147940
|
-
}
|
|
147941
|
-
const trimmedExpr = expr.trim();
|
|
147942
|
-
// Expressions that always evaluate to localization strings
|
|
147943
|
-
// if (trimmedExpr.includes('appLocale')) {
|
|
147944
|
-
// return true;
|
|
147945
|
-
// }
|
|
147946
|
-
// Hard-coded static expression names
|
|
147947
|
-
if (STATIC_EXPRESSION_NAMES$1.includes(trimmedExpr)) {
|
|
147948
|
-
return true;
|
|
147949
|
-
}
|
|
147950
|
-
return false;
|
|
147951
|
-
};
|
|
147952
|
-
/**
|
|
147953
|
-
* Gets the scope type from the scope object
|
|
147954
|
-
*/
|
|
147955
|
-
const getScopeType$1 = ($scope) => {
|
|
147956
|
-
if (!$scope) {
|
|
147957
|
-
return null;
|
|
147958
|
-
}
|
|
147959
|
-
if ($scope.pageName)
|
|
147960
|
-
return 'Page';
|
|
147961
|
-
if ($scope.prefabName)
|
|
147962
|
-
return 'Prefab';
|
|
147963
|
-
if ($scope.partialName)
|
|
147964
|
-
return 'Partial';
|
|
147965
|
-
// Check for App scope
|
|
147966
|
-
if ($scope.Variables !== undefined &&
|
|
147967
|
-
$scope.Actions !== undefined &&
|
|
147968
|
-
!$scope.pageName &&
|
|
147969
|
-
!$scope.prefabName &&
|
|
147970
|
-
!$scope.partialName) {
|
|
147971
|
-
return 'App';
|
|
147972
|
-
}
|
|
147973
|
-
if ($scope.constructor?.name === 'AppRef') {
|
|
147974
|
-
return 'App';
|
|
147975
|
-
}
|
|
147976
|
-
return null;
|
|
147977
|
-
};
|
|
147978
|
-
/**
|
|
147979
|
-
* Gets scope name based on scope type
|
|
147980
|
-
*/
|
|
147981
|
-
const getScopeName$1 = ($scope, scopeType) => {
|
|
147982
|
-
if (!scopeType || !$scope) {
|
|
147983
|
-
return null;
|
|
147984
|
-
}
|
|
147985
|
-
switch (scopeType) {
|
|
147986
|
-
case 'Prefab': return $scope.prefabName || null;
|
|
147987
|
-
case 'Partial': return $scope.partialName || null;
|
|
147988
|
-
case 'Page': return $scope.pageName || null;
|
|
147989
|
-
default: return null;
|
|
147990
|
-
}
|
|
147991
|
-
};
|
|
147992
|
-
/**
|
|
147993
|
-
* Main watch function
|
|
147994
|
-
*/
|
|
147995
147903
|
const $watch$1 = (expr, $scope, $locals, listener, identifier = watchIdGenerator$1.nextUid(), doNotClone = false, config = {}, isMuted) => {
|
|
147996
|
-
|
|
147997
|
-
|
|
147998
|
-
const watchInfo = getUpdatedWatchInfo$1(expr, config.arrayType || config.isList || false, listener);
|
|
147904
|
+
if (expr.indexOf('[$i]') !== -1) {
|
|
147905
|
+
let watchInfo = getUpdatedWatcInfo$1(expr, config && (config.arrayType || config.isList), listener);
|
|
147999
147906
|
expr = watchInfo.expr;
|
|
148000
147907
|
listener = watchInfo.listener;
|
|
148001
147908
|
}
|
|
148002
|
-
// Handle static expressions
|
|
148003
|
-
if (isStaticExpression$1(expr)) {
|
|
148004
|
-
try {
|
|
148005
|
-
const fn = $parseExpr$1(expr);
|
|
148006
|
-
const staticValue = fn($scope, $locals);
|
|
148007
|
-
listener(staticValue, FIRST_TIME_WATCH$1);
|
|
148008
|
-
}
|
|
148009
|
-
catch (e) {
|
|
148010
|
-
console.warn(`Error evaluating static expression '${expr}':`, e);
|
|
148011
|
-
listener(undefined, FIRST_TIME_WATCH$1);
|
|
148012
|
-
}
|
|
148013
|
-
return () => { }; // No-op unsubscribe
|
|
148014
|
-
}
|
|
148015
147909
|
const fn = $parseExpr$1();
|
|
148016
|
-
|
|
148017
|
-
|
|
148018
|
-
const destroyFn = () => $unwatch$1(identifier);
|
|
148019
|
-
const watchInfo = {
|
|
148020
|
-
fn: fn.bind(null, $scope, $locals),
|
|
147910
|
+
registry$1.set(identifier, {
|
|
147911
|
+
fn: fn.bind(expr, $scope, $locals),
|
|
148021
147912
|
listener,
|
|
148022
147913
|
expr,
|
|
148023
147914
|
last: FIRST_TIME_WATCH$1,
|
|
148024
147915
|
doNotClone,
|
|
148025
|
-
isMuted
|
|
148026
|
-
|
|
148027
|
-
|
|
148028
|
-
destroyFn
|
|
148029
|
-
};
|
|
148030
|
-
// Store in registry
|
|
148031
|
-
const widgetId = getWidgetId$1(identifier);
|
|
148032
|
-
if (widgetId) {
|
|
148033
|
-
const propertyName = getPropertyName$1(identifier);
|
|
148034
|
-
if (!registry$1.has(widgetId)) {
|
|
148035
|
-
registry$1.set(widgetId, {});
|
|
148036
|
-
}
|
|
148037
|
-
const widgetGroup = registry$1.get(widgetId);
|
|
148038
|
-
widgetGroup[propertyName] = watchInfo;
|
|
148039
|
-
}
|
|
148040
|
-
else {
|
|
148041
|
-
registry$1.set(identifier, watchInfo);
|
|
148042
|
-
}
|
|
148043
|
-
return destroyFn;
|
|
147916
|
+
isMuted: isMuted
|
|
147917
|
+
});
|
|
147918
|
+
return () => $unwatch$1(identifier);
|
|
148044
147919
|
};
|
|
148045
|
-
|
|
148046
|
-
|
|
148047
|
-
|
|
148048
|
-
const $
|
|
148049
|
-
|
|
148050
|
-
|
|
148051
|
-
|
|
148052
|
-
|
|
148053
|
-
|
|
148054
|
-
|
|
148055
|
-
|
|
148056
|
-
if (watchInfo) {
|
|
148057
|
-
delete widgetGroup[propertyName];
|
|
148058
|
-
// Clean up empty widget groups
|
|
148059
|
-
if (Object.keys(widgetGroup).length === 0) {
|
|
148060
|
-
registry$1.delete(widgetId);
|
|
148061
|
-
}
|
|
148062
|
-
return true;
|
|
148063
|
-
}
|
|
147920
|
+
const $unwatch$1 = identifier => registry$1.delete(identifier);
|
|
147921
|
+
window.watchRegistry = registry$1;
|
|
147922
|
+
window.__WM_DEBUG_WATCHERS__ = false;
|
|
147923
|
+
/*export const $invokeWatchers = (force?: boolean, ignoreMuted?: boolean) => {
|
|
147924
|
+
if (force) {
|
|
147925
|
+
triggerWatchers(ignoreMuted);
|
|
147926
|
+
} else {
|
|
147927
|
+
|
|
147928
|
+
if (skipWatchers) {
|
|
147929
|
+
skipWatchers = false;
|
|
147930
|
+
return;
|
|
148064
147931
|
}
|
|
147932
|
+
debouncedTriggerWatchers();
|
|
148065
147933
|
}
|
|
148066
|
-
|
|
148067
|
-
if (registry$1.has(identifier)) {
|
|
148068
|
-
registry$1.delete(identifier);
|
|
148069
|
-
return true;
|
|
148070
|
-
}
|
|
148071
|
-
return false;
|
|
148072
|
-
};
|
|
147934
|
+
};*/
|
|
148073
147935
|
const $appDigest$1 = (() => {
|
|
148074
|
-
return (force
|
|
147936
|
+
return (force) => {
|
|
148075
147937
|
{
|
|
148076
147938
|
return;
|
|
148077
147939
|
}
|
|
148078
147940
|
};
|
|
148079
147941
|
})();
|
|
148080
|
-
// Export registry for debugging
|
|
148081
|
-
window.watchRegistry = registry$1;
|
|
148082
147942
|
|
|
148083
147943
|
var ComponentType$1;
|
|
148084
147944
|
(function (ComponentType) {
|
|
@@ -199582,7 +199442,7 @@ function requireMomentTimezone () {
|
|
|
199582
199442
|
hasRequiredMomentTimezone = 1;
|
|
199583
199443
|
(function (module) {
|
|
199584
199444
|
//! moment-timezone.js
|
|
199585
|
-
//! version : 0.6.
|
|
199445
|
+
//! version : 0.6.1
|
|
199586
199446
|
//! Copyright (c) JS Foundation and other contributors
|
|
199587
199447
|
//! license : MIT
|
|
199588
199448
|
//! github.com/moment/moment-timezone
|
|
@@ -199608,7 +199468,7 @@ function requireMomentTimezone () {
|
|
|
199608
199468
|
// return moment;
|
|
199609
199469
|
// }
|
|
199610
199470
|
|
|
199611
|
-
var VERSION = "0.6.
|
|
199471
|
+
var VERSION = "0.6.1",
|
|
199612
199472
|
zones = {},
|
|
199613
199473
|
links = {},
|
|
199614
199474
|
countries = {},
|
|
@@ -203105,11 +202965,11 @@ var DEFAULT_FORMATS;
|
|
|
203105
202965
|
DEFAULT_FORMATS["DATE_TIME"] = "yyyy-MM-dd HH:mm:ss";
|
|
203106
202966
|
})(DEFAULT_FORMATS || (DEFAULT_FORMATS = {}));
|
|
203107
202967
|
|
|
203108
|
-
const $RAF = window.requestAnimationFrame;
|
|
202968
|
+
const $RAF$1 = window.requestAnimationFrame;
|
|
203109
202969
|
const $RAFQueue = [];
|
|
203110
202970
|
const invokeLater = fn => {
|
|
203111
202971
|
if (!$RAFQueue.length) {
|
|
203112
|
-
$RAF(() => {
|
|
202972
|
+
$RAF$1(() => {
|
|
203113
202973
|
$RAFQueue.forEach(f => f());
|
|
203114
202974
|
$RAFQueue.length = 0;
|
|
203115
202975
|
});
|
|
@@ -203667,223 +203527,83 @@ const getFnForEventExpr = (expr) => {
|
|
|
203667
203527
|
return fnExecutor(expr, ExpressionType.Action);
|
|
203668
203528
|
};
|
|
203669
203529
|
|
|
203670
|
-
// Constants
|
|
203671
|
-
const WIDGET_ID_REGEX = /^(widget-[^_]+)/;
|
|
203672
|
-
const WIDGET_PROPERTY_REGEX = /^widget-[^_]+_(.+)$/;
|
|
203673
|
-
const ARRAY_INDEX_PLACEHOLDER = '[$i]';
|
|
203674
|
-
const ARRAY_INDEX_ZERO = '[0]';
|
|
203675
203530
|
const registry = new Map();
|
|
203676
203531
|
const watchIdGenerator = new IDGenerator('watch-id-');
|
|
203677
|
-
const FIRST_TIME_WATCH =
|
|
203678
|
-
|
|
203679
|
-
* Extracts widget ID from identifier (e.g., "widget-id23_eventsource" -> "widget-id23")
|
|
203680
|
-
*/
|
|
203681
|
-
const getWidgetId = (identifier) => {
|
|
203682
|
-
if (!identifier || typeof identifier !== 'string') {
|
|
203683
|
-
return null;
|
|
203684
|
-
}
|
|
203685
|
-
const match = identifier.match(WIDGET_ID_REGEX);
|
|
203686
|
-
return match ? match[1] : null;
|
|
203687
|
-
};
|
|
203688
|
-
/**
|
|
203689
|
-
* Extracts property name from identifier (e.g., "widget-id23_eventsource" -> "eventsource")
|
|
203690
|
-
*/
|
|
203691
|
-
const getPropertyName = (identifier) => {
|
|
203692
|
-
if (!identifier || typeof identifier !== 'string') {
|
|
203693
|
-
return identifier;
|
|
203694
|
-
}
|
|
203695
|
-
const match = identifier.match(WIDGET_PROPERTY_REGEX);
|
|
203696
|
-
return match ? match[1] : identifier;
|
|
203697
|
-
};
|
|
203698
|
-
/**
|
|
203699
|
-
* Array consumer wrapper for array-based expressions
|
|
203700
|
-
*/
|
|
203532
|
+
const FIRST_TIME_WATCH = {};
|
|
203533
|
+
Object.freeze(FIRST_TIME_WATCH);
|
|
203701
203534
|
const arrayConsumer = (listenerFn, restExpr, newVal, oldVal) => {
|
|
203702
|
-
|
|
203703
|
-
|
|
203704
|
-
|
|
203705
|
-
|
|
203706
|
-
|
|
203707
|
-
|
|
203708
|
-
|
|
203535
|
+
let data = newVal, formattedData;
|
|
203536
|
+
if (isArray(data)) {
|
|
203537
|
+
formattedData = data.map(function (datum) {
|
|
203538
|
+
return findValueOf(datum, restExpr);
|
|
203539
|
+
});
|
|
203540
|
+
// If resulting structure is an array of array, flatten it
|
|
203541
|
+
if (isArray(formattedData[0])) {
|
|
203542
|
+
formattedData = flatten(formattedData);
|
|
203543
|
+
}
|
|
203544
|
+
listenerFn(formattedData, oldVal);
|
|
203709
203545
|
}
|
|
203710
|
-
listenerFn(formattedData, oldVal);
|
|
203711
203546
|
};
|
|
203712
|
-
|
|
203713
|
-
|
|
203714
|
-
|
|
203715
|
-
|
|
203716
|
-
const regex = /\[\$i\]/g;
|
|
203547
|
+
const getUpdatedWatcInfo = (expr, acceptsArray, listener) => {
|
|
203548
|
+
// listener doesn't accept array
|
|
203549
|
+
// replace all `[$i]` with `[0]` and return the expression
|
|
203550
|
+
let regex = /\[\$i\]/g, $I = '[$i]', $0 = '[0]';
|
|
203717
203551
|
if (!acceptsArray) {
|
|
203718
203552
|
return {
|
|
203719
|
-
expr: expr.replace(regex,
|
|
203720
|
-
listener
|
|
203553
|
+
'expr': expr.replace(regex, $0),
|
|
203554
|
+
'listener': listener
|
|
203721
203555
|
};
|
|
203722
203556
|
}
|
|
203723
|
-
|
|
203724
|
-
|
|
203725
|
-
|
|
203726
|
-
|
|
203727
|
-
|
|
203728
|
-
|
|
203557
|
+
// listener accepts array
|
|
203558
|
+
// replace all except the last `[$i]` with `[0]` and return the expression.
|
|
203559
|
+
var index = expr.lastIndexOf($I), _expr = expr.substr(0, index).replace($I, $0), restExpr = expr.substr(index + 5), arrayConsumerFn = listener;
|
|
203560
|
+
if (restExpr) {
|
|
203561
|
+
arrayConsumerFn = arrayConsumer.bind(undefined, listener, restExpr);
|
|
203562
|
+
}
|
|
203729
203563
|
return {
|
|
203730
|
-
expr:
|
|
203731
|
-
listener: arrayConsumerFn
|
|
203564
|
+
'expr': _expr,
|
|
203565
|
+
'listener': arrayConsumerFn
|
|
203732
203566
|
};
|
|
203733
203567
|
};
|
|
203734
|
-
/**
|
|
203735
|
-
* Determines if an expression is static (doesn't need to be watched)
|
|
203736
|
-
*/
|
|
203737
|
-
const STATIC_EXPRESSION_NAMES = [
|
|
203738
|
-
"row.getProperty('investment')",
|
|
203739
|
-
"row.getProperty('factsheetLink')",
|
|
203740
|
-
"row.getProperty('isRebalanceEligible')"
|
|
203741
|
-
];
|
|
203742
|
-
const isStaticExpression = (expr) => {
|
|
203743
|
-
if (typeof expr !== 'string') {
|
|
203744
|
-
return false;
|
|
203745
|
-
}
|
|
203746
|
-
const trimmedExpr = expr.trim();
|
|
203747
|
-
// Expressions that always evaluate to localization strings
|
|
203748
|
-
// if (trimmedExpr.includes('appLocale')) {
|
|
203749
|
-
// return true;
|
|
203750
|
-
// }
|
|
203751
|
-
// Hard-coded static expression names
|
|
203752
|
-
if (STATIC_EXPRESSION_NAMES.includes(trimmedExpr)) {
|
|
203753
|
-
return true;
|
|
203754
|
-
}
|
|
203755
|
-
return false;
|
|
203756
|
-
};
|
|
203757
|
-
/**
|
|
203758
|
-
* Gets the scope type from the scope object
|
|
203759
|
-
*/
|
|
203760
|
-
const getScopeType = ($scope) => {
|
|
203761
|
-
if (!$scope) {
|
|
203762
|
-
return null;
|
|
203763
|
-
}
|
|
203764
|
-
if ($scope.pageName)
|
|
203765
|
-
return 'Page';
|
|
203766
|
-
if ($scope.prefabName)
|
|
203767
|
-
return 'Prefab';
|
|
203768
|
-
if ($scope.partialName)
|
|
203769
|
-
return 'Partial';
|
|
203770
|
-
// Check for App scope
|
|
203771
|
-
if ($scope.Variables !== undefined &&
|
|
203772
|
-
$scope.Actions !== undefined &&
|
|
203773
|
-
!$scope.pageName &&
|
|
203774
|
-
!$scope.prefabName &&
|
|
203775
|
-
!$scope.partialName) {
|
|
203776
|
-
return 'App';
|
|
203777
|
-
}
|
|
203778
|
-
if ($scope.constructor?.name === 'AppRef') {
|
|
203779
|
-
return 'App';
|
|
203780
|
-
}
|
|
203781
|
-
return null;
|
|
203782
|
-
};
|
|
203783
|
-
/**
|
|
203784
|
-
* Gets scope name based on scope type
|
|
203785
|
-
*/
|
|
203786
|
-
const getScopeName = ($scope, scopeType) => {
|
|
203787
|
-
if (!scopeType || !$scope) {
|
|
203788
|
-
return null;
|
|
203789
|
-
}
|
|
203790
|
-
switch (scopeType) {
|
|
203791
|
-
case 'Prefab': return $scope.prefabName || null;
|
|
203792
|
-
case 'Partial': return $scope.partialName || null;
|
|
203793
|
-
case 'Page': return $scope.pageName || null;
|
|
203794
|
-
default: return null;
|
|
203795
|
-
}
|
|
203796
|
-
};
|
|
203797
|
-
/**
|
|
203798
|
-
* Main watch function
|
|
203799
|
-
*/
|
|
203800
203568
|
const $watch = (expr, $scope, $locals, listener, identifier = watchIdGenerator.nextUid(), doNotClone = false, config = {}, isMuted) => {
|
|
203801
|
-
|
|
203802
|
-
|
|
203803
|
-
const watchInfo = getUpdatedWatchInfo(expr, config.arrayType || config.isList || false, listener);
|
|
203569
|
+
if (expr.indexOf('[$i]') !== -1) {
|
|
203570
|
+
let watchInfo = getUpdatedWatcInfo(expr, config && (config.arrayType || config.isList), listener);
|
|
203804
203571
|
expr = watchInfo.expr;
|
|
203805
203572
|
listener = watchInfo.listener;
|
|
203806
203573
|
}
|
|
203807
|
-
// Handle static expressions
|
|
203808
|
-
if (isStaticExpression(expr)) {
|
|
203809
|
-
try {
|
|
203810
|
-
const fn = $parseExpr(expr);
|
|
203811
|
-
const staticValue = fn($scope, $locals);
|
|
203812
|
-
listener(staticValue, FIRST_TIME_WATCH);
|
|
203813
|
-
}
|
|
203814
|
-
catch (e) {
|
|
203815
|
-
console.warn(`Error evaluating static expression '${expr}':`, e);
|
|
203816
|
-
listener(undefined, FIRST_TIME_WATCH);
|
|
203817
|
-
}
|
|
203818
|
-
return () => { }; // No-op unsubscribe
|
|
203819
|
-
}
|
|
203820
203574
|
const fn = $parseExpr();
|
|
203821
|
-
|
|
203822
|
-
|
|
203823
|
-
const destroyFn = () => $unwatch(identifier);
|
|
203824
|
-
const watchInfo = {
|
|
203825
|
-
fn: fn.bind(null, $scope, $locals),
|
|
203575
|
+
registry.set(identifier, {
|
|
203576
|
+
fn: fn.bind(expr, $scope, $locals),
|
|
203826
203577
|
listener,
|
|
203827
203578
|
expr,
|
|
203828
203579
|
last: FIRST_TIME_WATCH,
|
|
203829
203580
|
doNotClone,
|
|
203830
|
-
isMuted
|
|
203831
|
-
|
|
203832
|
-
|
|
203833
|
-
destroyFn
|
|
203834
|
-
};
|
|
203835
|
-
// Store in registry
|
|
203836
|
-
const widgetId = getWidgetId(identifier);
|
|
203837
|
-
if (widgetId) {
|
|
203838
|
-
const propertyName = getPropertyName(identifier);
|
|
203839
|
-
if (!registry.has(widgetId)) {
|
|
203840
|
-
registry.set(widgetId, {});
|
|
203841
|
-
}
|
|
203842
|
-
const widgetGroup = registry.get(widgetId);
|
|
203843
|
-
widgetGroup[propertyName] = watchInfo;
|
|
203844
|
-
}
|
|
203845
|
-
else {
|
|
203846
|
-
registry.set(identifier, watchInfo);
|
|
203847
|
-
}
|
|
203848
|
-
return destroyFn;
|
|
203581
|
+
isMuted: isMuted
|
|
203582
|
+
});
|
|
203583
|
+
return () => $unwatch(identifier);
|
|
203849
203584
|
};
|
|
203850
|
-
|
|
203851
|
-
|
|
203852
|
-
|
|
203853
|
-
const $
|
|
203854
|
-
|
|
203855
|
-
|
|
203856
|
-
|
|
203857
|
-
|
|
203858
|
-
|
|
203859
|
-
|
|
203860
|
-
|
|
203861
|
-
if (watchInfo) {
|
|
203862
|
-
delete widgetGroup[propertyName];
|
|
203863
|
-
// Clean up empty widget groups
|
|
203864
|
-
if (Object.keys(widgetGroup).length === 0) {
|
|
203865
|
-
registry.delete(widgetId);
|
|
203866
|
-
}
|
|
203867
|
-
return true;
|
|
203868
|
-
}
|
|
203585
|
+
const $unwatch = identifier => registry.delete(identifier);
|
|
203586
|
+
window.watchRegistry = registry;
|
|
203587
|
+
window.__WM_DEBUG_WATCHERS__ = false;
|
|
203588
|
+
/*export const $invokeWatchers = (force?: boolean, ignoreMuted?: boolean) => {
|
|
203589
|
+
if (force) {
|
|
203590
|
+
triggerWatchers(ignoreMuted);
|
|
203591
|
+
} else {
|
|
203592
|
+
|
|
203593
|
+
if (skipWatchers) {
|
|
203594
|
+
skipWatchers = false;
|
|
203595
|
+
return;
|
|
203869
203596
|
}
|
|
203597
|
+
debouncedTriggerWatchers();
|
|
203870
203598
|
}
|
|
203871
|
-
|
|
203872
|
-
if (registry.has(identifier)) {
|
|
203873
|
-
registry.delete(identifier);
|
|
203874
|
-
return true;
|
|
203875
|
-
}
|
|
203876
|
-
return false;
|
|
203877
|
-
};
|
|
203599
|
+
};*/
|
|
203878
203600
|
const $appDigest = (() => {
|
|
203879
|
-
return (force
|
|
203601
|
+
return (force) => {
|
|
203880
203602
|
{
|
|
203881
203603
|
return;
|
|
203882
203604
|
}
|
|
203883
203605
|
};
|
|
203884
203606
|
})();
|
|
203885
|
-
// Export registry for debugging
|
|
203886
|
-
window.watchRegistry = registry;
|
|
203887
203607
|
|
|
203888
203608
|
var ComponentType;
|
|
203889
203609
|
(function (ComponentType) {
|