@acorex/platform 20.6.0-next.1 → 20.6.0-next.11
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 +5 -1
- package/core/index.d.ts +104 -34
- package/fesm2022/acorex-platform-auth.mjs +19 -19
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-CLb2KMfv.mjs → acorex-platform-common-common-settings.provider-zhqNP3xb.mjs} +28 -4
- package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +104 -103
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +98 -76
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +65 -20
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +17 -17
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +1208 -308
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +73 -73
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-entity-create-entity.command-BsLbiAdA.mjs → acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs} +40 -9
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-entity.mjs +948 -389
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +39 -25
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +157 -131
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-lHfg4JFJ.mjs → acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-lHfg4JFJ.mjs.map → acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-CMSnecnD.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-CMSnecnD.mjs.map → acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-DN-sIFYe.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-DN-sIFYe.mjs.map → acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-Bn9w0SEz.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-Bn9w0SEz.mjs.map → acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-view.component-B8mgcvoX.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-view.component-B8mgcvoX.mjs.map → acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-edit.component-Bhof2SY8.mjs → acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-edit.component-Bhof2SY8.mjs.map → acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-view.component-CeQIvKVV.mjs → acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-view.component-CeQIvKVV.mjs.map → acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-BOP7jFp4.mjs → acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs} +6 -6
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-BOP7jFp4.mjs.map → acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-C57lyBs3.mjs → acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-C57lyBs3.mjs.map → acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-fr77M8Z0.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-C1l2KSDa.mjs} +6 -6
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-C1l2KSDa.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-CvZTRhct.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-D-31ej0C.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-CvZTRhct.mjs.map → acorex-platform-layout-widgets-tabular-data-view-popup.component-D-31ej0C.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-DHES_0ot.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs} +4 -4
- package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-DHES_0ot.mjs.map → acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +2410 -1028
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-native.mjs +7 -7
- package/fesm2022/acorex-platform-native.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +119 -43
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-C_XmJV7Y.mjs → acorex-platform-themes-default-entity-master-create-view.component-WbPPqDON.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-WbPPqDON.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-BkY9HXcT.mjs → acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs} +37 -16
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-DJPDil7w.mjs → acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs} +4 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BArdGNfr.mjs → acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs} +7 -7
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-error-401.component-D7rEInHg.mjs → acorex-platform-themes-default-error-401.component-cfREo88K.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-401.component-D7rEInHg.mjs.map → acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-error-404.component-BTZlVrd8.mjs → acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-404.component-BTZlVrd8.mjs.map → acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-default-error-offline.component-BhvEi6nX.mjs → acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-default-error-offline.component-BhvEi6nX.mjs.map → acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +148 -47
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs +55 -0
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BXV40gay.mjs → acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BXV40gay.mjs.map → acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-BpIf4s53.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-BpIf4s53.mjs.map → acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-C9gvfQfX.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs} +4 -4
- package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-C9gvfQfX.mjs.map → acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map} +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +46 -46
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +327 -151
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/components/index.d.ts +255 -12
- package/layout/entity/index.d.ts +82 -19
- package/layout/views/index.d.ts +1 -0
- package/layout/widget-core/index.d.ts +16 -5
- package/layout/widgets/index.d.ts +264 -53
- package/package.json +5 -5
- package/runtime/index.d.ts +36 -8
- package/themes/default/index.d.ts +28 -6
- package/workflow/index.d.ts +909 -457
- package/fesm2022/acorex-platform-common-common-settings.provider-CLb2KMfv.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-BsLbiAdA.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-fr77M8Z0.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-C_XmJV7Y.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BkY9HXcT.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DJPDil7w.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BArdGNfr.mjs.map +0 -1
|
@@ -15,7 +15,7 @@ import { AXPWidgetsCatalog, AXPWidgetCoreModule, AXPPageStatus, AXPWidgetRegistr
|
|
|
15
15
|
import { AXPCommandService, AXPQueryService, provideCommandSetups, provideQuerySetups } from '@acorex/platform/runtime';
|
|
16
16
|
import * as i5 from '@angular/common';
|
|
17
17
|
import { CommonModule } from '@angular/common';
|
|
18
|
-
import { castArray, get, cloneDeep, set, merge, isEqual, isNil, isEmpty, sortBy } from 'lodash-es';
|
|
18
|
+
import { castArray, get, cloneDeep, set, merge, orderBy, isEqual, isNil, isEmpty, sortBy } from 'lodash-es';
|
|
19
19
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
20
20
|
import { AXFormatService } from '@acorex/core/format';
|
|
21
21
|
import * as i4$1 from '@acorex/platform/common';
|
|
@@ -76,24 +76,41 @@ class AXPOpenEntityDetailsCommand {
|
|
|
76
76
|
async execute(input) {
|
|
77
77
|
const { entity, data } = input;
|
|
78
78
|
if (!entity) {
|
|
79
|
-
|
|
79
|
+
return {
|
|
80
|
+
success: false,
|
|
81
|
+
message: {
|
|
82
|
+
text: 'Entity name is required for opening details view'
|
|
83
|
+
}
|
|
84
|
+
};
|
|
80
85
|
}
|
|
81
86
|
if (!data?.id) {
|
|
82
|
-
|
|
87
|
+
return {
|
|
88
|
+
success: false,
|
|
89
|
+
message: {
|
|
90
|
+
text: 'Entity ID is required for opening details view'
|
|
91
|
+
}
|
|
92
|
+
};
|
|
83
93
|
}
|
|
84
94
|
const [module, entityName] = entity.split('.');
|
|
85
95
|
if (!module || !entityName) {
|
|
86
|
-
|
|
96
|
+
return {
|
|
97
|
+
success: false,
|
|
98
|
+
message: {
|
|
99
|
+
text: 'Entity must be in format "ModuleName.EntityName"'
|
|
100
|
+
}
|
|
101
|
+
};
|
|
87
102
|
}
|
|
88
103
|
const url = `/${this.sessionService.application?.name}/m/${module}/e/${entityName}/${data.id}/new-view`;
|
|
89
104
|
// Navigate to the entity details page
|
|
90
105
|
this.router.navigate([url]);
|
|
91
|
-
return {
|
|
106
|
+
return {
|
|
107
|
+
success: true,
|
|
108
|
+
};
|
|
92
109
|
}
|
|
93
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
94
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
110
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPOpenEntityDetailsCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
111
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPOpenEntityDetailsCommand, providedIn: 'root' }); }
|
|
95
112
|
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPOpenEntityDetailsCommand, decorators: [{
|
|
97
114
|
type: Injectable,
|
|
98
115
|
args: [{ providedIn: 'root' }]
|
|
99
116
|
}] });
|
|
@@ -368,10 +385,10 @@ class AXPEntityDetailPopoverComponent {
|
|
|
368
385
|
.slice(0, 7); // Limit to 7 most important fields
|
|
369
386
|
return importantProperties;
|
|
370
387
|
}
|
|
371
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
372
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
388
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
389
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", 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 } }, 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 </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 [color]=\"'primary'\" [look]=\"'solid'\" text=\"Open Details\" (click)=\"navigateToDetails()\"> </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", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "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"], 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 }); }
|
|
373
390
|
}
|
|
374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailPopoverComponent, decorators: [{
|
|
375
392
|
type: Component,
|
|
376
393
|
args: [{ selector: 'axp-entity-detail-popover', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
377
394
|
CommonModule,
|
|
@@ -436,10 +453,10 @@ class AXPEntityDetailPopoverService {
|
|
|
436
453
|
get isActive() {
|
|
437
454
|
return this.activePopoverRef !== null;
|
|
438
455
|
}
|
|
439
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
440
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
456
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailPopoverService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
457
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailPopoverService, providedIn: 'root' }); }
|
|
441
458
|
}
|
|
442
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailPopoverService, decorators: [{
|
|
443
460
|
type: Injectable,
|
|
444
461
|
args: [{
|
|
445
462
|
providedIn: 'root'
|
|
@@ -456,10 +473,10 @@ class AXPDataSeederService {
|
|
|
456
473
|
await loader?.seed();
|
|
457
474
|
}
|
|
458
475
|
}
|
|
459
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
460
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
476
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataSeederService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
477
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataSeederService, providedIn: 'root' }); }
|
|
461
478
|
}
|
|
462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataSeederService, decorators: [{
|
|
463
480
|
type: Injectable,
|
|
464
481
|
args: [{ providedIn: 'root' }]
|
|
465
482
|
}] });
|
|
@@ -484,10 +501,10 @@ class AXPEntityResolver {
|
|
|
484
501
|
}
|
|
485
502
|
return null;
|
|
486
503
|
}
|
|
487
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
488
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
504
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
505
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityResolver, providedIn: 'root' }); }
|
|
489
506
|
}
|
|
490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityResolver, decorators: [{
|
|
491
508
|
type: Injectable,
|
|
492
509
|
args: [{ providedIn: 'root' }]
|
|
493
510
|
}] });
|
|
@@ -507,6 +524,7 @@ class AXPEntityCommandTriggerViewModel {
|
|
|
507
524
|
this.disabled = action.disabled ?? false;
|
|
508
525
|
this.default = action.default ?? false;
|
|
509
526
|
this.scope = action.scope;
|
|
527
|
+
this.order = action.order ?? 0;
|
|
510
528
|
}
|
|
511
529
|
}
|
|
512
530
|
class AXPEntityListViewColumnViewModel {
|
|
@@ -868,10 +886,10 @@ class AXPEntityEventDispatcherService {
|
|
|
868
886
|
async dispatchDeleted(entityName, data) {
|
|
869
887
|
await this.dispatchEntityEvent('deleted', entityName, data);
|
|
870
888
|
}
|
|
871
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
872
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
889
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityEventDispatcherService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
890
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityEventDispatcherService, providedIn: 'root' }); }
|
|
873
891
|
}
|
|
874
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
892
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityEventDispatcherService, decorators: [{
|
|
875
893
|
type: Injectable,
|
|
876
894
|
args: [{
|
|
877
895
|
providedIn: 'root',
|
|
@@ -1120,7 +1138,9 @@ class AXPEntityMiddleware {
|
|
|
1120
1138
|
this.providedModifiers = inject(AXP_ENTITY_MODIFIER, { optional: true }) || [];
|
|
1121
1139
|
this.providedActionPlugins = inject(AXP_ENTITY_ACTION_PLUGIN, { optional: true }) || [];
|
|
1122
1140
|
this.injector = inject(Injector);
|
|
1141
|
+
console.log('[AXPEntityMiddleware] Registering', this.providedModifiers.length, 'modifiers');
|
|
1123
1142
|
for (const { entityName, modifier } of this.providedModifiers) {
|
|
1143
|
+
console.log('[AXPEntityMiddleware] Registering modifier for pattern:', entityName);
|
|
1124
1144
|
this.register(entityName, modifier);
|
|
1125
1145
|
}
|
|
1126
1146
|
}
|
|
@@ -1159,13 +1179,26 @@ class AXPEntityMiddleware {
|
|
|
1159
1179
|
}
|
|
1160
1180
|
}
|
|
1161
1181
|
// Then apply entity-specific modifiers
|
|
1182
|
+
// Collect all matching modifiers
|
|
1183
|
+
const modifiers = [];
|
|
1162
1184
|
// Exact match first
|
|
1163
1185
|
const exact = this.exactModifiers.get(entity.name);
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1186
|
+
if (exact) {
|
|
1187
|
+
console.log('[AXPEntityMiddleware] Found exact modifier for:', entity.name);
|
|
1188
|
+
modifiers.push(exact);
|
|
1189
|
+
}
|
|
1190
|
+
// Then all pattern matches
|
|
1191
|
+
for (const { pattern, modifier } of this.patternModifiers) {
|
|
1192
|
+
if (pattern.test(entity.name)) {
|
|
1193
|
+
console.log('[AXPEntityMiddleware] Pattern matched for', entity.name, '- pattern:', pattern);
|
|
1194
|
+
modifiers.push(modifier);
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
console.log('[AXPEntityMiddleware] Applying', modifiers.length, 'modifiers to entity:', entity.name);
|
|
1198
|
+
// Apply all matching modifiers in order
|
|
1199
|
+
for (const modifier of modifiers) {
|
|
1200
|
+
modifier(context);
|
|
1167
1201
|
}
|
|
1168
|
-
modifier(context);
|
|
1169
1202
|
return context.toEntity();
|
|
1170
1203
|
}
|
|
1171
1204
|
//#endregion
|
|
@@ -1179,10 +1212,10 @@ class AXPEntityMiddleware {
|
|
|
1179
1212
|
const flags = rx.flags.replace('g', '');
|
|
1180
1213
|
return new RegExp(rx.source, flags);
|
|
1181
1214
|
}
|
|
1182
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1183
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1215
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityMiddleware, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1216
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityMiddleware, providedIn: 'root' }); }
|
|
1184
1217
|
}
|
|
1185
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1218
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityMiddleware, decorators: [{
|
|
1186
1219
|
type: Injectable,
|
|
1187
1220
|
args: [{ providedIn: 'root' }]
|
|
1188
1221
|
}], ctorParameters: () => [] });
|
|
@@ -1334,10 +1367,10 @@ class AXPEntityDefinitionRegistryService {
|
|
|
1334
1367
|
createEntityKey(moduleName, entityName) {
|
|
1335
1368
|
return `${moduleName}.${entityName}`;
|
|
1336
1369
|
}
|
|
1337
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1338
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1370
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDefinitionRegistryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1371
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDefinitionRegistryService, providedIn: 'root' }); }
|
|
1339
1372
|
}
|
|
1340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDefinitionRegistryService, decorators: [{
|
|
1341
1374
|
type: Injectable,
|
|
1342
1375
|
args: [{
|
|
1343
1376
|
providedIn: 'root',
|
|
@@ -1498,10 +1531,10 @@ class AXPEntityCreateViewModelFactory {
|
|
|
1498
1531
|
this.layout.setNavigationLoading(false);
|
|
1499
1532
|
return new AXPEntityMasterCreateViewModel(this.injector, config, initialData, options);
|
|
1500
1533
|
}
|
|
1501
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
1502
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
1534
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityCreateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1535
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityCreateViewModelFactory, providedIn: 'root' }); }
|
|
1503
1536
|
}
|
|
1504
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
1537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityCreateViewModelFactory, decorators: [{
|
|
1505
1538
|
type: Injectable,
|
|
1506
1539
|
args: [{ providedIn: 'root' }]
|
|
1507
1540
|
}] });
|
|
@@ -1605,7 +1638,9 @@ class AXPEntityMasterListViewModel {
|
|
|
1605
1638
|
//****************** Actions ******************//
|
|
1606
1639
|
this.allActions = computed(() => {
|
|
1607
1640
|
const list = this.entityDef.interfaces?.master?.list?.actions ?? [];
|
|
1608
|
-
|
|
1641
|
+
const actions = list.map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? [];
|
|
1642
|
+
const orderedActions = orderBy(actions, 'order', 'asc');
|
|
1643
|
+
return orderedActions;
|
|
1609
1644
|
}, ...(ngDevMode ? [{ debugName: "allActions" }] : []));
|
|
1610
1645
|
this.selectedScopeActionsCount = computed(() => {
|
|
1611
1646
|
return this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Selected).length;
|
|
@@ -2018,20 +2053,33 @@ class AXPEntityMasterListViewModel {
|
|
|
2018
2053
|
});
|
|
2019
2054
|
}
|
|
2020
2055
|
else {
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2056
|
+
const commandOptions = merge(options, {
|
|
2057
|
+
__context__: {
|
|
2058
|
+
data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
|
|
2059
|
+
entity: getEntityInfo(this.entityDef).source,
|
|
2060
|
+
entityInfo: {
|
|
2061
|
+
name: this.entityDef.name,
|
|
2062
|
+
module: this.entityDef.module,
|
|
2063
|
+
title: this.entityDef.title,
|
|
2064
|
+
parentKey: this.entityDef.parentKey,
|
|
2065
|
+
},
|
|
2030
2066
|
},
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2067
|
+
__metadata__: action?.metadata,
|
|
2068
|
+
}, options);
|
|
2069
|
+
this.commandService.execute(command, commandOptions);
|
|
2070
|
+
// this.commandService.execute(command, {
|
|
2071
|
+
// entity: getEntityInfo(this.entityDef).source,
|
|
2072
|
+
// entityInfo: {
|
|
2073
|
+
// name: this.entityDef.name,
|
|
2074
|
+
// module: this.entityDef.module,
|
|
2075
|
+
// title: this.entityDef.title,
|
|
2076
|
+
// parentKey: this.entityDef.parentKey,
|
|
2077
|
+
// source: `${this.entityDef.module}.${this.entityDef.name}`,
|
|
2078
|
+
// },
|
|
2079
|
+
// data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
|
|
2080
|
+
// options: options,
|
|
2081
|
+
// metadata: action?.metadata,
|
|
2082
|
+
// });
|
|
2035
2083
|
}
|
|
2036
2084
|
}
|
|
2037
2085
|
async execute(command) {
|
|
@@ -2066,10 +2114,10 @@ class AXPEntityListViewModelFactory {
|
|
|
2066
2114
|
this.layout.setNavigationLoading(false);
|
|
2067
2115
|
return new AXPEntityMasterListViewModel(this.injector, config);
|
|
2068
2116
|
}
|
|
2069
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2070
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2117
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2118
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListViewModelFactory, providedIn: 'root' }); }
|
|
2071
2119
|
}
|
|
2072
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2120
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListViewModelFactory, decorators: [{
|
|
2073
2121
|
type: Injectable,
|
|
2074
2122
|
args: [{ providedIn: 'root' }]
|
|
2075
2123
|
}] });
|
|
@@ -2087,10 +2135,10 @@ class AXPEntityService {
|
|
|
2087
2135
|
createPath(module, entity, path = 'list') {
|
|
2088
2136
|
return `/${this.sessionService.application?.name}/m/${module}/e/${entity}/${path}`;
|
|
2089
2137
|
}
|
|
2090
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2091
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2139
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityService, providedIn: 'root' }); }
|
|
2092
2140
|
}
|
|
2093
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityService, decorators: [{
|
|
2094
2142
|
type: Injectable,
|
|
2095
2143
|
args: [{ providedIn: 'root' }]
|
|
2096
2144
|
}] });
|
|
@@ -2243,10 +2291,10 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
|
|
|
2243
2291
|
}
|
|
2244
2292
|
}
|
|
2245
2293
|
}
|
|
2246
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2247
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2294
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityPerformDeleteAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2295
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityPerformDeleteAction }); }
|
|
2248
2296
|
}
|
|
2249
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2297
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityPerformDeleteAction, decorators: [{
|
|
2250
2298
|
type: Injectable
|
|
2251
2299
|
}] });
|
|
2252
2300
|
const AXPDeleteEntityWorkflow = {
|
|
@@ -2425,10 +2473,10 @@ class AXPEntityMasterUpdateViewModelFactory {
|
|
|
2425
2473
|
this.layout.setNavigationLoading(false);
|
|
2426
2474
|
return Promise.reject('cannot fetch ');
|
|
2427
2475
|
}
|
|
2428
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2429
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2476
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2477
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, providedIn: 'root' }); }
|
|
2430
2478
|
}
|
|
2431
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2479
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityMasterUpdateViewModelFactory, decorators: [{
|
|
2432
2480
|
type: Injectable,
|
|
2433
2481
|
args: [{ providedIn: 'root' }]
|
|
2434
2482
|
}] });
|
|
@@ -2471,10 +2519,10 @@ class AXPEntityModifySectionPopupAction extends AXPWorkflowAction {
|
|
|
2471
2519
|
context.setVariable('data', cloneDeep(popup.data.context));
|
|
2472
2520
|
}
|
|
2473
2521
|
}
|
|
2474
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2475
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2522
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModifySectionPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2523
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModifySectionPopupAction }); }
|
|
2476
2524
|
}
|
|
2477
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModifySectionPopupAction, decorators: [{
|
|
2478
2526
|
type: Injectable
|
|
2479
2527
|
}] });
|
|
2480
2528
|
class AXPEntityModifyConfirmedAction extends AXPWorkflowAction {
|
|
@@ -2489,10 +2537,10 @@ class AXPEntityModifyConfirmedAction extends AXPWorkflowAction {
|
|
|
2489
2537
|
},
|
|
2490
2538
|
}));
|
|
2491
2539
|
}
|
|
2492
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2493
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2540
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModifyConfirmedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2541
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModifyConfirmedAction }); }
|
|
2494
2542
|
}
|
|
2495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModifyConfirmedAction, decorators: [{
|
|
2496
2544
|
type: Injectable
|
|
2497
2545
|
}] });
|
|
2498
2546
|
const AXPModifyEntitySectionWorkflow = {
|
|
@@ -2513,8 +2561,8 @@ const AXPModifyEntitySectionWorkflow = {
|
|
|
2513
2561
|
action: 'AXPToastAction',
|
|
2514
2562
|
input: {
|
|
2515
2563
|
color: 'success',
|
|
2516
|
-
title: 'workflow.entity-modified-title',
|
|
2517
|
-
content: 'workflow.entity-modified-body',
|
|
2564
|
+
title: '@general:workflow.entity-modified-title',
|
|
2565
|
+
content: '@general:workflow.entity-modified-body',
|
|
2518
2566
|
},
|
|
2519
2567
|
nextSteps: [
|
|
2520
2568
|
{
|
|
@@ -2785,10 +2833,10 @@ class AXPEntityDetailViewModelFactory {
|
|
|
2785
2833
|
this.layout.setNavigationLoading(false);
|
|
2786
2834
|
return Promise.reject('cannot fetch ');
|
|
2787
2835
|
}
|
|
2788
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
2789
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
2836
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2837
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailViewModelFactory, providedIn: 'root' }); }
|
|
2790
2838
|
}
|
|
2791
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
2839
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailViewModelFactory, decorators: [{
|
|
2792
2840
|
type: Injectable,
|
|
2793
2841
|
args: [{ providedIn: 'root' }]
|
|
2794
2842
|
}] });
|
|
@@ -3001,7 +3049,6 @@ class AXPLayoutAdapterBuilder {
|
|
|
3001
3049
|
}
|
|
3002
3050
|
createExecuteFunction() {
|
|
3003
3051
|
return (command, context) => {
|
|
3004
|
-
console.log('layout execute', command, context);
|
|
3005
3052
|
return Promise.resolve({ success: true });
|
|
3006
3053
|
};
|
|
3007
3054
|
}
|
|
@@ -3009,14 +3056,14 @@ class AXPLayoutAdapterBuilder {
|
|
|
3009
3056
|
return async () => {
|
|
3010
3057
|
return {
|
|
3011
3058
|
success: true,
|
|
3012
|
-
|
|
3059
|
+
data: this.rootContext,
|
|
3013
3060
|
};
|
|
3014
3061
|
};
|
|
3015
3062
|
}
|
|
3016
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3017
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
3063
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLayoutAdapterBuilder, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3064
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLayoutAdapterBuilder, providedIn: 'root' }); }
|
|
3018
3065
|
}
|
|
3019
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3066
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLayoutAdapterBuilder, decorators: [{
|
|
3020
3067
|
type: Injectable,
|
|
3021
3068
|
args: [{
|
|
3022
3069
|
providedIn: 'root',
|
|
@@ -3239,7 +3286,7 @@ class AXPPageDetailsConverter extends AXPBaseRelatedEntityConverter {
|
|
|
3239
3286
|
const evaluatedConditionValues = await Promise.all(conditionValues.map((c) => evaluateExpressions(c)));
|
|
3240
3287
|
const id = evaluatedConditionValues[0];
|
|
3241
3288
|
const result = await fn(id);
|
|
3242
|
-
return { success: true, result };
|
|
3289
|
+
return { success: true, data: result };
|
|
3243
3290
|
};
|
|
3244
3291
|
}
|
|
3245
3292
|
createExecuteFunction(entityDef) {
|
|
@@ -3247,12 +3294,15 @@ class AXPPageDetailsConverter extends AXPBaseRelatedEntityConverter {
|
|
|
3247
3294
|
if (e.name === 'update-entity') {
|
|
3248
3295
|
const fn = entityDef?.commands?.update?.execute;
|
|
3249
3296
|
const result = await fn(context);
|
|
3250
|
-
return { success: true, result };
|
|
3297
|
+
return { success: true, data: result };
|
|
3251
3298
|
}
|
|
3252
3299
|
else {
|
|
3253
3300
|
return {
|
|
3254
3301
|
success: false,
|
|
3255
|
-
|
|
3302
|
+
message: {
|
|
3303
|
+
code: 'invalid_command',
|
|
3304
|
+
text: 'Invalid command'
|
|
3305
|
+
}
|
|
3256
3306
|
};
|
|
3257
3307
|
}
|
|
3258
3308
|
};
|
|
@@ -3356,11 +3406,10 @@ class AXPPageListConverter extends AXPBaseRelatedEntityConverter {
|
|
|
3356
3406
|
console.warn(`Action ${commandName} not found in entity definition`);
|
|
3357
3407
|
return {
|
|
3358
3408
|
success: false,
|
|
3359
|
-
|
|
3409
|
+
message: {
|
|
3360
3410
|
code: 'ACTION_NOT_FOUND',
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
},
|
|
3411
|
+
text: `Action ${commandName} not found`,
|
|
3412
|
+
}
|
|
3364
3413
|
};
|
|
3365
3414
|
}
|
|
3366
3415
|
await context.workflowService.execute(commandName, {
|
|
@@ -3384,10 +3433,9 @@ class AXPPageListConverter extends AXPBaseRelatedEntityConverter {
|
|
|
3384
3433
|
console.error('Error executing command:', error);
|
|
3385
3434
|
return {
|
|
3386
3435
|
success: false,
|
|
3387
|
-
|
|
3436
|
+
message: {
|
|
3388
3437
|
code: 'EXECUTION_ERROR',
|
|
3389
|
-
|
|
3390
|
-
details: error,
|
|
3438
|
+
text: error instanceof Error ? error.message : 'Unknown error occurred',
|
|
3391
3439
|
},
|
|
3392
3440
|
};
|
|
3393
3441
|
}
|
|
@@ -3545,10 +3593,10 @@ class AXPRelatedEntityConverterFactory {
|
|
|
3545
3593
|
createTabListConverter() {
|
|
3546
3594
|
return this.createConverter('tab-list');
|
|
3547
3595
|
}
|
|
3548
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
3549
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
3596
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPRelatedEntityConverterFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3597
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPRelatedEntityConverterFactory, providedIn: 'root' }); }
|
|
3550
3598
|
}
|
|
3551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
3599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPRelatedEntityConverterFactory, decorators: [{
|
|
3552
3600
|
type: Injectable,
|
|
3553
3601
|
args: [{
|
|
3554
3602
|
providedIn: 'root',
|
|
@@ -3577,7 +3625,7 @@ class AXPMainEntityContentBuilder {
|
|
|
3577
3625
|
? this.createExpressionEvaluator(rootContext, dependencies.expressionEvaluator)
|
|
3578
3626
|
: null;
|
|
3579
3627
|
// Prepare merge-details structures (sections and properties per section)
|
|
3580
|
-
let evaluatedRelatedEntities =
|
|
3628
|
+
let evaluatedRelatedEntities = [...(entity?.relatedEntities ?? [])];
|
|
3581
3629
|
if (evaluatedRelatedEntities && evaluateExpressions) {
|
|
3582
3630
|
// Only evaluate the 'hidden' property for each related entity
|
|
3583
3631
|
evaluatedRelatedEntities = await Promise.all((entity.relatedEntities ?? []).map(async (re) => {
|
|
@@ -3657,6 +3705,7 @@ class AXPMainEntityContentBuilder {
|
|
|
3657
3705
|
return;
|
|
3658
3706
|
}
|
|
3659
3707
|
const relSingle = entityDef?.interfaces?.master?.single;
|
|
3708
|
+
const relUpdate = entityDef?.interfaces?.master?.update;
|
|
3660
3709
|
const relGroups = entityDef?.groups ?? [];
|
|
3661
3710
|
// Merge related groups into allGroups (avoid duplicates by id)
|
|
3662
3711
|
for (const rg of relGroups) {
|
|
@@ -3705,6 +3754,7 @@ class AXPMainEntityContentBuilder {
|
|
|
3705
3754
|
const propClone = { ...p };
|
|
3706
3755
|
propClone.__dataPath = relatedEntity?.persistence?.dataPath || entityName;
|
|
3707
3756
|
propClone.__layout = relSingle?.properties?.find((x) => x.name === p.name)?.layout;
|
|
3757
|
+
propClone.__isEditable = !!relUpdate?.properties?.some((x) => x.name === p.name);
|
|
3708
3758
|
acc[p.groupId].push(propClone);
|
|
3709
3759
|
return acc;
|
|
3710
3760
|
}, {});
|
|
@@ -3839,7 +3889,7 @@ class AXPMainEntityContentBuilder {
|
|
|
3839
3889
|
const tabListTabs = await this.buildTabLists(tabListEntities ?? [], rootContext, dependencies);
|
|
3840
3890
|
// Build actions from single interface
|
|
3841
3891
|
const actions = this.buildActions(entity, singleInterface);
|
|
3842
|
-
console.log({ rootContext, dependencies });
|
|
3892
|
+
//console.log({ rootContext, dependencies });
|
|
3843
3893
|
return {
|
|
3844
3894
|
id: entity?.name ?? '',
|
|
3845
3895
|
// title: singleInterface?.title ?? entity?.formats.individual ?? '',
|
|
@@ -3872,12 +3922,12 @@ class AXPMainEntityContentBuilder {
|
|
|
3872
3922
|
if (params?.forceRefresh) {
|
|
3873
3923
|
return {
|
|
3874
3924
|
success: true,
|
|
3875
|
-
|
|
3925
|
+
data: await dependencies.reloadRootContext(),
|
|
3876
3926
|
};
|
|
3877
3927
|
}
|
|
3878
3928
|
return {
|
|
3879
3929
|
success: true,
|
|
3880
|
-
|
|
3930
|
+
data: rootContext,
|
|
3881
3931
|
};
|
|
3882
3932
|
},
|
|
3883
3933
|
execute: async (e, context) => {
|
|
@@ -3887,7 +3937,7 @@ class AXPMainEntityContentBuilder {
|
|
|
3887
3937
|
const result = await fn(context);
|
|
3888
3938
|
return {
|
|
3889
3939
|
success: true,
|
|
3890
|
-
|
|
3940
|
+
data: result,
|
|
3891
3941
|
};
|
|
3892
3942
|
}
|
|
3893
3943
|
else {
|
|
@@ -3930,9 +3980,9 @@ class AXPMainEntityContentBuilder {
|
|
|
3930
3980
|
}
|
|
3931
3981
|
return {
|
|
3932
3982
|
success: false,
|
|
3933
|
-
|
|
3983
|
+
message: {
|
|
3934
3984
|
code: 'invalid_command',
|
|
3935
|
-
|
|
3985
|
+
text: 'Invalid command',
|
|
3936
3986
|
},
|
|
3937
3987
|
};
|
|
3938
3988
|
}
|
|
@@ -3940,9 +3990,8 @@ class AXPMainEntityContentBuilder {
|
|
|
3940
3990
|
catch (error) {
|
|
3941
3991
|
return {
|
|
3942
3992
|
success: false,
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
message: error,
|
|
3993
|
+
message: {
|
|
3994
|
+
text: error,
|
|
3946
3995
|
},
|
|
3947
3996
|
};
|
|
3948
3997
|
}
|
|
@@ -3991,12 +4040,19 @@ class AXPMainEntityContentBuilder {
|
|
|
3991
4040
|
},
|
|
3992
4041
|
},
|
|
3993
4042
|
children: (await getVisiblePropertyByGroupId(s.id))
|
|
3994
|
-
.filter((p) =>
|
|
4043
|
+
.filter((p) => {
|
|
4044
|
+
const isFromRelated = p.__dataPath != null;
|
|
4045
|
+
const visibleInMain = visiblePropertyNames.has(p.name);
|
|
4046
|
+
const visibleInRelated = isFromRelated ? !!p.__layout : false;
|
|
4047
|
+
return visibleInMain || visibleInRelated;
|
|
4048
|
+
})
|
|
3995
4049
|
.map((p) => {
|
|
3996
4050
|
const layout = getPropertyLayout(p.name, p);
|
|
3997
4051
|
const prefixed = p.__dataPath ? `${p.__dataPath}.${p.name}` : p.name;
|
|
3998
4052
|
// Check if property is editable (exists in update interface)
|
|
3999
|
-
const isEditable =
|
|
4053
|
+
const isEditable = p.__isEditable != null
|
|
4054
|
+
? p.__isEditable
|
|
4055
|
+
: editablePropertyNames.has(p.name);
|
|
4000
4056
|
// Check if property has its own disabled option
|
|
4001
4057
|
const hasOwnDisabled = p.schema.interface?.options?.disabled !== undefined;
|
|
4002
4058
|
return {
|
|
@@ -4113,6 +4169,7 @@ class AXPMainEntityContentBuilder {
|
|
|
4113
4169
|
disabled: disabled || false,
|
|
4114
4170
|
zone: 'header',
|
|
4115
4171
|
priority: action.priority,
|
|
4172
|
+
scope: action.scope,
|
|
4116
4173
|
command: {
|
|
4117
4174
|
name: action.name,
|
|
4118
4175
|
options: options,
|
|
@@ -4151,10 +4208,10 @@ class AXPMainEntityContentBuilder {
|
|
|
4151
4208
|
}
|
|
4152
4209
|
return tabs;
|
|
4153
4210
|
}
|
|
4154
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4155
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
4211
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMainEntityContentBuilder, deps: [{ token: AXPRelatedEntityConverterFactory }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4212
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMainEntityContentBuilder, providedIn: 'root' }); }
|
|
4156
4213
|
}
|
|
4157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4214
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMainEntityContentBuilder, decorators: [{
|
|
4158
4215
|
type: Injectable,
|
|
4159
4216
|
args: [{
|
|
4160
4217
|
providedIn: 'root',
|
|
@@ -4295,10 +4352,10 @@ class AXPLayoutAdapterFactory {
|
|
|
4295
4352
|
const title = await dependencies.expressionEvaluator.evaluate(entity.interfaces?.master?.single?.title, rootContext);
|
|
4296
4353
|
return title;
|
|
4297
4354
|
}
|
|
4298
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4299
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
4355
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLayoutAdapterFactory, deps: [{ token: AXPRelatedEntityConverterFactory }, { token: AXPMainEntityContentBuilder }, { token: AXPLayoutAdapterBuilder }, { token: i4$1.AXPFilterOperatorMiddlewareService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4356
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLayoutAdapterFactory, providedIn: 'root' }); }
|
|
4300
4357
|
}
|
|
4301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLayoutAdapterFactory, decorators: [{
|
|
4302
4359
|
type: Injectable,
|
|
4303
4360
|
args: [{
|
|
4304
4361
|
providedIn: 'root',
|
|
@@ -4319,6 +4376,29 @@ const AXPLayoutDetailsViewRouteResolver = async (route, state, entityResolver =
|
|
|
4319
4376
|
return await layoutAdapterFactory.createDetailsViewAdapter(entityResolver, moduleName, entityName, id, dependencies);
|
|
4320
4377
|
};
|
|
4321
4378
|
|
|
4379
|
+
const eventDispatchMiddleware = {
|
|
4380
|
+
target: { ops: ['create', 'update', 'delete'], order: 90 },
|
|
4381
|
+
execute: async (ctx, next) => {
|
|
4382
|
+
const dispatcher = inject(AXPEntityEventDispatcherService);
|
|
4383
|
+
await next();
|
|
4384
|
+
if (ctx.op === 'create') {
|
|
4385
|
+
const createdData = ctx.result ? { ...ctx.data, id: ctx.result } : ctx.data;
|
|
4386
|
+
await dispatcher.dispatchInserted(ctx.entityName, { refType: ctx.entityName, data: createdData });
|
|
4387
|
+
}
|
|
4388
|
+
else if (ctx.op === 'update') {
|
|
4389
|
+
await dispatcher.dispatchUpdated(ctx.entityName, {
|
|
4390
|
+
refType: ctx.entityName,
|
|
4391
|
+
data: ctx.result,
|
|
4392
|
+
changes: ctx.locals.get('changes'),
|
|
4393
|
+
});
|
|
4394
|
+
}
|
|
4395
|
+
else if (ctx.op === 'delete') {
|
|
4396
|
+
// For delete, prefer previous entity if available
|
|
4397
|
+
await dispatcher.dispatchDeleted(ctx.entityName, { refType: ctx.entityName, data: ctx.result ?? ctx.previous });
|
|
4398
|
+
}
|
|
4399
|
+
},
|
|
4400
|
+
};
|
|
4401
|
+
|
|
4322
4402
|
/**
|
|
4323
4403
|
* Default widths for common text columns
|
|
4324
4404
|
*/
|
|
@@ -4370,6 +4450,200 @@ const createColumnWidthMiddlewareProvider = (widths, entityName = '*') => ({
|
|
|
4370
4450
|
const columnWidthMiddlewareProvider = createColumnWidthMiddlewareProvider(DEFAULT_COLUMN_WIDTHS);
|
|
4371
4451
|
//#endregion
|
|
4372
4452
|
|
|
4453
|
+
/**
|
|
4454
|
+
* Default order for common sections
|
|
4455
|
+
*/
|
|
4456
|
+
const DEFAULT_SECTION_ORDER = {
|
|
4457
|
+
'basic-info': 0,
|
|
4458
|
+
'classification': 20,
|
|
4459
|
+
'appearance': 30,
|
|
4460
|
+
'settings': 100,
|
|
4461
|
+
'advanced': 110,
|
|
4462
|
+
'metadata': 120,
|
|
4463
|
+
};
|
|
4464
|
+
/**
|
|
4465
|
+
* Default order for common properties
|
|
4466
|
+
* Format: 'sectionId.propertyName' for section-specific or 'propertyName' for any section
|
|
4467
|
+
*/
|
|
4468
|
+
const DEFAULT_PROPERTY_ORDER = {
|
|
4469
|
+
// Basic Info section
|
|
4470
|
+
'basic-info.code': 1,
|
|
4471
|
+
'basic-info.title': 2,
|
|
4472
|
+
'basic-info.name': 3,
|
|
4473
|
+
'basic-info.description': 10,
|
|
4474
|
+
'basic-info.note': 11,
|
|
4475
|
+
'basic-info.notes': 12,
|
|
4476
|
+
// Classification section
|
|
4477
|
+
'classification.categoryIds': 1,
|
|
4478
|
+
'classification.tags': 2,
|
|
4479
|
+
'classification.type': 3,
|
|
4480
|
+
// Appearance section
|
|
4481
|
+
'appearance.icon': 1,
|
|
4482
|
+
'appearance.color': 2,
|
|
4483
|
+
'appearance.avatar': 3,
|
|
4484
|
+
// Settings section
|
|
4485
|
+
'settings.isDefault': 90,
|
|
4486
|
+
'settings.isPrimary': 91,
|
|
4487
|
+
'settings.isDisabled': 95,
|
|
4488
|
+
'settings.isArchived': 96,
|
|
4489
|
+
// Generic fallbacks (apply to any section if not specified above)
|
|
4490
|
+
'code': 1,
|
|
4491
|
+
'title': 2,
|
|
4492
|
+
'name': 3,
|
|
4493
|
+
'icon': 5,
|
|
4494
|
+
'color': 6,
|
|
4495
|
+
'avatar': 7,
|
|
4496
|
+
'description': 10,
|
|
4497
|
+
'categoryIds': 15,
|
|
4498
|
+
'tags': 16,
|
|
4499
|
+
'isDefault': 90,
|
|
4500
|
+
'isPrimary': 91,
|
|
4501
|
+
'isDisabled': 95,
|
|
4502
|
+
'isArchived': 96,
|
|
4503
|
+
};
|
|
4504
|
+
/**
|
|
4505
|
+
* Get the property order for a given section and property name
|
|
4506
|
+
*/
|
|
4507
|
+
const getPropertyOrder = (sectionId, propertyName, orderConfig) => {
|
|
4508
|
+
// Try section-specific order first
|
|
4509
|
+
if (sectionId) {
|
|
4510
|
+
const sectionSpecific = orderConfig[`${sectionId}.${propertyName}`];
|
|
4511
|
+
if (sectionSpecific !== undefined) {
|
|
4512
|
+
return sectionSpecific;
|
|
4513
|
+
}
|
|
4514
|
+
}
|
|
4515
|
+
// Fall back to generic property order
|
|
4516
|
+
return orderConfig[propertyName];
|
|
4517
|
+
};
|
|
4518
|
+
/**
|
|
4519
|
+
* Factory to create a layout ordering middleware
|
|
4520
|
+
*/
|
|
4521
|
+
const layoutOrderingMiddlewareFactory = (config) => {
|
|
4522
|
+
console.log('[Layout Ordering Middleware] Factory called - creating middleware function');
|
|
4523
|
+
return (context) => {
|
|
4524
|
+
console.log('[Layout Ordering Middleware] ========================================');
|
|
4525
|
+
console.log('[Layout Ordering Middleware] MIDDLEWARE CALLED FOR ENTITY:', context.entity.name);
|
|
4526
|
+
console.log('[Layout Ordering Middleware] Entity module:', context.entity.module);
|
|
4527
|
+
console.log('[Layout Ordering Middleware] ========================================');
|
|
4528
|
+
const { sections: sectionOrder, properties: propertyOrder } = config;
|
|
4529
|
+
console.log('[Layout Ordering Middleware] Section order config:', sectionOrder);
|
|
4530
|
+
//#region ---- Order Sections ----
|
|
4531
|
+
const orderSections = (layout) => {
|
|
4532
|
+
if (!layout || !layout.sections) {
|
|
4533
|
+
console.log('[Layout Ordering Middleware] No sections found in layout');
|
|
4534
|
+
return;
|
|
4535
|
+
}
|
|
4536
|
+
console.log('[Layout Ordering Middleware] Before ordering sections:', layout.sections.map((s) => ({ id: s.id, order: s.order })));
|
|
4537
|
+
layout.sections.forEach((section) => {
|
|
4538
|
+
const defaultOrder = sectionOrder[section.id];
|
|
4539
|
+
if (defaultOrder !== undefined) {
|
|
4540
|
+
console.log(`[Layout Ordering Middleware] Setting section "${section.id}" order from ${section.order} to ${defaultOrder}`);
|
|
4541
|
+
// Always apply the default order if configured (force override)
|
|
4542
|
+
section.order = defaultOrder;
|
|
4543
|
+
}
|
|
4544
|
+
else {
|
|
4545
|
+
console.log(`[Layout Ordering Middleware] No default order for section "${section.id}"`);
|
|
4546
|
+
}
|
|
4547
|
+
});
|
|
4548
|
+
// Sort sections by order
|
|
4549
|
+
layout.sections.sort((a, b) => {
|
|
4550
|
+
const orderA = a.order ?? 999;
|
|
4551
|
+
const orderB = b.order ?? 999;
|
|
4552
|
+
return orderA - orderB;
|
|
4553
|
+
});
|
|
4554
|
+
console.log('[Layout Ordering Middleware] After ordering sections:', layout.sections.map((s) => ({ id: s.id, order: s.order })));
|
|
4555
|
+
};
|
|
4556
|
+
//#endregion
|
|
4557
|
+
//#region ---- Order Properties Within Sections ----
|
|
4558
|
+
const orderProperties = (layout) => {
|
|
4559
|
+
if (!layout || !layout.properties) {
|
|
4560
|
+
return;
|
|
4561
|
+
}
|
|
4562
|
+
layout.properties.forEach((prop) => {
|
|
4563
|
+
const groupId = context.properties.find(prop.name).get()?.groupId;
|
|
4564
|
+
const defaultOrder = getPropertyOrder(groupId, prop.name, propertyOrder);
|
|
4565
|
+
if (defaultOrder !== undefined) {
|
|
4566
|
+
// Ensure layout.positions exists
|
|
4567
|
+
if (!prop.layout) {
|
|
4568
|
+
prop.layout = {};
|
|
4569
|
+
}
|
|
4570
|
+
if (!prop.layout.positions) {
|
|
4571
|
+
prop.layout.positions = {};
|
|
4572
|
+
}
|
|
4573
|
+
if (!prop.layout.positions.lg) {
|
|
4574
|
+
prop.layout.positions.lg = {};
|
|
4575
|
+
}
|
|
4576
|
+
// Set order if not already defined
|
|
4577
|
+
if (prop.layout.positions.lg.order === undefined) {
|
|
4578
|
+
prop.layout.positions.lg.order = defaultOrder;
|
|
4579
|
+
}
|
|
4580
|
+
}
|
|
4581
|
+
});
|
|
4582
|
+
// Sort properties by order
|
|
4583
|
+
layout.properties.sort((a, b) => {
|
|
4584
|
+
const orderA = a.layout?.positions?.lg?.order ?? 999;
|
|
4585
|
+
const orderB = b.layout?.positions?.lg?.order ?? 999;
|
|
4586
|
+
return orderA - orderB;
|
|
4587
|
+
});
|
|
4588
|
+
};
|
|
4589
|
+
//#endregion
|
|
4590
|
+
//#region ---- Apply to All Layouts ----
|
|
4591
|
+
// Apply to create layout
|
|
4592
|
+
context.interfaces.master.create.update((create) => {
|
|
4593
|
+
console.log('[Layout Ordering Middleware] Processing CREATE layout');
|
|
4594
|
+
if (create) {
|
|
4595
|
+
orderSections(create);
|
|
4596
|
+
orderProperties(create);
|
|
4597
|
+
}
|
|
4598
|
+
return create ?? { sections: [], properties: [] };
|
|
4599
|
+
});
|
|
4600
|
+
// Apply to modify layout
|
|
4601
|
+
context.interfaces.master.modify.update((modify) => {
|
|
4602
|
+
console.log('[Layout Ordering Middleware] Processing MODIFY layout');
|
|
4603
|
+
if (modify) {
|
|
4604
|
+
orderSections(modify);
|
|
4605
|
+
orderProperties(modify);
|
|
4606
|
+
}
|
|
4607
|
+
return modify ?? { sections: [], properties: [] };
|
|
4608
|
+
});
|
|
4609
|
+
// Apply to single layout
|
|
4610
|
+
context.interfaces.master.single.update((single) => {
|
|
4611
|
+
console.log('[Layout Ordering Middleware] Processing SINGLE layout');
|
|
4612
|
+
if (single) {
|
|
4613
|
+
orderSections(single);
|
|
4614
|
+
orderProperties(single);
|
|
4615
|
+
}
|
|
4616
|
+
return single ?? { title: context.entity.title, sections: [], properties: [] };
|
|
4617
|
+
});
|
|
4618
|
+
//#endregion
|
|
4619
|
+
};
|
|
4620
|
+
};
|
|
4621
|
+
//#endregion
|
|
4622
|
+
//#region ---- Provider Registration ----
|
|
4623
|
+
/**
|
|
4624
|
+
* Helper to create a provider for the layout ordering middleware
|
|
4625
|
+
* By default it applies to all entities using the '*' pattern
|
|
4626
|
+
*/
|
|
4627
|
+
const createLayoutOrderingMiddlewareProvider = (config = {}, entityName = '*') => {
|
|
4628
|
+
console.log('[Layout Ordering Middleware] Creating provider for entityName pattern:', entityName);
|
|
4629
|
+
return {
|
|
4630
|
+
entityName,
|
|
4631
|
+
modifier: layoutOrderingMiddlewareFactory({
|
|
4632
|
+
sections: { ...DEFAULT_SECTION_ORDER, ...config.sections },
|
|
4633
|
+
properties: { ...DEFAULT_PROPERTY_ORDER, ...config.properties },
|
|
4634
|
+
}),
|
|
4635
|
+
};
|
|
4636
|
+
};
|
|
4637
|
+
/**
|
|
4638
|
+
* Default provider registered with the default configuration
|
|
4639
|
+
*/
|
|
4640
|
+
const layoutOrderingMiddlewareProvider = createLayoutOrderingMiddlewareProvider();
|
|
4641
|
+
console.log('[Layout Ordering Middleware] Provider initialized with config:', {
|
|
4642
|
+
sections: DEFAULT_SECTION_ORDER,
|
|
4643
|
+
propertyCount: Object.keys(DEFAULT_PROPERTY_ORDER).length
|
|
4644
|
+
});
|
|
4645
|
+
//#endregion
|
|
4646
|
+
|
|
4373
4647
|
class AXPEntityCommandSearchDefinitionProvider {
|
|
4374
4648
|
async provide(context) {
|
|
4375
4649
|
context.addDefinition('command', 'Commands', 'command', 'fa-solid fa-command', 1, {
|
|
@@ -4530,10 +4804,10 @@ class AXPMiddlewareEntityStorageService extends AXPEntityStorageService {
|
|
|
4530
4804
|
const ctx = this.createCtx('query', entityName, { request });
|
|
4531
4805
|
return this.run(ctx, () => this.backend.query(entityName, request));
|
|
4532
4806
|
}
|
|
4533
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4534
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
4807
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMiddlewareEntityStorageService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4808
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMiddlewareEntityStorageService }); }
|
|
4535
4809
|
}
|
|
4536
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
4810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMiddlewareEntityStorageService, decorators: [{
|
|
4537
4811
|
type: Injectable
|
|
4538
4812
|
}] });
|
|
4539
4813
|
|
|
@@ -4788,10 +5062,10 @@ class AXPEntityListTableService {
|
|
|
4788
5062
|
},
|
|
4789
5063
|
};
|
|
4790
5064
|
}
|
|
4791
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4792
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
5065
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5066
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListTableService }); }
|
|
4793
5067
|
}
|
|
4794
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5068
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListTableService, decorators: [{
|
|
4795
5069
|
type: Injectable
|
|
4796
5070
|
}] });
|
|
4797
5071
|
|
|
@@ -4885,10 +5159,10 @@ class AXPEntityListToolbarService {
|
|
|
4885
5159
|
};
|
|
4886
5160
|
});
|
|
4887
5161
|
}
|
|
4888
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
4889
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
5162
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5163
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListToolbarService }); }
|
|
4890
5164
|
}
|
|
4891
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5165
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListToolbarService, decorators: [{
|
|
4892
5166
|
type: Injectable
|
|
4893
5167
|
}] });
|
|
4894
5168
|
|
|
@@ -4999,6 +5273,9 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
4999
5273
|
this.context = {};
|
|
5000
5274
|
this.previousQueries = null;
|
|
5001
5275
|
}
|
|
5276
|
+
handleUnselectAll() {
|
|
5277
|
+
this.selectedItems.set([]);
|
|
5278
|
+
}
|
|
5002
5279
|
handleActionClick(item) {
|
|
5003
5280
|
if (item.command && (item.items?.length ?? 0) == 0) {
|
|
5004
5281
|
this.execute(item.command.name, null);
|
|
@@ -5186,8 +5463,8 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
5186
5463
|
this.destroyed.next();
|
|
5187
5464
|
this.destroyed.complete();
|
|
5188
5465
|
}
|
|
5189
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5190
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
5466
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5467
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPEntityListWidgetViewComponent, isStandalone: true, selector: "ng-component", host: { properties: { "class": "\"ax-h-full\"" } }, providers: [AXPEntityListTableService, AXPEntityListToolbarService], viewQueries: [{ propertyName: "list", first: true, predicate: ["list"], descendants: true, isSignal: true }, { propertyName: "allWidgets", predicate: AXPWidgetRendererDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
5191
5468
|
@if (showEntityActions()) {
|
|
5192
5469
|
<div class="ax-flex ax-gap-2 ax-justify-end ax-mb-4">
|
|
5193
5470
|
@for (action of primaryActions(); track $index) {
|
|
@@ -5277,6 +5554,17 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
5277
5554
|
[mode]="this.mode"
|
|
5278
5555
|
></ng-container>
|
|
5279
5556
|
}
|
|
5557
|
+
<!-- <div class="ax-flex ax-items-center ax-justify-between ax-gap-1 ">
|
|
5558
|
+
<span
|
|
5559
|
+
>{{ selectedItems().length }}
|
|
5560
|
+
<span>{{ '@general:terms.interface.items-selected' | translate | async }}</span>
|
|
5561
|
+
</span>
|
|
5562
|
+
<ax-button
|
|
5563
|
+
text="@general:terms.interface.unselect-all"
|
|
5564
|
+
class="ax-xs"
|
|
5565
|
+
(onClick)="handleUnselectAll()"
|
|
5566
|
+
></ax-button>
|
|
5567
|
+
</div> -->
|
|
5280
5568
|
@if (listNode() != null) {
|
|
5281
5569
|
<ng-container
|
|
5282
5570
|
#list
|
|
@@ -5288,9 +5576,9 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
5288
5576
|
></ng-container>
|
|
5289
5577
|
}
|
|
5290
5578
|
</div>
|
|
5291
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { 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: "component", type: i3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4$2.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5579
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { 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: "component", type: i3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4$2.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5292
5580
|
}
|
|
5293
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListWidgetViewComponent, decorators: [{
|
|
5294
5582
|
type: Component,
|
|
5295
5583
|
args: [{
|
|
5296
5584
|
template: `
|
|
@@ -5383,6 +5671,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
5383
5671
|
[mode]="this.mode"
|
|
5384
5672
|
></ng-container>
|
|
5385
5673
|
}
|
|
5674
|
+
<!-- <div class="ax-flex ax-items-center ax-justify-between ax-gap-1 ">
|
|
5675
|
+
<span
|
|
5676
|
+
>{{ selectedItems().length }}
|
|
5677
|
+
<span>{{ '@general:terms.interface.items-selected' | translate | async }}</span>
|
|
5678
|
+
</span>
|
|
5679
|
+
<ax-button
|
|
5680
|
+
text="@general:terms.interface.unselect-all"
|
|
5681
|
+
class="ax-xs"
|
|
5682
|
+
(onClick)="handleUnselectAll()"
|
|
5683
|
+
></ax-button>
|
|
5684
|
+
</div> -->
|
|
5386
5685
|
@if (listNode() != null) {
|
|
5387
5686
|
<ng-container
|
|
5388
5687
|
#list
|
|
@@ -5443,10 +5742,10 @@ const AXPEntityListWidget = {
|
|
|
5443
5742
|
};
|
|
5444
5743
|
|
|
5445
5744
|
class AXPEntityReferenceWidgetViewComponent extends AXPLayoutBaseWidgetComponent {
|
|
5446
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5447
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
5745
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5746
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5448
5747
|
}
|
|
5449
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5748
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, decorators: [{
|
|
5450
5749
|
type: Component,
|
|
5451
5750
|
args: [{
|
|
5452
5751
|
template: ``,
|
|
@@ -5475,10 +5774,10 @@ class AXPEntityReferenceWidgetEditComponent extends AXPLayoutBaseWidgetComponent
|
|
|
5475
5774
|
}, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
|
|
5476
5775
|
}
|
|
5477
5776
|
#efEntity;
|
|
5478
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5479
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
5777
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5778
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetEditComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5480
5779
|
}
|
|
5481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5780
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, decorators: [{
|
|
5482
5781
|
type: Component,
|
|
5483
5782
|
args: [{
|
|
5484
5783
|
template: ``,
|
|
@@ -5494,10 +5793,10 @@ var entityReferenceWidgetEdit_component = /*#__PURE__*/Object.freeze({
|
|
|
5494
5793
|
});
|
|
5495
5794
|
|
|
5496
5795
|
class AXPEntityReferenceWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
5497
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5498
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
5796
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5797
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue" }, usesInheritance: true, ngImport: i0, template: `{{rawValue}}`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5499
5798
|
}
|
|
5500
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5799
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, decorators: [{
|
|
5501
5800
|
type: Component,
|
|
5502
5801
|
args: [{
|
|
5503
5802
|
template: `{{rawValue}}`,
|
|
@@ -5514,10 +5813,10 @@ var entityReferenceWidgetColumn_component = /*#__PURE__*/Object.freeze({
|
|
|
5514
5813
|
});
|
|
5515
5814
|
|
|
5516
5815
|
class AXPEntityReferenceWidgetPrintComponent extends AXPLayoutBaseWidgetComponent {
|
|
5517
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5518
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
5816
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5817
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5519
5818
|
}
|
|
5520
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5819
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, decorators: [{
|
|
5521
5820
|
type: Component,
|
|
5522
5821
|
args: [{
|
|
5523
5822
|
template: ``,
|
|
@@ -5534,10 +5833,10 @@ var entityReferenceWidgetPrint_component = /*#__PURE__*/Object.freeze({
|
|
|
5534
5833
|
});
|
|
5535
5834
|
|
|
5536
5835
|
class AXPEntityReferenceWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {
|
|
5537
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5538
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
5836
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5837
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetDesignerComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5539
5838
|
}
|
|
5540
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
5839
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, decorators: [{
|
|
5541
5840
|
type: Component,
|
|
5542
5841
|
args: [{
|
|
5543
5842
|
template: ``,
|
|
@@ -5585,6 +5884,7 @@ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
5585
5884
|
super(...arguments);
|
|
5586
5885
|
//#region ---- Computed Properties ----
|
|
5587
5886
|
this.editorPath = `__${this.path}EditorValue`;
|
|
5887
|
+
this.lookupWidgetRenderer = viewChild('widgetRenderer', ...(ngDevMode ? [{ debugName: "lookupWidgetRenderer" }] : []));
|
|
5588
5888
|
this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
5589
5889
|
this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : []));
|
|
5590
5890
|
this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
|
|
@@ -5629,7 +5929,6 @@ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
5629
5929
|
this.lookupNode.set(node);
|
|
5630
5930
|
}, ...(ngDevMode ? [{ debugName: "#efUpdateLookupNode" }] : []));
|
|
5631
5931
|
this.#efUpdateValue = effect(() => {
|
|
5632
|
-
debugger;
|
|
5633
5932
|
const newValueObj = this.contextService.getValue(`${this.path}EditorObj`);
|
|
5634
5933
|
const prevValue = untracked(() => this.getValue()?.value);
|
|
5635
5934
|
const newValue = this.multiple()
|
|
@@ -5653,18 +5952,73 @@ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
5653
5952
|
displayText: displayText,
|
|
5654
5953
|
});
|
|
5655
5954
|
}, ...(ngDevMode ? [{ debugName: "#efUpdateValue" }] : []));
|
|
5955
|
+
//#endregion
|
|
5956
|
+
//#region ---- Focus Management ----
|
|
5957
|
+
this.shouldFocus = signal(false, ...(ngDevMode ? [{ debugName: "shouldFocus" }] : []));
|
|
5958
|
+
/**
|
|
5959
|
+
* Reactive effect to auto-focus the lookup editor when component is ready
|
|
5960
|
+
*/
|
|
5961
|
+
this.#focusEffect = effect(() => {
|
|
5962
|
+
const renderer = this.lookupWidgetRenderer();
|
|
5963
|
+
const shouldFocus = this.shouldFocus();
|
|
5964
|
+
// Early return if no renderer or shouldn't focus
|
|
5965
|
+
if (!renderer || !shouldFocus) {
|
|
5966
|
+
return;
|
|
5967
|
+
}
|
|
5968
|
+
// Listen to componentRefSignal reactively
|
|
5969
|
+
const componentRef = renderer.componentRefSignal();
|
|
5970
|
+
// When componentRef is set (not null), focus the widget
|
|
5971
|
+
if (componentRef) {
|
|
5972
|
+
const componentInstance = componentRef.instance;
|
|
5973
|
+
// Try to use the component's native focus method
|
|
5974
|
+
if (componentInstance && typeof componentInstance.focus === 'function') {
|
|
5975
|
+
try {
|
|
5976
|
+
componentInstance.focus();
|
|
5977
|
+
// Reset focus flag after successful focus
|
|
5978
|
+
this.shouldFocus.set(false);
|
|
5979
|
+
}
|
|
5980
|
+
catch (error) {
|
|
5981
|
+
// console.error('Error focusing lookup widget component:', error);
|
|
5982
|
+
}
|
|
5983
|
+
}
|
|
5984
|
+
}
|
|
5985
|
+
}, ...(ngDevMode ? [{ debugName: "#focusEffect" }] : []));
|
|
5656
5986
|
}
|
|
5657
5987
|
//#endregion
|
|
5658
5988
|
//#region ---- Effects ----
|
|
5659
5989
|
#efUpdateLookupNode;
|
|
5660
5990
|
#efUpdateValue;
|
|
5661
|
-
|
|
5662
|
-
|
|
5991
|
+
/**
|
|
5992
|
+
* Reactive effect to auto-focus the lookup editor when component is ready
|
|
5993
|
+
*/
|
|
5994
|
+
#focusEffect;
|
|
5995
|
+
/**
|
|
5996
|
+
* Public focus method to trigger focusing
|
|
5997
|
+
*/
|
|
5998
|
+
focus() {
|
|
5999
|
+
this.shouldFocus.set(true);
|
|
6000
|
+
}
|
|
6001
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
6002
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.12", type: AXPLookupFilterWidgetEditComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "lookupWidgetRenderer", first: true, predicate: ["widgetRenderer"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
6003
|
+
<ng-container
|
|
6004
|
+
axp-widget-renderer
|
|
6005
|
+
#widgetRenderer="widgetRenderer"
|
|
6006
|
+
[node]="lookupNode()"
|
|
6007
|
+
[mode]="'edit'"
|
|
6008
|
+
></ng-container>
|
|
6009
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5663
6010
|
}
|
|
5664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6011
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, decorators: [{
|
|
5665
6012
|
type: Component,
|
|
5666
6013
|
args: [{
|
|
5667
|
-
template: `
|
|
6014
|
+
template: `
|
|
6015
|
+
<ng-container
|
|
6016
|
+
axp-widget-renderer
|
|
6017
|
+
#widgetRenderer="widgetRenderer"
|
|
6018
|
+
[node]="lookupNode()"
|
|
6019
|
+
[mode]="'edit'"
|
|
6020
|
+
></ng-container>
|
|
6021
|
+
`,
|
|
5668
6022
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5669
6023
|
imports: [
|
|
5670
6024
|
FormsModule,
|
|
@@ -5678,7 +6032,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
5678
6032
|
AXPWidgetCoreModule,
|
|
5679
6033
|
],
|
|
5680
6034
|
}]
|
|
5681
|
-
}] });
|
|
6035
|
+
}], propDecorators: { lookupWidgetRenderer: [{ type: i0.ViewChild, args: ['widgetRenderer', { isSignal: true }] }] } });
|
|
5682
6036
|
|
|
5683
6037
|
var lookupFilterWidgetEdit_component = /*#__PURE__*/Object.freeze({
|
|
5684
6038
|
__proto__: null,
|
|
@@ -5710,6 +6064,10 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
5710
6064
|
this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
|
|
5711
6065
|
this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : []));
|
|
5712
6066
|
this.badgeClass = computed(() => this.options()['badgeClass'] ?? 'ax-accent1', ...(ngDevMode ? [{ debugName: "badgeClass" }] : []));
|
|
6067
|
+
this.displayFormat = computed(() => {
|
|
6068
|
+
const template = this.options()['displayFormat'];
|
|
6069
|
+
return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
|
|
6070
|
+
}, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
|
|
5713
6071
|
this.displayField = computed(() => {
|
|
5714
6072
|
return this.textField() ?? this.entityDef()?.formats.lookup ?? this.entityDef()?.properties.find((c) => c.name != 'id')?.name ?? 'title';
|
|
5715
6073
|
}, ...(ngDevMode ? [{ debugName: "displayField" }] : []));
|
|
@@ -5735,26 +6093,34 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
5735
6093
|
if (typeof item == 'object') {
|
|
5736
6094
|
return {
|
|
5737
6095
|
id: item[this.valueField()],
|
|
5738
|
-
text: this.
|
|
6096
|
+
text: this.getDisplayText(item),
|
|
5739
6097
|
};
|
|
5740
6098
|
}
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
this.loading.set(false);
|
|
5748
|
-
return {
|
|
5749
|
-
id: fetchedItem[this.valueField()],
|
|
5750
|
-
text: this.formatService.format(this.displayField(), 'string', fetchedItem),
|
|
5751
|
-
};
|
|
5752
|
-
}
|
|
6099
|
+
const def = this.entityDef();
|
|
6100
|
+
const byKey = def?.queries.byKey?.execute;
|
|
6101
|
+
if (byKey) {
|
|
6102
|
+
this.loading.set(true);
|
|
6103
|
+
const fetchedItem = await byKey(item);
|
|
6104
|
+
this.loading.set(false);
|
|
5753
6105
|
return {
|
|
5754
|
-
id:
|
|
5755
|
-
text:
|
|
6106
|
+
id: fetchedItem[this.valueField()],
|
|
6107
|
+
text: this.getDisplayText(fetchedItem),
|
|
5756
6108
|
};
|
|
5757
6109
|
}
|
|
6110
|
+
return {
|
|
6111
|
+
id: item,
|
|
6112
|
+
text: item,
|
|
6113
|
+
};
|
|
6114
|
+
}
|
|
6115
|
+
getDisplayText(item) {
|
|
6116
|
+
const template = this.displayFormat();
|
|
6117
|
+
if (template) {
|
|
6118
|
+
const formatted = this.formatService.format(template, 'string', item);
|
|
6119
|
+
if (formatted) {
|
|
6120
|
+
return formatted;
|
|
6121
|
+
}
|
|
6122
|
+
}
|
|
6123
|
+
return this.formatService.format(this.displayField(), 'string', item);
|
|
5758
6124
|
}
|
|
5759
6125
|
get __class() {
|
|
5760
6126
|
const cls = {};
|
|
@@ -5762,8 +6128,8 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
5762
6128
|
cls[`ax-gap-1`] = true;
|
|
5763
6129
|
return cls;
|
|
5764
6130
|
}
|
|
5765
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
5766
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
6131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
6132
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPLookupWidgetViewComponent, isStandalone: true, selector: "axp-lookup-widget-view", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
|
|
5767
6133
|
@if(loading())
|
|
5768
6134
|
{
|
|
5769
6135
|
<ax-loading></ax-loading>
|
|
@@ -5783,7 +6149,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
5783
6149
|
}
|
|
5784
6150
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i2$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5785
6151
|
}
|
|
5786
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetViewComponent, decorators: [{
|
|
5787
6153
|
type: Component,
|
|
5788
6154
|
args: [{
|
|
5789
6155
|
selector: 'axp-lookup-widget-view',
|
|
@@ -5868,6 +6234,7 @@ class AXPEntityDataSelectorService {
|
|
|
5868
6234
|
columns,
|
|
5869
6235
|
selectionMode: options.allowMultiple ? 'multiple' : 'single',
|
|
5870
6236
|
searchFields,
|
|
6237
|
+
initialSearchTerm: options.initialSearchTerm,
|
|
5871
6238
|
parentField: options.entity.parentKey,
|
|
5872
6239
|
filters: options.filters || undefined,
|
|
5873
6240
|
allowCreate: options.allowCreate ?? this.canCreate(options.entity),
|
|
@@ -5949,13 +6316,19 @@ class AXPEntityDataSelectorService {
|
|
|
5949
6316
|
*/
|
|
5950
6317
|
getSearchFields(options) {
|
|
5951
6318
|
const { entity, searchFields } = options;
|
|
6319
|
+
const searchableFields = entity.properties
|
|
6320
|
+
.filter(p => p.options?.filter?.inline?.enabled)
|
|
6321
|
+
.map(p => {
|
|
6322
|
+
return {
|
|
6323
|
+
name: p.name,
|
|
6324
|
+
title: p.title,
|
|
6325
|
+
};
|
|
6326
|
+
}) ?? [];
|
|
5952
6327
|
if (searchFields && searchFields.length > 0) {
|
|
5953
|
-
return searchFields;
|
|
6328
|
+
return searchableFields.filter(f => searchFields.includes(f.name));
|
|
5954
6329
|
}
|
|
5955
6330
|
// Auto-detect searchable fields from entity properties
|
|
5956
|
-
return
|
|
5957
|
-
.filter(p => p.options?.filter?.inline?.enabled)
|
|
5958
|
-
.map(p => p.name);
|
|
6331
|
+
return searchableFields;
|
|
5959
6332
|
}
|
|
5960
6333
|
/**
|
|
5961
6334
|
* Check if entity supports create operation
|
|
@@ -5999,10 +6372,10 @@ class AXPEntityDataSelectorService {
|
|
|
5999
6372
|
}
|
|
6000
6373
|
return request;
|
|
6001
6374
|
}
|
|
6002
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6003
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
6375
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDataSelectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
6376
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDataSelectorService, providedIn: 'root' }); }
|
|
6004
6377
|
}
|
|
6005
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6378
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDataSelectorService, decorators: [{
|
|
6006
6379
|
type: Injectable,
|
|
6007
6380
|
args: [{
|
|
6008
6381
|
providedIn: 'root'
|
|
@@ -6018,6 +6391,9 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6018
6391
|
this.popupService = inject(AXPopupService);
|
|
6019
6392
|
this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
|
|
6020
6393
|
this.translateService = inject(AXTranslationService);
|
|
6394
|
+
this.selectBox = viewChild('selectBox', ...(ngDevMode ? [{ debugName: "selectBox" }] : []));
|
|
6395
|
+
this.tagBox = viewChild('tagBoxComponent', ...(ngDevMode ? [{ debugName: "tagBox" }] : []));
|
|
6396
|
+
this.shouldFocus = signal(false, ...(ngDevMode ? [{ debugName: "shouldFocus" }] : []));
|
|
6021
6397
|
this.expose = computed(() => this.options()['expose'], ...(ngDevMode ? [{ debugName: "expose" }] : []));
|
|
6022
6398
|
this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
6023
6399
|
this.disabled = computed(() => this.options()['disabled'], ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
@@ -6038,9 +6414,15 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6038
6414
|
return this.defaultTextField();
|
|
6039
6415
|
}, ...(ngDevMode ? [{ debugName: "displayField" }] : []));
|
|
6040
6416
|
this.selectedItemsText = computed(() => {
|
|
6041
|
-
return this.selectedItems()
|
|
6417
|
+
return this.selectedItems()
|
|
6418
|
+
.map((item) => get(item, this.displayField()))
|
|
6419
|
+
.join(', ');
|
|
6042
6420
|
}, ...(ngDevMode ? [{ debugName: "selectedItemsText" }] : []));
|
|
6043
6421
|
this.valueField = computed(() => this.entityDef()?.properties.find((c) => c.name == 'id')?.name ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
|
|
6422
|
+
this.displayFormat = computed(() => {
|
|
6423
|
+
const template = this.options()['displayFormat'];
|
|
6424
|
+
return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
|
|
6425
|
+
}, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
|
|
6044
6426
|
this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : []));
|
|
6045
6427
|
this.dataSource = computed(() => {
|
|
6046
6428
|
const entity = this.entityDef();
|
|
@@ -6061,15 +6443,12 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6061
6443
|
});
|
|
6062
6444
|
}, ...(ngDevMode ? [{ debugName: "dataSource" }] : []));
|
|
6063
6445
|
this.searchTerm = signal(null, ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
|
|
6446
|
+
this.searchPlaceholderText = signal('', ...(ngDevMode ? [{ debugName: "searchPlaceholderText" }] : []));
|
|
6064
6447
|
this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
|
|
6065
6448
|
this.textbox = viewChild(AXTagBoxComponent, ...(ngDevMode ? [{ debugName: "textbox" }] : []));
|
|
6066
6449
|
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
6067
6450
|
this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
6068
|
-
this.
|
|
6069
|
-
return this.selectedItems().length
|
|
6070
|
-
? ''
|
|
6071
|
-
: this.translateService.translateSync('@general:widgets.lookup.search');
|
|
6072
|
-
}, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
6451
|
+
this.placeholderUpdateToken = 0;
|
|
6073
6452
|
this.#efEntity = effect(async () => {
|
|
6074
6453
|
const [module, entity] = this.entity().split('.');
|
|
6075
6454
|
this.entityDef.set(await this.entityResolver.get(module, entity));
|
|
@@ -6082,9 +6461,76 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6082
6461
|
this.clear();
|
|
6083
6462
|
}
|
|
6084
6463
|
}, ...(ngDevMode ? [{ debugName: "#efValue" }] : []));
|
|
6464
|
+
this.#efSearchPlaceholder = effect(() => {
|
|
6465
|
+
const entity = this.entityDef();
|
|
6466
|
+
if (!entity) {
|
|
6467
|
+
this.searchPlaceholderText.set('');
|
|
6468
|
+
return;
|
|
6469
|
+
}
|
|
6470
|
+
let inlineFields = entity.properties
|
|
6471
|
+
.filter((property) => property.options?.filter?.inline?.enabled)
|
|
6472
|
+
.map((property) => ({
|
|
6473
|
+
title: property.title,
|
|
6474
|
+
name: property.name,
|
|
6475
|
+
})) ?? [];
|
|
6476
|
+
if (!inlineFields.length) {
|
|
6477
|
+
const displayFieldName = this.displayField();
|
|
6478
|
+
const displayProperty = entity.properties.find((property) => property.name === displayFieldName);
|
|
6479
|
+
if (displayProperty) {
|
|
6480
|
+
inlineFields = [
|
|
6481
|
+
{
|
|
6482
|
+
title: displayProperty.title,
|
|
6483
|
+
name: displayProperty.name,
|
|
6484
|
+
},
|
|
6485
|
+
];
|
|
6486
|
+
}
|
|
6487
|
+
}
|
|
6488
|
+
void this.updateSearchPlaceholder(inlineFields);
|
|
6489
|
+
}, ...(ngDevMode ? [{ debugName: "#efSearchPlaceholder" }] : []));
|
|
6490
|
+
//#region ---- Focus Management ----
|
|
6491
|
+
/**
|
|
6492
|
+
* Reactive effect to auto-focus when viewChild is ready
|
|
6493
|
+
* This handles the case where selectBox/tagBox are inside @if conditions
|
|
6494
|
+
*/
|
|
6495
|
+
this.#focusEffect = effect(() => {
|
|
6496
|
+
const shouldFocus = this.shouldFocus();
|
|
6497
|
+
// Early return if shouldn't focus
|
|
6498
|
+
if (!shouldFocus) {
|
|
6499
|
+
return;
|
|
6500
|
+
}
|
|
6501
|
+
// Check which viewChild is available based on look type
|
|
6502
|
+
const look = this.look();
|
|
6503
|
+
if (look === 'select') {
|
|
6504
|
+
const selectBox = this.selectBox();
|
|
6505
|
+
if (selectBox) {
|
|
6506
|
+
try {
|
|
6507
|
+
selectBox.focus();
|
|
6508
|
+
// Reset focus flag after successful focus
|
|
6509
|
+
this.shouldFocus.set(false);
|
|
6510
|
+
}
|
|
6511
|
+
catch (error) {
|
|
6512
|
+
// console.error('Error focusing select box:', error);
|
|
6513
|
+
}
|
|
6514
|
+
}
|
|
6515
|
+
}
|
|
6516
|
+
else {
|
|
6517
|
+
const tagBox = this.tagBox();
|
|
6518
|
+
if (tagBox) {
|
|
6519
|
+
try {
|
|
6520
|
+
tagBox.focus();
|
|
6521
|
+
// Reset focus flag after successful focus
|
|
6522
|
+
this.shouldFocus.set(false);
|
|
6523
|
+
}
|
|
6524
|
+
catch (error) {
|
|
6525
|
+
// console.error('Error focusing tag box:', error);
|
|
6526
|
+
}
|
|
6527
|
+
}
|
|
6528
|
+
}
|
|
6529
|
+
}, ...(ngDevMode ? [{ debugName: "#focusEffect" }] : []));
|
|
6085
6530
|
}
|
|
6086
6531
|
#efEntity;
|
|
6087
6532
|
#efValue;
|
|
6533
|
+
#efSearchPlaceholder;
|
|
6088
6534
|
async findByValue() {
|
|
6089
6535
|
this.isLoading.set(true);
|
|
6090
6536
|
const rawValue = this.getValue();
|
|
@@ -6111,6 +6557,8 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6111
6557
|
}
|
|
6112
6558
|
async showSelector() {
|
|
6113
6559
|
this.isOpen.set(true);
|
|
6560
|
+
const inlineSearchValue = (this.searchTerm() ?? '').trim();
|
|
6561
|
+
const initialSearchTerm = inlineSearchValue.length > 0 ? inlineSearchValue : undefined;
|
|
6114
6562
|
try {
|
|
6115
6563
|
const result = await this.entityDataSelectorService.open({
|
|
6116
6564
|
entity: this.entityDef(),
|
|
@@ -6119,7 +6567,8 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6119
6567
|
filters: this.customFilter(),
|
|
6120
6568
|
parentFilters: this.filter,
|
|
6121
6569
|
columns: this.columns(),
|
|
6122
|
-
allowCreate: true
|
|
6570
|
+
allowCreate: true,
|
|
6571
|
+
initialSearchTerm,
|
|
6123
6572
|
});
|
|
6124
6573
|
if (result && 'items' in result) {
|
|
6125
6574
|
this.setItems(result.items);
|
|
@@ -6147,6 +6596,11 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6147
6596
|
}
|
|
6148
6597
|
}
|
|
6149
6598
|
}
|
|
6599
|
+
handleSearchInputChange(e) {
|
|
6600
|
+
if (e.isUserInteraction) {
|
|
6601
|
+
this.searchTerm.set(e.value ?? '');
|
|
6602
|
+
}
|
|
6603
|
+
}
|
|
6150
6604
|
handleOnBlur(e) {
|
|
6151
6605
|
setTimeout(() => {
|
|
6152
6606
|
if (!this.isOpen()) {
|
|
@@ -6228,11 +6682,57 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6228
6682
|
this.textbox()?.inputValue.set('');
|
|
6229
6683
|
this.searchTerm.set('');
|
|
6230
6684
|
}
|
|
6685
|
+
getTagLabel(item) {
|
|
6686
|
+
if (!item) {
|
|
6687
|
+
return '';
|
|
6688
|
+
}
|
|
6689
|
+
const template = this.displayFormat();
|
|
6690
|
+
if (template) {
|
|
6691
|
+
const formatted = this.formatService.format(template, 'string', item);
|
|
6692
|
+
if (formatted) {
|
|
6693
|
+
return formatted;
|
|
6694
|
+
}
|
|
6695
|
+
}
|
|
6696
|
+
return get(item, this.displayField()) ?? '';
|
|
6697
|
+
}
|
|
6698
|
+
async updateSearchPlaceholder(fields) {
|
|
6699
|
+
const updateToken = ++this.placeholderUpdateToken;
|
|
6700
|
+
if (!fields || fields.length === 0) {
|
|
6701
|
+
const fallback = await this.translateService.translateAsync('@general:actions.search.title');
|
|
6702
|
+
if (updateToken !== this.placeholderUpdateToken) {
|
|
6703
|
+
return;
|
|
6704
|
+
}
|
|
6705
|
+
this.searchPlaceholderText.set(fallback ? `${fallback}...` : '');
|
|
6706
|
+
return;
|
|
6707
|
+
}
|
|
6708
|
+
const translatedFields = await Promise.all(fields.map(async (field) => {
|
|
6709
|
+
const translated = await this.translateService.translateAsync(field.title || field.name);
|
|
6710
|
+
return translated ?? field.title ?? field.name;
|
|
6711
|
+
}));
|
|
6712
|
+
const translatedText = translatedFields
|
|
6713
|
+
.filter((value) => Boolean(value && value.trim().length > 0))
|
|
6714
|
+
.join(', ');
|
|
6715
|
+
const fallbackText = fields
|
|
6716
|
+
.map((field) => field.title || field.name)
|
|
6717
|
+
.filter((value) => Boolean(value && value.trim().length > 0))
|
|
6718
|
+
.join(', ');
|
|
6719
|
+
let fieldsText = translatedText || fallbackText;
|
|
6720
|
+
if (!fieldsText) {
|
|
6721
|
+
fieldsText = (await this.translateService.translateAsync('@general:terms.items')) ?? 'items';
|
|
6722
|
+
}
|
|
6723
|
+
const placeholder = await this.translateService.translateAsync('@general:widgets.lookup.search-placeholder', {
|
|
6724
|
+
params: { fields: fieldsText },
|
|
6725
|
+
});
|
|
6726
|
+
if (updateToken !== this.placeholderUpdateToken) {
|
|
6727
|
+
return;
|
|
6728
|
+
}
|
|
6729
|
+
this.searchPlaceholderText.set(placeholder ?? `Search in ${fieldsText}...`);
|
|
6730
|
+
}
|
|
6231
6731
|
async searchByValue(value) {
|
|
6232
6732
|
if (!this.entityDef())
|
|
6233
6733
|
return null;
|
|
6234
6734
|
const entity = this.entityDef();
|
|
6235
|
-
const searchFields = entity.properties.filter(p => p.options?.filter?.inline?.enabled);
|
|
6735
|
+
const searchFields = entity.properties.filter((p) => p.options?.filter?.inline?.enabled);
|
|
6236
6736
|
const inlineFilters = {
|
|
6237
6737
|
field: null,
|
|
6238
6738
|
logic: 'or',
|
|
@@ -6258,7 +6758,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6258
6758
|
if (request.filter) {
|
|
6259
6759
|
request.filter = {
|
|
6260
6760
|
logic: 'and',
|
|
6261
|
-
filters: [...[request.filter], ...(filter.filters ?? [])]
|
|
6761
|
+
filters: [...[request.filter], ...(filter.filters ?? [])],
|
|
6262
6762
|
};
|
|
6263
6763
|
}
|
|
6264
6764
|
else {
|
|
@@ -6269,149 +6769,189 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6269
6769
|
singleOrMultiple(values) {
|
|
6270
6770
|
return this.multiple() ? values : values[0];
|
|
6271
6771
|
}
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
[ngModel]="selectedItems()"
|
|
6302
|
-
[textField]="displayField()"
|
|
6303
|
-
[valueField]="valueField()"
|
|
6304
|
-
(onValueChanged)="handleValueChange($event)"
|
|
6305
|
-
[placeholder]="placeholder() | translate | async"
|
|
6306
|
-
[addOnEnter]="false"
|
|
6307
|
-
[addOnComma]="false"
|
|
6308
|
-
[disabled]="disabled()"
|
|
6309
|
-
(onKeyUp)="handleKeyUp($event)"
|
|
6310
|
-
(onBlur)="handleOnBlur($event)"
|
|
6311
|
-
>
|
|
6312
|
-
@for (validation of validationRules(); track $index) {
|
|
6313
|
-
<ax-validation-rule
|
|
6314
|
-
[rule]="validation.rule"
|
|
6315
|
-
[message]="validation.options?.message"
|
|
6316
|
-
[options]="validation.options"
|
|
6317
|
-
></ax-validation-rule>
|
|
6318
|
-
}
|
|
6319
|
-
@if (selectedItems().length > 1 || allowClear()) {
|
|
6320
|
-
<ax-clear-button (click)="handleClearClick()"></ax-clear-button>
|
|
6321
|
-
}
|
|
6322
|
-
|
|
6323
|
-
<ax-suffix>
|
|
6324
|
-
<ax-button
|
|
6325
|
-
color="ghost"
|
|
6326
|
-
look="blank"
|
|
6327
|
-
[disabled]="isLoading() || disabled()"
|
|
6328
|
-
(onClick)="handleOnClick($event)"
|
|
6772
|
+
//#region ---- Focus Management ----
|
|
6773
|
+
/**
|
|
6774
|
+
* Reactive effect to auto-focus when viewChild is ready
|
|
6775
|
+
* This handles the case where selectBox/tagBox are inside @if conditions
|
|
6776
|
+
*/
|
|
6777
|
+
#focusEffect;
|
|
6778
|
+
/**
|
|
6779
|
+
* Public focus method to trigger focusing
|
|
6780
|
+
*/
|
|
6781
|
+
focus() {
|
|
6782
|
+
this.shouldFocus.set(true);
|
|
6783
|
+
}
|
|
6784
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
6785
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPLookupWidgetEditComponent, isStandalone: true, selector: "axp-lookup-widget-edit", viewQueries: [{ propertyName: "selectBox", first: true, predicate: ["selectBox"], descendants: true, isSignal: true }, { propertyName: "tagBox", first: true, predicate: ["tagBoxComponent"], descendants: true, isSignal: true }, { propertyName: "textbox", first: true, predicate: AXTagBoxComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
6786
|
+
@if (dataSource()) {
|
|
6787
|
+
@if (look() == 'select') {
|
|
6788
|
+
<ax-select-box
|
|
6789
|
+
#selectBox
|
|
6790
|
+
[dataSource]="dataSource()!"
|
|
6791
|
+
[ngModel]="selectedItems()"
|
|
6792
|
+
[textField]="displayField()"
|
|
6793
|
+
[valueField]="valueField()"
|
|
6794
|
+
[disabled]="disabled()"
|
|
6795
|
+
[multiple]="multiple()"
|
|
6796
|
+
(onValueChanged)="selectBoxValueChange($event)"
|
|
6797
|
+
>
|
|
6798
|
+
<ax-search-box
|
|
6799
|
+
[placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
|
|
6800
|
+
(onValueChanged)="handleSearchInputChange($event)"
|
|
6329
6801
|
>
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6802
|
+
<ax-clear-button></ax-clear-button>
|
|
6803
|
+
</ax-search-box>
|
|
6804
|
+
@for (validation of validationRules(); track $index) {
|
|
6805
|
+
<ax-validation-rule
|
|
6806
|
+
[rule]="validation.rule"
|
|
6807
|
+
[message]="validation.options?.message"
|
|
6808
|
+
[options]="validation.options"
|
|
6809
|
+
></ax-validation-rule>
|
|
6810
|
+
}
|
|
6811
|
+
@if (allowClear()) {
|
|
6812
|
+
<ax-clear-button (click)="handleClearClick()"></ax-clear-button>
|
|
6813
|
+
}
|
|
6814
|
+
</ax-select-box>
|
|
6815
|
+
} @else {
|
|
6816
|
+
<ax-tag-box
|
|
6817
|
+
#tagBoxComponent
|
|
6818
|
+
[tagTemplate]="tagTemplate"
|
|
6819
|
+
[ngModel]="selectedItems()"
|
|
6820
|
+
[textField]="displayField()"
|
|
6821
|
+
[valueField]="valueField()"
|
|
6822
|
+
(onValueChanged)="handleValueChange($event)"
|
|
6823
|
+
[placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
|
|
6824
|
+
[addOnEnter]="false"
|
|
6825
|
+
[addOnComma]="false"
|
|
6826
|
+
[disabled]="disabled()"
|
|
6827
|
+
(onKeyUp)="handleKeyUp($event)"
|
|
6828
|
+
(onBlur)="handleOnBlur($event)"
|
|
6829
|
+
>
|
|
6830
|
+
@for (validation of validationRules(); track $index) {
|
|
6831
|
+
<ax-validation-rule
|
|
6832
|
+
[rule]="validation.rule"
|
|
6833
|
+
[message]="validation.options?.message"
|
|
6834
|
+
[options]="validation.options"
|
|
6835
|
+
></ax-validation-rule>
|
|
6836
|
+
}
|
|
6837
|
+
@if (selectedItems().length > 1 || allowClear()) {
|
|
6838
|
+
<ax-clear-button (click)="handleClearClick()"></ax-clear-button>
|
|
6839
|
+
}
|
|
6840
|
+
|
|
6841
|
+
<ax-suffix>
|
|
6842
|
+
<ax-button
|
|
6843
|
+
color="ghost"
|
|
6844
|
+
look="blank"
|
|
6845
|
+
[disabled]="isLoading() || disabled()"
|
|
6846
|
+
(onClick)="handleOnClick($event)"
|
|
6847
|
+
>
|
|
6848
|
+
@if (isLoading()) {
|
|
6849
|
+
<ax-loading></ax-loading>
|
|
6850
|
+
} @else {
|
|
6851
|
+
<ax-icon icon="far fa-search"> </ax-icon>
|
|
6852
|
+
}
|
|
6853
|
+
</ax-button>
|
|
6854
|
+
</ax-suffix>
|
|
6855
|
+
</ax-tag-box>
|
|
6856
|
+
<ng-template #tagTemplate let-item let-index="index">
|
|
6857
|
+
<div class="ax-inline-flex ax-items-center ax-gap-1.5 ax-rounded-md ax-px-3 ax-py-1 ax-text-sm ax-surface">
|
|
6858
|
+
<span>{{ getTagLabel(item) }}</span>
|
|
6859
|
+
<button type="button" (click)="tagBoxComponent.removeItem(index)">
|
|
6860
|
+
<ax-icon class="ax-icon ax-icon-close"></ax-icon>
|
|
6861
|
+
</button>
|
|
6862
|
+
</div>
|
|
6863
|
+
</ng-template>
|
|
6864
|
+
}
|
|
6338
6865
|
}
|
|
6339
|
-
}
|
|
6340
6866
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type:
|
|
6341
6867
|
//
|
|
6342
|
-
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: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i6$1.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues", "tagTemplate"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onTagClick", "onTagDblClick", "onTagContextMenu"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i7.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "component", type: AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }
|
|
6868
|
+
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: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i6$1.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues", "tagTemplate"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onTagClick", "onTagDblClick", "onTagContextMenu"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i7.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "component", type: AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6343
6869
|
}
|
|
6344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
6870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
|
|
6345
6871
|
type: Component,
|
|
6346
6872
|
args: [{
|
|
6347
6873
|
selector: 'axp-lookup-widget-edit',
|
|
6348
6874
|
template: `
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
<ax-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
<ax-validation-rule
|
|
6365
|
-
[rule]="validation.rule"
|
|
6366
|
-
[message]="validation.options?.message"
|
|
6367
|
-
[options]="validation.options"
|
|
6368
|
-
></ax-validation-rule>
|
|
6369
|
-
}
|
|
6370
|
-
@if (allowClear()) {
|
|
6371
|
-
<ax-clear-button (click)="handleClearClick()"></ax-clear-button>
|
|
6372
|
-
}
|
|
6373
|
-
</ax-select-box>
|
|
6374
|
-
} @else {
|
|
6375
|
-
<ax-tag-box
|
|
6376
|
-
[ngModel]="selectedItems()"
|
|
6377
|
-
[textField]="displayField()"
|
|
6378
|
-
[valueField]="valueField()"
|
|
6379
|
-
(onValueChanged)="handleValueChange($event)"
|
|
6380
|
-
[placeholder]="placeholder() | translate | async"
|
|
6381
|
-
[addOnEnter]="false"
|
|
6382
|
-
[addOnComma]="false"
|
|
6383
|
-
[disabled]="disabled()"
|
|
6384
|
-
(onKeyUp)="handleKeyUp($event)"
|
|
6385
|
-
(onBlur)="handleOnBlur($event)"
|
|
6386
|
-
>
|
|
6387
|
-
@for (validation of validationRules(); track $index) {
|
|
6388
|
-
<ax-validation-rule
|
|
6389
|
-
[rule]="validation.rule"
|
|
6390
|
-
[message]="validation.options?.message"
|
|
6391
|
-
[options]="validation.options"
|
|
6392
|
-
></ax-validation-rule>
|
|
6393
|
-
}
|
|
6394
|
-
@if (selectedItems().length > 1 || allowClear()) {
|
|
6395
|
-
<ax-clear-button (click)="handleClearClick()"></ax-clear-button>
|
|
6396
|
-
}
|
|
6397
|
-
|
|
6398
|
-
<ax-suffix>
|
|
6399
|
-
<ax-button
|
|
6400
|
-
color="ghost"
|
|
6401
|
-
look="blank"
|
|
6402
|
-
[disabled]="isLoading() || disabled()"
|
|
6403
|
-
(onClick)="handleOnClick($event)"
|
|
6875
|
+
@if (dataSource()) {
|
|
6876
|
+
@if (look() == 'select') {
|
|
6877
|
+
<ax-select-box
|
|
6878
|
+
#selectBox
|
|
6879
|
+
[dataSource]="dataSource()!"
|
|
6880
|
+
[ngModel]="selectedItems()"
|
|
6881
|
+
[textField]="displayField()"
|
|
6882
|
+
[valueField]="valueField()"
|
|
6883
|
+
[disabled]="disabled()"
|
|
6884
|
+
[multiple]="multiple()"
|
|
6885
|
+
(onValueChanged)="selectBoxValueChange($event)"
|
|
6886
|
+
>
|
|
6887
|
+
<ax-search-box
|
|
6888
|
+
[placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
|
|
6889
|
+
(onValueChanged)="handleSearchInputChange($event)"
|
|
6404
6890
|
>
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6891
|
+
<ax-clear-button></ax-clear-button>
|
|
6892
|
+
</ax-search-box>
|
|
6893
|
+
@for (validation of validationRules(); track $index) {
|
|
6894
|
+
<ax-validation-rule
|
|
6895
|
+
[rule]="validation.rule"
|
|
6896
|
+
[message]="validation.options?.message"
|
|
6897
|
+
[options]="validation.options"
|
|
6898
|
+
></ax-validation-rule>
|
|
6899
|
+
}
|
|
6900
|
+
@if (allowClear()) {
|
|
6901
|
+
<ax-clear-button (click)="handleClearClick()"></ax-clear-button>
|
|
6902
|
+
}
|
|
6903
|
+
</ax-select-box>
|
|
6904
|
+
} @else {
|
|
6905
|
+
<ax-tag-box
|
|
6906
|
+
#tagBoxComponent
|
|
6907
|
+
[tagTemplate]="tagTemplate"
|
|
6908
|
+
[ngModel]="selectedItems()"
|
|
6909
|
+
[textField]="displayField()"
|
|
6910
|
+
[valueField]="valueField()"
|
|
6911
|
+
(onValueChanged)="handleValueChange($event)"
|
|
6912
|
+
[placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
|
|
6913
|
+
[addOnEnter]="false"
|
|
6914
|
+
[addOnComma]="false"
|
|
6915
|
+
[disabled]="disabled()"
|
|
6916
|
+
(onKeyUp)="handleKeyUp($event)"
|
|
6917
|
+
(onBlur)="handleOnBlur($event)"
|
|
6918
|
+
>
|
|
6919
|
+
@for (validation of validationRules(); track $index) {
|
|
6920
|
+
<ax-validation-rule
|
|
6921
|
+
[rule]="validation.rule"
|
|
6922
|
+
[message]="validation.options?.message"
|
|
6923
|
+
[options]="validation.options"
|
|
6924
|
+
></ax-validation-rule>
|
|
6925
|
+
}
|
|
6926
|
+
@if (selectedItems().length > 1 || allowClear()) {
|
|
6927
|
+
<ax-clear-button (click)="handleClearClick()"></ax-clear-button>
|
|
6928
|
+
}
|
|
6929
|
+
|
|
6930
|
+
<ax-suffix>
|
|
6931
|
+
<ax-button
|
|
6932
|
+
color="ghost"
|
|
6933
|
+
look="blank"
|
|
6934
|
+
[disabled]="isLoading() || disabled()"
|
|
6935
|
+
(onClick)="handleOnClick($event)"
|
|
6936
|
+
>
|
|
6937
|
+
@if (isLoading()) {
|
|
6938
|
+
<ax-loading></ax-loading>
|
|
6939
|
+
} @else {
|
|
6940
|
+
<ax-icon icon="far fa-search"> </ax-icon>
|
|
6941
|
+
}
|
|
6942
|
+
</ax-button>
|
|
6943
|
+
</ax-suffix>
|
|
6944
|
+
</ax-tag-box>
|
|
6945
|
+
<ng-template #tagTemplate let-item let-index="index">
|
|
6946
|
+
<div class="ax-inline-flex ax-items-center ax-gap-1.5 ax-rounded-md ax-px-3 ax-py-1 ax-text-sm ax-surface">
|
|
6947
|
+
<span>{{ getTagLabel(item) }}</span>
|
|
6948
|
+
<button type="button" (click)="tagBoxComponent.removeItem(index)">
|
|
6949
|
+
<ax-icon class="ax-icon ax-icon-close"></ax-icon>
|
|
6950
|
+
</button>
|
|
6951
|
+
</div>
|
|
6952
|
+
</ng-template>
|
|
6953
|
+
}
|
|
6413
6954
|
}
|
|
6414
|
-
}
|
|
6415
6955
|
`,
|
|
6416
6956
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6417
6957
|
imports: [
|
|
@@ -6429,7 +6969,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
6429
6969
|
AXSearchBoxComponent,
|
|
6430
6970
|
],
|
|
6431
6971
|
}]
|
|
6432
|
-
}], propDecorators: { textbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXTagBoxComponent), { isSignal: true }] }] } });
|
|
6972
|
+
}], propDecorators: { selectBox: [{ type: i0.ViewChild, args: ['selectBox', { isSignal: true }] }], tagBox: [{ type: i0.ViewChild, args: ['tagBoxComponent', { isSignal: true }] }], textbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXTagBoxComponent), { isSignal: true }] }] } });
|
|
6433
6973
|
|
|
6434
6974
|
var lookupWidgetEdit_component = /*#__PURE__*/Object.freeze({
|
|
6435
6975
|
__proto__: null,
|
|
@@ -6441,6 +6981,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
6441
6981
|
super(...arguments);
|
|
6442
6982
|
//#region ---- Dependencies ----
|
|
6443
6983
|
this.entityDetailPopoverService = inject(AXPEntityDetailPopoverService);
|
|
6984
|
+
this.formatService = inject(AXFormatService);
|
|
6444
6985
|
//#endregion
|
|
6445
6986
|
//#region ---- View Children ----
|
|
6446
6987
|
this.moreButton = viewChild('moreButton', ...(ngDevMode ? [{ debugName: "moreButton" }] : []));
|
|
@@ -6453,6 +6994,10 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
6453
6994
|
this.entity = this.options['entity'] ?? 'title';
|
|
6454
6995
|
this.columnName = this.options['columnName'] ?? 'title';
|
|
6455
6996
|
this.maxVisible = this.options['maxVisible'] ?? 2;
|
|
6997
|
+
this.displayFormat = computed(() => {
|
|
6998
|
+
const template = this.options['displayFormat'];
|
|
6999
|
+
return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
|
|
7000
|
+
}, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
|
|
6456
7001
|
//#endregion
|
|
6457
7002
|
//#region ---- Signals ----
|
|
6458
7003
|
this.isMorePopoverOpen = signal(false, ...(ngDevMode ? [{ debugName: "isMorePopoverOpen" }] : []));
|
|
@@ -6523,22 +7068,33 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
6523
7068
|
if (isNil(item)) {
|
|
6524
7069
|
return null;
|
|
6525
7070
|
}
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
7071
|
+
if (typeof item === 'object') {
|
|
7072
|
+
return item;
|
|
7073
|
+
}
|
|
7074
|
+
return {
|
|
7075
|
+
[this.valueField]: item,
|
|
7076
|
+
[this.textField]: item,
|
|
7077
|
+
};
|
|
7078
|
+
}
|
|
7079
|
+
getDisplayText(item) {
|
|
7080
|
+
if (!item) {
|
|
7081
|
+
return '';
|
|
7082
|
+
}
|
|
7083
|
+
const template = this.displayFormat();
|
|
7084
|
+
if (template) {
|
|
7085
|
+
const formatted = this.formatService.format(template, 'string', item);
|
|
7086
|
+
if (formatted) {
|
|
7087
|
+
return formatted;
|
|
6530
7088
|
}
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
[this.textField]: item,
|
|
6534
|
-
};
|
|
7089
|
+
}
|
|
7090
|
+
return item?.[this.textField] ?? '';
|
|
6535
7091
|
}
|
|
6536
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6537
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
7092
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
7093
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, viewQueries: [{ propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-gap-1 ax-items-center\">\n @if (visibleItems().length > 0) {\n @for (item of visibleItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"handleItemClick($index)\">\n {{ getDisplayText(item) }}\n </span>\n @if ($index < visibleItems().length - 1) { <span class=\"ax-text-muted\">\u2022</span>\n }\n }\n } @else {\n <span class=\"ax-text-muted\">---</span>\n }\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3\">\n @for (item of allItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"showItemDetail(item, $index)\">\n {{ getDisplayText(item) }}\n </span>\n }\n </div>\n </div>\n</ax-popover>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6538
7094
|
}
|
|
6539
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7095
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetColumnComponent, decorators: [{
|
|
6540
7096
|
type: Component,
|
|
6541
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXBadgeModule, AXButtonModule, AXPopoverModule], inputs: ['rawValue', 'rowData'], template: "<div class=\"ax-flex ax-gap-1 ax-items-center\">\n @if (visibleItems().length > 0) {\n
|
|
7097
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXBadgeModule, AXButtonModule, AXPopoverModule], inputs: ['rawValue', 'rowData'], template: "<div class=\"ax-flex ax-gap-1 ax-items-center\">\n @if (visibleItems().length > 0) {\n @for (item of visibleItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"handleItemClick($index)\">\n {{ getDisplayText(item) }}\n </span>\n @if ($index < visibleItems().length - 1) { <span class=\"ax-text-muted\">\u2022</span>\n }\n }\n } @else {\n <span class=\"ax-text-muted\">---</span>\n }\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3\">\n @for (item of allItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"showItemDetail(item, $index)\">\n {{ getDisplayText(item) }}\n </span>\n }\n </div>\n </div>\n</ax-popover>" }]
|
|
6542
7098
|
}], propDecorators: { moreButton: [{ type: i0.ViewChild, args: ['moreButton', { isSignal: true }] }], morePopover: [{ type: i0.ViewChild, args: ['morePopover', { isSignal: true }] }] } });
|
|
6543
7099
|
|
|
6544
7100
|
var lookupWidgetColumn_component = /*#__PURE__*/Object.freeze({
|
|
@@ -6587,6 +7143,20 @@ const AXPLookupWidget = {
|
|
|
6587
7143
|
visible: true,
|
|
6588
7144
|
},
|
|
6589
7145
|
AXP_ALLOW_MULTIPLE_PROPERTY,
|
|
7146
|
+
{
|
|
7147
|
+
name: 'displayFormat',
|
|
7148
|
+
title: 'Display Format',
|
|
7149
|
+
group: AXP_DATA_PROPERTY_GROUP,
|
|
7150
|
+
schema: {
|
|
7151
|
+
dataType: 'string',
|
|
7152
|
+
interface: {
|
|
7153
|
+
name: 'displayFormat',
|
|
7154
|
+
path: 'options.displayFormat',
|
|
7155
|
+
type: AXPWidgetsCatalog.template,
|
|
7156
|
+
},
|
|
7157
|
+
},
|
|
7158
|
+
visible: true,
|
|
7159
|
+
},
|
|
6590
7160
|
],
|
|
6591
7161
|
components: {
|
|
6592
7162
|
view: {
|
|
@@ -6648,8 +7218,8 @@ class AXPWidgetSelectorWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6648
7218
|
const widget = this.widgetRegisteryService.resolve(e.values.type);
|
|
6649
7219
|
this.setValue({ title: widget?.title, ...e.values });
|
|
6650
7220
|
}
|
|
6651
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6652
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
7221
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
7222
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPWidgetSelectorWidgetEditComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
6653
7223
|
<ax-text-box [ngModel]="displayText()" [placeholder]="placeholder()" [readonly]="true">
|
|
6654
7224
|
@for (validation of validationRules(); track $index) {
|
|
6655
7225
|
<ax-validation-rule
|
|
@@ -6670,7 +7240,7 @@ class AXPWidgetSelectorWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
6670
7240
|
}
|
|
6671
7241
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2$2.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { 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: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$1.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget", "mode"], outputs: ["onChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6672
7242
|
}
|
|
6673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, decorators: [{
|
|
6674
7244
|
type: Component,
|
|
6675
7245
|
args: [{
|
|
6676
7246
|
template: `
|
|
@@ -6717,10 +7287,10 @@ var widgetSelectorWidgetEdit_component = /*#__PURE__*/Object.freeze({
|
|
|
6717
7287
|
});
|
|
6718
7288
|
|
|
6719
7289
|
class AXPWidgetSelectorWidgetViewComponent extends AXPValueWidgetComponent {
|
|
6720
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6721
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
7290
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
7291
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPWidgetSelectorWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `{{ getValue()?.title }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6722
7292
|
}
|
|
6723
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, decorators: [{
|
|
6724
7294
|
type: Component,
|
|
6725
7295
|
args: [{
|
|
6726
7296
|
template: `{{ getValue()?.title }}`,
|
|
@@ -6797,10 +7367,10 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
|
|
|
6797
7367
|
}
|
|
6798
7368
|
}
|
|
6799
7369
|
}
|
|
6800
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6801
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
7370
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityCreatePopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7371
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityCreatePopupAction }); }
|
|
6802
7372
|
}
|
|
6803
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityCreatePopupAction, decorators: [{
|
|
6804
7374
|
type: Injectable
|
|
6805
7375
|
}] });
|
|
6806
7376
|
class AXPEntityCreateSubmittedAction extends AXPWorkflowAction {
|
|
@@ -6808,10 +7378,10 @@ class AXPEntityCreateSubmittedAction extends AXPWorkflowAction {
|
|
|
6808
7378
|
this.dispatch(AXPEntityCreateEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
|
|
6809
7379
|
this.dispatch(AXPRefreshEvent({ entity: context.getVariable('entity'), meta: context.getVariable('meta') }));
|
|
6810
7380
|
}
|
|
6811
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6812
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
7381
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityCreateSubmittedAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7382
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityCreateSubmittedAction }); }
|
|
6813
7383
|
}
|
|
6814
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7384
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityCreateSubmittedAction, decorators: [{
|
|
6815
7385
|
type: Injectable
|
|
6816
7386
|
}] });
|
|
6817
7387
|
const AXPCreateEntityWorkflow = {
|
|
@@ -6902,10 +7472,10 @@ class AXPQuickEntityModifyPopupAction extends AXPWorkflowAction {
|
|
|
6902
7472
|
context.setVariable('data', cloneDeep(popup.data.context));
|
|
6903
7473
|
}
|
|
6904
7474
|
}
|
|
6905
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6906
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
7475
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPQuickEntityModifyPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7476
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPQuickEntityModifyPopupAction }); }
|
|
6907
7477
|
}
|
|
6908
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPQuickEntityModifyPopupAction, decorators: [{
|
|
6909
7479
|
type: Injectable
|
|
6910
7480
|
}] });
|
|
6911
7481
|
const AXPQuickModifyEntityWorkflow = {
|
|
@@ -6926,8 +7496,8 @@ const AXPQuickModifyEntityWorkflow = {
|
|
|
6926
7496
|
action: 'AXPToastAction',
|
|
6927
7497
|
input: {
|
|
6928
7498
|
color: 'success',
|
|
6929
|
-
title: 'workflow.entity-modified-title',
|
|
6930
|
-
content: 'workflow.entity-modified-body',
|
|
7499
|
+
title: '@general:workflow.entity-modified-title',
|
|
7500
|
+
content: '@general:workflow.entity-modified-body',
|
|
6931
7501
|
},
|
|
6932
7502
|
nextSteps: [
|
|
6933
7503
|
{
|
|
@@ -6962,10 +7532,10 @@ class AXPEntityApplyUpdatesAction extends AXPWorkflowAction {
|
|
|
6962
7532
|
context.setOutput('error', error);
|
|
6963
7533
|
}
|
|
6964
7534
|
}
|
|
6965
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6966
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
7535
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityApplyUpdatesAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7536
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityApplyUpdatesAction }); }
|
|
6967
7537
|
}
|
|
6968
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7538
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityApplyUpdatesAction, decorators: [{
|
|
6969
7539
|
type: Injectable
|
|
6970
7540
|
}] });
|
|
6971
7541
|
|
|
@@ -6984,10 +7554,10 @@ class AXPShowDetailViewAction extends AXPWorkflowAction {
|
|
|
6984
7554
|
context.setVariable('payload', newPayload);
|
|
6985
7555
|
this.navigation.execute(context);
|
|
6986
7556
|
}
|
|
6987
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
6988
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
7557
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPShowDetailViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7558
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPShowDetailViewAction }); }
|
|
6989
7559
|
}
|
|
6990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPShowDetailViewAction, decorators: [{
|
|
6991
7561
|
type: Injectable
|
|
6992
7562
|
}] });
|
|
6993
7563
|
const AXPShowDetailsViewWorkflow = {
|
|
@@ -7041,10 +7611,10 @@ class AXPShowFileUploaderPopupAction extends AXPWorkflowAction {
|
|
|
7041
7611
|
context.setVariable('data', cloneDeep(entityData));
|
|
7042
7612
|
}
|
|
7043
7613
|
}
|
|
7044
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
7045
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
7614
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPShowFileUploaderPopupAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7615
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPShowFileUploaderPopupAction }); }
|
|
7046
7616
|
}
|
|
7047
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7617
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPShowFileUploaderPopupAction, decorators: [{
|
|
7048
7618
|
type: Injectable
|
|
7049
7619
|
}] });
|
|
7050
7620
|
const AXPShowFileUploaderPopupWorkflow = {
|
|
@@ -7064,8 +7634,8 @@ const AXPShowFileUploaderPopupWorkflow = {
|
|
|
7064
7634
|
action: 'AXPToastAction',
|
|
7065
7635
|
input: {
|
|
7066
7636
|
color: 'success',
|
|
7067
|
-
title: 'workflow.entity-modified-title',
|
|
7068
|
-
content: 'workflow.entity-modified-body',
|
|
7637
|
+
title: '@general:workflow.entity-modified-title',
|
|
7638
|
+
content: '@general:workflow.entity-modified-body',
|
|
7069
7639
|
},
|
|
7070
7640
|
nextSteps: [
|
|
7071
7641
|
{
|
|
@@ -7095,10 +7665,10 @@ class AXPShowListViewAction extends AXPWorkflowAction {
|
|
|
7095
7665
|
context.setVariable('payload', newPayload);
|
|
7096
7666
|
this.navigation.execute(context);
|
|
7097
7667
|
}
|
|
7098
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
7099
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
7668
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPShowListViewAction, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
7669
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPShowListViewAction }); }
|
|
7100
7670
|
}
|
|
7101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7671
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPShowListViewAction, decorators: [{
|
|
7102
7672
|
type: Injectable
|
|
7103
7673
|
}] });
|
|
7104
7674
|
const AXPShowListViewWorkflow = {
|
|
@@ -7187,9 +7757,9 @@ class AXPEntityModule {
|
|
|
7187
7757
|
},
|
|
7188
7758
|
});
|
|
7189
7759
|
}
|
|
7190
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
7191
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
7192
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
7760
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, deps: [{ token: i1$1.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7761
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i2$3.AXPWorkflowModule, i3$1.AXPWidgetCoreModule] }); }
|
|
7762
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, providers: [
|
|
7193
7763
|
{
|
|
7194
7764
|
provide: ROUTES,
|
|
7195
7765
|
multi: true,
|
|
@@ -7212,6 +7782,11 @@ class AXPEntityModule {
|
|
|
7212
7782
|
useValue: columnWidthMiddlewareProvider,
|
|
7213
7783
|
multi: true,
|
|
7214
7784
|
},
|
|
7785
|
+
{
|
|
7786
|
+
provide: AXP_ENTITY_MODIFIER,
|
|
7787
|
+
useValue: layoutOrderingMiddlewareProvider,
|
|
7788
|
+
multi: true,
|
|
7789
|
+
},
|
|
7215
7790
|
provideCommandSetups([
|
|
7216
7791
|
{
|
|
7217
7792
|
key: 'Entity:OpenDetails',
|
|
@@ -7219,7 +7794,7 @@ class AXPEntityModule {
|
|
|
7219
7794
|
},
|
|
7220
7795
|
{
|
|
7221
7796
|
key: 'Entity:Create',
|
|
7222
|
-
command: () => import('./acorex-platform-layout-entity-create-entity.command-
|
|
7797
|
+
command: () => import('./acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs').then((c) => c.AXPCreateEntityCommand),
|
|
7223
7798
|
},
|
|
7224
7799
|
]),
|
|
7225
7800
|
provideQuerySetups([
|
|
@@ -7266,7 +7841,7 @@ class AXPEntityModule {
|
|
|
7266
7841
|
],
|
|
7267
7842
|
})] }); }
|
|
7268
7843
|
}
|
|
7269
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
7844
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, decorators: [{
|
|
7270
7845
|
type: NgModule,
|
|
7271
7846
|
args: [{
|
|
7272
7847
|
imports: [
|
|
@@ -7333,6 +7908,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
7333
7908
|
useValue: columnWidthMiddlewareProvider,
|
|
7334
7909
|
multi: true,
|
|
7335
7910
|
},
|
|
7911
|
+
{
|
|
7912
|
+
provide: AXP_ENTITY_MODIFIER,
|
|
7913
|
+
useValue: layoutOrderingMiddlewareProvider,
|
|
7914
|
+
multi: true,
|
|
7915
|
+
},
|
|
7336
7916
|
provideCommandSetups([
|
|
7337
7917
|
{
|
|
7338
7918
|
key: 'Entity:OpenDetails',
|
|
@@ -7340,7 +7920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
7340
7920
|
},
|
|
7341
7921
|
{
|
|
7342
7922
|
key: 'Entity:Create',
|
|
7343
|
-
command: () => import('./acorex-platform-layout-entity-create-entity.command-
|
|
7923
|
+
command: () => import('./acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs').then((c) => c.AXPCreateEntityCommand),
|
|
7344
7924
|
},
|
|
7345
7925
|
]),
|
|
7346
7926
|
provideQuerySetups([
|
|
@@ -7353,29 +7933,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImpo
|
|
|
7353
7933
|
}]
|
|
7354
7934
|
}], ctorParameters: () => [{ type: i1$1.AXPAppStartUpService }, { type: i0.Injector }] });
|
|
7355
7935
|
|
|
7356
|
-
const eventDispatchMiddleware = {
|
|
7357
|
-
target: { ops: ['create', 'update', 'delete'], order: 90 },
|
|
7358
|
-
execute: async (ctx, next) => {
|
|
7359
|
-
const dispatcher = inject(AXPEntityEventDispatcherService);
|
|
7360
|
-
await next();
|
|
7361
|
-
if (ctx.op === 'create') {
|
|
7362
|
-
const createdData = ctx.result ? { ...ctx.data, id: ctx.result } : ctx.data;
|
|
7363
|
-
await dispatcher.dispatchInserted(ctx.entityName, { refType: ctx.entityName, data: createdData });
|
|
7364
|
-
}
|
|
7365
|
-
else if (ctx.op === 'update') {
|
|
7366
|
-
await dispatcher.dispatchUpdated(ctx.entityName, {
|
|
7367
|
-
refType: ctx.entityName,
|
|
7368
|
-
data: ctx.result,
|
|
7369
|
-
changes: ctx.locals.get('changes'),
|
|
7370
|
-
});
|
|
7371
|
-
}
|
|
7372
|
-
else if (ctx.op === 'delete') {
|
|
7373
|
-
// For delete, prefer previous entity if available
|
|
7374
|
-
await dispatcher.dispatchDeleted(ctx.entityName, { refType: ctx.entityName, data: ctx.result ?? ctx.previous });
|
|
7375
|
-
}
|
|
7376
|
-
},
|
|
7377
|
-
};
|
|
7378
|
-
|
|
7379
7936
|
//#endregion
|
|
7380
7937
|
//#region ---- Get Entity Details Query ----
|
|
7381
7938
|
/**
|
|
@@ -7441,10 +7998,10 @@ class AXPGetEntityDetailsQuery {
|
|
|
7441
7998
|
throw new Error(`Failed to fetch entity data: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
7442
7999
|
}
|
|
7443
8000
|
}
|
|
7444
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
7445
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
8001
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGetEntityDetailsQuery, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8002
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGetEntityDetailsQuery, providedIn: 'root' }); }
|
|
7446
8003
|
}
|
|
7447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
8004
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGetEntityDetailsQuery, decorators: [{
|
|
7448
8005
|
type: Injectable,
|
|
7449
8006
|
args: [{ providedIn: 'root' }]
|
|
7450
8007
|
}] });
|
|
@@ -7467,10 +8024,10 @@ class AXPEntityDynamicDialogService {
|
|
|
7467
8024
|
entity(fullName) {
|
|
7468
8025
|
return new InterfaceSelector(this.entityRegistry, this.layoutBuilder, this.layoutTheme, fullName);
|
|
7469
8026
|
}
|
|
7470
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
7471
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
8027
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDynamicDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
8028
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDynamicDialogService, providedIn: 'root' }); }
|
|
7472
8029
|
}
|
|
7473
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
8030
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDynamicDialogService, decorators: [{
|
|
7474
8031
|
type: Injectable,
|
|
7475
8032
|
args: [{ providedIn: 'root' }]
|
|
7476
8033
|
}] });
|
|
@@ -7750,6 +8307,7 @@ function entityMasterBulkDeleteAction() {
|
|
|
7750
8307
|
priority: 'primary',
|
|
7751
8308
|
type: AXPSystemActionType.Delete,
|
|
7752
8309
|
scope: AXPEntityCommandScope.Selected,
|
|
8310
|
+
order: 100,
|
|
7753
8311
|
};
|
|
7754
8312
|
}
|
|
7755
8313
|
function entityMasterViewAction() {
|
|
@@ -7769,6 +8327,7 @@ function entityMasterDeleteAction() {
|
|
|
7769
8327
|
priority: 'secondary',
|
|
7770
8328
|
type: AXPSystemActionType.Delete,
|
|
7771
8329
|
scope: AXPEntityCommandScope.Individual,
|
|
8330
|
+
order: 100,
|
|
7772
8331
|
};
|
|
7773
8332
|
}
|
|
7774
8333
|
function entityMasterCrudActions(options) {
|
|
@@ -7929,5 +8488,5 @@ function detectEntityChanges(oldObj, newObj) {
|
|
|
7929
8488
|
* Generated bundle index. Do not edit.
|
|
7930
8489
|
*/
|
|
7931
8490
|
|
|
7932
|
-
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityDynamicDialogService, AXPEntityEventDispatcherService, AXPEntityListTableService, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityReferenceWidget, AXPEntityReferenceWidgetColumnComponent, AXPEntityReferenceWidgetDesignerComponent, AXPEntityReferenceWidgetEditComponent, AXPEntityReferenceWidgetPrintComponent, AXPEntityReferenceWidgetViewComponent, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPGetEntityDetailsQuery, AXPLookupFilterWidget, AXPLookupFilterWidgetEditComponent, AXPLookupWidget, AXPLookupWidgetColumnComponent, AXPLookupWidgetEditComponent, AXPLookupWidgetViewComponent, AXPMiddlewareAbortError, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXPWidgetSelectorWidget, AXPWidgetSelectorWidgetEditComponent, AXPWidgetSelectorWidgetViewComponent, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_BACKEND, AXP_ENTITY_STORAGE_MIDDLEWARE, DEFAULT_COLUMN_WIDTHS, actionExists, columnWidthMiddlewareFactory, columnWidthMiddlewareProvider, createColumnWidthMiddlewareProvider, createModifierContext, detectEntityChanges, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware, isAXPMiddlewareAbortError };
|
|
8491
|
+
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityDynamicDialogService, AXPEntityEventDispatcherService, AXPEntityListTableService, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityReferenceWidget, AXPEntityReferenceWidgetColumnComponent, AXPEntityReferenceWidgetDesignerComponent, AXPEntityReferenceWidgetEditComponent, AXPEntityReferenceWidgetPrintComponent, AXPEntityReferenceWidgetViewComponent, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPGetEntityDetailsQuery, AXPLookupFilterWidget, AXPLookupFilterWidgetEditComponent, AXPLookupWidget, AXPLookupWidgetColumnComponent, AXPLookupWidgetEditComponent, AXPLookupWidgetViewComponent, AXPMiddlewareAbortError, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXPWidgetSelectorWidget, AXPWidgetSelectorWidgetEditComponent, AXPWidgetSelectorWidgetViewComponent, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_BACKEND, AXP_ENTITY_STORAGE_MIDDLEWARE, DEFAULT_COLUMN_WIDTHS, DEFAULT_PROPERTY_ORDER, DEFAULT_SECTION_ORDER, actionExists, columnWidthMiddlewareFactory, columnWidthMiddlewareProvider, createColumnWidthMiddlewareProvider, createLayoutOrderingMiddlewareProvider, createModifierContext, detectEntityChanges, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware, isAXPMiddlewareAbortError, layoutOrderingMiddlewareFactory, layoutOrderingMiddlewareProvider };
|
|
7933
8492
|
//# sourceMappingURL=acorex-platform-layout-entity.mjs.map
|