@acorex/platform 20.4.1 → 20.4.2
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.
|
@@ -3578,9 +3578,10 @@ class AXPMainEntityContentBuilder {
|
|
|
3578
3578
|
? this.createExpressionEvaluator(rootContext, dependencies.expressionEvaluator)
|
|
3579
3579
|
: null;
|
|
3580
3580
|
// Prepare merge-details structures (sections and properties per section)
|
|
3581
|
-
|
|
3581
|
+
let evaluatedRelatedEntities = { ...(entity?.relatedEntities ?? []) };
|
|
3582
|
+
if (evaluatedRelatedEntities && evaluateExpressions) {
|
|
3582
3583
|
// Only evaluate the 'hidden' property for each related entity
|
|
3583
|
-
|
|
3584
|
+
evaluatedRelatedEntities = await Promise.all((entity.relatedEntities ?? []).map(async (re) => {
|
|
3584
3585
|
let hidden = re.hidden;
|
|
3585
3586
|
if (hidden && typeof hidden === 'string') {
|
|
3586
3587
|
try {
|
|
@@ -3594,7 +3595,7 @@ class AXPMainEntityContentBuilder {
|
|
|
3594
3595
|
return { ...re, hidden };
|
|
3595
3596
|
}));
|
|
3596
3597
|
}
|
|
3597
|
-
const mergeDetailEntities =
|
|
3598
|
+
const mergeDetailEntities = evaluatedRelatedEntities?.filter((re) => !re.hidden && re.layout?.type === 'merge-detail');
|
|
3598
3599
|
const mainPropsByGroup = (entity?.properties ?? []).reduce((acc, p) => {
|
|
3599
3600
|
if (!acc[p.groupId])
|
|
3600
3601
|
acc[p.groupId] = [];
|
|
@@ -3832,8 +3833,8 @@ class AXPMainEntityContentBuilder {
|
|
|
3832
3833
|
return prop?.__layout ?? singleInterface?.properties?.find((p) => p.name === name)?.layout;
|
|
3833
3834
|
};
|
|
3834
3835
|
// Get related entities for tabs
|
|
3835
|
-
const tabDetailEntities =
|
|
3836
|
-
const tabListEntities =
|
|
3836
|
+
const tabDetailEntities = evaluatedRelatedEntities?.filter((re) => !re.hidden && re.layout?.type === 'tab-detail');
|
|
3837
|
+
const tabListEntities = evaluatedRelatedEntities?.filter((re) => !re.hidden && (!re.layout?.type || re.layout?.type === 'tab-list'));
|
|
3837
3838
|
// Build related tabs if dependencies are provided
|
|
3838
3839
|
const tabDetailTabs = await this.buildTabDetails(tabDetailEntities ?? [], dependencies);
|
|
3839
3840
|
const tabListTabs = await this.buildTabLists(tabListEntities ?? [], rootContext, dependencies);
|
|
@@ -5487,11 +5488,11 @@ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
5487
5488
|
expose: [
|
|
5488
5489
|
{
|
|
5489
5490
|
source: this.textField(),
|
|
5490
|
-
target: `${this.path}EditorObj.title`,
|
|
5491
|
+
target: this.multiple() ? `${this.path}EditorObj.{title}` : `${this.path}EditorObj.title`,
|
|
5491
5492
|
},
|
|
5492
5493
|
{
|
|
5493
5494
|
source: this.valueField(),
|
|
5494
|
-
target: `${this.path}EditorObj.id`,
|
|
5495
|
+
target: this.multiple() ? `${this.path}EditorObj.{id}` : `${this.path}EditorObj.id`,
|
|
5495
5496
|
},
|
|
5496
5497
|
],
|
|
5497
5498
|
look: 'select',
|
|
@@ -5504,16 +5505,21 @@ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
5504
5505
|
this.lookupNode.set(node);
|
|
5505
5506
|
}, ...(ngDevMode ? [{ debugName: "#efUpdateLookupNode" }] : []));
|
|
5506
5507
|
this.#efUpdateValue = effect(() => {
|
|
5508
|
+
debugger;
|
|
5507
5509
|
const newValueObj = this.contextService.getValue(`${this.path}EditorObj`);
|
|
5508
5510
|
const prevValue = untracked(() => this.getValue()?.value);
|
|
5509
|
-
|
|
5511
|
+
const newValue = this.multiple()
|
|
5512
|
+
? newValueObj?.map((v) => v[this.valueField()])
|
|
5513
|
+
: newValueObj?.[this.valueField()];
|
|
5514
|
+
const valueIsChanged = !isEqual(prevValue, newValue);
|
|
5515
|
+
if (!valueIsChanged) {
|
|
5510
5516
|
return;
|
|
5511
5517
|
}
|
|
5512
5518
|
const value = this.multiple()
|
|
5513
|
-
? newValueObj
|
|
5519
|
+
? newValueObj.map((v) => v[this.valueField()])
|
|
5514
5520
|
: newValueObj?.[this.valueField()];
|
|
5515
5521
|
const displayText = this.multiple()
|
|
5516
|
-
? newValueObj
|
|
5522
|
+
? newValueObj.map((v) => v[this.textField()]).join(',')
|
|
5517
5523
|
: newValueObj?.[this.textField()];
|
|
5518
5524
|
this.setValue({
|
|
5519
5525
|
value: value,
|