@acorex/platform 20.9.44 → 20.9.46

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.
@@ -1999,6 +1999,8 @@ class AXPWidgetRendererDirective {
1999
1999
  this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
2000
2000
  this.isVisible = signal(true, ...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
2001
2001
  this.expressionEvaluators = new Map();
2002
+ /** Original `{{ ... }}` templates, kept even after evaluated values overwrite `node.options`. */
2003
+ this.expressionTemplates = new Map();
2002
2004
  this.renderTimeoutId = null;
2003
2005
  this.renderGeneration = 0;
2004
2006
  this.hasInitialRender = false;
@@ -2306,12 +2308,11 @@ class AXPWidgetRendererDirective {
2306
2308
  return false;
2307
2309
  }
2308
2310
  hasExpressionDependency(changedPath) {
2309
- for (const [path, evaluator] of this.expressionEvaluators) {
2311
+ for (const [path] of this.expressionEvaluators) {
2310
2312
  if (path.includes(changedPath)) {
2311
2313
  return true;
2312
2314
  }
2313
- const node = this.node();
2314
- const expressionValue = this.getExpressionValueFromNode(node, path);
2315
+ const expressionValue = this.expressionTemplates.get(path) ?? this.getExpressionValueFromNode(this.node(), path);
2315
2316
  if (expressionValue && typeof expressionValue === 'string') {
2316
2317
  if (this.expressionTextDependsOnContextPath(expressionValue, changedPath)) {
2317
2318
  return true;
@@ -2485,6 +2486,7 @@ class AXPWidgetRendererDirective {
2485
2486
  //
2486
2487
  this.mergedOptions.set(merge(props, widget?.options, this.node().options) || {});
2487
2488
  this.expressionEvaluators.clear();
2489
+ this.expressionTemplates.clear();
2488
2490
  // Register expressions from widget defaults and node options to cover related-entity cases
2489
2491
  this.preprocessAndInitialOptions(cloneDeep(widget?.options));
2490
2492
  this.preprocessAndInitialOptions(cloneDeep(this.node().options));
@@ -2648,7 +2650,7 @@ class AXPWidgetRendererDirective {
2648
2650
  return;
2649
2651
  }
2650
2652
  if (typeof value === 'string' && this.expressionEvaluator.isExpression(value)) {
2651
- // Cache dynamic expression for later evaluation
2653
+ this.expressionTemplates.set(currentPath, value);
2652
2654
  this.expressionEvaluators.set(currentPath, () => this.evaluateExpression(value));
2653
2655
  }
2654
2656
  else if (typeof value === 'object' &&