@acorex/platform 21.0.0-next.37 → 21.0.0-next.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-platform-common.mjs +19 -1
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +11 -172
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +7 -8
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +39 -29
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +8 -9
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +468 -255
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +171 -86
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +36 -13
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs → acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs} +5 -60
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CDYAGBku.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +101 -128
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +16 -4
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +25 -5
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-common.d.ts +11 -6
- package/types/acorex-platform-core.d.ts +56 -101
- package/types/acorex-platform-layout-builder.d.ts +0 -1
- package/types/acorex-platform-layout-components.d.ts +4 -3
- package/types/acorex-platform-layout-designer.d.ts +1 -1
- package/types/acorex-platform-layout-entity.d.ts +36 -30
- package/types/acorex-platform-layout-views.d.ts +31 -29
- package/types/acorex-platform-layout-widget-core.d.ts +30 -14
- package/types/acorex-platform-layout-widgets.d.ts +17 -11
- package/types/acorex-platform-themes-default.d.ts +1 -0
- package/types/acorex-platform-workflow.d.ts +28 -51
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-9uCkMxcc.mjs.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AXToastService } from '@acorex/components/toast';
|
|
2
2
|
import * as i6 from '@acorex/core/translation';
|
|
3
|
-
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
3
|
+
import { AXTranslationService, AXTranslationModule, resolveMultiLanguageString } from '@acorex/core/translation';
|
|
4
4
|
import * as i4$4 from '@acorex/platform/common';
|
|
5
5
|
import { AXPSettingsService, AXPCommonSettings, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPRefreshEvent, AXPReloadEvent, AXPCleanNestedFilters, AXPDefaultMultiLanguageConfigService, withDefaultMultiLanguageOnWidgetNodeTree, AXPEntityQueryType, AXPWorkflowNavigateAction, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER, AXPMenuItemsDataSourceDefinition } from '@acorex/platform/common';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
7
|
import { InjectionToken, inject, Injector, runInInjectionContext, Injectable, input, viewChild, signal, ElementRef, ChangeDetectionStrategy, Component, ApplicationRef, EnvironmentInjector, createComponent, computed, ChangeDetectorRef, effect, Input, afterNextRender, untracked, ViewEncapsulation, viewChildren, linkedSignal, HostBinding, output, NgModule, makeEnvironmentProviders } from '@angular/core';
|
|
8
8
|
import { Subject, takeUntil } from 'rxjs';
|
|
9
9
|
import { AXPLayoutBuilderService, LayoutBuilderModule } from '@acorex/platform/layout/builder';
|
|
10
|
-
import { AXPDeviceService, AXPBroadcastEventService,
|
|
10
|
+
import { AXPDeviceService, AXPBroadcastEventService, applyFilterArray, applySortArray, resolveActionLook, AXPExpressionEvaluatorService, AXPDistributedEventListenerService, AXPPlatformScope, AXHighlightService, extractValue, setSmart, getChangedPaths, AXPColumnWidthService, AXPModuleManifestRegistry, defaultColumnWidthProvider, AXP_COLUMN_WIDTH_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXPModuleManifestsDataSourceDefinition, AXPSystemActionType } from '@acorex/platform/core';
|
|
11
11
|
import { merge, get, castArray, cloneDeep, set, orderBy, omit, isNil, isEmpty, isEqual } from 'lodash-es';
|
|
12
12
|
import { AXPSessionService, AXPAuthGuard, AXPPermissionDefinitionsDataSourceDefinition } from '@acorex/platform/auth';
|
|
13
13
|
import { Router, ActivatedRoute, RouterModule, ROUTES } from '@angular/router';
|
|
@@ -282,7 +282,7 @@ function createModifierContext(entity) {
|
|
|
282
282
|
},
|
|
283
283
|
},
|
|
284
284
|
modify: {
|
|
285
|
-
get: () => entity.interfaces?.master?.
|
|
285
|
+
get: () => entity.interfaces?.master?.update,
|
|
286
286
|
update: (updater) => {
|
|
287
287
|
entity.interfaces ??= {};
|
|
288
288
|
entity.interfaces.master ??= {};
|
|
@@ -851,6 +851,9 @@ class InterfaceSelector {
|
|
|
851
851
|
recordId = data['id'] || data['_id'];
|
|
852
852
|
}
|
|
853
853
|
const filter = new PropertyFilter(this.entityRegistry, this.layoutBuilder, this.deviceService, this.fullName, 'update', recordId, this.formBuilderService);
|
|
854
|
+
if (Object.keys(initialData).length > 0) {
|
|
855
|
+
filter.context(initialData);
|
|
856
|
+
}
|
|
854
857
|
return filter;
|
|
855
858
|
}
|
|
856
859
|
single(data) {
|
|
@@ -936,21 +939,16 @@ class PropertyFilter {
|
|
|
936
939
|
}
|
|
937
940
|
async show() {
|
|
938
941
|
const dialog = await this.buildDialog();
|
|
939
|
-
// Context: load
|
|
942
|
+
// Context: always load by key when we have a record id (authoritative full row), then merge any
|
|
943
|
+
// caller/list row context. Skipping fetch when initialContext was non-empty left dialogs without
|
|
944
|
+
// fields not present on the passed row (e.g. Entity:View single() with partial list payload).
|
|
940
945
|
let baseContext = {};
|
|
941
|
-
|
|
942
|
-
const hasInitialData = this.initialContext && Object.keys(this.initialContext).length > 0;
|
|
943
|
-
if ((this.kind === 'update' || this.kind === 'single') && !hasInitialData) {
|
|
946
|
+
if ((this.kind === 'update' || this.kind === 'single') && this.recordId) {
|
|
944
947
|
const id = this.recordId;
|
|
945
|
-
if (!id) {
|
|
946
|
-
throw new Error(`Record id is required for ${this.kind}().`);
|
|
947
|
-
}
|
|
948
|
-
// Use the public method if service is available, otherwise fallback to direct entity access
|
|
949
948
|
if (this.formBuilderService) {
|
|
950
949
|
baseContext = await this.formBuilderService.getRecordById(this.fullName, id);
|
|
951
950
|
}
|
|
952
951
|
else {
|
|
953
|
-
// Fallback to original implementation if service is not available
|
|
954
952
|
const { moduleName, entityName } = parseEntityFullName(this.fullName);
|
|
955
953
|
const entity = await this.entityRegistry.resolve(moduleName, entityName);
|
|
956
954
|
try {
|
|
@@ -964,7 +962,7 @@ class PropertyFilter {
|
|
|
964
962
|
}
|
|
965
963
|
}
|
|
966
964
|
}
|
|
967
|
-
const effectiveContext = merge({},
|
|
965
|
+
const effectiveContext = merge({}, this.initialContext, baseContext);
|
|
968
966
|
dialog.setContext(effectiveContext);
|
|
969
967
|
return await dialog.show();
|
|
970
968
|
}
|
|
@@ -1185,6 +1183,10 @@ class PropertyFilter {
|
|
|
1185
1183
|
}
|
|
1186
1184
|
const sectionLayout = section.layout ?? undefined;
|
|
1187
1185
|
grid.item(sectionLayout, (fs) => {
|
|
1186
|
+
const sectionVisible = section.layout?.visible;
|
|
1187
|
+
if (sectionVisible !== undefined && sectionVisible !== null) {
|
|
1188
|
+
fs.visible(sectionVisible);
|
|
1189
|
+
}
|
|
1188
1190
|
fs.setLook('fieldset');
|
|
1189
1191
|
fs.setTitle((getGroupTitleFromList(allGroups, groupId) || groupId));
|
|
1190
1192
|
fs.setCols(12);
|
|
@@ -2445,19 +2447,11 @@ class AXPEntityDetailPopoverComponent {
|
|
|
2445
2447
|
return prop.name;
|
|
2446
2448
|
}
|
|
2447
2449
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2448
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPEntityDetailPopoverComponent, isStandalone: true, selector: "axp-entity-detail-popover", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, breadcrumb: { classPropertyName: "breadcrumb", publicName: "breadcrumb", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "detailPopover", first: true, predicate: ["detailPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n {{
|
|
2450
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPEntityDetailPopoverComponent, isStandalone: true, selector: "axp-entity-detail-popover", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null }, breadcrumb: { classPropertyName: "breadcrumb", publicName: "breadcrumb", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "detailPopover", first: true, predicate: ["detailPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n {{ entityDetails()?.entityData?.[textField()] ?? item()?.[textField()] | translate | async }}\n </h3>\n @if (breadcrumb()) {\n <div class=\"ax-text-xs ax-text-neutral-500 ax-mt-1\">{{ breadcrumb() }}</div>\n }\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button\n [color]=\"'primary'\"\n [look]=\"'solid'\"\n [text]=\"'@general:actions.open-details.title' | translate | async\"\n (click)=\"navigateToDetails()\"\n >\n </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "repositionOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2449
2451
|
}
|
|
2450
2452
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailPopoverComponent, decorators: [{
|
|
2451
2453
|
type: Component,
|
|
2452
|
-
args: [{ selector: 'axp-entity-detail-popover', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
2453
|
-
CommonModule,
|
|
2454
|
-
AXButtonModule,
|
|
2455
|
-
AXPopoverModule,
|
|
2456
|
-
AXPWidgetCoreModule,
|
|
2457
|
-
AXTranslationModule,
|
|
2458
|
-
AXLoadingModule,
|
|
2459
|
-
AXPResolveMultiLanguageStringPipe,
|
|
2460
|
-
], 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 {{\n (entityDetails()?.entityData?.[textField()] ?? item()?.[textField()]) | axpResolveMultiLanguageString\n }}\n </h3>\n @if (breadcrumb()) {\n <div class=\"ax-text-xs ax-text-neutral-500 ax-mt-1\">{{ breadcrumb() }}</div>\n }\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button\n [color]=\"'primary'\"\n [look]=\"'solid'\"\n [text]=\"'@general:actions.open-details.title' | translate | async\"\n (click)=\"navigateToDetails()\"\n >\n </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n" }]
|
|
2454
|
+
args: [{ selector: 'axp-entity-detail-popover', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXButtonModule, AXPopoverModule, AXPWidgetCoreModule, AXTranslationModule, AXLoadingModule], 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 {{ entityDetails()?.entityData?.[textField()] ?? item()?.[textField()] | translate | async }}\n </h3>\n @if (breadcrumb()) {\n <div class=\"ax-text-xs ax-text-neutral-500 ax-mt-1\">{{ breadcrumb() }}</div>\n }\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button\n [color]=\"'primary'\"\n [look]=\"'solid'\"\n [text]=\"'@general:actions.open-details.title' | translate | async\"\n (click)=\"navigateToDetails()\"\n >\n </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n" }]
|
|
2461
2455
|
}], propDecorators: { entity: [{ type: i0.Input, args: [{ isSignal: true, alias: "entity", required: true }] }], entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: true }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], item: [{ type: i0.Input, args: [{ isSignal: true, alias: "item", required: false }] }], breadcrumb: [{ type: i0.Input, args: [{ isSignal: true, alias: "breadcrumb", required: false }] }], detailPopover: [{ type: i0.ViewChild, args: ['detailPopover', { isSignal: true }] }] } });
|
|
2462
2456
|
|
|
2463
2457
|
class AXPEntityDetailPopoverService {
|
|
@@ -2658,6 +2652,23 @@ class AXMEntityCrudServiceImpl {
|
|
|
2658
2652
|
async custom(request) { }
|
|
2659
2653
|
}
|
|
2660
2654
|
|
|
2655
|
+
/**
|
|
2656
|
+
* Best-effort plain string for thrown {@link Error} messages from command results (no i18n lookup).
|
|
2657
|
+
*/
|
|
2658
|
+
function commandMessageTextForError(value) {
|
|
2659
|
+
if (value == null) {
|
|
2660
|
+
return '';
|
|
2661
|
+
}
|
|
2662
|
+
if (typeof value === 'string') {
|
|
2663
|
+
return value;
|
|
2664
|
+
}
|
|
2665
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
2666
|
+
const values = Object.values(value);
|
|
2667
|
+
const first = values.find((v) => typeof v === 'string' && v.length > 0);
|
|
2668
|
+
return first ?? '';
|
|
2669
|
+
}
|
|
2670
|
+
return String(value);
|
|
2671
|
+
}
|
|
2661
2672
|
//#region ---- EntityDataAccessor ----
|
|
2662
2673
|
/**
|
|
2663
2674
|
* Data accessor for entity operations.
|
|
@@ -2754,7 +2765,7 @@ class EntityDataAccessor {
|
|
|
2754
2765
|
else if (typeof execute === 'string') {
|
|
2755
2766
|
const result = await this.commandService.execute(execute, data);
|
|
2756
2767
|
if (!result?.success) {
|
|
2757
|
-
throw new Error(result?.message?.text || 'Failed to create entity');
|
|
2768
|
+
throw new Error(commandMessageTextForError(result?.message?.text) || 'Failed to create entity');
|
|
2758
2769
|
}
|
|
2759
2770
|
return result.data?.id || result.data;
|
|
2760
2771
|
}
|
|
@@ -2780,7 +2791,7 @@ class EntityDataAccessor {
|
|
|
2780
2791
|
else if (typeof execute === 'string') {
|
|
2781
2792
|
const result = await this.commandService.execute(execute, updateData);
|
|
2782
2793
|
if (!result?.success) {
|
|
2783
|
-
throw new Error(result?.message?.text || 'Failed to update entity');
|
|
2794
|
+
throw new Error(commandMessageTextForError(result?.message?.text) || 'Failed to update entity');
|
|
2784
2795
|
}
|
|
2785
2796
|
return result.data;
|
|
2786
2797
|
}
|
|
@@ -2804,7 +2815,7 @@ class EntityDataAccessor {
|
|
|
2804
2815
|
else if (typeof execute === 'string') {
|
|
2805
2816
|
const result = await this.commandService.execute(execute, id);
|
|
2806
2817
|
if (!result?.success) {
|
|
2807
|
-
throw new Error(result?.message?.text || 'Failed to delete entity');
|
|
2818
|
+
throw new Error(commandMessageTextForError(result?.message?.text) || 'Failed to delete entity');
|
|
2808
2819
|
}
|
|
2809
2820
|
return;
|
|
2810
2821
|
}
|
|
@@ -3698,6 +3709,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
3698
3709
|
}]
|
|
3699
3710
|
}] });
|
|
3700
3711
|
|
|
3712
|
+
//#region ---- Imports ----
|
|
3713
|
+
//#endregion
|
|
3714
|
+
//#region ---- Master interface property sort order ----
|
|
3715
|
+
/**
|
|
3716
|
+
* Sort key for entries in `interfaces.master.{create|update|single}.properties`.
|
|
3717
|
+
* Uses `layout.order` when set and finite; otherwise the property index in that list.
|
|
3718
|
+
*/
|
|
3719
|
+
function getMasterInterfacePropertySortKey(interfaceRow, indexInMasterInterfaceList) {
|
|
3720
|
+
const layout = interfaceRow?.layout;
|
|
3721
|
+
if (!layout) {
|
|
3722
|
+
return indexInMasterInterfaceList;
|
|
3723
|
+
}
|
|
3724
|
+
const o = layout.order;
|
|
3725
|
+
if (o !== undefined && o !== null) {
|
|
3726
|
+
const n = Number(o);
|
|
3727
|
+
if (Number.isFinite(n)) {
|
|
3728
|
+
return n;
|
|
3729
|
+
}
|
|
3730
|
+
}
|
|
3731
|
+
return indexInMasterInterfaceList;
|
|
3732
|
+
}
|
|
3733
|
+
//#endregion
|
|
3734
|
+
|
|
3701
3735
|
class AXPEntityCreateViewSectionViewModel {
|
|
3702
3736
|
constructor(entity, section) {
|
|
3703
3737
|
this.entity = entity;
|
|
@@ -3711,18 +3745,30 @@ class AXPEntityCreateViewSectionViewModel {
|
|
|
3711
3745
|
return this.group.description;
|
|
3712
3746
|
}, ...(ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []));
|
|
3713
3747
|
this.layout = computed(() => {
|
|
3714
|
-
const source = cloneDeep(this.section.layout ?? {
|
|
3748
|
+
const source = cloneDeep(this.section.layout ?? {
|
|
3749
|
+
positions: {
|
|
3750
|
+
lg: {
|
|
3751
|
+
colSpan: 12,
|
|
3752
|
+
},
|
|
3753
|
+
},
|
|
3754
|
+
});
|
|
3715
3755
|
set(source, 'positions.default.colSpan', 12);
|
|
3716
3756
|
return source;
|
|
3717
3757
|
}, ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
3718
3758
|
this.elements = computed(() => {
|
|
3719
3759
|
const { interfaces, properties } = this.entity;
|
|
3720
3760
|
const createProps = interfaces?.master?.create?.properties ?? [];
|
|
3721
|
-
const
|
|
3722
|
-
const
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3761
|
+
const propsByName = new Map(properties.map((p) => [p.name, p]));
|
|
3762
|
+
const ordered = createProps
|
|
3763
|
+
.map((cp, index) => ({ cp, index }))
|
|
3764
|
+
.filter(({ cp }) => {
|
|
3765
|
+
const p = propsByName.get(cp.name);
|
|
3766
|
+
return p !== undefined && p.groupId === this.group.id;
|
|
3767
|
+
})
|
|
3768
|
+
.sort((a, b) => getMasterInterfacePropertySortKey(a.cp, a.index) - getMasterInterfacePropertySortKey(b.cp, b.index));
|
|
3769
|
+
return ordered.map(({ cp }) => {
|
|
3770
|
+
const property = propsByName.get(cp.name);
|
|
3771
|
+
return new AXPEntityCreateViewElementViewModel(this.entity, this, property, cp);
|
|
3726
3772
|
});
|
|
3727
3773
|
}, ...(ngDevMode ? [{ debugName: "elements" }] : /* istanbul ignore next */ []));
|
|
3728
3774
|
}
|
|
@@ -3788,7 +3834,6 @@ class AXPEntityMasterCreateViewModel {
|
|
|
3788
3834
|
const createProps = interfaces?.master?.create?.properties?.map(({ name }) => name) ?? [];
|
|
3789
3835
|
const visibleProperties = properties.filter(({ groupId, schema, name }) => groupId && createProps.includes(name));
|
|
3790
3836
|
const sections = interfaces?.master?.create?.sections?.filter(({ id }) => visibleProperties.some(({ groupId }) => groupId === id)) ?? [];
|
|
3791
|
-
console.log({ sections, visibleProperties });
|
|
3792
3837
|
return sections.map((section) => new AXPEntityCreateViewSectionViewModel(this.entityDef, section));
|
|
3793
3838
|
}, ...(ngDevMode ? [{ debugName: "sections" }] : /* istanbul ignore next */ []));
|
|
3794
3839
|
if (!initialData)
|
|
@@ -3877,6 +3922,48 @@ class AXPEntityMasterListViewQueryViewModel {
|
|
|
3877
3922
|
}
|
|
3878
3923
|
}
|
|
3879
3924
|
class AXPEntityMasterListViewModel {
|
|
3925
|
+
createExpressionScope(data) {
|
|
3926
|
+
return {
|
|
3927
|
+
context: {
|
|
3928
|
+
eval: (path) => get(data, path),
|
|
3929
|
+
},
|
|
3930
|
+
list: {
|
|
3931
|
+
view: () => this.view().name,
|
|
3932
|
+
views: () => this.views().map((v) => ({ name: v.name, title: v.title })),
|
|
3933
|
+
},
|
|
3934
|
+
};
|
|
3935
|
+
}
|
|
3936
|
+
async resolveCommandNameExpression(commandName, data) {
|
|
3937
|
+
if (!commandName || !commandName.includes('{{')) {
|
|
3938
|
+
return commandName;
|
|
3939
|
+
}
|
|
3940
|
+
const scope = this.createExpressionScope(data);
|
|
3941
|
+
const result = await this.expressionEvaluator.evaluate({ value: commandName }, scope);
|
|
3942
|
+
const resolved = result?.value;
|
|
3943
|
+
return typeof resolved === 'string' && resolved.trim() !== '' ? resolved : commandName;
|
|
3944
|
+
}
|
|
3945
|
+
async resolveTitleExpression(title, data) {
|
|
3946
|
+
if (!title || !title.includes('{{')) {
|
|
3947
|
+
return title;
|
|
3948
|
+
}
|
|
3949
|
+
const scope = this.createExpressionScope(data);
|
|
3950
|
+
const result = await this.expressionEvaluator.evaluate({ value: title }, scope);
|
|
3951
|
+
const resolved = result?.value;
|
|
3952
|
+
return typeof resolved === 'string' && resolved.trim() !== '' ? resolved : title;
|
|
3953
|
+
}
|
|
3954
|
+
async resolveTriggerName(triggerName, data) {
|
|
3955
|
+
if (!triggerName) {
|
|
3956
|
+
return triggerName;
|
|
3957
|
+
}
|
|
3958
|
+
const ampIndex = triggerName.indexOf('&');
|
|
3959
|
+
if (ampIndex < 0) {
|
|
3960
|
+
return await this.resolveCommandNameExpression(triggerName, data);
|
|
3961
|
+
}
|
|
3962
|
+
const commandPart = triggerName.slice(0, ampIndex);
|
|
3963
|
+
const suffix = triggerName.slice(ampIndex); // includes '&'
|
|
3964
|
+
const resolvedCommand = await this.resolveCommandNameExpression(commandPart, data);
|
|
3965
|
+
return `${resolvedCommand}${suffix}`;
|
|
3966
|
+
}
|
|
3880
3967
|
async setView(viewName = null) {
|
|
3881
3968
|
const entitySetting = await this.settings.get(this.settingEntityKey);
|
|
3882
3969
|
const selectedViewName = entitySetting?.list?.currentView;
|
|
@@ -4065,13 +4152,7 @@ class AXPEntityMasterListViewModel {
|
|
|
4065
4152
|
};
|
|
4066
4153
|
this.sortedFields = signal([], ...(ngDevMode ? [{ debugName: "sortedFields" }] : /* istanbul ignore next */ []));
|
|
4067
4154
|
this.evaluateExpressions = async (options, data) => {
|
|
4068
|
-
const scope =
|
|
4069
|
-
context: {
|
|
4070
|
-
eval: (path) => {
|
|
4071
|
-
return get(data, path);
|
|
4072
|
-
},
|
|
4073
|
-
},
|
|
4074
|
-
};
|
|
4155
|
+
const scope = this.createExpressionScope(data);
|
|
4075
4156
|
return await this.expressionEvaluator.evaluate(options, scope);
|
|
4076
4157
|
};
|
|
4077
4158
|
this.workflow.events$
|
|
@@ -4243,7 +4324,7 @@ class AXPEntityMasterListViewModel {
|
|
|
4243
4324
|
this.selectedCategory.set(category);
|
|
4244
4325
|
}
|
|
4245
4326
|
async getPrimaryActions() {
|
|
4246
|
-
const scope =
|
|
4327
|
+
const scope = this.createExpressionScope(null);
|
|
4247
4328
|
const actions = await Promise.all(this.allActions()
|
|
4248
4329
|
.filter((a) => a.priority == 'primary' &&
|
|
4249
4330
|
((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) ||
|
|
@@ -4253,12 +4334,14 @@ class AXPEntityMasterListViewModel {
|
|
|
4253
4334
|
if (isHidden)
|
|
4254
4335
|
return null;
|
|
4255
4336
|
const disabled = await this.expressionEvaluator.evaluate(a.disabled, scope);
|
|
4256
|
-
|
|
4337
|
+
const name = await this.resolveTriggerName(a.name, null);
|
|
4338
|
+
const title = await this.resolveTitleExpression(a.title, null);
|
|
4339
|
+
return { ...a, disabled, name, title };
|
|
4257
4340
|
}));
|
|
4258
|
-
return actions;
|
|
4341
|
+
return actions.filter(Boolean);
|
|
4259
4342
|
}
|
|
4260
4343
|
async getSecondaryActions() {
|
|
4261
|
-
const scope =
|
|
4344
|
+
const scope = this.createExpressionScope(null);
|
|
4262
4345
|
const actions = await Promise.all(this.allActions()
|
|
4263
4346
|
.filter((a) => a.priority == 'secondary' &&
|
|
4264
4347
|
((a.scope == AXPEntityCommandScope.Selected && this.hasSelectedItems()) ||
|
|
@@ -4268,16 +4351,14 @@ class AXPEntityMasterListViewModel {
|
|
|
4268
4351
|
if (isHidden)
|
|
4269
4352
|
return null;
|
|
4270
4353
|
const disabled = await this.expressionEvaluator.evaluate(a.disabled, scope);
|
|
4271
|
-
|
|
4354
|
+
const name = await this.resolveTriggerName(a.name, null);
|
|
4355
|
+
const title = await this.resolveTitleExpression(a.title, null);
|
|
4356
|
+
return { ...a, disabled, name, title };
|
|
4272
4357
|
}));
|
|
4273
|
-
return actions;
|
|
4358
|
+
return actions.filter(Boolean);
|
|
4274
4359
|
}
|
|
4275
4360
|
async secondaryRowActions(rowData) {
|
|
4276
|
-
const scope =
|
|
4277
|
-
context: {
|
|
4278
|
-
eval: (path) => get(rowData, path),
|
|
4279
|
-
},
|
|
4280
|
-
};
|
|
4361
|
+
const scope = this.createExpressionScope(rowData);
|
|
4281
4362
|
const actions = await Promise.all(this.allActions()
|
|
4282
4363
|
.filter((a) => a.scope === AXPEntityCommandScope.Individual && a.priority === 'secondary')
|
|
4283
4364
|
.map(async (a) => {
|
|
@@ -4285,7 +4366,9 @@ class AXPEntityMasterListViewModel {
|
|
|
4285
4366
|
if (isHidden)
|
|
4286
4367
|
return null;
|
|
4287
4368
|
const disabled = await this.expressionEvaluator.evaluate(a.disabled, scope);
|
|
4288
|
-
|
|
4369
|
+
const name = await this.resolveTriggerName(a.name, rowData);
|
|
4370
|
+
const title = await this.resolveTitleExpression(a.title, rowData);
|
|
4371
|
+
return { ...a, disabled, name, title };
|
|
4289
4372
|
}));
|
|
4290
4373
|
return actions.filter(Boolean);
|
|
4291
4374
|
}
|
|
@@ -4536,7 +4619,8 @@ class AXPEntityMasterListViewModel {
|
|
|
4536
4619
|
: c.scope == AXPEntityCommandScope.Individual) ||
|
|
4537
4620
|
c.scope == AXPEntityCommandScope.TypeLevel));
|
|
4538
4621
|
});
|
|
4539
|
-
const
|
|
4622
|
+
const resolvedTriggerName = await this.resolveTriggerName(commandName, data);
|
|
4623
|
+
const command = resolvedTriggerName.split('&')[0];
|
|
4540
4624
|
const options = await this.evaluateExpressions(action?.options, data);
|
|
4541
4625
|
const baseData = action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data;
|
|
4542
4626
|
const commandData = this.mergeDefaultCategoryForCreate(command, baseData);
|
|
@@ -4878,10 +4962,16 @@ class AXPEntityUpdateViewSectionViewModel {
|
|
|
4878
4962
|
this.elements = computed(() => {
|
|
4879
4963
|
const { interfaces, properties } = this.entity;
|
|
4880
4964
|
const updateProps = interfaces?.master?.update?.properties ?? [];
|
|
4881
|
-
const
|
|
4882
|
-
const
|
|
4883
|
-
|
|
4884
|
-
|
|
4965
|
+
const propsByName = new Map(properties.map((p) => [p.name, p]));
|
|
4966
|
+
const ordered = updateProps
|
|
4967
|
+
.map((up, index) => ({ up, index }))
|
|
4968
|
+
.filter(({ up }) => {
|
|
4969
|
+
const p = propsByName.get(up.name);
|
|
4970
|
+
return p !== undefined && p.groupId === this.group.id && p.schema.visible !== false;
|
|
4971
|
+
})
|
|
4972
|
+
.sort((a, b) => getMasterInterfacePropertySortKey(a.up, a.index) - getMasterInterfacePropertySortKey(b.up, b.index));
|
|
4973
|
+
return ordered.map(({ up }) => {
|
|
4974
|
+
const property = propsByName.get(up.name);
|
|
4885
4975
|
return new AXPEntityMasterUpdateElementViewModel(this.entity, property);
|
|
4886
4976
|
});
|
|
4887
4977
|
}, ...(ngDevMode ? [{ debugName: "elements" }] : /* istanbul ignore next */ []));
|
|
@@ -5133,17 +5223,31 @@ class AXPEntityMasterSingleViewGroupViewModel {
|
|
|
5133
5223
|
}, ...(ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []));
|
|
5134
5224
|
this.props = computed(() => {
|
|
5135
5225
|
const { properties, interfaces } = this.entity;
|
|
5136
|
-
const
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5226
|
+
const groupPropertyNames = new Set(properties.filter(({ groupId, schema }) => groupId === this.group.id && schema.visible !== false).map((p) => p.name));
|
|
5227
|
+
const singleProps = interfaces?.master?.single?.properties ?? [];
|
|
5228
|
+
const ordered = singleProps
|
|
5229
|
+
.map((vp, index) => ({ vp, index }))
|
|
5230
|
+
.filter(({ vp }) => groupPropertyNames.has(vp.name))
|
|
5231
|
+
.sort((a, b) => getMasterInterfacePropertySortKey(a.vp, a.index) - getMasterInterfacePropertySortKey(b.vp, b.index));
|
|
5232
|
+
return ordered.map(({ vp }) => new AXPEntityMasterSingleElementViewModel(this.entity, this, vp));
|
|
5141
5233
|
}, ...(ngDevMode ? [{ debugName: "props" }] : /* istanbul ignore next */ []));
|
|
5142
5234
|
this.editableProps = computed(() => {
|
|
5143
5235
|
const { properties, interfaces } = this.entity;
|
|
5144
|
-
const
|
|
5145
|
-
const
|
|
5146
|
-
|
|
5236
|
+
const singleViews = interfaces?.master?.single?.properties ?? [];
|
|
5237
|
+
const updateViews = interfaces?.master?.update?.properties ?? [];
|
|
5238
|
+
const propsByName = new Map(properties.map((p) => [p.name, p]));
|
|
5239
|
+
const ordered = updateViews
|
|
5240
|
+
.map((up, index) => ({ up, index }))
|
|
5241
|
+
.filter(({ up }) => {
|
|
5242
|
+
const p = propsByName.get(up.name);
|
|
5243
|
+
return p !== undefined && p.groupId === this.group.id && p.schema.visible !== false;
|
|
5244
|
+
})
|
|
5245
|
+
.sort((a, b) => getMasterInterfacePropertySortKey(a.up, a.index) - getMasterInterfacePropertySortKey(b.up, b.index));
|
|
5246
|
+
return ordered.map(({ up }) => {
|
|
5247
|
+
const viewProp = singleViews.find((s) => s.name === up.name) ??
|
|
5248
|
+
{ name: up.name, layout: up.layout };
|
|
5249
|
+
return new AXPEntityMasterSingleElementViewModel(this.entity, this, viewProp);
|
|
5250
|
+
});
|
|
5147
5251
|
}, ...(ngDevMode ? [{ debugName: "editableProps" }] : /* istanbul ignore next */ []));
|
|
5148
5252
|
this.editable = computed(() => {
|
|
5149
5253
|
return this.editableProps().length > 0;
|
|
@@ -5829,7 +5933,6 @@ class AXPEntityCategoryTreeSelectorComponent extends AXBasePageComponent {
|
|
|
5829
5933
|
/** i18n key for the synthetic "all items" root row; resolved in the template with the translate pipe. */
|
|
5830
5934
|
this.categoryTreeRootTitleI18nKey = AXP_CATEGORY_TREE_ROOT_TITLE_I18N_KEY;
|
|
5831
5935
|
this.translationService = inject(AXTranslationService);
|
|
5832
|
-
this.mlsResolver = inject(AXPMultiLanguageStringResolverService);
|
|
5833
5936
|
this.highlightService = inject(AXHighlightService);
|
|
5834
5937
|
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
5835
5938
|
//#endregion
|
|
@@ -7385,7 +7488,7 @@ class AXPEntityCategoryTreeSelectorComponent extends AXBasePageComponent {
|
|
|
7385
7488
|
const nodeData = pathNode['data'];
|
|
7386
7489
|
const pathTitle = nodeData
|
|
7387
7490
|
? this.getNodeTitle(nodeData)
|
|
7388
|
-
: this.
|
|
7491
|
+
: this.translationService.resolve(pathNode['title']);
|
|
7389
7492
|
if (pathTitle) {
|
|
7390
7493
|
titlePath.push(pathTitle);
|
|
7391
7494
|
}
|
|
@@ -7468,7 +7571,7 @@ class AXPEntityCategoryTreeSelectorComponent extends AXBasePageComponent {
|
|
|
7468
7571
|
}
|
|
7469
7572
|
const textField = this.treeConfig.textField || 'title';
|
|
7470
7573
|
const raw = nodeData[textField];
|
|
7471
|
-
return this.
|
|
7574
|
+
return this.translationService.resolve(raw);
|
|
7472
7575
|
}
|
|
7473
7576
|
async getSelectedItems() {
|
|
7474
7577
|
// selectedNodeIds now only contains LEAF nodes (already filtered)
|
|
@@ -7544,7 +7647,7 @@ class AXPEntityCategoryTreeSelectorComponent extends AXBasePageComponent {
|
|
|
7544
7647
|
} @else if (searchValue().trim() && !isSearching()) {
|
|
7545
7648
|
<div class="ax-text-xs ax-text-muted ax-flex ax-items-center ax-gap-1">
|
|
7546
7649
|
@if (searchResultCount() > 0) {
|
|
7547
|
-
<span>{{ resultsFoundText() }}</span>
|
|
7650
|
+
<span>{{ resultsFoundText() | translate | async }}</span>
|
|
7548
7651
|
}
|
|
7549
7652
|
</div>
|
|
7550
7653
|
}
|
|
@@ -7598,7 +7701,7 @@ class AXPEntityCategoryTreeSelectorComponent extends AXBasePageComponent {
|
|
|
7598
7701
|
@if (node.id === 'all') {
|
|
7599
7702
|
{{ categoryTreeRootTitleI18nKey | translate | async }}
|
|
7600
7703
|
} @else {
|
|
7601
|
-
{{ rawLabel |
|
|
7704
|
+
{{ rawLabel | translate | async }}
|
|
7602
7705
|
}
|
|
7603
7706
|
</span>
|
|
7604
7707
|
</div>
|
|
@@ -7651,7 +7754,7 @@ class AXPEntityCategoryTreeSelectorComponent extends AXBasePageComponent {
|
|
|
7651
7754
|
></ax-button>
|
|
7652
7755
|
</ax-suffix>
|
|
7653
7756
|
</ax-footer>
|
|
7654
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXBadgeModule }, { kind: "component", type: i2$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$1.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: AXSearchBoxModule }, { kind: "component", type: i4$1.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"] }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i5$1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: ["datasource", "selectMode", "selectionBehavior", "dragArea", "dragBehavior", "showIcons", "showChildrenBadge", "expandedIcon", "collapsedIcon", "indentSize", "look", "nodeTemplate", "idField", "titleField", "tooltipField", "iconField", "expandedField", "selectedField", "indeterminateField", "disabledField", "hiddenField", "childrenField", "childrenCountField", "dataField", "inheritDisabled", "expandOnDoubleClick", "doubleClickDuration", "tooltipDelay"], outputs: ["datasourceChange", "onBeforeDrop", "onNodeToggle", "onNodeSelect", "onNodeDoubleClick", "onNodeClick", "onSelectionChange", "onOrderChange", "onMoveChange", "onItemsChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }
|
|
7757
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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: AXBadgeModule }, { kind: "component", type: i2$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$1.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: AXSearchBoxModule }, { kind: "component", type: i4$1.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"] }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i5$1.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "component", type: AXTreeViewComponent, selector: "ax-tree-view", inputs: ["datasource", "selectMode", "selectionBehavior", "dragArea", "dragBehavior", "showIcons", "showChildrenBadge", "expandedIcon", "collapsedIcon", "indentSize", "look", "nodeTemplate", "idField", "titleField", "tooltipField", "iconField", "expandedField", "selectedField", "indeterminateField", "disabledField", "hiddenField", "childrenField", "childrenCountField", "dataField", "inheritDisabled", "expandOnDoubleClick", "doubleClickDuration", "tooltipDelay"], outputs: ["datasourceChange", "onBeforeDrop", "onNodeToggle", "onNodeSelect", "onNodeDoubleClick", "onNodeClick", "onSelectionChange", "onOrderChange", "onMoveChange", "onItemsChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7655
7758
|
}
|
|
7656
7759
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryTreeSelectorComponent, decorators: [{
|
|
7657
7760
|
type: Component,
|
|
@@ -7681,7 +7784,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
7681
7784
|
} @else if (searchValue().trim() && !isSearching()) {
|
|
7682
7785
|
<div class="ax-text-xs ax-text-muted ax-flex ax-items-center ax-gap-1">
|
|
7683
7786
|
@if (searchResultCount() > 0) {
|
|
7684
|
-
<span>{{ resultsFoundText() }}</span>
|
|
7787
|
+
<span>{{ resultsFoundText() | translate | async }}</span>
|
|
7685
7788
|
}
|
|
7686
7789
|
</div>
|
|
7687
7790
|
}
|
|
@@ -7735,7 +7838,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
7735
7838
|
@if (node.id === 'all') {
|
|
7736
7839
|
{{ categoryTreeRootTitleI18nKey | translate | async }}
|
|
7737
7840
|
} @else {
|
|
7738
|
-
{{ rawLabel |
|
|
7841
|
+
{{ rawLabel | translate | async }}
|
|
7739
7842
|
}
|
|
7740
7843
|
</span>
|
|
7741
7844
|
</div>
|
|
@@ -7801,7 +7904,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
7801
7904
|
AXTreeViewComponent,
|
|
7802
7905
|
AXTranslationModule,
|
|
7803
7906
|
AXPStateMessageComponent,
|
|
7804
|
-
AXPResolveMultiLanguageStringPipe,
|
|
7805
7907
|
FormsModule,
|
|
7806
7908
|
],
|
|
7807
7909
|
}]
|
|
@@ -7941,16 +8043,14 @@ class AXPEntityCategoryBatchResolverService {
|
|
|
7941
8043
|
items = result?.items ?? [];
|
|
7942
8044
|
allItems = items;
|
|
7943
8045
|
}
|
|
7944
|
-
const pathMap = parentKey
|
|
7945
|
-
? this.buildPathMap(allItems, valueField, textField, parentKey)
|
|
7946
|
-
: null;
|
|
8046
|
+
const pathMap = parentKey ? this.buildPathMap(allItems, valueField, textField, parentKey) : null;
|
|
7947
8047
|
const result = new Map();
|
|
7948
8048
|
for (const item of items) {
|
|
7949
8049
|
const id = String(get(item, valueField));
|
|
7950
8050
|
const rawTitle = get(item, textField);
|
|
7951
8051
|
const titleText = this.resolveCategoryLabel(rawTitle);
|
|
7952
8052
|
const path = pathMap
|
|
7953
|
-
? pathMap.get(id) ?? (rawTitle != null && rawTitle !== '' ? [titleText] : [])
|
|
8053
|
+
? (pathMap.get(id) ?? (rawTitle != null && rawTitle !== '' ? [titleText] : []))
|
|
7954
8054
|
: rawTitle != null && rawTitle !== ''
|
|
7955
8055
|
? [titleText]
|
|
7956
8056
|
: [];
|
|
@@ -7983,10 +8083,7 @@ class AXPEntityCategoryBatchResolverService {
|
|
|
7983
8083
|
return [];
|
|
7984
8084
|
const parentId = get(item, parentKey);
|
|
7985
8085
|
const title = this.resolveCategoryLabel(get(item, textField));
|
|
7986
|
-
if (parentId == null ||
|
|
7987
|
-
parentId === '' ||
|
|
7988
|
-
parentId === 'all' ||
|
|
7989
|
-
String(parentId) === id) {
|
|
8086
|
+
if (parentId == null || parentId === '' || parentId === 'all' || String(parentId) === id) {
|
|
7990
8087
|
const path = title ? [title] : [];
|
|
7991
8088
|
pathMap.set(id, path);
|
|
7992
8089
|
visited.add(id);
|
|
@@ -8427,7 +8524,7 @@ var entityCategoryWidgetColumn_component = /*#__PURE__*/Object.freeze({
|
|
|
8427
8524
|
class AXPTruncatedBreadcrumbComponent {
|
|
8428
8525
|
//#endregion
|
|
8429
8526
|
constructor() {
|
|
8430
|
-
this.mlsResolver = inject(
|
|
8527
|
+
this.mlsResolver = inject(AXTranslationService);
|
|
8431
8528
|
/** Plain string or locale map per segment; truncation uses resolved text (see {@link resolvedSectionTexts}). */
|
|
8432
8529
|
this.sections = input([], ...(ngDevMode ? [{ debugName: "sections" }] : /* istanbul ignore next */ []));
|
|
8433
8530
|
this.characterLimit = input(20, ...(ngDevMode ? [{ debugName: "characterLimit" }] : /* istanbul ignore next */ []));
|
|
@@ -8450,7 +8547,7 @@ class AXPTruncatedBreadcrumbComponent {
|
|
|
8450
8547
|
if (this.sectionLimit() === 'auto') {
|
|
8451
8548
|
const sections = this.resolvedSectionTexts();
|
|
8452
8549
|
// Return the maximum length of any section to prevent truncation
|
|
8453
|
-
return sections.length > 0 ? Math.max(...sections.map(s => s.length)) : Number.MAX_SAFE_INTEGER;
|
|
8550
|
+
return sections.length > 0 ? Math.max(...sections.map((s) => s.length)) : Number.MAX_SAFE_INTEGER;
|
|
8454
8551
|
}
|
|
8455
8552
|
// If only characterLimit is auto, calculate based on container width
|
|
8456
8553
|
const width = this.containerWidth();
|
|
@@ -8554,7 +8651,7 @@ class AXPTruncatedBreadcrumbComponent {
|
|
|
8554
8651
|
} @else {
|
|
8555
8652
|
@if (isExpanded() && canToggle()) {
|
|
8556
8653
|
@for (section of sections(); track $index; let isLast = $last) {
|
|
8557
|
-
<span class="ax-text-sm">{{ section |
|
|
8654
|
+
<span class="ax-text-sm">{{ section | translate | async }}</span>
|
|
8558
8655
|
@if (!isLast) {
|
|
8559
8656
|
<ax-icon [class]="separatorIcon()" class="rtl:ax-rotate-180 ax-text-muted ax-text-xs"></ax-icon>
|
|
8560
8657
|
}
|
|
@@ -8594,7 +8691,7 @@ class AXPTruncatedBreadcrumbComponent {
|
|
|
8594
8691
|
}
|
|
8595
8692
|
}
|
|
8596
8693
|
</div>
|
|
8597
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "pipe", type:
|
|
8694
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
8598
8695
|
}
|
|
8599
8696
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPTruncatedBreadcrumbComponent, decorators: [{
|
|
8600
8697
|
type: Component,
|
|
@@ -8610,7 +8707,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
8610
8707
|
} @else {
|
|
8611
8708
|
@if (isExpanded() && canToggle()) {
|
|
8612
8709
|
@for (section of sections(); track $index; let isLast = $last) {
|
|
8613
|
-
<span class="ax-text-sm">{{ section |
|
|
8710
|
+
<span class="ax-text-sm">{{ section | translate | async }}</span>
|
|
8614
8711
|
@if (!isLast) {
|
|
8615
8712
|
<ax-icon [class]="separatorIcon()" class="rtl:ax-rotate-180 ax-text-muted ax-text-xs"></ax-icon>
|
|
8616
8713
|
}
|
|
@@ -8652,7 +8749,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
8652
8749
|
</div>
|
|
8653
8750
|
`,
|
|
8654
8751
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8655
|
-
imports: [AXDecoratorModule,
|
|
8752
|
+
imports: [AXDecoratorModule, AXTranslationModule, AsyncPipe],
|
|
8656
8753
|
}]
|
|
8657
8754
|
}], ctorParameters: () => [], propDecorators: { sections: [{ type: i0.Input, args: [{ isSignal: true, alias: "sections", required: false }] }], characterLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "characterLimit", required: false }] }], sectionLimit: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionLimit", required: false }] }], separatorIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "separatorIcon", required: false }] }], ellipsisIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "ellipsisIcon", required: false }] }], eyeIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "eyeIcon", required: false }] }], container: [{ type: i0.ViewChild, args: ['container', { isSignal: true }] }] } });
|
|
8658
8755
|
|
|
@@ -9112,7 +9209,11 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
9112
9209
|
}
|
|
9113
9210
|
// Return item with path array, or just the item title if no path
|
|
9114
9211
|
const rawLeafTitle = get(item, textField);
|
|
9115
|
-
const pathArray = path.length > 0
|
|
9212
|
+
const pathArray = path.length > 0
|
|
9213
|
+
? path
|
|
9214
|
+
: rawLeafTitle != null && rawLeafTitle !== ''
|
|
9215
|
+
? [rawLeafTitle]
|
|
9216
|
+
: [];
|
|
9116
9217
|
return { ...item, path: pathArray };
|
|
9117
9218
|
}
|
|
9118
9219
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -9233,7 +9334,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
9233
9334
|
AXFormModule,
|
|
9234
9335
|
AXTagBoxModule,
|
|
9235
9336
|
AXTranslationModule,
|
|
9236
|
-
AXPTruncatedBreadcrumbComponent
|
|
9337
|
+
AXPTruncatedBreadcrumbComponent,
|
|
9237
9338
|
],
|
|
9238
9339
|
}]
|
|
9239
9340
|
}], propDecorators: { tagBox: [{ type: i0.ViewChild, args: ['tagBoxComponent', { isSignal: true }] }] } });
|
|
@@ -9326,21 +9427,18 @@ class AXPEntityCategoryWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
9326
9427
|
} @else {
|
|
9327
9428
|
@if (displayItems().length > 1) {
|
|
9328
9429
|
@for (item of displayItems(); track item.id) {
|
|
9329
|
-
<ax-badge
|
|
9330
|
-
class="ax-p-0.5 {{ badgeClass() }}"
|
|
9331
|
-
[text]="item.titleRaw | axpResolveMultiLanguageString"
|
|
9332
|
-
></ax-badge>
|
|
9430
|
+
<ax-badge class="ax-p-0.5 {{ badgeClass() }}" [text]="(item.titleRaw | translate | async) || ''"></ax-badge>
|
|
9333
9431
|
}
|
|
9334
9432
|
} @else if (displayItems().length == 1) {
|
|
9335
9433
|
<ax-badge
|
|
9336
9434
|
class="ax-p-0.5 {{ badgeClass() }}"
|
|
9337
|
-
[text]="displayItems()[0].titleRaw |
|
|
9435
|
+
[text]="(displayItems()[0].titleRaw | translate | async) || ''"
|
|
9338
9436
|
></ax-badge>
|
|
9339
9437
|
} @else {
|
|
9340
9438
|
<span class="ax-text-muted">---</span>
|
|
9341
9439
|
}
|
|
9342
9440
|
}
|
|
9343
|
-
`, 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"] }, { kind: "pipe", type:
|
|
9441
|
+
`, 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"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9344
9442
|
}
|
|
9345
9443
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryWidgetViewComponent, decorators: [{
|
|
9346
9444
|
type: Component,
|
|
@@ -9352,15 +9450,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
9352
9450
|
} @else {
|
|
9353
9451
|
@if (displayItems().length > 1) {
|
|
9354
9452
|
@for (item of displayItems(); track item.id) {
|
|
9355
|
-
<ax-badge
|
|
9356
|
-
class="ax-p-0.5 {{ badgeClass() }}"
|
|
9357
|
-
[text]="item.titleRaw | axpResolveMultiLanguageString"
|
|
9358
|
-
></ax-badge>
|
|
9453
|
+
<ax-badge class="ax-p-0.5 {{ badgeClass() }}" [text]="(item.titleRaw | translate | async) || ''"></ax-badge>
|
|
9359
9454
|
}
|
|
9360
9455
|
} @else if (displayItems().length == 1) {
|
|
9361
9456
|
<ax-badge
|
|
9362
9457
|
class="ax-p-0.5 {{ badgeClass() }}"
|
|
9363
|
-
[text]="displayItems()[0].titleRaw |
|
|
9458
|
+
[text]="(displayItems()[0].titleRaw | translate | async) || ''"
|
|
9364
9459
|
></ax-badge>
|
|
9365
9460
|
} @else {
|
|
9366
9461
|
<span class="ax-text-muted">---</span>
|
|
@@ -9368,7 +9463,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
9368
9463
|
}
|
|
9369
9464
|
`,
|
|
9370
9465
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
9371
|
-
imports: [AXLoadingModule, AXBadgeModule,
|
|
9466
|
+
imports: [AXLoadingModule, AXBadgeModule, AXTranslationModule, AsyncPipe],
|
|
9372
9467
|
}]
|
|
9373
9468
|
}] });
|
|
9374
9469
|
|
|
@@ -10501,7 +10596,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10501
10596
|
[class.ax-sm]="deviceService.isSmall()"
|
|
10502
10597
|
[iconOnly]="deviceService.isSmall()"
|
|
10503
10598
|
[disabled]="action.disabled"
|
|
10504
|
-
[text]="action.title"
|
|
10599
|
+
[text]="(action.title | translate | async)!"
|
|
10505
10600
|
[look]="'solid'"
|
|
10506
10601
|
[color]="action.color"
|
|
10507
10602
|
(onClick)="handleActionClick(action)"
|
|
@@ -10515,7 +10610,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10515
10610
|
@for (sub of action?.items; track $index) {
|
|
10516
10611
|
@if (sub.visible != false) {
|
|
10517
10612
|
<ax-button-item
|
|
10518
|
-
[text]="sub.title"
|
|
10613
|
+
[text]="(sub.title | translate | async)!"
|
|
10519
10614
|
[color]="sub.color"
|
|
10520
10615
|
[disabled]="sub.disabled"
|
|
10521
10616
|
(onClick)="handleActionClick(sub)"
|
|
@@ -10551,7 +10646,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10551
10646
|
@for (item of secondaryActions(); track $index) {
|
|
10552
10647
|
@if (item.visible != false) {
|
|
10553
10648
|
<ax-button-item
|
|
10554
|
-
[text]="item.title"
|
|
10649
|
+
[text]="(item.title | translate | async)!"
|
|
10555
10650
|
[color]="item.color"
|
|
10556
10651
|
[disabled]="item.disabled"
|
|
10557
10652
|
(onClick)="handleSecondaryActionClick(item)"
|
|
@@ -10618,7 +10713,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
10618
10713
|
[class.ax-sm]="deviceService.isSmall()"
|
|
10619
10714
|
[iconOnly]="deviceService.isSmall()"
|
|
10620
10715
|
[disabled]="action.disabled"
|
|
10621
|
-
[text]="action.title"
|
|
10716
|
+
[text]="(action.title | translate | async)!"
|
|
10622
10717
|
[look]="'solid'"
|
|
10623
10718
|
[color]="action.color"
|
|
10624
10719
|
(onClick)="handleActionClick(action)"
|
|
@@ -10632,7 +10727,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
10632
10727
|
@for (sub of action?.items; track $index) {
|
|
10633
10728
|
@if (sub.visible != false) {
|
|
10634
10729
|
<ax-button-item
|
|
10635
|
-
[text]="sub.title"
|
|
10730
|
+
[text]="(sub.title | translate | async)!"
|
|
10636
10731
|
[color]="sub.color"
|
|
10637
10732
|
[disabled]="sub.disabled"
|
|
10638
10733
|
(onClick)="handleActionClick(sub)"
|
|
@@ -10668,7 +10763,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
10668
10763
|
@for (item of secondaryActions(); track $index) {
|
|
10669
10764
|
@if (item.visible != false) {
|
|
10670
10765
|
<ax-button-item
|
|
10671
|
-
[text]="item.title"
|
|
10766
|
+
[text]="(item.title | translate | async)!"
|
|
10672
10767
|
[color]="item.color"
|
|
10673
10768
|
[disabled]="item.disabled"
|
|
10674
10769
|
(onClick)="handleSecondaryActionClick(item)"
|
|
@@ -10784,7 +10879,10 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10784
10879
|
return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
|
|
10785
10880
|
}, ...(ngDevMode ? [{ debugName: "displayFormat" }] : /* istanbul ignore next */ []));
|
|
10786
10881
|
this.displayField = computed(() => {
|
|
10787
|
-
return this.textField() ??
|
|
10882
|
+
return (this.textField() ??
|
|
10883
|
+
this.entityDef()?.formats.lookup ??
|
|
10884
|
+
this.entityDef()?.properties.find((c) => c.name != 'id')?.name ??
|
|
10885
|
+
'title');
|
|
10788
10886
|
}, ...(ngDevMode ? [{ debugName: "displayField" }] : /* istanbul ignore next */ []));
|
|
10789
10887
|
this.loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
|
|
10790
10888
|
this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : /* istanbul ignore next */ []));
|
|
@@ -10827,9 +10925,6 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10827
10925
|
text: item,
|
|
10828
10926
|
};
|
|
10829
10927
|
}
|
|
10830
|
-
/**
|
|
10831
|
-
* Raw label for {@link AXPResolveMultiLanguageStringPipe} (handles {@link AXPMultiLanguageString} and plain strings).
|
|
10832
|
-
*/
|
|
10833
10928
|
getDisplayRaw(item) {
|
|
10834
10929
|
if (!item) {
|
|
10835
10930
|
return '';
|
|
@@ -10861,50 +10956,48 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10861
10956
|
}
|
|
10862
10957
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
10863
10958
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPLookupWidgetViewComponent, isStandalone: true, selector: "axp-lookup-widget-view", host: { properties: { "class": "this.__class" } }, usesInheritance: true, ngImport: i0, template: `
|
|
10864
|
-
@if(loading())
|
|
10865
|
-
{
|
|
10959
|
+
@if (loading()) {
|
|
10866
10960
|
<ax-loading></ax-loading>
|
|
10867
|
-
}
|
|
10868
|
-
|
|
10869
|
-
@
|
|
10870
|
-
|
|
10871
|
-
<ax-badge class="ax-p-0.5 {{badgeClass()}}" [text]="item.text | axpResolveMultiLanguageString" ></ax-badge>
|
|
10872
|
-
}
|
|
10873
|
-
}
|
|
10874
|
-
@else if(displayItems().length == 1) {
|
|
10875
|
-
<ax-badge class="ax-p-0.5 {{badgeClass()}}" [text]="displayItems()[0].text | axpResolveMultiLanguageString" ></ax-badge>
|
|
10876
|
-
}
|
|
10877
|
-
@else {
|
|
10878
|
-
<span class="ax-text-muted">---</span>
|
|
10961
|
+
} @else {
|
|
10962
|
+
@if (displayItems().length > 1) {
|
|
10963
|
+
@for (item of displayItems(); track $index) {
|
|
10964
|
+
<ax-badge class="ax-p-0.5 {{ badgeClass() }}" [text]="(item.text | translate | async) || ''"></ax-badge>
|
|
10879
10965
|
}
|
|
10966
|
+
} @else if (displayItems().length == 1) {
|
|
10967
|
+
<ax-badge
|
|
10968
|
+
class="ax-p-0.5 {{ badgeClass() }}"
|
|
10969
|
+
[text]="(displayItems()[0].text | translate | async) || ''"
|
|
10970
|
+
></ax-badge>
|
|
10971
|
+
} @else {
|
|
10972
|
+
<span class="ax-text-muted">---</span>
|
|
10973
|
+
}
|
|
10880
10974
|
}
|
|
10881
|
-
`, 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"] }, { kind: "pipe", type:
|
|
10975
|
+
`, 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"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10882
10976
|
}
|
|
10883
10977
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetViewComponent, decorators: [{
|
|
10884
10978
|
type: Component,
|
|
10885
10979
|
args: [{
|
|
10886
10980
|
selector: 'axp-lookup-widget-view',
|
|
10887
10981
|
template: `
|
|
10888
|
-
@if(loading())
|
|
10889
|
-
{
|
|
10982
|
+
@if (loading()) {
|
|
10890
10983
|
<ax-loading></ax-loading>
|
|
10891
|
-
}
|
|
10892
|
-
|
|
10893
|
-
@
|
|
10894
|
-
|
|
10895
|
-
<ax-badge class="ax-p-0.5 {{badgeClass()}}" [text]="item.text | axpResolveMultiLanguageString" ></ax-badge>
|
|
10896
|
-
}
|
|
10897
|
-
}
|
|
10898
|
-
@else if(displayItems().length == 1) {
|
|
10899
|
-
<ax-badge class="ax-p-0.5 {{badgeClass()}}" [text]="displayItems()[0].text | axpResolveMultiLanguageString" ></ax-badge>
|
|
10900
|
-
}
|
|
10901
|
-
@else {
|
|
10902
|
-
<span class="ax-text-muted">---</span>
|
|
10984
|
+
} @else {
|
|
10985
|
+
@if (displayItems().length > 1) {
|
|
10986
|
+
@for (item of displayItems(); track $index) {
|
|
10987
|
+
<ax-badge class="ax-p-0.5 {{ badgeClass() }}" [text]="(item.text | translate | async) || ''"></ax-badge>
|
|
10903
10988
|
}
|
|
10989
|
+
} @else if (displayItems().length == 1) {
|
|
10990
|
+
<ax-badge
|
|
10991
|
+
class="ax-p-0.5 {{ badgeClass() }}"
|
|
10992
|
+
[text]="(displayItems()[0].text | translate | async) || ''"
|
|
10993
|
+
></ax-badge>
|
|
10994
|
+
} @else {
|
|
10995
|
+
<span class="ax-text-muted">---</span>
|
|
10996
|
+
}
|
|
10904
10997
|
}
|
|
10905
10998
|
`,
|
|
10906
10999
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10907
|
-
imports: [AXLoadingModule, AXBadgeModule,
|
|
11000
|
+
imports: [AXLoadingModule, AXBadgeModule, AXTranslationModule, AsyncPipe],
|
|
10908
11001
|
}]
|
|
10909
11002
|
}], propDecorators: { __class: [{
|
|
10910
11003
|
type: HostBinding,
|
|
@@ -11351,7 +11444,7 @@ class LookupWidgetLookBase {
|
|
|
11351
11444
|
class AXPLookupWidgetSelectComponent extends LookupWidgetLookBase {
|
|
11352
11445
|
constructor() {
|
|
11353
11446
|
super(...arguments);
|
|
11354
|
-
this.mlsResolver = inject(
|
|
11447
|
+
this.mlsResolver = inject(AXTranslationService);
|
|
11355
11448
|
//#region ---- Inputs ----
|
|
11356
11449
|
this.entityDef = input.required(...(ngDevMode ? [{ debugName: "entityDef" }] : /* istanbul ignore next */ []));
|
|
11357
11450
|
this.customFilter = input.required(...(ngDevMode ? [{ debugName: "customFilter" }] : /* istanbul ignore next */ []));
|
|
@@ -11361,6 +11454,7 @@ class AXPLookupWidgetSelectComponent extends LookupWidgetLookBase {
|
|
|
11361
11454
|
this.disabled = input.required(...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
11362
11455
|
this.multiple = input.required(...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
11363
11456
|
this.validationRules = input.required(...(ngDevMode ? [{ debugName: "validationRules" }] : /* istanbul ignore next */ []));
|
|
11457
|
+
this.placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
11364
11458
|
this.hasClearButton = input(false, ...(ngDevMode ? [{ debugName: "hasClearButton" }] : /* istanbul ignore next */ []));
|
|
11365
11459
|
this.allowCreate = input('none', ...(ngDevMode ? [{ debugName: "allowCreate" }] : /* istanbul ignore next */ []));
|
|
11366
11460
|
//#endregion
|
|
@@ -11378,6 +11472,7 @@ class AXPLookupWidgetSelectComponent extends LookupWidgetLookBase {
|
|
|
11378
11472
|
this.disabledValue = computed(() => this.disabled()(), ...(ngDevMode ? [{ debugName: "disabledValue" }] : /* istanbul ignore next */ []));
|
|
11379
11473
|
this.multipleValue = computed(() => this.multiple()(), ...(ngDevMode ? [{ debugName: "multipleValue" }] : /* istanbul ignore next */ []));
|
|
11380
11474
|
this.validationRulesValue = computed(() => this.validationRules()(), ...(ngDevMode ? [{ debugName: "validationRulesValue" }] : /* istanbul ignore next */ []));
|
|
11475
|
+
this.placeholderValue = computed(() => this.placeholder()?.() ?? '', ...(ngDevMode ? [{ debugName: "placeholderValue" }] : /* istanbul ignore next */ []));
|
|
11381
11476
|
/**
|
|
11382
11477
|
* Get default sort order from entity's first list view
|
|
11383
11478
|
*/
|
|
@@ -11507,18 +11602,18 @@ class AXPLookupWidgetSelectComponent extends LookupWidgetLookBase {
|
|
|
11507
11602
|
this.dataSource()?.refresh();
|
|
11508
11603
|
}
|
|
11509
11604
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetSelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
11510
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPLookupWidgetSelectComponent, isStandalone: true, selector: "axp-lookup-widget-select", inputs: { entityDef: { classPropertyName: "entityDef", publicName: "entityDef", isSignal: true, isRequired: true, transformFunction: null }, customFilter: { classPropertyName: "customFilter", publicName: "customFilter", isSignal: true, isRequired: true, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: true, transformFunction: null }, displayField: { classPropertyName: "displayField", publicName: "displayField", isSignal: true, isRequired: true, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: true, transformFunction: null }, validationRules: { classPropertyName: "validationRules", publicName: "validationRules", isSignal: true, isRequired: true, transformFunction: null }, hasClearButton: { classPropertyName: "hasClearButton", publicName: "hasClearButton", isSignal: true, isRequired: false, transformFunction: null }, allowCreate: { classPropertyName: "allowCreate", publicName: "allowCreate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChanged: "valueChanged" }, providers: [
|
|
11605
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPLookupWidgetSelectComponent, isStandalone: true, selector: "axp-lookup-widget-select", inputs: { entityDef: { classPropertyName: "entityDef", publicName: "entityDef", isSignal: true, isRequired: true, transformFunction: null }, customFilter: { classPropertyName: "customFilter", publicName: "customFilter", isSignal: true, isRequired: true, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: true, transformFunction: null }, displayField: { classPropertyName: "displayField", publicName: "displayField", isSignal: true, isRequired: true, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: true, transformFunction: null }, validationRules: { classPropertyName: "validationRules", publicName: "validationRules", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hasClearButton: { classPropertyName: "hasClearButton", publicName: "hasClearButton", isSignal: true, isRequired: false, transformFunction: null }, allowCreate: { classPropertyName: "allowCreate", publicName: "allowCreate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChanged: "valueChanged" }, providers: [
|
|
11511
11606
|
{
|
|
11512
11607
|
provide: LookupWidgetLookBase,
|
|
11513
11608
|
useExisting: AXPLookupWidgetSelectComponent,
|
|
11514
|
-
}
|
|
11609
|
+
},
|
|
11515
11610
|
], viewQueries: [{ propertyName: "selectBox", first: true, predicate: ["selectBox"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
|
|
11516
11611
|
@if (dataSource()) {
|
|
11517
11612
|
<div class="ax-flex ax-items-center ax-gap-1 ax-w-full">
|
|
11518
11613
|
<ax-select-box
|
|
11519
11614
|
#selectBox
|
|
11520
11615
|
class="ax-flex-1 ax-min-w-0"
|
|
11521
|
-
[placeholder]="('@general:widgets.lookup.placeholder' | translate | async)
|
|
11616
|
+
[placeholder]="placeholderValue() || (('@general:widgets.lookup.placeholder' | translate | async) ?? '')"
|
|
11522
11617
|
[dataSource]="dataSource()!"
|
|
11523
11618
|
[ngModel]="selectedItemsValue()"
|
|
11524
11619
|
[textField]="displayFieldValue()"
|
|
@@ -11528,11 +11623,9 @@ class AXPLookupWidgetSelectComponent extends LookupWidgetLookBase {
|
|
|
11528
11623
|
(onValueChanged)="handleValueChanged($event)"
|
|
11529
11624
|
>
|
|
11530
11625
|
@if (hasClearButton()) {
|
|
11531
|
-
<ax-clear-button
|
|
11626
|
+
<ax-clear-button></ax-clear-button>
|
|
11532
11627
|
}
|
|
11533
|
-
<ax-search-box
|
|
11534
|
-
[placeholder]="('@general:widgets.lookup.search.placeholder' | translate | async)!"
|
|
11535
|
-
>
|
|
11628
|
+
<ax-search-box [placeholder]="('@general:widgets.lookup.search.placeholder' | translate | async)!">
|
|
11536
11629
|
<ax-clear-button></ax-clear-button>
|
|
11537
11630
|
</ax-search-box>
|
|
11538
11631
|
@for (validation of validationRulesValue(); track $index) {
|
|
@@ -11543,7 +11636,6 @@ class AXPLookupWidgetSelectComponent extends LookupWidgetLookBase {
|
|
|
11543
11636
|
></ax-validation-rule>
|
|
11544
11637
|
}
|
|
11545
11638
|
</ax-select-box>
|
|
11546
|
-
|
|
11547
11639
|
</div>
|
|
11548
11640
|
}
|
|
11549
11641
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$2.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i2$2.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"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -11558,7 +11650,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
11558
11650
|
<ax-select-box
|
|
11559
11651
|
#selectBox
|
|
11560
11652
|
class="ax-flex-1 ax-min-w-0"
|
|
11561
|
-
[placeholder]="('@general:widgets.lookup.placeholder' | translate | async)
|
|
11653
|
+
[placeholder]="placeholderValue() || (('@general:widgets.lookup.placeholder' | translate | async) ?? '')"
|
|
11562
11654
|
[dataSource]="dataSource()!"
|
|
11563
11655
|
[ngModel]="selectedItemsValue()"
|
|
11564
11656
|
[textField]="displayFieldValue()"
|
|
@@ -11568,11 +11660,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
11568
11660
|
(onValueChanged)="handleValueChanged($event)"
|
|
11569
11661
|
>
|
|
11570
11662
|
@if (hasClearButton()) {
|
|
11571
|
-
<ax-clear-button
|
|
11663
|
+
<ax-clear-button></ax-clear-button>
|
|
11572
11664
|
}
|
|
11573
|
-
<ax-search-box
|
|
11574
|
-
[placeholder]="('@general:widgets.lookup.search.placeholder' | translate | async)!"
|
|
11575
|
-
>
|
|
11665
|
+
<ax-search-box [placeholder]="('@general:widgets.lookup.search.placeholder' | translate | async)!">
|
|
11576
11666
|
<ax-clear-button></ax-clear-button>
|
|
11577
11667
|
</ax-search-box>
|
|
11578
11668
|
@for (validation of validationRulesValue(); track $index) {
|
|
@@ -11583,7 +11673,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
11583
11673
|
></ax-validation-rule>
|
|
11584
11674
|
}
|
|
11585
11675
|
</ax-select-box>
|
|
11586
|
-
|
|
11587
11676
|
</div>
|
|
11588
11677
|
}
|
|
11589
11678
|
`,
|
|
@@ -11603,10 +11692,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
11603
11692
|
{
|
|
11604
11693
|
provide: LookupWidgetLookBase,
|
|
11605
11694
|
useExisting: AXPLookupWidgetSelectComponent,
|
|
11606
|
-
}
|
|
11695
|
+
},
|
|
11607
11696
|
],
|
|
11608
11697
|
}]
|
|
11609
|
-
}], propDecorators: { entityDef: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityDef", required: true }] }], customFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "customFilter", required: true }] }], selectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItems", required: true }] }], displayField: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayField", required: true }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: true }] }], validationRules: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationRules", required: true }] }], hasClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasClearButton", required: false }] }], allowCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCreate", required: false }] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }], selectBox: [{ type: i0.ViewChild, args: ['selectBox', { isSignal: true }] }] } });
|
|
11698
|
+
}], propDecorators: { entityDef: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityDef", required: true }] }], customFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "customFilter", required: true }] }], selectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItems", required: true }] }], displayField: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayField", required: true }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: true }] }], validationRules: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationRules", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hasClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasClearButton", required: false }] }], allowCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCreate", required: false }] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }], selectBox: [{ type: i0.ViewChild, args: ['selectBox', { isSignal: true }] }] } });
|
|
11610
11699
|
|
|
11611
11700
|
class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
11612
11701
|
constructor() {
|
|
@@ -11625,6 +11714,7 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
11625
11714
|
this.multiple = input.required(...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
11626
11715
|
this.isLoading = input.required(...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
|
|
11627
11716
|
this.validationRules = input.required(...(ngDevMode ? [{ debugName: "validationRules" }] : /* istanbul ignore next */ []));
|
|
11717
|
+
this.placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
11628
11718
|
this.hasClearButton = input(false, ...(ngDevMode ? [{ debugName: "hasClearButton" }] : /* istanbul ignore next */ []));
|
|
11629
11719
|
this.allowCreate = input('none', ...(ngDevMode ? [{ debugName: "allowCreate" }] : /* istanbul ignore next */ []));
|
|
11630
11720
|
// Entity and configuration data (for showSelector and searchByValue)
|
|
@@ -11675,6 +11765,7 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
11675
11765
|
this.multipleValue = computed(() => this.multiple()(), ...(ngDevMode ? [{ debugName: "multipleValue" }] : /* istanbul ignore next */ []));
|
|
11676
11766
|
this.isLoadingValue = computed(() => this.isLoading()(), ...(ngDevMode ? [{ debugName: "isLoadingValue" }] : /* istanbul ignore next */ []));
|
|
11677
11767
|
this.validationRulesValue = computed(() => this.validationRules()(), ...(ngDevMode ? [{ debugName: "validationRulesValue" }] : /* istanbul ignore next */ []));
|
|
11768
|
+
this.placeholderValue = computed(() => this.placeholder()?.() ?? '', ...(ngDevMode ? [{ debugName: "placeholderValue" }] : /* istanbul ignore next */ []));
|
|
11678
11769
|
}
|
|
11679
11770
|
#focusEffect;
|
|
11680
11771
|
focus() {
|
|
@@ -11855,7 +11946,7 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
11855
11946
|
this.clear();
|
|
11856
11947
|
}
|
|
11857
11948
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetTagboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
11858
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPLookupWidgetTagboxComponent, isStandalone: true, selector: "axp-lookup-widget-tagbox", inputs: { selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: true, transformFunction: null }, displayField: { classPropertyName: "displayField", publicName: "displayField", isSignal: true, isRequired: true, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: true, transformFunction: null }, displayFormat: { classPropertyName: "displayFormat", publicName: "displayFormat", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: true, transformFunction: null }, validationRules: { classPropertyName: "validationRules", publicName: "validationRules", isSignal: true, isRequired: true, transformFunction: null }, hasClearButton: { classPropertyName: "hasClearButton", publicName: "hasClearButton", isSignal: true, isRequired: false, transformFunction: null }, allowCreate: { classPropertyName: "allowCreate", publicName: "allowCreate", isSignal: true, isRequired: false, transformFunction: null }, entityDef: { classPropertyName: "entityDef", publicName: "entityDef", isSignal: true, isRequired: true, transformFunction: null }, customFilter: { classPropertyName: "customFilter", publicName: "customFilter", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, parentFilters: { classPropertyName: "parentFilters", publicName: "parentFilters", isSignal: true, isRequired: false, transformFunction: null }, onSetLoading: { classPropertyName: "onSetLoading", publicName: "onSetLoading", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { valueChanged: "valueChanged" }, providers: [
|
|
11949
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPLookupWidgetTagboxComponent, isStandalone: true, selector: "axp-lookup-widget-tagbox", inputs: { selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: true, transformFunction: null }, displayField: { classPropertyName: "displayField", publicName: "displayField", isSignal: true, isRequired: true, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: true, transformFunction: null }, displayFormat: { classPropertyName: "displayFormat", publicName: "displayFormat", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: true, transformFunction: null }, validationRules: { classPropertyName: "validationRules", publicName: "validationRules", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, hasClearButton: { classPropertyName: "hasClearButton", publicName: "hasClearButton", isSignal: true, isRequired: false, transformFunction: null }, allowCreate: { classPropertyName: "allowCreate", publicName: "allowCreate", isSignal: true, isRequired: false, transformFunction: null }, entityDef: { classPropertyName: "entityDef", publicName: "entityDef", isSignal: true, isRequired: true, transformFunction: null }, customFilter: { classPropertyName: "customFilter", publicName: "customFilter", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, parentFilters: { classPropertyName: "parentFilters", publicName: "parentFilters", isSignal: true, isRequired: false, transformFunction: null }, onSetLoading: { classPropertyName: "onSetLoading", publicName: "onSetLoading", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { valueChanged: "valueChanged" }, providers: [
|
|
11859
11950
|
{
|
|
11860
11951
|
provide: LookupWidgetLookBase,
|
|
11861
11952
|
useExisting: AXPLookupWidgetTagboxComponent,
|
|
@@ -11868,7 +11959,11 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
11868
11959
|
[textField]="displayFieldValue()"
|
|
11869
11960
|
[valueField]="valueFieldValue()"
|
|
11870
11961
|
(onValueChanged)="handleValueChanged($event)"
|
|
11871
|
-
[placeholder]="
|
|
11962
|
+
[placeholder]="
|
|
11963
|
+
selectedItemsValue().length
|
|
11964
|
+
? ''
|
|
11965
|
+
: (placeholderValue() || (('@general:widgets.lookup.placeholder' | translate | async) ?? ''))
|
|
11966
|
+
"
|
|
11872
11967
|
[addOnEnter]="false"
|
|
11873
11968
|
[addOnComma]="false"
|
|
11874
11969
|
[disabled]="disabledValue()"
|
|
@@ -11904,13 +11999,13 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
11904
11999
|
</ax-tag-box>
|
|
11905
12000
|
<ng-template #tagTemplate let-item let-index="index">
|
|
11906
12001
|
<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">
|
|
11907
|
-
<span>{{ getDisplayRaw(item) |
|
|
12002
|
+
<span>{{ getDisplayRaw(item) | translate | async }}</span>
|
|
11908
12003
|
<button type="button" (click)="tagBoxComponent.removeItem(index)">
|
|
11909
12004
|
<ax-icon class="ax-icon ax-icon-close"></ax-icon>
|
|
11910
12005
|
</button>
|
|
11911
12006
|
</div>
|
|
11912
12007
|
</ng-template>
|
|
11913
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$1.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$2.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: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }
|
|
12008
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$1.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$1.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$2.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: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11914
12009
|
}
|
|
11915
12010
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetTagboxComponent, decorators: [{
|
|
11916
12011
|
type: Component,
|
|
@@ -11924,7 +12019,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
11924
12019
|
[textField]="displayFieldValue()"
|
|
11925
12020
|
[valueField]="valueFieldValue()"
|
|
11926
12021
|
(onValueChanged)="handleValueChanged($event)"
|
|
11927
|
-
[placeholder]="
|
|
12022
|
+
[placeholder]="
|
|
12023
|
+
selectedItemsValue().length
|
|
12024
|
+
? ''
|
|
12025
|
+
: (placeholderValue() || (('@general:widgets.lookup.placeholder' | translate | async) ?? ''))
|
|
12026
|
+
"
|
|
11928
12027
|
[addOnEnter]="false"
|
|
11929
12028
|
[addOnComma]="false"
|
|
11930
12029
|
[disabled]="disabledValue()"
|
|
@@ -11960,7 +12059,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
11960
12059
|
</ax-tag-box>
|
|
11961
12060
|
<ng-template #tagTemplate let-item let-index="index">
|
|
11962
12061
|
<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">
|
|
11963
|
-
<span>{{ getDisplayRaw(item) |
|
|
12062
|
+
<span>{{ getDisplayRaw(item) | translate | async }}</span>
|
|
11964
12063
|
<button type="button" (click)="tagBoxComponent.removeItem(index)">
|
|
11965
12064
|
<ax-icon class="ax-icon ax-icon-close"></ax-icon>
|
|
11966
12065
|
</button>
|
|
@@ -11978,7 +12077,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
11978
12077
|
AXFormModule,
|
|
11979
12078
|
AXTagBoxModule,
|
|
11980
12079
|
AXTranslationModule,
|
|
11981
|
-
AXPResolveMultiLanguageStringPipe,
|
|
11982
12080
|
],
|
|
11983
12081
|
providers: [
|
|
11984
12082
|
{
|
|
@@ -11987,7 +12085,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
11987
12085
|
},
|
|
11988
12086
|
],
|
|
11989
12087
|
}]
|
|
11990
|
-
}], propDecorators: { selectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItems", required: true }] }], displayField: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayField", required: true }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: true }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: true }] }], validationRules: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationRules", required: true }] }], hasClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasClearButton", required: false }] }], allowCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCreate", required: false }] }], entityDef: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityDef", required: true }] }], customFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "customFilter", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], parentFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentFilters", required: false }] }], onSetLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "onSetLoading", required: true }] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }], tagBox: [{ type: i0.ViewChild, args: ['tagBoxComponent', { isSignal: true }] }] } });
|
|
12088
|
+
}], propDecorators: { selectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItems", required: true }] }], displayField: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayField", required: true }] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: true }] }], displayFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayFormat", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: true }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: true }] }], validationRules: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationRules", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], hasClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasClearButton", required: false }] }], allowCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCreate", required: false }] }], entityDef: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityDef", required: true }] }], customFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "customFilter", required: true }] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: true }] }], parentFilters: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentFilters", required: false }] }], onSetLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "onSetLoading", required: true }] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }], tagBox: [{ type: i0.ViewChild, args: ['tagBoxComponent', { isSignal: true }] }] } });
|
|
11991
12089
|
|
|
11992
12090
|
class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
11993
12091
|
constructor() {
|
|
@@ -11997,7 +12095,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11997
12095
|
this.entityResolver = inject(AXPEntityDefinitionRegistryService);
|
|
11998
12096
|
this.entityService = inject(AXPEntityService);
|
|
11999
12097
|
this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
|
|
12000
|
-
this.mlsResolver = inject(
|
|
12098
|
+
this.mlsResolver = inject(AXTranslationService);
|
|
12001
12099
|
//#endregion
|
|
12002
12100
|
//#region ---- View Children ----
|
|
12003
12101
|
this.componentLook = viewChild(LookupWidgetLookBase, ...(ngDevMode ? [{ debugName: "componentLook" }] : /* istanbul ignore next */ []));
|
|
@@ -12010,6 +12108,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
12010
12108
|
this.textField = computed(() => this.options()['textField'] ?? '', ...(ngDevMode ? [{ debugName: "textField" }] : /* istanbul ignore next */ []));
|
|
12011
12109
|
this.hasClearButton = computed(() => (!this.filterMode() && this.options()['hasClearButton']) ?? false, ...(ngDevMode ? [{ debugName: "hasClearButton" }] : /* istanbul ignore next */ []));
|
|
12012
12110
|
this.customFilter = computed(() => this.options()['filter'], ...(ngDevMode ? [{ debugName: "customFilter" }] : /* istanbul ignore next */ []));
|
|
12111
|
+
this.placeholder = computed(() => this.options()['placeholder'] ?? '', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
12013
12112
|
this.filterMode = computed(() => this.options()['filterMode'], ...(ngDevMode ? [{ debugName: "filterMode" }] : /* istanbul ignore next */ []));
|
|
12014
12113
|
this.multiple = computed(() => (this.options()['multiple'] ?? false), ...(ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []));
|
|
12015
12114
|
this.look = computed(() => this.options()['look'] ?? 'lookup', ...(ngDevMode ? [{ debugName: "look" }] : /* istanbul ignore next */ []));
|
|
@@ -12288,6 +12387,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
12288
12387
|
[valueField]="valueField"
|
|
12289
12388
|
[disabled]="disabled"
|
|
12290
12389
|
[multiple]="multiple"
|
|
12390
|
+
[placeholder]="placeholder"
|
|
12291
12391
|
[validationRules]="validationRules"
|
|
12292
12392
|
[hasClearButton]="hasClearButton()"
|
|
12293
12393
|
[allowCreate]="allowCreate()"
|
|
@@ -12303,6 +12403,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
12303
12403
|
[displayFormat]="displayFormat"
|
|
12304
12404
|
[disabled]="disabled"
|
|
12305
12405
|
[multiple]="multiple"
|
|
12406
|
+
[placeholder]="placeholder"
|
|
12306
12407
|
[isLoading]="isLoading"
|
|
12307
12408
|
[validationRules]="validationRules"
|
|
12308
12409
|
[hasClearButton]="hasClearButton()"
|
|
@@ -12331,7 +12432,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
12331
12432
|
}
|
|
12332
12433
|
</div>
|
|
12333
12434
|
}
|
|
12334
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPLookupWidgetSelectComponent, selector: "axp-lookup-widget-select", inputs: ["entityDef", "customFilter", "selectedItems", "displayField", "valueField", "disabled", "multiple", "validationRules", "hasClearButton", "allowCreate"], outputs: ["valueChanged"] }, { kind: "component", type: AXPLookupWidgetTagboxComponent, selector: "axp-lookup-widget-tagbox", inputs: ["selectedItems", "displayField", "valueField", "displayFormat", "disabled", "multiple", "isLoading", "validationRules", "hasClearButton", "allowCreate", "entityDef", "customFilter", "columns", "parentFilters", "onSetLoading"], outputs: ["valueChanged"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12435
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.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$1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPLookupWidgetSelectComponent, selector: "axp-lookup-widget-select", inputs: ["entityDef", "customFilter", "selectedItems", "displayField", "valueField", "disabled", "multiple", "validationRules", "placeholder", "hasClearButton", "allowCreate"], outputs: ["valueChanged"] }, { kind: "component", type: AXPLookupWidgetTagboxComponent, selector: "axp-lookup-widget-tagbox", inputs: ["selectedItems", "displayField", "valueField", "displayFormat", "disabled", "multiple", "isLoading", "validationRules", "placeholder", "hasClearButton", "allowCreate", "entityDef", "customFilter", "columns", "parentFilters", "onSetLoading"], outputs: ["valueChanged"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12335
12436
|
}
|
|
12336
12437
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
|
|
12337
12438
|
type: Component,
|
|
@@ -12351,6 +12452,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
12351
12452
|
[valueField]="valueField"
|
|
12352
12453
|
[disabled]="disabled"
|
|
12353
12454
|
[multiple]="multiple"
|
|
12455
|
+
[placeholder]="placeholder"
|
|
12354
12456
|
[validationRules]="validationRules"
|
|
12355
12457
|
[hasClearButton]="hasClearButton()"
|
|
12356
12458
|
[allowCreate]="allowCreate()"
|
|
@@ -12366,6 +12468,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
12366
12468
|
[displayFormat]="displayFormat"
|
|
12367
12469
|
[disabled]="disabled"
|
|
12368
12470
|
[multiple]="multiple"
|
|
12471
|
+
[placeholder]="placeholder"
|
|
12369
12472
|
[isLoading]="isLoading"
|
|
12370
12473
|
[validationRules]="validationRules"
|
|
12371
12474
|
[hasClearButton]="hasClearButton()"
|
|
@@ -12417,7 +12520,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
12417
12520
|
super(...arguments);
|
|
12418
12521
|
//#region ---- Dependencies ----
|
|
12419
12522
|
this.entityDetailPopoverService = inject(AXPEntityDetailPopoverService);
|
|
12420
|
-
this.mlResolver = inject(
|
|
12523
|
+
this.mlResolver = inject(AXTranslationService);
|
|
12421
12524
|
this.formatService = inject(AXFormatService);
|
|
12422
12525
|
//#endregion
|
|
12423
12526
|
//#region ---- View Children ----
|
|
@@ -12446,7 +12549,9 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
12446
12549
|
//#region ---- Computed Properties ----
|
|
12447
12550
|
this.displayItems = computed(() => isNil(this.rawValue)
|
|
12448
12551
|
? []
|
|
12449
|
-
: castArray(this.rawValue)
|
|
12552
|
+
: castArray(this.rawValue)
|
|
12553
|
+
.map((item) => this.extractItem(item))
|
|
12554
|
+
.filter((c) => c != null), ...(ngDevMode ? [{ debugName: "displayItems" }] : /* istanbul ignore next */ []));
|
|
12450
12555
|
this.allItems = computed(() => this.displayItems(), ...(ngDevMode ? [{ debugName: "allItems" }] : /* istanbul ignore next */ []));
|
|
12451
12556
|
this.visibleItems = computed(() => {
|
|
12452
12557
|
const items = this.allItems();
|
|
@@ -12482,7 +12587,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
12482
12587
|
id: id,
|
|
12483
12588
|
textField: this.textField,
|
|
12484
12589
|
valueField: this.valueField,
|
|
12485
|
-
item
|
|
12590
|
+
item,
|
|
12486
12591
|
});
|
|
12487
12592
|
}
|
|
12488
12593
|
handleItemClick(index) {
|
|
@@ -15307,8 +15412,8 @@ class AXPLayoutAdapterBuilder {
|
|
|
15307
15412
|
return this;
|
|
15308
15413
|
}
|
|
15309
15414
|
/**
|
|
15310
|
-
* Sets the evaluated root title (e.g.
|
|
15311
|
-
* Without this, the raw template expression would be shown when showPages is true.
|
|
15415
|
+
* Sets the evaluated root title (e.g. display name) used when displaying the adapter title on mobile.
|
|
15416
|
+
* Accepts a plain string, `@` i18n key, or locale map. Without this, the raw template expression would be shown when showPages is true.
|
|
15312
15417
|
*/
|
|
15313
15418
|
setRootTitle(rootTitle) {
|
|
15314
15419
|
this.rootTitle = rootTitle;
|
|
@@ -15746,7 +15851,7 @@ class AXPPageDetailsConverter extends AXPBaseRelatedEntityConverter {
|
|
|
15746
15851
|
const actions = this.buildActions(entityDef, helpers.singleInterface);
|
|
15747
15852
|
return {
|
|
15748
15853
|
id: entityDef?.name ?? '',
|
|
15749
|
-
title:
|
|
15854
|
+
title: context.rootTitle ?? '',
|
|
15750
15855
|
label: relatedEntity.title ?? '@general:terms.common.overview',
|
|
15751
15856
|
icon: relatedEntity.icon || entityDef.icon,
|
|
15752
15857
|
isReadonly: isPageReadonly,
|
|
@@ -15988,7 +16093,7 @@ class AXPPageListConverter extends AXPBaseRelatedEntityConverter {
|
|
|
15988
16093
|
}) ?? []);
|
|
15989
16094
|
return {
|
|
15990
16095
|
id: entityDef?.name ?? '',
|
|
15991
|
-
title:
|
|
16096
|
+
title: context.rootTitle ?? '',
|
|
15992
16097
|
label: relatedEntity.title,
|
|
15993
16098
|
icon: relatedEntity.icon || entityDef.icon,
|
|
15994
16099
|
actions: this.mergeActions(entityDef, actions)
|
|
@@ -16755,12 +16860,29 @@ class AXPMainEntityContentBuilder {
|
|
|
16755
16860
|
},
|
|
16756
16861
|
children: await Promise.all((await Promise.all(combinedSections.map(async (s) => {
|
|
16757
16862
|
const properties = await getVisiblePropertyByGroupId(s.id);
|
|
16758
|
-
const
|
|
16863
|
+
const inView = properties.filter((p) => {
|
|
16759
16864
|
const isFromRelated = p.__dataPath != null;
|
|
16760
16865
|
const visibleInMain = visiblePropertyNames.has(p.name);
|
|
16761
16866
|
const visibleInRelated = isFromRelated ? !!p.__layout : false;
|
|
16762
16867
|
return visibleInMain || visibleInRelated;
|
|
16763
16868
|
});
|
|
16869
|
+
const visibilityEvaluated = await Promise.all(inView.map(async (p) => {
|
|
16870
|
+
let visible = p.schema?.visible;
|
|
16871
|
+
if (typeof visible === 'string' && evaluateExpressions) {
|
|
16872
|
+
try {
|
|
16873
|
+
const result = await evaluateExpressions({ visible });
|
|
16874
|
+
visible = result.visible;
|
|
16875
|
+
}
|
|
16876
|
+
catch {
|
|
16877
|
+
visible = true;
|
|
16878
|
+
}
|
|
16879
|
+
}
|
|
16880
|
+
const resolved = visible !== false;
|
|
16881
|
+
return { property: p, resolvedVisible: resolved };
|
|
16882
|
+
}));
|
|
16883
|
+
const visibleProperties = visibilityEvaluated
|
|
16884
|
+
.filter((x) => x.resolvedVisible)
|
|
16885
|
+
.map((x) => x.property);
|
|
16764
16886
|
return { section: s, hasProperties: visibleProperties.length > 0, visibleProperties };
|
|
16765
16887
|
})))
|
|
16766
16888
|
.filter((item) => item.hasProperties)
|
|
@@ -16803,6 +16925,14 @@ class AXPMainEntityContentBuilder {
|
|
|
16803
16925
|
: editablePropertyNames.has(p.name);
|
|
16804
16926
|
// Check if property has its own disabled option
|
|
16805
16927
|
const hasOwnDisabled = p.schema.interface?.options?.disabled !== undefined;
|
|
16928
|
+
let formFieldVisible;
|
|
16929
|
+
const sv = p.schema?.visible;
|
|
16930
|
+
if (typeof sv === 'string') {
|
|
16931
|
+
formFieldVisible = true;
|
|
16932
|
+
}
|
|
16933
|
+
else if (sv === false) {
|
|
16934
|
+
formFieldVisible = false;
|
|
16935
|
+
}
|
|
16806
16936
|
return {
|
|
16807
16937
|
type: 'form-field',
|
|
16808
16938
|
options: {
|
|
@@ -16814,7 +16944,7 @@ class AXPMainEntityContentBuilder {
|
|
|
16814
16944
|
rowSpan: layout?.positions?.lg?.rowSpan,
|
|
16815
16945
|
rowStart: layout?.positions?.lg?.rowStart,
|
|
16816
16946
|
rowEnd: layout?.positions?.lg?.rowEnd,
|
|
16817
|
-
visible:
|
|
16947
|
+
...(formFieldVisible !== undefined ? { visible: formFieldVisible } : {}),
|
|
16818
16948
|
},
|
|
16819
16949
|
children: [
|
|
16820
16950
|
{
|
|
@@ -17159,8 +17289,18 @@ class AXPLayoutAdapterFactory {
|
|
|
17159
17289
|
}
|
|
17160
17290
|
async getRootTitle(entity, rootContext, dependencies) {
|
|
17161
17291
|
const titleTemplate = entity.interfaces?.master?.single?.title;
|
|
17162
|
-
|
|
17163
|
-
|
|
17292
|
+
const fallback = entity?.formats?.individual ?? '';
|
|
17293
|
+
if (titleTemplate == null || titleTemplate === '') {
|
|
17294
|
+
return fallback;
|
|
17295
|
+
}
|
|
17296
|
+
if (typeof titleTemplate === 'object' && !Array.isArray(titleTemplate)) {
|
|
17297
|
+
return titleTemplate;
|
|
17298
|
+
}
|
|
17299
|
+
if (typeof titleTemplate !== 'string') {
|
|
17300
|
+
return fallback;
|
|
17301
|
+
}
|
|
17302
|
+
if (!dependencies?.expressionEvaluator) {
|
|
17303
|
+
return titleTemplate;
|
|
17164
17304
|
}
|
|
17165
17305
|
const scope = {
|
|
17166
17306
|
...rootContext,
|
|
@@ -17169,7 +17309,7 @@ class AXPLayoutAdapterFactory {
|
|
|
17169
17309
|
},
|
|
17170
17310
|
};
|
|
17171
17311
|
const title = await dependencies.expressionEvaluator.evaluate(titleTemplate, scope);
|
|
17172
|
-
return
|
|
17312
|
+
return title;
|
|
17173
17313
|
}
|
|
17174
17314
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutAdapterFactory, deps: [{ token: AXPRelatedEntityConverterFactory }, { token: AXPMainEntityContentBuilder }, { token: AXPLayoutAdapterBuilder }, { token: i4$4.AXPFilterOperatorMiddlewareService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
17175
17315
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLayoutAdapterFactory, providedIn: 'root' }); }
|
|
@@ -17193,7 +17333,8 @@ const AXPLayoutDetailsViewRouteResolver = async (route, state, entityResolver =
|
|
|
17193
17333
|
workflowService,
|
|
17194
17334
|
commandService,
|
|
17195
17335
|
};
|
|
17196
|
-
|
|
17336
|
+
const adapter = await layoutAdapterFactory.createDetailsViewAdapter(entityResolver, moduleName, entityName, id, dependencies);
|
|
17337
|
+
return adapter;
|
|
17197
17338
|
};
|
|
17198
17339
|
|
|
17199
17340
|
class AXPEntityPreloadFilterGuard {
|
|
@@ -17455,8 +17596,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
17455
17596
|
}], ctorParameters: () => [] });
|
|
17456
17597
|
|
|
17457
17598
|
/**
|
|
17458
|
-
* Default
|
|
17599
|
+
* Default shipped rules: narrow identifier + wider title on `md` / `lg`.
|
|
17459
17600
|
*/
|
|
17601
|
+
const DEFAULT_PAIR_SPAN_RULES = [
|
|
17602
|
+
{
|
|
17603
|
+
first: 'code',
|
|
17604
|
+
second: 'title',
|
|
17605
|
+
firstSpan: 4,
|
|
17606
|
+
secondSpan: 8,
|
|
17607
|
+
breakpoints: ['md', 'lg'],
|
|
17608
|
+
},
|
|
17609
|
+
{
|
|
17610
|
+
first: 'name',
|
|
17611
|
+
second: 'title',
|
|
17612
|
+
firstSpan: 4,
|
|
17613
|
+
secondSpan: 8,
|
|
17614
|
+
breakpoints: ['md', 'lg'],
|
|
17615
|
+
},
|
|
17616
|
+
];
|
|
17460
17617
|
const DEFAULT_SECTION_ORDER = {
|
|
17461
17618
|
'basic-info': -100,
|
|
17462
17619
|
classification: 20,
|
|
@@ -17465,32 +17622,23 @@ const DEFAULT_SECTION_ORDER = {
|
|
|
17465
17622
|
metadata: 120,
|
|
17466
17623
|
settings: 200,
|
|
17467
17624
|
};
|
|
17468
|
-
/**
|
|
17469
|
-
* Default order for common properties
|
|
17470
|
-
* Format: 'sectionId.propertyName' for section-specific or 'propertyName' for any section
|
|
17471
|
-
*/
|
|
17472
17625
|
const DEFAULT_PROPERTY_ORDER = {
|
|
17473
|
-
// Basic Info section
|
|
17474
17626
|
'basic-info.code': -10,
|
|
17475
17627
|
'basic-info.title': -9,
|
|
17476
17628
|
'basic-info.name': -8,
|
|
17477
17629
|
'basic-info.description': -7,
|
|
17478
17630
|
'basic-info.note': -6,
|
|
17479
17631
|
'basic-info.notes': -5,
|
|
17480
|
-
// Classification section
|
|
17481
17632
|
'classification.categoryIds': 1,
|
|
17482
17633
|
'classification.tags': 2,
|
|
17483
17634
|
'classification.type': 3,
|
|
17484
|
-
// Appearance section
|
|
17485
17635
|
'appearance.icon': 1,
|
|
17486
17636
|
'appearance.color': 2,
|
|
17487
17637
|
'appearance.avatar': 3,
|
|
17488
|
-
// Settings section
|
|
17489
17638
|
'settings.isDefault': 90,
|
|
17490
17639
|
'settings.isPrimary': 91,
|
|
17491
17640
|
'settings.isDisabled': 95,
|
|
17492
17641
|
'settings.isArchived': 96,
|
|
17493
|
-
// Generic fallbacks (apply to any section if not specified above)
|
|
17494
17642
|
code: 1,
|
|
17495
17643
|
title: 2,
|
|
17496
17644
|
name: 3,
|
|
@@ -17505,23 +17653,111 @@ const DEFAULT_PROPERTY_ORDER = {
|
|
|
17505
17653
|
isDisabled: 95,
|
|
17506
17654
|
isArchived: 96,
|
|
17507
17655
|
};
|
|
17508
|
-
|
|
17509
|
-
|
|
17510
|
-
|
|
17656
|
+
const DEFAULT_PAIR_BREAKPOINTS = ['md', 'lg'];
|
|
17657
|
+
function applyPairSpanRules(layout, rules, getGroupId) {
|
|
17658
|
+
if (!layout.properties?.length || rules.length === 0) {
|
|
17659
|
+
return;
|
|
17660
|
+
}
|
|
17661
|
+
const namesByGroup = new Map();
|
|
17662
|
+
for (const prop of layout.properties) {
|
|
17663
|
+
if (!prop.name)
|
|
17664
|
+
continue;
|
|
17665
|
+
const gid = getGroupId(prop.name);
|
|
17666
|
+
if (!gid)
|
|
17667
|
+
continue;
|
|
17668
|
+
if (!namesByGroup.has(gid)) {
|
|
17669
|
+
namesByGroup.set(gid, new Set());
|
|
17670
|
+
}
|
|
17671
|
+
namesByGroup.get(gid).add(prop.name);
|
|
17672
|
+
}
|
|
17673
|
+
const findPropView = (name) => layout.properties.find((p) => p.name === name);
|
|
17674
|
+
const spanIfUnset = (pv, breakpoint, span) => {
|
|
17675
|
+
if (!pv.layout)
|
|
17676
|
+
pv.layout = {};
|
|
17677
|
+
let positions = pv.layout['positions'] ?? undefined;
|
|
17678
|
+
if (!positions) {
|
|
17679
|
+
positions = {};
|
|
17680
|
+
pv.layout['positions'] = positions;
|
|
17681
|
+
}
|
|
17682
|
+
const cell = positions[breakpoint] ?? {};
|
|
17683
|
+
positions[breakpoint] = cell;
|
|
17684
|
+
if (cell.colSpan === undefined)
|
|
17685
|
+
cell.colSpan = span;
|
|
17686
|
+
};
|
|
17687
|
+
for (const namesInGroup of namesByGroup.values()) {
|
|
17688
|
+
for (const rule of rules) {
|
|
17689
|
+
if (!namesInGroup.has(rule.first) || !namesInGroup.has(rule.second))
|
|
17690
|
+
continue;
|
|
17691
|
+
if (rule.first === 'name' && rule.second === 'title' && namesInGroup.has('code')) {
|
|
17692
|
+
continue;
|
|
17693
|
+
}
|
|
17694
|
+
const a = findPropView(rule.first);
|
|
17695
|
+
const b = findPropView(rule.second);
|
|
17696
|
+
if (!a || !b)
|
|
17697
|
+
continue;
|
|
17698
|
+
const breakpoints = rule.breakpoints?.length ? rule.breakpoints : DEFAULT_PAIR_BREAKPOINTS;
|
|
17699
|
+
for (const bp of breakpoints)
|
|
17700
|
+
spanIfUnset(a, bp, rule.firstSpan);
|
|
17701
|
+
for (const bp of breakpoints)
|
|
17702
|
+
spanIfUnset(b, bp, rule.secondSpan);
|
|
17703
|
+
break;
|
|
17704
|
+
}
|
|
17705
|
+
}
|
|
17706
|
+
}
|
|
17511
17707
|
const getPropertyOrder = (sectionId, propertyName, orderConfig) => {
|
|
17512
|
-
// Try section-specific order first
|
|
17513
17708
|
if (sectionId) {
|
|
17514
17709
|
const sectionSpecific = orderConfig[`${sectionId}.${propertyName}`];
|
|
17515
|
-
if (sectionSpecific !== undefined)
|
|
17710
|
+
if (sectionSpecific !== undefined)
|
|
17516
17711
|
return sectionSpecific;
|
|
17517
|
-
}
|
|
17518
17712
|
}
|
|
17519
|
-
// Fall back to generic property order
|
|
17520
17713
|
return orderConfig[propertyName];
|
|
17521
17714
|
};
|
|
17522
17715
|
/**
|
|
17523
|
-
*
|
|
17716
|
+
* True when the entity already defined sort order for this property view.
|
|
17717
|
+
* Middleware default order applies only when this is false (entity layout takes priority).
|
|
17524
17718
|
*/
|
|
17719
|
+
function hasExplicitLayoutOrder(prop) {
|
|
17720
|
+
const layout = prop.layout;
|
|
17721
|
+
if (!layout || typeof layout !== 'object') {
|
|
17722
|
+
return false;
|
|
17723
|
+
}
|
|
17724
|
+
if (layout['order'] !== undefined && layout['order'] !== null) {
|
|
17725
|
+
return true;
|
|
17726
|
+
}
|
|
17727
|
+
const positions = layout['positions'];
|
|
17728
|
+
if (!positions || typeof positions !== 'object') {
|
|
17729
|
+
return false;
|
|
17730
|
+
}
|
|
17731
|
+
for (const key of Object.keys(positions)) {
|
|
17732
|
+
const cell = positions[key];
|
|
17733
|
+
if (cell && typeof cell === 'object' && cell['order'] !== undefined && cell['order'] !== null) {
|
|
17734
|
+
return true;
|
|
17735
|
+
}
|
|
17736
|
+
}
|
|
17737
|
+
return false;
|
|
17738
|
+
}
|
|
17739
|
+
function resolveViewPropertySortOrder(prop) {
|
|
17740
|
+
const toNum = (v) => {
|
|
17741
|
+
if (v === undefined || v === null)
|
|
17742
|
+
return null;
|
|
17743
|
+
const n = Number(v);
|
|
17744
|
+
return Number.isFinite(n) ? n : null;
|
|
17745
|
+
};
|
|
17746
|
+
const layout = prop.layout;
|
|
17747
|
+
if (!layout)
|
|
17748
|
+
return 999;
|
|
17749
|
+
const primary = toNum(layout['order']);
|
|
17750
|
+
if (primary !== null)
|
|
17751
|
+
return primary;
|
|
17752
|
+
const positions = layout['positions'];
|
|
17753
|
+
const lg = toNum(positions?.['lg']?.order);
|
|
17754
|
+
if (lg !== null)
|
|
17755
|
+
return lg;
|
|
17756
|
+
const md = toNum(positions?.['md']?.order);
|
|
17757
|
+
if (md !== null)
|
|
17758
|
+
return md;
|
|
17759
|
+
return 999;
|
|
17760
|
+
}
|
|
17525
17761
|
const layoutOrderingMiddlewareFactory = (config) => {
|
|
17526
17762
|
return (context) => {
|
|
17527
17763
|
const configService = inject(AXPLayoutOrderingConfigService);
|
|
@@ -17529,64 +17765,51 @@ const layoutOrderingMiddlewareFactory = (config) => {
|
|
|
17529
17765
|
return;
|
|
17530
17766
|
}
|
|
17531
17767
|
const { sections: sectionOrder, properties: propertyOrder } = config;
|
|
17532
|
-
|
|
17768
|
+
const pairRules = config.pairSpanRules === false
|
|
17769
|
+
? []
|
|
17770
|
+
: config.pairSpanRules?.length
|
|
17771
|
+
? config.pairSpanRules
|
|
17772
|
+
: [...DEFAULT_PAIR_SPAN_RULES];
|
|
17533
17773
|
const orderSections = (layout) => {
|
|
17534
|
-
if (!layout
|
|
17774
|
+
if (!layout?.sections)
|
|
17535
17775
|
return;
|
|
17536
|
-
}
|
|
17537
17776
|
layout.sections.forEach((section) => {
|
|
17538
17777
|
const defaultOrder = sectionOrder[section.id];
|
|
17539
|
-
if (defaultOrder !== undefined) {
|
|
17540
|
-
// Always apply the default order if configured (force override)
|
|
17778
|
+
if (defaultOrder !== undefined && section.order === undefined) {
|
|
17541
17779
|
section.order = defaultOrder;
|
|
17542
17780
|
}
|
|
17543
|
-
else {
|
|
17544
|
-
// console.log(`[Layout Ordering Middleware] No default order for section "${section.id}"`);
|
|
17545
|
-
}
|
|
17546
17781
|
});
|
|
17547
|
-
// Sort sections by order
|
|
17548
17782
|
layout.sections.sort((a, b) => {
|
|
17549
17783
|
const orderA = a.order ?? 999;
|
|
17550
17784
|
const orderB = b.order ?? 999;
|
|
17551
17785
|
return orderA - orderB;
|
|
17552
17786
|
});
|
|
17553
17787
|
};
|
|
17554
|
-
//#endregion
|
|
17555
|
-
//#region ---- Order Properties Within Sections ----
|
|
17556
17788
|
const orderProperties = (layout) => {
|
|
17557
|
-
if (!layout
|
|
17789
|
+
if (!layout?.properties)
|
|
17558
17790
|
return;
|
|
17559
|
-
}
|
|
17560
17791
|
layout.properties.forEach((prop) => {
|
|
17561
17792
|
const groupId = context.properties.find(prop.name).get()?.groupId;
|
|
17562
17793
|
const defaultOrder = getPropertyOrder(groupId, prop.name, propertyOrder);
|
|
17563
|
-
if (defaultOrder !== undefined) {
|
|
17564
|
-
|
|
17565
|
-
if (!prop.layout) {
|
|
17794
|
+
if (defaultOrder !== undefined && !hasExplicitLayoutOrder(prop)) {
|
|
17795
|
+
if (!prop.layout)
|
|
17566
17796
|
prop.layout = {};
|
|
17567
|
-
|
|
17568
|
-
|
|
17797
|
+
if (prop.layout.order === undefined)
|
|
17798
|
+
prop.layout.order = defaultOrder;
|
|
17799
|
+
if (!prop.layout.positions)
|
|
17569
17800
|
prop.layout.positions = {};
|
|
17570
|
-
|
|
17571
|
-
if (!prop.layout.positions.lg) {
|
|
17801
|
+
if (!prop.layout.positions.lg)
|
|
17572
17802
|
prop.layout.positions.lg = {};
|
|
17573
|
-
}
|
|
17574
|
-
// Set order if not already defined
|
|
17575
17803
|
if (prop.layout.positions.lg.order === undefined) {
|
|
17576
17804
|
prop.layout.positions.lg.order = defaultOrder;
|
|
17577
17805
|
}
|
|
17578
17806
|
}
|
|
17579
17807
|
});
|
|
17580
|
-
|
|
17581
|
-
|
|
17582
|
-
|
|
17583
|
-
|
|
17584
|
-
return orderA - orderB;
|
|
17585
|
-
});
|
|
17808
|
+
layout.properties.sort((a, b) => resolveViewPropertySortOrder(a) - resolveViewPropertySortOrder(b));
|
|
17809
|
+
if (pairRules.length > 0) {
|
|
17810
|
+
applyPairSpanRules(layout, pairRules, (propertyName) => context.properties.find(propertyName).get()?.groupId);
|
|
17811
|
+
}
|
|
17586
17812
|
};
|
|
17587
|
-
//#endregion
|
|
17588
|
-
//#region ---- Apply to All Layouts ----
|
|
17589
|
-
// Apply to create layout
|
|
17590
17813
|
context.interfaces.master.create.update((create) => {
|
|
17591
17814
|
if (create) {
|
|
17592
17815
|
orderSections(create);
|
|
@@ -17594,7 +17817,6 @@ const layoutOrderingMiddlewareFactory = (config) => {
|
|
|
17594
17817
|
}
|
|
17595
17818
|
return create ?? { sections: [], properties: [] };
|
|
17596
17819
|
});
|
|
17597
|
-
// Apply to modify layout
|
|
17598
17820
|
context.interfaces.master.modify.update((modify) => {
|
|
17599
17821
|
if (modify) {
|
|
17600
17822
|
orderSections(modify);
|
|
@@ -17602,7 +17824,6 @@ const layoutOrderingMiddlewareFactory = (config) => {
|
|
|
17602
17824
|
}
|
|
17603
17825
|
return modify ?? { sections: [], properties: [] };
|
|
17604
17826
|
});
|
|
17605
|
-
// Apply to single layout
|
|
17606
17827
|
context.interfaces.master.single.update((single) => {
|
|
17607
17828
|
if (single) {
|
|
17608
17829
|
orderSections(single);
|
|
@@ -17610,27 +17831,20 @@ const layoutOrderingMiddlewareFactory = (config) => {
|
|
|
17610
17831
|
}
|
|
17611
17832
|
return single ?? { title: context.entity.title, sections: [], properties: [] };
|
|
17612
17833
|
});
|
|
17613
|
-
//#endregion
|
|
17614
17834
|
};
|
|
17615
17835
|
};
|
|
17616
|
-
|
|
17617
|
-
|
|
17618
|
-
|
|
17619
|
-
|
|
17620
|
-
|
|
17621
|
-
|
|
17622
|
-
|
|
17623
|
-
|
|
17624
|
-
|
|
17625
|
-
|
|
17626
|
-
|
|
17627
|
-
|
|
17628
|
-
}),
|
|
17629
|
-
};
|
|
17630
|
-
};
|
|
17631
|
-
/**
|
|
17632
|
-
* Default provider registered with the default configuration
|
|
17633
|
-
*/
|
|
17836
|
+
const createLayoutOrderingMiddlewareProvider = (config = {}, entityName = '*') => ({
|
|
17837
|
+
entityName,
|
|
17838
|
+
modifier: layoutOrderingMiddlewareFactory({
|
|
17839
|
+
sections: { ...DEFAULT_SECTION_ORDER, ...config.sections },
|
|
17840
|
+
properties: { ...DEFAULT_PROPERTY_ORDER, ...config.properties },
|
|
17841
|
+
pairSpanRules: config.pairSpanRules === false
|
|
17842
|
+
? false
|
|
17843
|
+
: config.pairSpanRules !== undefined
|
|
17844
|
+
? config.pairSpanRules
|
|
17845
|
+
: undefined,
|
|
17846
|
+
}),
|
|
17847
|
+
});
|
|
17634
17848
|
const layoutOrderingMiddlewareProvider = createLayoutOrderingMiddlewareProvider();
|
|
17635
17849
|
//#endregion
|
|
17636
17850
|
|
|
@@ -18281,8 +18495,7 @@ class AXPShowFileUploaderPopupAction extends AXPWorkflowAction {
|
|
|
18281
18495
|
const fileEditable = context.getVariable('options.fileEditable');
|
|
18282
18496
|
const enableTitleDescription = context.getVariable('options.enableTitleDescription');
|
|
18283
18497
|
const showEditDialogAfterSelect = context.getVariable('options.showEditDialogAfterSelect');
|
|
18284
|
-
|
|
18285
|
-
const correctFiles = files.filter((item) => item != undefined);
|
|
18498
|
+
const correctFiles = (files ?? []).filter((item) => item != null && typeof item === 'object' && typeof item.name === 'string');
|
|
18286
18499
|
// *********** show file list ***********
|
|
18287
18500
|
const res = await this.fileUploaderWidgetService.showFileList({
|
|
18288
18501
|
files: correctFiles,
|
|
@@ -19171,5 +19384,5 @@ function detectEntityChanges(oldObj, newObj) {
|
|
|
19171
19384
|
* Generated bundle index. Do not edit.
|
|
19172
19385
|
*/
|
|
19173
19386
|
|
|
19174
|
-
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCategoryTreeService, AXPCreateEntityCommand, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntitiesListDataSourceDefinition, AXPEntityApplyUpdatesAction, AXPEntityCategoryTreeSelectorComponent, AXPEntityCategoryWidget, AXPEntityCategoryWidgetColumnComponent, AXPEntityCategoryWidgetEditComponent, AXPEntityCategoryWidgetViewComponent, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorService, AXPEntityDefinitionProviderWidget, AXPEntityDefinitionProviderWidgetEditComponent, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityEventsKeys, AXPEntityFormBuilderService, AXPEntityListTableService, AXPEntityListToolbarService, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityPreloadFiltersContainerComponent, AXPEntityPreloadFiltersViewModel, AXPEntityPreloadFiltersViewModelResolver, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPGetEntityDetailsQuery, AXPLayoutOrderingConfigService, AXPLookupWidget, AXPLookupWidgetColumnComponent, AXPLookupWidgetEditComponent, AXPLookupWidgetViewComponent, AXPMiddlewareAbortError, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPMultiSourceDefinitionProviderContext, AXPMultiSourceDefinitionProviderService, AXPMultiSourceFederatedSearchService, AXPMultiSourceSelectorComponent, AXPMultiSourceSelectorService, AXPMultiSourceSelectorWidget, AXPMultiSourceSelectorWidgetColumnComponent, AXPMultiSourceSelectorWidgetEditComponent, AXPMultiSourceSelectorWidgetViewComponent, AXPMultiSourceType, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPRelatedColumnEnrichmentService, AXPRelatedColumnMetadataResolver, AXPSelectorStructureWidget, AXPSelectorStructureWidgetColumnComponent, AXPSelectorStructureWidgetEditComponent, AXPSelectorStructureWidgetViewComponent, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXPTruncatedBreadcrumbComponent, AXPUpdateEntityCommand, AXPViewEntityDetailsCommand, AXP_CATEGORY_TREE_ROOT_TITLE_I18N_KEY, 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, AXP_MULTI_SOURCE_DEFINITION_PROVIDER, DEFAULT_COLUMN_ORDER, DEFAULT_PROPERTY_ORDER, DEFAULT_SECTION_ORDER, EntityBuilder, EntityDataAccessor, actionExists, axpCreateEntityAiToolInputDefaults, axpCreateEntityCommandDefinition, cloneLayoutArrays, columnOrderingMiddleware, columnOrderingMiddlewareProvider, columnWidthMiddleware, columnWidthMiddlewareProvider, createColumnOrderingMiddlewareProvider, createLayoutOrderingMiddlewareProvider, createModifierContext, defaultMultiLanguageMiddleware, defaultMultiLanguageMiddlewareProvider, detectEntityChanges, ensureLayoutPropertyView, ensureLayoutSection, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsNewEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterEditAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware, isAXPMiddlewareAbortError, layoutOrderingMiddlewareFactory, layoutOrderingMiddlewareProvider, provideEntity, resolveEntityPluginDetailPageOrder, searchResultDescriptionMiddleware, searchResultDescriptionMiddlewareProvider };
|
|
19387
|
+
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCategoryTreeService, AXPCreateEntityCommand, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntitiesListDataSourceDefinition, AXPEntityApplyUpdatesAction, AXPEntityCategoryTreeSelectorComponent, AXPEntityCategoryWidget, AXPEntityCategoryWidgetColumnComponent, AXPEntityCategoryWidgetEditComponent, AXPEntityCategoryWidgetViewComponent, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorService, AXPEntityDefinitionProviderWidget, AXPEntityDefinitionProviderWidgetEditComponent, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityEventsKeys, AXPEntityFormBuilderService, AXPEntityListTableService, AXPEntityListToolbarService, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityPreloadFiltersContainerComponent, AXPEntityPreloadFiltersViewModel, AXPEntityPreloadFiltersViewModelResolver, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPGetEntityDetailsQuery, AXPLayoutOrderingConfigService, AXPLookupWidget, AXPLookupWidgetColumnComponent, AXPLookupWidgetEditComponent, AXPLookupWidgetViewComponent, AXPMiddlewareAbortError, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPMultiSourceDefinitionProviderContext, AXPMultiSourceDefinitionProviderService, AXPMultiSourceFederatedSearchService, AXPMultiSourceSelectorComponent, AXPMultiSourceSelectorService, AXPMultiSourceSelectorWidget, AXPMultiSourceSelectorWidgetColumnComponent, AXPMultiSourceSelectorWidgetEditComponent, AXPMultiSourceSelectorWidgetViewComponent, AXPMultiSourceType, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPRelatedColumnEnrichmentService, AXPRelatedColumnMetadataResolver, AXPSelectorStructureWidget, AXPSelectorStructureWidgetColumnComponent, AXPSelectorStructureWidgetEditComponent, AXPSelectorStructureWidgetViewComponent, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXPTruncatedBreadcrumbComponent, AXPUpdateEntityCommand, AXPViewEntityDetailsCommand, AXP_CATEGORY_TREE_ROOT_TITLE_I18N_KEY, 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, AXP_MULTI_SOURCE_DEFINITION_PROVIDER, DEFAULT_COLUMN_ORDER, DEFAULT_PAIR_SPAN_RULES, DEFAULT_PROPERTY_ORDER, DEFAULT_SECTION_ORDER, EntityBuilder, EntityDataAccessor, actionExists, axpCreateEntityAiToolInputDefaults, axpCreateEntityCommandDefinition, cloneLayoutArrays, columnOrderingMiddleware, columnOrderingMiddlewareProvider, columnWidthMiddleware, columnWidthMiddlewareProvider, createColumnOrderingMiddlewareProvider, createLayoutOrderingMiddlewareProvider, createModifierContext, defaultMultiLanguageMiddleware, defaultMultiLanguageMiddlewareProvider, detectEntityChanges, ensureLayoutPropertyView, ensureLayoutSection, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsNewEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterEditAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware, getMasterInterfacePropertySortKey, isAXPMiddlewareAbortError, layoutOrderingMiddlewareFactory, layoutOrderingMiddlewareProvider, provideEntity, resolveEntityPluginDetailPageOrder, searchResultDescriptionMiddleware, searchResultDescriptionMiddlewareProvider };
|
|
19175
19388
|
//# sourceMappingURL=acorex-platform-layout-entity.mjs.map
|