@acorex/platform 20.9.43 → 20.9.45
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/fesm2022/acorex-platform-contracts.mjs +3 -0
- package/fesm2022/acorex-platform-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +2 -2
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +6 -4
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +47 -4
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-layout-widget-core.d.ts +2 -0
- package/types/acorex-platform-layout-widgets.d.ts +7 -1
|
@@ -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
|
|
2311
|
+
for (const [path] of this.expressionEvaluators) {
|
|
2310
2312
|
if (path.includes(changedPath)) {
|
|
2311
2313
|
return true;
|
|
2312
2314
|
}
|
|
2313
|
-
const
|
|
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
|
-
|
|
2653
|
+
this.expressionTemplates.set(currentPath, value);
|
|
2652
2654
|
this.expressionEvaluators.set(currentPath, () => this.evaluateExpression(value));
|
|
2653
2655
|
}
|
|
2654
2656
|
else if (typeof value === 'object' &&
|