@acorex/platform 20.7.10 → 20.7.12
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/common/index.d.ts +1 -0
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +340 -178
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +70 -63
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +158 -55
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/layout/components/index.d.ts +207 -44
- package/layout/entity/index.d.ts +1 -2
- package/layout/widgets/index.d.ts +12 -0
- package/package.json +5 -5
|
@@ -2043,7 +2043,7 @@ class AXPEntityDetailPopoverComponent {
|
|
|
2043
2043
|
return importantProperties;
|
|
2044
2044
|
}
|
|
2045
2045
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPEntityDetailPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2046
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXPEntityDetailPopoverComponent, isStandalone: true, selector: "axp-entity-detail-popover", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, breadcrumb: { classPropertyName: "breadcrumb", publicName: "breadcrumb", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "detailPopover", first: true, predicate: ["detailPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[textField()]) {\n {{ entityDetails()?.entityData[textField()] }}\n } @else {\n {{ item()?.[textField()] }}\n }\n </h3>\n @if (breadcrumb()) {\n <div class=\"ax-text-xs ax-text-neutral-500 ax-mt-1\">{{ breadcrumb() }}</div>\n }\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button
|
|
2046
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXPEntityDetailPopoverComponent, isStandalone: true, selector: "axp-entity-detail-popover", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, breadcrumb: { classPropertyName: "breadcrumb", publicName: "breadcrumb", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "detailPopover", first: true, predicate: ["detailPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[textField()]) {\n {{ entityDetails()?.entityData[textField()] }}\n } @else {\n {{ item()?.[textField()] }}\n }\n </h3>\n @if (breadcrumb()) {\n <div class=\"ax-text-xs ax-text-neutral-500 ax-mt-1\">{{ breadcrumb() }}</div>\n }\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button\n [color]=\"'primary'\"\n [look]=\"'solid'\"\n [text]=\"'@general:open-details.title' | translate | async\"\n (click)=\"navigateToDetails()\"\n >\n </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "forceDisableActionSheetStyle", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "repositionOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2047
2047
|
}
|
|
2048
2048
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPEntityDetailPopoverComponent, decorators: [{
|
|
2049
2049
|
type: Component,
|
|
@@ -2054,7 +2054,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2054
2054
|
AXPWidgetCoreModule,
|
|
2055
2055
|
AXTranslationModule,
|
|
2056
2056
|
AXLoadingModule,
|
|
2057
|
-
], template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[textField()]) {\n {{ entityDetails()?.entityData[textField()] }}\n } @else {\n {{ item()?.[textField()] }}\n }\n </h3>\n @if (breadcrumb()) {\n <div class=\"ax-text-xs ax-text-neutral-500 ax-mt-1\">{{ breadcrumb() }}</div>\n }\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button
|
|
2057
|
+
], template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[textField()]) {\n {{ entityDetails()?.entityData[textField()] }}\n } @else {\n {{ item()?.[textField()] }}\n }\n </h3>\n @if (breadcrumb()) {\n <div class=\"ax-text-xs ax-text-neutral-500 ax-mt-1\">{{ breadcrumb() }}</div>\n }\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button\n [color]=\"'primary'\"\n [look]=\"'solid'\"\n [text]=\"'@general:open-details.title' | translate | async\"\n (click)=\"navigateToDetails()\"\n >\n </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n" }]
|
|
2058
2058
|
}], propDecorators: { entity: [{ type: i0.Input, args: [{ isSignal: true, alias: "entity", required: true }] }], entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: true }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], breadcrumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadcrumb", required: false }] }], detailPopover: [{ type: i0.ViewChild, args: ['detailPopover', { isSignal: true }] }] } });
|
|
2059
2059
|
|
|
2060
2060
|
class AXPEntityDetailPopoverService {
|
|
@@ -4662,12 +4662,17 @@ class AXPBaseRelatedEntityConverter {
|
|
|
4662
4662
|
groups,
|
|
4663
4663
|
};
|
|
4664
4664
|
}
|
|
4665
|
-
async createGridLayoutStructure(singleInterface, helpers, evaluateExpressions) {
|
|
4666
|
-
return await this.createGridLayoutStructureInternal(singleInterface, helpers, evaluateExpressions);
|
|
4665
|
+
async createGridLayoutStructure(singleInterface, helpers, evaluateExpressions, includeProperties) {
|
|
4666
|
+
return await this.createGridLayoutStructureInternal(singleInterface, helpers, evaluateExpressions, includeProperties);
|
|
4667
4667
|
}
|
|
4668
4668
|
//#region ---- Visible Evaluation Helpers ----
|
|
4669
|
-
async getVisiblePropertiesByGroupId(sectionId, helpers, evaluateExpressions) {
|
|
4670
|
-
|
|
4669
|
+
async getVisiblePropertiesByGroupId(sectionId, helpers, evaluateExpressions, includeProperties) {
|
|
4670
|
+
let properties = helpers.getPropertyByGroupId(sectionId) ?? [];
|
|
4671
|
+
// Filter by includeProperties if provided
|
|
4672
|
+
if (includeProperties && includeProperties.length > 0) {
|
|
4673
|
+
const includeSet = new Set(includeProperties);
|
|
4674
|
+
properties = properties.filter((p) => includeSet.has(p.name));
|
|
4675
|
+
}
|
|
4671
4676
|
const evaluated = await Promise.all(properties.map(async (property) => {
|
|
4672
4677
|
let visible = property?.schema?.visible;
|
|
4673
4678
|
if (typeof visible === 'string' && evaluateExpressions) {
|
|
@@ -4683,8 +4688,8 @@ class AXPBaseRelatedEntityConverter {
|
|
|
4683
4688
|
}));
|
|
4684
4689
|
return evaluated.filter((x) => x.visible !== false).map((x) => x.property);
|
|
4685
4690
|
}
|
|
4686
|
-
async createPropertyGrid(sectionId, helpers, evaluateExpressions) {
|
|
4687
|
-
const visibleProperties = await this.getVisiblePropertiesByGroupId(sectionId, helpers, evaluateExpressions);
|
|
4691
|
+
async createPropertyGrid(sectionId, helpers, evaluateExpressions, includeProperties) {
|
|
4692
|
+
const visibleProperties = await this.getVisiblePropertiesByGroupId(sectionId, helpers, evaluateExpressions, includeProperties);
|
|
4688
4693
|
return {
|
|
4689
4694
|
type: 'grid-layout',
|
|
4690
4695
|
mode: 'edit',
|
|
@@ -4732,7 +4737,13 @@ class AXPBaseRelatedEntityConverter {
|
|
|
4732
4737
|
}),
|
|
4733
4738
|
};
|
|
4734
4739
|
}
|
|
4735
|
-
async createGridLayoutStructureInternal(singleInterface, helpers, evaluateExpressions) {
|
|
4740
|
+
async createGridLayoutStructureInternal(singleInterface, helpers, evaluateExpressions, includeProperties) {
|
|
4741
|
+
// Filter out empty sections (sections with no visible properties)
|
|
4742
|
+
const sectionsWithProperties = await Promise.all((singleInterface?.sections ?? []).map(async (s) => {
|
|
4743
|
+
const visibleProperties = await this.getVisiblePropertiesByGroupId(s.id, helpers, evaluateExpressions, includeProperties);
|
|
4744
|
+
return { section: s, hasProperties: visibleProperties.length > 0 };
|
|
4745
|
+
}));
|
|
4746
|
+
const validSections = sectionsWithProperties.filter((item) => item.hasProperties).map((item) => item.section);
|
|
4736
4747
|
return {
|
|
4737
4748
|
type: 'grid-layout',
|
|
4738
4749
|
options: {
|
|
@@ -4744,7 +4755,7 @@ class AXPBaseRelatedEntityConverter {
|
|
|
4744
4755
|
},
|
|
4745
4756
|
},
|
|
4746
4757
|
},
|
|
4747
|
-
children: await Promise.all(
|
|
4758
|
+
children: await Promise.all(validSections.map(async (s) => ({
|
|
4748
4759
|
type: 'grid-item-layout',
|
|
4749
4760
|
name: s.id,
|
|
4750
4761
|
options: {
|
|
@@ -4759,7 +4770,7 @@ class AXPBaseRelatedEntityConverter {
|
|
|
4759
4770
|
title: helpers.getGroupById(s.id)?.title ?? '',
|
|
4760
4771
|
collapsible: true,
|
|
4761
4772
|
},
|
|
4762
|
-
children: [await this.createPropertyGrid(s.id, helpers, evaluateExpressions)],
|
|
4773
|
+
children: [await this.createPropertyGrid(s.id, helpers, evaluateExpressions, includeProperties)],
|
|
4763
4774
|
},
|
|
4764
4775
|
],
|
|
4765
4776
|
}))),
|
|
@@ -4823,7 +4834,7 @@ class AXPPageDetailsConverter extends AXPBaseRelatedEntityConverter {
|
|
|
4823
4834
|
execute: this.createExecuteFunction(entityDef, actions, evaluateExpressions, context),
|
|
4824
4835
|
actions: await this.buildEvaluatedActions(actions, evaluateExpressions),
|
|
4825
4836
|
// tabs: [...tabDetailTabs, ...tabListTabs],
|
|
4826
|
-
content: [await this.createGridLayoutStructure(helpers.singleInterface, helpers, evaluateExpressions)],
|
|
4837
|
+
content: [await this.createGridLayoutStructure(helpers.singleInterface, helpers, evaluateExpressions, relatedEntity.properties)],
|
|
4827
4838
|
};
|
|
4828
4839
|
}
|
|
4829
4840
|
//#region ---- Utility Methods ----
|
|
@@ -5231,7 +5242,9 @@ class AXPTabDetailsConverter extends AXPBaseRelatedEntityConverter {
|
|
|
5231
5242
|
id: entityDef?.name ?? '',
|
|
5232
5243
|
title: relatedEntity.title ?? entityDef?.title ?? '',
|
|
5233
5244
|
icon: relatedEntity.icon || entityDef.icon,
|
|
5234
|
-
content: [
|
|
5245
|
+
content: [
|
|
5246
|
+
await this.createGridLayoutStructure(helpers.singleInterface, helpers, undefined, relatedEntity.properties),
|
|
5247
|
+
],
|
|
5235
5248
|
};
|
|
5236
5249
|
}
|
|
5237
5250
|
}
|
|
@@ -5465,7 +5478,19 @@ class AXPMainEntityContentBuilder {
|
|
|
5465
5478
|
const p = relatedEntity?.persistence || {};
|
|
5466
5479
|
const strategy = p.strategy || 'embedded';
|
|
5467
5480
|
const mappedTargets = Object.keys(p.map || {}).map((k) => (k || '').split('.')[0]);
|
|
5481
|
+
// Filter by properties if provided (for detail types)
|
|
5482
|
+
const includeProperties = relatedEntity?.properties && relatedEntity.properties.length > 0
|
|
5483
|
+
? new Set(relatedEntity.properties)
|
|
5484
|
+
: undefined;
|
|
5468
5485
|
const relPropsByGroup = (entityDef?.properties ?? []).reduce((acc, p) => {
|
|
5486
|
+
// Filter by includeProperties if provided (for detail types)
|
|
5487
|
+
if (includeProperties &&
|
|
5488
|
+
(relatedEntity?.layout?.type === 'merge-detail' ||
|
|
5489
|
+
relatedEntity?.layout?.type === 'page-detail' ||
|
|
5490
|
+
relatedEntity?.layout?.type === 'tab-detail') &&
|
|
5491
|
+
!includeProperties.has(p.name)) {
|
|
5492
|
+
return acc; // skip properties not in includeProperties
|
|
5493
|
+
}
|
|
5469
5494
|
if (strategy === 'referenced' &&
|
|
5470
5495
|
(relatedEntity?.layout?.type === 'merge-detail' ||
|
|
5471
5496
|
relatedEntity?.layout?.type === 'page-detail' ||
|
|
@@ -5743,7 +5768,18 @@ class AXPMainEntityContentBuilder {
|
|
|
5743
5768
|
},
|
|
5744
5769
|
},
|
|
5745
5770
|
},
|
|
5746
|
-
children: await Promise.all(combinedSections.map(async (s) =>
|
|
5771
|
+
children: await Promise.all((await Promise.all(combinedSections.map(async (s) => {
|
|
5772
|
+
const properties = await getVisiblePropertyByGroupId(s.id);
|
|
5773
|
+
const visibleProperties = properties.filter((p) => {
|
|
5774
|
+
const isFromRelated = p.__dataPath != null;
|
|
5775
|
+
const visibleInMain = visiblePropertyNames.has(p.name);
|
|
5776
|
+
const visibleInRelated = isFromRelated ? !!p.__layout : false;
|
|
5777
|
+
return visibleInMain || visibleInRelated;
|
|
5778
|
+
});
|
|
5779
|
+
return { section: s, hasProperties: visibleProperties.length > 0, visibleProperties };
|
|
5780
|
+
})))
|
|
5781
|
+
.filter((item) => item.hasProperties)
|
|
5782
|
+
.map(({ section: s, visibleProperties }) => ({
|
|
5747
5783
|
type: 'grid-item-layout',
|
|
5748
5784
|
name: s.id,
|
|
5749
5785
|
options: {
|
|
@@ -5773,14 +5809,7 @@ class AXPMainEntityContentBuilder {
|
|
|
5773
5809
|
},
|
|
5774
5810
|
},
|
|
5775
5811
|
},
|
|
5776
|
-
children: (
|
|
5777
|
-
.filter((p) => {
|
|
5778
|
-
const isFromRelated = p.__dataPath != null;
|
|
5779
|
-
const visibleInMain = visiblePropertyNames.has(p.name);
|
|
5780
|
-
const visibleInRelated = isFromRelated ? !!p.__layout : false;
|
|
5781
|
-
return visibleInMain || visibleInRelated;
|
|
5782
|
-
})
|
|
5783
|
-
.map((p) => {
|
|
5812
|
+
children: visibleProperties.map((p) => {
|
|
5784
5813
|
const layout = getPropertyLayout(p.name, p);
|
|
5785
5814
|
const prefixed = p.__dataPath ? `${p.__dataPath}.${p.name}` : p.name;
|
|
5786
5815
|
// Check if property is editable (exists in update interface)
|
|
@@ -10446,7 +10475,6 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10446
10475
|
this.deviceService = inject(AXPDeviceService);
|
|
10447
10476
|
this.commandService = inject(AXPCommandService);
|
|
10448
10477
|
this.eventService = inject(AXPBroadcastEventService);
|
|
10449
|
-
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
10450
10478
|
this.isMounted = signal(false, ...(ngDevMode ? [{ debugName: "isMounted" }] : []));
|
|
10451
10479
|
this.entity = signal(null, ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
10452
10480
|
this.listNode = signal(null, ...(ngDevMode ? [{ debugName: "listNode" }] : []));
|
|
@@ -10575,32 +10603,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10575
10603
|
c.scope == AXPEntityCommandScope.TypeLevel));
|
|
10576
10604
|
});
|
|
10577
10605
|
const command = commandName.split('&')[0];
|
|
10578
|
-
//
|
|
10579
|
-
const currentContext = this.contextService.initial();
|
|
10580
|
-
console.log('currentContext', currentContext);
|
|
10581
|
-
// Evaluate action options with current context if they contain expressions
|
|
10582
|
-
let evaluatedOptions = action?.options;
|
|
10583
|
-
if (action?.options && currentContext) {
|
|
10584
|
-
try {
|
|
10585
|
-
const scope = {
|
|
10586
|
-
context: {
|
|
10587
|
-
eval: (path) => {
|
|
10588
|
-
console.log({ path });
|
|
10589
|
-
return get(currentContext, path);
|
|
10590
|
-
},
|
|
10591
|
-
},
|
|
10592
|
-
};
|
|
10593
|
-
evaluatedOptions = await this.expressionEvaluator.evaluate(action.options, scope);
|
|
10594
|
-
}
|
|
10595
|
-
catch {
|
|
10596
|
-
// Keep original options if evaluation fails
|
|
10597
|
-
evaluatedOptions = action?.options;
|
|
10598
|
-
}
|
|
10599
|
-
}
|
|
10600
|
-
debugger;
|
|
10601
|
-
const actionData = action?.scope == AXPEntityCommandScope.Selected
|
|
10602
|
-
? this.selectedItems()
|
|
10603
|
-
: evaluatedOptions?.['process']?.data || null;
|
|
10606
|
+
// const options = await this.evaluateExpressions(action?.options, data);
|
|
10604
10607
|
if (this.commandService.exists(command)) {
|
|
10605
10608
|
await this.commandService.execute(command, {
|
|
10606
10609
|
__context__: {
|
|
@@ -10612,8 +10615,10 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10612
10615
|
parentKey: this.entity()?.parentKey,
|
|
10613
10616
|
source: `${this.entity()?.module}.${this.entity()?.name}`,
|
|
10614
10617
|
},
|
|
10615
|
-
data:
|
|
10616
|
-
|
|
10618
|
+
data: action?.scope == AXPEntityCommandScope.Selected
|
|
10619
|
+
? this.selectedItems()
|
|
10620
|
+
: action?.options?.['process']?.data || null,
|
|
10621
|
+
options: action?.options,
|
|
10617
10622
|
metadata: action?.metadata,
|
|
10618
10623
|
},
|
|
10619
10624
|
});
|
|
@@ -10628,8 +10633,10 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10628
10633
|
parentKey: this.entity()?.parentKey,
|
|
10629
10634
|
source: `${this.entity()?.module}.${this.entity()?.name}`,
|
|
10630
10635
|
},
|
|
10631
|
-
data:
|
|
10632
|
-
|
|
10636
|
+
data: action?.scope == AXPEntityCommandScope.Selected
|
|
10637
|
+
? this.selectedItems()
|
|
10638
|
+
: action?.options?.['process']?.data || null,
|
|
10639
|
+
options: action?.options,
|
|
10633
10640
|
metadata: action?.metadata,
|
|
10634
10641
|
});
|
|
10635
10642
|
}
|
|
@@ -14393,11 +14400,11 @@ class AXPEntityModule {
|
|
|
14393
14400
|
useClass: AXPEntitiesListDataSourceDefinition,
|
|
14394
14401
|
multi: true,
|
|
14395
14402
|
},
|
|
14396
|
-
{
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
},
|
|
14403
|
+
// {
|
|
14404
|
+
// provide: AXP_ENTITY_MODIFIER,
|
|
14405
|
+
// useValue: layoutOrderingMiddlewareProvider,
|
|
14406
|
+
// multi: true,
|
|
14407
|
+
// },
|
|
14401
14408
|
provideCommandSetups([
|
|
14402
14409
|
{
|
|
14403
14410
|
key: 'Entity:OpenDetails',
|
|
@@ -14566,11 +14573,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
14566
14573
|
useClass: AXPEntitiesListDataSourceDefinition,
|
|
14567
14574
|
multi: true,
|
|
14568
14575
|
},
|
|
14569
|
-
{
|
|
14570
|
-
|
|
14571
|
-
|
|
14572
|
-
|
|
14573
|
-
},
|
|
14576
|
+
// {
|
|
14577
|
+
// provide: AXP_ENTITY_MODIFIER,
|
|
14578
|
+
// useValue: layoutOrderingMiddlewareProvider,
|
|
14579
|
+
// multi: true,
|
|
14580
|
+
// },
|
|
14574
14581
|
provideCommandSetups([
|
|
14575
14582
|
{
|
|
14576
14583
|
key: 'Entity:OpenDetails',
|