@acorex/platform 20.3.0-next.13 → 20.3.0-next.14
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-layout-entity.mjs +18 -2
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +4 -2
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +34 -14
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/layout/widgets/index.d.ts +3 -0
- package/package.json +5 -5
|
@@ -3551,6 +3551,11 @@ class AXPMainEntityContentBuilder {
|
|
|
3551
3551
|
async build(entity, rootContext, dependencies, rootTitle) {
|
|
3552
3552
|
const groups = entity?.groups ?? [];
|
|
3553
3553
|
const singleInterface = entity?.interfaces?.master?.single;
|
|
3554
|
+
const updateInterface = entity?.interfaces?.master?.update;
|
|
3555
|
+
// Get list of visible property names from single interface
|
|
3556
|
+
const visiblePropertyNames = new Set(singleInterface?.properties?.map((p) => p.name) ?? []);
|
|
3557
|
+
// Get list of editable property names from update interface
|
|
3558
|
+
const editablePropertyNames = new Set(updateInterface?.properties?.map((p) => p.name) ?? []);
|
|
3554
3559
|
// Accumulate groups from main and merge-detail related entities for validation/title lookup
|
|
3555
3560
|
const allGroups = [...groups];
|
|
3556
3561
|
// Create expression evaluator for actions
|
|
@@ -3970,9 +3975,15 @@ class AXPMainEntityContentBuilder {
|
|
|
3970
3975
|
},
|
|
3971
3976
|
},
|
|
3972
3977
|
},
|
|
3973
|
-
children: (await getVisiblePropertyByGroupId(s.id))
|
|
3978
|
+
children: (await getVisiblePropertyByGroupId(s.id))
|
|
3979
|
+
.filter((p) => visiblePropertyNames.has(p.name))
|
|
3980
|
+
.map((p) => {
|
|
3974
3981
|
const layout = getPropertyLayout(p.name, p);
|
|
3975
3982
|
const prefixed = p.__dataPath ? `${p.__dataPath}.${p.name}` : p.name;
|
|
3983
|
+
// Check if property is editable (exists in update interface)
|
|
3984
|
+
const isEditable = editablePropertyNames.has(p.name);
|
|
3985
|
+
// Check if property has its own disabled option
|
|
3986
|
+
const hasOwnDisabled = p.schema.interface?.options?.disabled !== undefined;
|
|
3976
3987
|
return {
|
|
3977
3988
|
type: 'grid-item-layout',
|
|
3978
3989
|
name: prefixed,
|
|
@@ -4006,7 +4017,9 @@ class AXPMainEntityContentBuilder {
|
|
|
4006
4017
|
})),
|
|
4007
4018
|
// Attach dataPath for merged properties to be available in widgets/options if needed
|
|
4008
4019
|
dataPath: p.__dataPath,
|
|
4009
|
-
}
|
|
4020
|
+
},
|
|
4021
|
+
// Only set disabled if property doesn't have its own disabled option
|
|
4022
|
+
hasOwnDisabled ? {} : { disabled: !isEditable }),
|
|
4010
4023
|
},
|
|
4011
4024
|
],
|
|
4012
4025
|
},
|
|
@@ -4654,6 +4667,9 @@ class AXPEntityListToolbarService {
|
|
|
4654
4667
|
filterDefinitions: this.createFilterDefinitions(entity),
|
|
4655
4668
|
columnDefinitions: this.createColumnDefinitions(entity, options),
|
|
4656
4669
|
sortDefinitions: this.createSortDefinitions(entity),
|
|
4670
|
+
canFilter: true,
|
|
4671
|
+
canColumns: true,
|
|
4672
|
+
canSort: true,
|
|
4657
4673
|
};
|
|
4658
4674
|
return toolbarOptions;
|
|
4659
4675
|
}
|