@acorex/platform 21.0.0-next.88 → 21.0.0-next.90
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-auth.mjs +8 -2
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-common-common-settings.provider-VfmZct9H.mjs → acorex-platform-common-common-settings.provider-DilV4dql.mjs} +15 -42
- package/fesm2022/acorex-platform-common-common-settings.provider-DilV4dql.mjs.map +1 -0
- package/fesm2022/acorex-platform-common.mjs +3299 -3200
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-contracts.mjs +1 -0
- package/fesm2022/acorex-platform-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +643 -30
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +98 -189
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs → acorex-platform-layout-components-binding-expression-editor-popup.component-RttFwaw9.mjs} +17 -4
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-RttFwaw9.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-components.mjs +125 -26
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +4 -4
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity-contracts.mjs +106 -12
- package/fesm2022/acorex-platform-layout-entity-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +512 -155
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +921 -173
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +380 -103
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-D4MOHEpI.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-BvFykMTH.mjs} +2 -2
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-D4MOHEpI.mjs.map → acorex-platform-layout-widgets-tabular-data-edit-popup.component-BvFykMTH.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-gX-3Kx9I.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-CntopmDS.mjs} +2 -2
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-gX-3Kx9I.mjs.map → acorex-platform-layout-widgets-tabular-data-view-popup.component-CntopmDS.mjs.map} +1 -1
- package/fesm2022/acorex-platform-layout-widgets.mjs +575 -239
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default.mjs +232 -25
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-shared-settings.provider-BUwPqwUS.mjs → acorex-platform-themes-shared-settings.provider-UyKdkeyk.mjs} +48 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-UyKdkeyk.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +103 -24
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-auth.d.ts +1 -0
- package/types/acorex-platform-common.d.ts +202 -151
- package/types/acorex-platform-contracts.d.ts +1 -0
- package/types/acorex-platform-core.d.ts +162 -7
- package/types/acorex-platform-layout-builder.d.ts +10 -20
- package/types/acorex-platform-layout-components.d.ts +14 -1
- package/types/acorex-platform-layout-entity-contracts.d.ts +31 -2
- package/types/acorex-platform-layout-entity.d.ts +91 -16
- package/types/acorex-platform-layout-views.d.ts +107 -20
- package/types/acorex-platform-layout-widget-core.d.ts +71 -9
- package/types/acorex-platform-layout-widgets.d.ts +48 -26
- package/types/acorex-platform-themes-default.d.ts +60 -6
- package/types/acorex-platform-themes-shared.d.ts +4 -0
- package/fesm2022/acorex-platform-common-common-settings.provider-VfmZct9H.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-components-binding-expression-editor-popup.component-CXEdvDTf.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-shared-settings.provider-BUwPqwUS.mjs.map +0 -1
|
@@ -1,18 +1,20 @@
|
|
|
1
|
+
import { mergeForeignKeyFieldIntoCreateActions, collectNestedCreateHiddenProperties, normalizeEntityDisplayTemplate, sanitizeResolvedEntityDisplayTitle, isUnresolvedEntityDisplayTemplate, AXPEntityDataSourceKeys, AXPEntityEventsKeys, collectEntityListSortableFields, collectEntityListFilterDefinitions, parseDottedFieldPath, ENTITY_ROW_POPUP_TITLE_OPTION, buildEntitySearchTitleContext } from '@acorex/platform/layout/entity-contracts';
|
|
2
|
+
export * from '@acorex/platform/layout/entity-contracts';
|
|
3
|
+
export { collectNestedCreateHiddenProperties, entityDetailsCreateActions, entityDetailsCreateActionsDeferredParent, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsNewEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterEditAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, mergeForeignKeyFieldIntoCreateActions } from '@acorex/platform/layout/entity-contracts';
|
|
1
4
|
import { AXToastService } from '@acorex/components/toast';
|
|
2
5
|
import * as i3$1 from '@acorex/core/translation';
|
|
3
6
|
import { AXTranslationService, resolveMultiLanguageString, AXTranslationModule, translateSync } from '@acorex/core/translation';
|
|
4
7
|
import * as i4$2 from '@acorex/platform/common';
|
|
5
|
-
import { AXPNotFoundError, AXPEntityCommandScope, axpNavigateAppPath, AXPSettingsService, AXPCommonSettings, resolveEntityModifyPopupTitle, resolveSearchableText, evaluateEntityDisplayTemplate, AXPFilterOperatorMiddlewareService, isCardFieldBadgeDisplay, resolveCardFieldBadgeColor, getEntityInfo, resolveEnabledMasterListLayouts, resolveDefaultMasterListLayout,
|
|
8
|
+
import { AXPNotFoundError, AXPEntityCommandScope, axpNavigateAppPath, AXPSettingsService, AXPCommonSettings, resolveEntityCreateListBehavior, AXPRefreshEvent, resolveEntityModifyPopupTitle, resolveSearchableText, evaluateEntityDisplayTemplate, AXPFilterOperatorMiddlewareService, isCardFieldBadgeDisplay, resolveCardFieldBadgeColor, getEntityInfo, resolveEnabledMasterListLayouts, resolveDefaultMasterListLayout, AXPReloadEvent, axpRedirectToNotFound, AXP_ENTITY_DELETED_WORKFLOW_EVENT_TYPE, AXPCleanNestedFilters, AXPFileTypeProviderService, AXPFileStorageService, resolveEntityRowDisplayTitle, AXPFileActionsService, axpIsEntityRecordNotFound, AXPDefaultMultiLanguageConfigService, withDefaultMultiLanguageOnWidgetNodeTree, AXPEntityQueryType, AXPWorkflowNavigateAction, AXP_NOT_FOUND_ROUTE, AXP_PROTECTED_ROUTE_GUARDS, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_DEFINITION_LAZY_RESOLVER, AXPMenuItemsDataSourceDefinition } from '@acorex/platform/common';
|
|
9
|
+
import * as i1$3 from '@acorex/platform/workflow';
|
|
10
|
+
import { AXPWorkflowEventService, AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
6
11
|
import * as i0 from '@angular/core';
|
|
7
12
|
import { InjectionToken, inject, Injector, runInInjectionContext, Injectable, ChangeDetectorRef, input, signal, computed, effect, ChangeDetectionStrategy, Component, ElementRef, NgModule, viewChild, Input, afterNextRender, untracked, ViewEncapsulation, viewChildren, linkedSignal, HostBinding, output, EnvironmentInjector, makeEnvironmentProviders } from '@angular/core';
|
|
8
|
-
import { cloneDeep, merge, get, castArray, set, orderBy, isNil, isEmpty, isEqual as isEqual$1, isArray, isString } from 'lodash-es';
|
|
13
|
+
import { cloneDeep, merge, get, castArray, set, orderBy, isNil, isEmpty, isEqual as isEqual$1, isObjectLike, isArray, has, isString } from 'lodash-es';
|
|
9
14
|
import { Subject, filter, takeUntil } from 'rxjs';
|
|
10
15
|
import { AXPLayoutBuilderService, LayoutBuilderModule } from '@acorex/platform/layout/builder';
|
|
11
16
|
import { AXPWidgetsCatalog, AXPPlatformScope, AXPDataGenerator, AXPSystemActionType } from '@acorex/platform/contracts';
|
|
12
|
-
import { AXPDeviceService, AXPExpressionEvaluatorService, AXPContextEvalFactory, AXPBroadcastEventService, applyFilterArray, applySortArray, resolveActionLook, AXPDistributedEventListenerService, AXHighlightService, extractValue, setSmart, getChangedPaths, objectKeyValueTransforms, AXPHookService, AXPComponentSlotModule,
|
|
13
|
-
import { mergeForeignKeyFieldIntoCreateActions, collectNestedCreateHiddenProperties, normalizeEntityDisplayTemplate, sanitizeResolvedEntityDisplayTitle, isUnresolvedEntityDisplayTemplate, AXPEntityDataSourceKeys, AXPEntityEventsKeys, collectEntityListFilterDefinitions, ENTITY_ROW_POPUP_TITLE_OPTION, buildEntitySearchTitleContext } from '@acorex/platform/layout/entity-contracts';
|
|
14
|
-
export * from '@acorex/platform/layout/entity-contracts';
|
|
15
|
-
export { collectNestedCreateHiddenProperties, entityDetailsCreateActions, entityDetailsCreateActionsDeferredParent, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsNewEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterEditAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, mergeForeignKeyFieldIntoCreateActions } from '@acorex/platform/layout/entity-contracts';
|
|
17
|
+
import { AXPDeviceService, AXPExpressionEvaluatorService, AXPContextEvalFactory, AXPBroadcastEventService, applyFilterArray, applySortArray, resolveActionLook, AXPDistributedEventListenerService, AXHighlightService, extractValue, setSmart, getChangedPaths, AXPContextStore, isSelectionValueEqual, AXPDebugService, FORM_DIRTY_TRACE_NS, objectKeyValueTransforms, setupPopupFooterKeyboardShortcuts, AXPHookService, AXPComponentSlotModule, AXPColumnWidthService, AXPModuleManifestRegistry, defaultColumnWidthProvider, AXP_COLUMN_WIDTH_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXPModuleManifestsDataSourceDefinition } from '@acorex/platform/core';
|
|
16
18
|
import { transform, isEqual } from 'lodash';
|
|
17
19
|
import { AXPSessionService, AXPPermissionDefinitionsDataSourceDefinition } from '@acorex/platform/auth';
|
|
18
20
|
import { Router, NavigationStart, ActivatedRoute, RouterModule, ROUTES } from '@angular/router';
|
|
@@ -30,12 +32,10 @@ import { AXOverlayService } from '@acorex/cdk/overlay';
|
|
|
30
32
|
import { AXLocaleService } from '@acorex/core/locale';
|
|
31
33
|
import { AXPlatform } from '@acorex/core/platform';
|
|
32
34
|
import { AXPThemeLayoutBlockComponent, AXPPreloadFiltersComponent, AXP_PAGE_COMPONENT_PROVIDER, AXPStateMessageComponent, AXPColumnItemListComponent, AXPDataSelectorService, AXPPageComponentRegistryService } from '@acorex/platform/layout/components';
|
|
33
|
-
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageComponentRendererDirective, AXPPageComponentInstanceRegistryService, axpDetailsViewCanDeactivateGuard } from '@acorex/platform/layout/views';
|
|
35
|
+
import { AXPPageLayoutBaseComponent, AXPPageLayoutComponent, AXPPageComponentRendererDirective, AXPPageComponentInstanceRegistryService, AXP_LAYOUT_DETAILS_VIEW_ADAPTER_LOADER, axpDetailsViewCanDeactivateGuard } from '@acorex/platform/layout/views';
|
|
34
36
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
35
37
|
import { AXP_ENTITY_CRUD_SETUP } from '@acorex/platform/domain';
|
|
36
38
|
export { AXP_ENTITY_DEFINITION_CRUD_SERVICE } from '@acorex/platform/domain';
|
|
37
|
-
import * as i1$3 from '@acorex/platform/workflow';
|
|
38
|
-
import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowEventService, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
39
39
|
import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
|
|
40
40
|
import { moveItemInArray } from '@angular/cdk/drag-drop';
|
|
41
41
|
import { AXDialogService } from '@acorex/components/dialog';
|
|
@@ -100,6 +100,10 @@ function actionExists(actions, commandName, name) {
|
|
|
100
100
|
return cmd === commandName;
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
|
+
/** Layout order for the shared appearance section (after entity-defined groups). */
|
|
104
|
+
const AXP_APPEARANCE_SECTION_ORDER = 900;
|
|
105
|
+
/** Layout order for the shared classification section (after appearance). */
|
|
106
|
+
const AXP_CLASSIFICATION_SECTION_ORDER = 910;
|
|
103
107
|
/**
|
|
104
108
|
* Clones `sections` and `properties` arrays to prevent accidental cross-interface mutations.
|
|
105
109
|
* Many entity definitions reuse the same array instances across create/update/single interfaces.
|
|
@@ -112,9 +116,19 @@ function cloneLayoutArrays(layout) {
|
|
|
112
116
|
};
|
|
113
117
|
}
|
|
114
118
|
function ensureLayoutSection(layout, section) {
|
|
115
|
-
|
|
119
|
+
const existingIndex = layout.sections.findIndex((s) => s.id === section.id);
|
|
120
|
+
if (existingIndex === -1) {
|
|
116
121
|
layout.sections = [...layout.sections, section];
|
|
122
|
+
return;
|
|
117
123
|
}
|
|
124
|
+
const incomingOrder = section.order;
|
|
125
|
+
if (incomingOrder == null) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const existing = layout.sections[existingIndex];
|
|
129
|
+
const mergedOrder = Math.max(existing.order ?? 0, incomingOrder);
|
|
130
|
+
layout.sections = [...layout.sections];
|
|
131
|
+
layout.sections[existingIndex] = { ...existing, ...section, order: mergedOrder };
|
|
118
132
|
}
|
|
119
133
|
function ensureLayoutPropertyView(layout, prop) {
|
|
120
134
|
if (!layout.properties.some((p) => p.name === prop.name)) {
|
|
@@ -2302,6 +2316,7 @@ class AXPCreateEntityCommand {
|
|
|
2302
2316
|
this.translationService = inject(AXTranslationService);
|
|
2303
2317
|
this.settingsService = inject(AXPSettingsService);
|
|
2304
2318
|
this.openEntityDetailsCommand = inject(AXPOpenEntityDetailsCommand);
|
|
2319
|
+
this.workflowEventService = inject(AXPWorkflowEventService);
|
|
2305
2320
|
this.context = {};
|
|
2306
2321
|
}
|
|
2307
2322
|
async execute(input) {
|
|
@@ -2359,7 +2374,6 @@ class AXPCreateEntityCommand {
|
|
|
2359
2374
|
const createFn = entityRef.commands?.create?.execute;
|
|
2360
2375
|
const updateFn = entityRef.commands?.update?.execute;
|
|
2361
2376
|
const context = merge({}, data, dialogRef.context());
|
|
2362
|
-
console.log('context', context);
|
|
2363
2377
|
const hasPersistedId = hasPersistedRootId(context);
|
|
2364
2378
|
const persistFn = hasPersistedId ? updateFn : createFn;
|
|
2365
2379
|
const missingPersistHandlerMsg = hasPersistedId
|
|
@@ -2417,13 +2431,24 @@ class AXPCreateEntityCommand {
|
|
|
2417
2431
|
.show();
|
|
2418
2432
|
const commandResult = result;
|
|
2419
2433
|
const redirectOption = options?.process?.redirect;
|
|
2420
|
-
const shouldRedirect =
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
if (commandResult.success &&
|
|
2434
|
+
const { shouldRedirect, shouldHighlight } = await resolveEntityCreateListBehavior(this.settingsService, {
|
|
2435
|
+
redirect: redirectOption,
|
|
2436
|
+
});
|
|
2437
|
+
if (commandResult.success && commandResult.data) {
|
|
2424
2438
|
const createdItem = commandResult.data?.item ?? commandResult.data;
|
|
2425
|
-
const createdId = createdItem?.id;
|
|
2426
|
-
|
|
2439
|
+
const createdId = createdItem?.id ?? createdItem?._id;
|
|
2440
|
+
const refreshMeta = { resetPagination: true };
|
|
2441
|
+
if (createdId != null && shouldHighlight) {
|
|
2442
|
+
refreshMeta['highlightRowId'] = createdId;
|
|
2443
|
+
}
|
|
2444
|
+
if (entityRef.parentKey && createdItem?.[entityRef.parentKey]) {
|
|
2445
|
+
refreshMeta['refreshTargetId'] = createdItem[entityRef.parentKey];
|
|
2446
|
+
}
|
|
2447
|
+
this.workflowEventService.dispatch(AXPRefreshEvent({
|
|
2448
|
+
entity: `${moduleName}.${entityName}`,
|
|
2449
|
+
meta: refreshMeta,
|
|
2450
|
+
}));
|
|
2451
|
+
if (shouldRedirect && createdId != null) {
|
|
2427
2452
|
await this.openEntityDetailsCommand.execute({
|
|
2428
2453
|
entity: `${moduleName}.${entityName}`,
|
|
2429
2454
|
data: { id: String(createdId) },
|
|
@@ -3700,16 +3725,27 @@ function commandMessageTextForError(value) {
|
|
|
3700
3725
|
* 2. Falls back to CRUD service if not defined
|
|
3701
3726
|
*/
|
|
3702
3727
|
class EntityDataAccessor {
|
|
3703
|
-
constructor(module, entity, entityRegistry, queryExecutor, commandService) {
|
|
3728
|
+
constructor(module, entity, entityRegistry, queryExecutor, commandService, injector) {
|
|
3704
3729
|
this.module = module;
|
|
3705
3730
|
this.entity = entity;
|
|
3706
3731
|
this.entityRegistry = entityRegistry;
|
|
3707
3732
|
this.queryExecutor = queryExecutor;
|
|
3708
3733
|
this.commandService = commandService;
|
|
3734
|
+
this.injector = injector;
|
|
3709
3735
|
this.crudService = null;
|
|
3710
3736
|
this.entityDef = null;
|
|
3711
3737
|
this.entityDefPromise = null;
|
|
3712
3738
|
}
|
|
3739
|
+
/**
|
|
3740
|
+
* Lazily creates the CRUD fallback inside an injection context so {@link AXMEntityCrudServiceImpl}
|
|
3741
|
+
* can resolve {@link AXPEntityStorageService} via `inject()`.
|
|
3742
|
+
*/
|
|
3743
|
+
ensureCrudService() {
|
|
3744
|
+
if (!this.crudService) {
|
|
3745
|
+
this.crudService = runInInjectionContext(this.injector, () => new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`));
|
|
3746
|
+
}
|
|
3747
|
+
return this.crudService;
|
|
3748
|
+
}
|
|
3713
3749
|
/**
|
|
3714
3750
|
* Resolves the entity definition lazily and caches it.
|
|
3715
3751
|
* @returns The resolved entity definition
|
|
@@ -3742,10 +3778,7 @@ class EntityDataAccessor {
|
|
|
3742
3778
|
return await this.queryExecutor.fetch(execute, key);
|
|
3743
3779
|
}
|
|
3744
3780
|
// Fallback to CRUD service
|
|
3745
|
-
|
|
3746
|
-
this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
|
|
3747
|
-
}
|
|
3748
|
-
return await this.crudService.getOne(key);
|
|
3781
|
+
return await this.ensureCrudService().getOne(key);
|
|
3749
3782
|
}
|
|
3750
3783
|
/**
|
|
3751
3784
|
* Queries a list of entities.
|
|
@@ -3768,20 +3801,14 @@ class EntityDataAccessor {
|
|
|
3768
3801
|
return result;
|
|
3769
3802
|
}
|
|
3770
3803
|
// Fallback to CRUD service
|
|
3771
|
-
|
|
3772
|
-
this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
|
|
3773
|
-
}
|
|
3774
|
-
return await this.crudService.query(queryRequest);
|
|
3804
|
+
return await this.ensureCrudService().query(queryRequest);
|
|
3775
3805
|
}
|
|
3776
3806
|
/**
|
|
3777
3807
|
* Queries category entities linked to this entity (`{module}.{entity}Category`).
|
|
3778
3808
|
* Falls back to CRUD category storage (same as {@link AXMEntityCrudServiceImpl.getCategoriesList}).
|
|
3779
3809
|
*/
|
|
3780
3810
|
async getCategoriesList(request = { skip: 0, take: 1000 }) {
|
|
3781
|
-
|
|
3782
|
-
this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
|
|
3783
|
-
}
|
|
3784
|
-
return await this.crudService.getCategoriesList(request);
|
|
3811
|
+
return await this.ensureCrudService().getCategoriesList(request);
|
|
3785
3812
|
}
|
|
3786
3813
|
/**
|
|
3787
3814
|
* Creates a new entity.
|
|
@@ -3803,10 +3830,7 @@ class EntityDataAccessor {
|
|
|
3803
3830
|
return result.data?.id || result.data;
|
|
3804
3831
|
}
|
|
3805
3832
|
// Fallback to CRUD service
|
|
3806
|
-
|
|
3807
|
-
this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
|
|
3808
|
-
}
|
|
3809
|
-
return await this.crudService.insertOne(data);
|
|
3833
|
+
return await this.ensureCrudService().insertOne(data);
|
|
3810
3834
|
}
|
|
3811
3835
|
/**
|
|
3812
3836
|
* Updates an existing entity.
|
|
@@ -3829,10 +3853,7 @@ class EntityDataAccessor {
|
|
|
3829
3853
|
return result.data;
|
|
3830
3854
|
}
|
|
3831
3855
|
// Fallback to CRUD service
|
|
3832
|
-
|
|
3833
|
-
this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
|
|
3834
|
-
}
|
|
3835
|
-
return await this.crudService.updateOne(id, data);
|
|
3856
|
+
return await this.ensureCrudService().updateOne(id, data);
|
|
3836
3857
|
}
|
|
3837
3858
|
/**
|
|
3838
3859
|
* Deletes an entity.
|
|
@@ -3853,10 +3874,7 @@ class EntityDataAccessor {
|
|
|
3853
3874
|
return;
|
|
3854
3875
|
}
|
|
3855
3876
|
// Fallback to CRUD service
|
|
3856
|
-
|
|
3857
|
-
this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
|
|
3858
|
-
}
|
|
3859
|
-
return await this.crudService.deleteOne(id);
|
|
3877
|
+
return await this.ensureCrudService().deleteOne(id);
|
|
3860
3878
|
}
|
|
3861
3879
|
}
|
|
3862
3880
|
//#endregion
|
|
@@ -3866,11 +3884,12 @@ class EntityDataAccessor {
|
|
|
3866
3884
|
* Provides methods to create paths and access entity data.
|
|
3867
3885
|
*/
|
|
3868
3886
|
class EntityBuilder {
|
|
3869
|
-
constructor(module, entity, sessionService, entityRegistry, queryExecutor, commandService) {
|
|
3887
|
+
constructor(module, entity, sessionService, entityRegistry, queryExecutor, commandService, injector) {
|
|
3870
3888
|
this.sessionService = sessionService;
|
|
3871
3889
|
this.entityRegistry = entityRegistry;
|
|
3872
3890
|
this.queryExecutor = queryExecutor;
|
|
3873
3891
|
this.commandService = commandService;
|
|
3892
|
+
this.injector = injector;
|
|
3874
3893
|
this.module = module;
|
|
3875
3894
|
this.entity = entity;
|
|
3876
3895
|
}
|
|
@@ -3888,7 +3907,7 @@ class EntityBuilder {
|
|
|
3888
3907
|
* @returns An EntityDataAccessor instance
|
|
3889
3908
|
*/
|
|
3890
3909
|
data() {
|
|
3891
|
-
return new EntityDataAccessor(this.module, this.entity, this.entityRegistry, this.queryExecutor, this.commandService);
|
|
3910
|
+
return new EntityDataAccessor(this.module, this.entity, this.entityRegistry, this.queryExecutor, this.commandService, this.injector);
|
|
3892
3911
|
}
|
|
3893
3912
|
}
|
|
3894
3913
|
//#endregion
|
|
@@ -3898,6 +3917,7 @@ class AXPEntityService {
|
|
|
3898
3917
|
this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
|
|
3899
3918
|
this.queryExecutor = inject(AXPQueryExecutor);
|
|
3900
3919
|
this.commandService = inject(AXPCommandService);
|
|
3920
|
+
this.injector = inject(Injector);
|
|
3901
3921
|
}
|
|
3902
3922
|
/**
|
|
3903
3923
|
* @deprecated Use `withEntity(module, entity).createPath(path)` instead.
|
|
@@ -3923,7 +3943,7 @@ class AXPEntityService {
|
|
|
3923
3943
|
module = moduleOrEntityKey.substring(0, dotIndex);
|
|
3924
3944
|
entityName = moduleOrEntityKey.substring(dotIndex + 1);
|
|
3925
3945
|
}
|
|
3926
|
-
return new EntityBuilder(module, entityName, this.sessionService, this.entityRegistry, this.queryExecutor, this.commandService);
|
|
3946
|
+
return new EntityBuilder(module, entityName, this.sessionService, this.entityRegistry, this.queryExecutor, this.commandService, this.injector);
|
|
3927
3947
|
}
|
|
3928
3948
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3929
3949
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityService, providedIn: 'root' }); }
|
|
@@ -4227,7 +4247,8 @@ const PLUGIN_SLOT_INDEX = {
|
|
|
4227
4247
|
attachments: 1,
|
|
4228
4248
|
documents: 2,
|
|
4229
4249
|
comments: 3,
|
|
4230
|
-
|
|
4250
|
+
dashboard: 4,
|
|
4251
|
+
history: 5,
|
|
4231
4252
|
};
|
|
4232
4253
|
//#endregion
|
|
4233
4254
|
//#region ---- Helpers ----
|
|
@@ -4349,7 +4370,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
4349
4370
|
|
|
4350
4371
|
class AXPEntityCommandTriggerViewModel {
|
|
4351
4372
|
constructor(entity, action, isChild = false) {
|
|
4352
|
-
this.name =
|
|
4373
|
+
this.name = AXPEntityCommandTriggerViewModel.buildTriggerName(action);
|
|
4353
4374
|
this.options = typeof action.command === 'object' ? action.command.options : undefined;
|
|
4354
4375
|
this.metadata = typeof action.command === 'object' ? action.command.metadata : undefined;
|
|
4355
4376
|
const resolvedLook = resolveActionLook(action.type);
|
|
@@ -4367,6 +4388,15 @@ class AXPEntityCommandTriggerViewModel {
|
|
|
4367
4388
|
this.isChild = isChild;
|
|
4368
4389
|
this.items = action.items?.map((child) => new AXPEntityCommandTriggerViewModel(entity, child, true));
|
|
4369
4390
|
}
|
|
4391
|
+
/** Stable trigger id for command lookup and list tracking when {@link AXPEntityAction.name} is omitted. */
|
|
4392
|
+
static buildTriggerName(action) {
|
|
4393
|
+
const commandName = typeof action.command === 'string' ? action.command : action.command.name;
|
|
4394
|
+
if (action.name) {
|
|
4395
|
+
return `${commandName}&${action.name}`;
|
|
4396
|
+
}
|
|
4397
|
+
const suffix = [action.scope, action.priority, String(action.order ?? 0), action.type].join(':');
|
|
4398
|
+
return `${commandName}&${suffix}`;
|
|
4399
|
+
}
|
|
4370
4400
|
}
|
|
4371
4401
|
class AXPEntityListViewColumnViewModel {
|
|
4372
4402
|
constructor(property, column) {
|
|
@@ -5325,6 +5355,48 @@ class AXPEntityMasterListViewModel {
|
|
|
5325
5355
|
const resolved = String(result).trim();
|
|
5326
5356
|
return resolved !== '' ? resolved : 'default';
|
|
5327
5357
|
}
|
|
5358
|
+
/**
|
|
5359
|
+
* Resolves table row CSS classes from `layouts.table.cssClass.row` for the given row.
|
|
5360
|
+
*/
|
|
5361
|
+
async resolveTableRowCssClass(rowData) {
|
|
5362
|
+
return this.resolveTableCssClassValue(this.tableLayout()?.cssClass?.row, rowData);
|
|
5363
|
+
}
|
|
5364
|
+
/**
|
|
5365
|
+
* Resolves table cell CSS classes from `layouts.table.cssClass.cell` for the given row and column.
|
|
5366
|
+
*/
|
|
5367
|
+
async resolveTableCellCssClass(rowData, columnName) {
|
|
5368
|
+
return this.resolveTableCssClassValue(this.tableLayout()?.cssClass?.cell, rowData, columnName);
|
|
5369
|
+
}
|
|
5370
|
+
createTableCssClassExpressionScope(data, columnName) {
|
|
5371
|
+
const scope = this.createLogicExpressionScope(data);
|
|
5372
|
+
if (!columnName) {
|
|
5373
|
+
return scope;
|
|
5374
|
+
}
|
|
5375
|
+
const columnContext = { name: columnName };
|
|
5376
|
+
return {
|
|
5377
|
+
...scope,
|
|
5378
|
+
table: {
|
|
5379
|
+
getColumn: (field) => {
|
|
5380
|
+
return get(columnContext, field);
|
|
5381
|
+
},
|
|
5382
|
+
},
|
|
5383
|
+
};
|
|
5384
|
+
}
|
|
5385
|
+
async resolveTableCssClassValue(expression, rowData, columnName) {
|
|
5386
|
+
if (!expression) {
|
|
5387
|
+
return undefined;
|
|
5388
|
+
}
|
|
5389
|
+
const scope = this.createTableCssClassExpressionScope(rowData, columnName);
|
|
5390
|
+
const result = await this.expressionEvaluator.evaluate(expression, scope);
|
|
5391
|
+
return this.normalizeTableCssClassValue(result);
|
|
5392
|
+
}
|
|
5393
|
+
normalizeTableCssClassValue(value) {
|
|
5394
|
+
if (value === false || value == null) {
|
|
5395
|
+
return undefined;
|
|
5396
|
+
}
|
|
5397
|
+
const resolved = String(value).trim();
|
|
5398
|
+
return resolved !== '' ? resolved : undefined;
|
|
5399
|
+
}
|
|
5328
5400
|
async resolveTriggerName(triggerName, data) {
|
|
5329
5401
|
if (!triggerName) {
|
|
5330
5402
|
return triggerName;
|
|
@@ -5488,6 +5560,8 @@ class AXPEntityMasterListViewModel {
|
|
|
5488
5560
|
this.hasInlineFilters = computed(() => {
|
|
5489
5561
|
return this.inlineFiltersPlaceholders().length > 0;
|
|
5490
5562
|
}, ...(ngDevMode ? [{ debugName: "hasInlineFilters" }] : /* istanbul ignore next */ []));
|
|
5563
|
+
/** Text for data-table cell highlighting (set only after filters are applied). */
|
|
5564
|
+
this.inlineFilterHighlightText = signal('', ...(ngDevMode ? [{ debugName: "inlineFilterHighlightText" }] : /* istanbul ignore next */ []));
|
|
5491
5565
|
//****************** Beardcrumbs ******************//
|
|
5492
5566
|
this.beardcrumbs = computed(() => {
|
|
5493
5567
|
return [
|
|
@@ -5501,7 +5575,7 @@ class AXPEntityMasterListViewModel {
|
|
|
5501
5575
|
const list = this.entityDef.interfaces?.master?.list?.actions ?? [];
|
|
5502
5576
|
const actions = list.map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? [];
|
|
5503
5577
|
const orderedActions = orderBy(actions, 'order', 'asc');
|
|
5504
|
-
return orderedActions;
|
|
5578
|
+
return this.dedupeActionsByName(orderedActions);
|
|
5505
5579
|
}, ...(ngDevMode ? [{ debugName: "allActions" }] : /* istanbul ignore next */ []));
|
|
5506
5580
|
/** Flattened actions including children for execute lookup */
|
|
5507
5581
|
this.flattenedActions = computed(() => {
|
|
@@ -5523,7 +5597,6 @@ class AXPEntityMasterListViewModel {
|
|
|
5523
5597
|
this.primaryRowActions = computed(() => this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Individual && a.priority === 'primary'), ...(ngDevMode ? [{ debugName: "primaryRowActions" }] : /* istanbul ignore next */ []));
|
|
5524
5598
|
//****************** Filter ******************//
|
|
5525
5599
|
this.filterQueries = signal([], ...(ngDevMode ? [{ debugName: "filterQueries" }] : /* istanbul ignore next */ []));
|
|
5526
|
-
//****************** Columns ******************//
|
|
5527
5600
|
this.allAvailableColumns = () => {
|
|
5528
5601
|
const { columns = [], properties } = this.entityDef;
|
|
5529
5602
|
// const visibleProperties = properties.filter(({ schema }) => schema?.visible !== false);
|
|
@@ -5531,13 +5604,15 @@ class AXPEntityMasterListViewModel {
|
|
|
5531
5604
|
return columns
|
|
5532
5605
|
.filter(({ name, showAs, options }) => (propNames.has(name) || showAs) && options?.visible !== false)
|
|
5533
5606
|
.map((column) => {
|
|
5607
|
+
const relatedProperty = this.resolveMergeDetailProperty(column.name);
|
|
5534
5608
|
if (column.showAs) {
|
|
5535
5609
|
const widgetConfig = this.widgetResolver.resolve(column.showAs.type);
|
|
5536
5610
|
const { title: _wcTitle, description: _wcDescription, ...widgetRest } = widgetConfig;
|
|
5537
5611
|
const property = {
|
|
5538
5612
|
...widgetRest,
|
|
5539
5613
|
name: column.name,
|
|
5540
|
-
title: column.title ?? '',
|
|
5614
|
+
title: column.title ?? relatedProperty?.title ?? '',
|
|
5615
|
+
options: relatedProperty?.options,
|
|
5541
5616
|
schema: {
|
|
5542
5617
|
dataType: 'string',
|
|
5543
5618
|
interface: {
|
|
@@ -5566,18 +5641,16 @@ class AXPEntityMasterListViewModel {
|
|
|
5566
5641
|
};
|
|
5567
5642
|
this.cardFields = signal([], ...(ngDevMode ? [{ debugName: "cardFields" }] : /* istanbul ignore next */ []));
|
|
5568
5643
|
//****************** Sort ******************//
|
|
5644
|
+
this.sortableFieldDefinitions = signal([], ...(ngDevMode ? [{ debugName: "sortableFieldDefinitions" }] : /* istanbul ignore next */ []));
|
|
5569
5645
|
this.sortableFields = () => {
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
dir: undefined,
|
|
5576
|
-
};
|
|
5577
|
-
});
|
|
5646
|
+
return this.sortableFieldDefinitions().map((field) => ({
|
|
5647
|
+
name: field.name,
|
|
5648
|
+
title: field.title,
|
|
5649
|
+
dir: undefined,
|
|
5650
|
+
}));
|
|
5578
5651
|
};
|
|
5579
5652
|
this.sortableFieldsCount = () => {
|
|
5580
|
-
return this.
|
|
5653
|
+
return this.sortableFieldDefinitions().length;
|
|
5581
5654
|
};
|
|
5582
5655
|
this.canSort = () => {
|
|
5583
5656
|
return this.sortableFieldsCount() > 0;
|
|
@@ -5980,6 +6053,17 @@ class AXPEntityMasterListViewModel {
|
|
|
5980
6053
|
setSelectedCategory(category) {
|
|
5981
6054
|
this.selectedCategory.set(category);
|
|
5982
6055
|
}
|
|
6056
|
+
/** Keeps the first action when list definitions repeat the same trigger name. */
|
|
6057
|
+
dedupeActionsByName(actions) {
|
|
6058
|
+
const seen = new Set();
|
|
6059
|
+
return actions.filter((action) => {
|
|
6060
|
+
if (seen.has(action.name)) {
|
|
6061
|
+
return false;
|
|
6062
|
+
}
|
|
6063
|
+
seen.add(action.name);
|
|
6064
|
+
return true;
|
|
6065
|
+
});
|
|
6066
|
+
}
|
|
5983
6067
|
async getPrimaryActions() {
|
|
5984
6068
|
const scope = this.createLogicExpressionScope(null);
|
|
5985
6069
|
const actions = await Promise.all(this.allActions()
|
|
@@ -6176,6 +6260,13 @@ class AXPEntityMasterListViewModel {
|
|
|
6176
6260
|
}
|
|
6177
6261
|
return false;
|
|
6178
6262
|
}
|
|
6263
|
+
/**
|
|
6264
|
+
* Loads host and merge-detail related sortable field definitions (async registry resolution).
|
|
6265
|
+
*/
|
|
6266
|
+
async loadSortableFields() {
|
|
6267
|
+
const fields = await collectEntityListSortableFields(this.entityDef, (moduleName, entityName) => this.entityDefinitionRegistry.resolve(moduleName, entityName).catch(() => null));
|
|
6268
|
+
this.sortableFieldDefinitions.set(fields);
|
|
6269
|
+
}
|
|
6179
6270
|
/**
|
|
6180
6271
|
* Loads host and merge-detail related filter definitions (async registry resolution).
|
|
6181
6272
|
*/
|
|
@@ -6229,6 +6320,7 @@ class AXPEntityMasterListViewModel {
|
|
|
6229
6320
|
if (sortKey === this.lastAppliedSortKey && filterKey === this.lastAppliedFilterKey) {
|
|
6230
6321
|
return; // No effective change; avoid redundant refresh
|
|
6231
6322
|
}
|
|
6323
|
+
this.updateAppliedInlineFilterHighlightText(filters);
|
|
6232
6324
|
const filtersChanged = this.lastAppliedFilterKey != null && filterKey !== this.lastAppliedFilterKey;
|
|
6233
6325
|
this.lastAppliedSortKey = sortKey;
|
|
6234
6326
|
this.lastAppliedFilterKey = filterKey;
|
|
@@ -6240,6 +6332,25 @@ class AXPEntityMasterListViewModel {
|
|
|
6240
6332
|
this.dataSource.filter(transformedFilter);
|
|
6241
6333
|
this.events$.next({ action: 'refresh', meta: { resetPagination: filtersChanged } });
|
|
6242
6334
|
}
|
|
6335
|
+
updateAppliedInlineFilterHighlightText(filters) {
|
|
6336
|
+
const allFilter = filters.find((f) => f.field === 'all');
|
|
6337
|
+
const value = allFilter?.value;
|
|
6338
|
+
this.inlineFilterHighlightText.set(typeof value === 'string' ? value.trim() : '');
|
|
6339
|
+
}
|
|
6340
|
+
//****************** Columns ******************//
|
|
6341
|
+
resolveMergeDetailProperty(columnName) {
|
|
6342
|
+
const parsed = parseDottedFieldPath(columnName);
|
|
6343
|
+
if (!parsed) {
|
|
6344
|
+
return null;
|
|
6345
|
+
}
|
|
6346
|
+
const { dataPath, propertyName } = parsed;
|
|
6347
|
+
const related = this.entityDef.relatedEntities?.find((entry) => entry.layout?.type === 'merge-detail' && entry.persistence?.dataPath?.trim() === dataPath);
|
|
6348
|
+
if (!related?.entity) {
|
|
6349
|
+
return null;
|
|
6350
|
+
}
|
|
6351
|
+
const relatedDef = this.getRegisteredEntity(related.entity);
|
|
6352
|
+
return relatedDef?.properties?.find((property) => property.name === propertyName) ?? null;
|
|
6353
|
+
}
|
|
6243
6354
|
resetColumns() {
|
|
6244
6355
|
this.applyViewColumns();
|
|
6245
6356
|
}
|
|
@@ -6635,6 +6746,7 @@ class AXPEntityListViewModelFactory {
|
|
|
6635
6746
|
this.layout.setNavigationLoading(false);
|
|
6636
6747
|
const vm = new AXPEntityMasterListViewModel(this.injector, config);
|
|
6637
6748
|
await vm.loadFilterDefinitions();
|
|
6749
|
+
await vm.loadSortableFields();
|
|
6638
6750
|
await vm.initializeListPersistence();
|
|
6639
6751
|
return vm;
|
|
6640
6752
|
}
|
|
@@ -6669,7 +6781,7 @@ const AXPEntityListViewModelResolver = async (route, state, service = inject(AXP
|
|
|
6669
6781
|
}
|
|
6670
6782
|
};
|
|
6671
6783
|
|
|
6672
|
-
const AXPEntityDeletedEvent = createWorkFlowEvent(
|
|
6784
|
+
const AXPEntityDeletedEvent = createWorkFlowEvent(AXP_ENTITY_DELETED_WORKFLOW_EVENT_TYPE);
|
|
6673
6785
|
class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
|
|
6674
6786
|
constructor() {
|
|
6675
6787
|
super(...arguments);
|
|
@@ -7656,10 +7768,11 @@ async function calculateChildrenCounts(items, entityName, getDirectChildCount) {
|
|
|
7656
7768
|
* Loads raw rows for an entity and applies the same sorting and filtering as {@link runEntityQuery},
|
|
7657
7769
|
* without pagination.
|
|
7658
7770
|
*/
|
|
7659
|
-
async function filterSortEntityRows(entityName, request, adapters) {
|
|
7771
|
+
async function filterSortEntityRows(entityName, request, adapters, sortLocale) {
|
|
7660
7772
|
let result = await adapters.getRawAll(entityName);
|
|
7661
7773
|
if (request.sort && request.sort.length) {
|
|
7662
|
-
|
|
7774
|
+
const locale = sortLocale ?? request.params?.['locale'] ?? 'en-US';
|
|
7775
|
+
result = applySortArray(result, request.sort, locale);
|
|
7663
7776
|
}
|
|
7664
7777
|
if (request.filter && isCategoryFilter(request.filter)) {
|
|
7665
7778
|
result = await applyRecursiveCategoryFilter(result, request.filter, entityName, adapters.getAllChildCategoryIds);
|
|
@@ -7675,8 +7788,8 @@ async function filterSortEntityRows(entityName, request, adapters) {
|
|
|
7675
7788
|
/**
|
|
7676
7789
|
* Shared entity query logic: sort, filter (including recursive category filter), childrenCount, pagination.
|
|
7677
7790
|
*/
|
|
7678
|
-
async function runEntityQuery(entityName, request, adapters) {
|
|
7679
|
-
const rows = await filterSortEntityRows(entityName, request, adapters);
|
|
7791
|
+
async function runEntityQuery(entityName, request, adapters, sortLocale) {
|
|
7792
|
+
const rows = await filterSortEntityRows(entityName, request, adapters, sortLocale);
|
|
7680
7793
|
const skip = request.skip ?? 0;
|
|
7681
7794
|
const take = request.take ?? 0;
|
|
7682
7795
|
return {
|
|
@@ -9864,7 +9977,7 @@ class AXPEntityCategoryTreeSelectorComponent extends AXBasePageComponent {
|
|
|
9864
9977
|
></ax-button>
|
|
9865
9978
|
</ax-suffix>
|
|
9866
9979
|
</ax-footer>
|
|
9867
|
-
`, 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$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i4.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: i3.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", "controlledSelection", "selectedIds"], outputs: ["datasourceChange", "selectedIdsChange", "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", "look"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9980
|
+
`, 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$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXSearchBoxModule }, { kind: "component", type: i4.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: i3.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", "controlledSelection", "selectedIds"], outputs: ["datasourceChange", "selectedIdsChange", "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", "titleParams", "descriptionParams", "look"] }, { kind: "ngmodule", type: FormsModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9868
9981
|
}
|
|
9869
9982
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityCategoryTreeSelectorComponent, decorators: [{
|
|
9870
9983
|
type: Component,
|
|
@@ -12213,7 +12326,7 @@ class AXPEntityListToolbarService {
|
|
|
12213
12326
|
const toolbarOptions = {
|
|
12214
12327
|
filterDefinitions: this.mergeFilterDefinitions(baseFilters, options?.customFilterDefinitions),
|
|
12215
12328
|
columnDefinitions: this.createColumnDefinitions(entity, options),
|
|
12216
|
-
sortDefinitions: this.createSortDefinitions(entity),
|
|
12329
|
+
sortDefinitions: await this.createSortDefinitions(entity),
|
|
12217
12330
|
canFilter: true,
|
|
12218
12331
|
canColumns: true,
|
|
12219
12332
|
canSort: true,
|
|
@@ -12339,23 +12452,14 @@ class AXPEntityListToolbarService {
|
|
|
12339
12452
|
}
|
|
12340
12453
|
/**
|
|
12341
12454
|
* Create Sort Definitions for Toolbar.
|
|
12342
|
-
* Includes
|
|
12455
|
+
* Includes host properties and merge-detail related fields with sort enabled.
|
|
12343
12456
|
*/
|
|
12344
|
-
createSortDefinitions(entity) {
|
|
12345
|
-
const
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
|
|
12349
|
-
|
|
12350
|
-
.filter((col) => col.name.includes('.') && col.title)
|
|
12351
|
-
.map((col) => ({ name: col.name, title: col.title ?? col.name }));
|
|
12352
|
-
const seen = new Set();
|
|
12353
|
-
return [...fromProperties, ...fromColumns].filter((s) => {
|
|
12354
|
-
if (seen.has(s.name))
|
|
12355
|
-
return false;
|
|
12356
|
-
seen.add(s.name);
|
|
12357
|
-
return true;
|
|
12358
|
-
});
|
|
12457
|
+
async createSortDefinitions(entity) {
|
|
12458
|
+
const fields = await collectEntityListSortableFields(entity, (moduleName, entityName) => this.entityRegistry.resolve(moduleName, entityName).catch(() => null));
|
|
12459
|
+
return fields.map((field) => ({
|
|
12460
|
+
name: field.name,
|
|
12461
|
+
title: field.title,
|
|
12462
|
+
}));
|
|
12359
12463
|
}
|
|
12360
12464
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityListToolbarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
12361
12465
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityListToolbarService }); }
|
|
@@ -13390,7 +13494,7 @@ class AXPPageComponentWidgetViewComponent extends AXPBaseWidgetComponent {
|
|
|
13390
13494
|
return;
|
|
13391
13495
|
}
|
|
13392
13496
|
for (const [path, value] of Object.entries(partial)) {
|
|
13393
|
-
this.contextService.update(path, value);
|
|
13497
|
+
this.contextService.update(path, value, { origin: 'user' });
|
|
13394
13498
|
}
|
|
13395
13499
|
}
|
|
13396
13500
|
//#endregion
|
|
@@ -13801,6 +13905,108 @@ var lookupWidgetView_component = /*#__PURE__*/Object.freeze({
|
|
|
13801
13905
|
AXPLookupWidgetViewComponent: AXPLookupWidgetViewComponent
|
|
13802
13906
|
});
|
|
13803
13907
|
|
|
13908
|
+
//#region ---- Expression Scope ----
|
|
13909
|
+
/**
|
|
13910
|
+
* Builds the expression scope used to evaluate lookup `create.context` templates.
|
|
13911
|
+
* Matches widget-renderer `context.eval` / `context.set` semantics.
|
|
13912
|
+
*/
|
|
13913
|
+
function buildLookupExpressionScope(contextService, parentPath) {
|
|
13914
|
+
return {
|
|
13915
|
+
context: {
|
|
13916
|
+
eval: (path) => {
|
|
13917
|
+
const fullPath = path.startsWith('>') && parentPath ? `${parentPath}.${path.substring(1)}` : path;
|
|
13918
|
+
return contextService.getValue(fullPath);
|
|
13919
|
+
},
|
|
13920
|
+
set: (path, value) => {
|
|
13921
|
+
contextService.update(path, value, { origin: 'user' });
|
|
13922
|
+
},
|
|
13923
|
+
data: () => contextService.data(),
|
|
13924
|
+
isDirty: () => {
|
|
13925
|
+
if (!contextService.isSavedCommitted()) {
|
|
13926
|
+
return false;
|
|
13927
|
+
}
|
|
13928
|
+
return contextService.isDirty();
|
|
13929
|
+
},
|
|
13930
|
+
options: (path) => {
|
|
13931
|
+
if (path == null || path === '') {
|
|
13932
|
+
return contextService.getValue('options');
|
|
13933
|
+
}
|
|
13934
|
+
return contextService.getValue(`options.${path}`);
|
|
13935
|
+
},
|
|
13936
|
+
},
|
|
13937
|
+
events: {},
|
|
13938
|
+
widget: {},
|
|
13939
|
+
methods: {},
|
|
13940
|
+
vars: {},
|
|
13941
|
+
};
|
|
13942
|
+
}
|
|
13943
|
+
//#endregion
|
|
13944
|
+
//#region ---- Create Context Evaluation ----
|
|
13945
|
+
/**
|
|
13946
|
+
* Deep-evaluates expression strings inside lookup `create.context` (e.g. parentId from context).
|
|
13947
|
+
*/
|
|
13948
|
+
async function evaluateLookupCreateContext(template, expressionEvaluator, scope) {
|
|
13949
|
+
if (!template || !isObjectLike(template)) {
|
|
13950
|
+
return {};
|
|
13951
|
+
}
|
|
13952
|
+
return (await evaluateLookupCreateContextValue(template, expressionEvaluator, scope));
|
|
13953
|
+
}
|
|
13954
|
+
async function evaluateLookupCreateContextValue(value, expressionEvaluator, scope) {
|
|
13955
|
+
if (typeof value === 'string' && expressionEvaluator.isExpression(value)) {
|
|
13956
|
+
return expressionEvaluator.evaluate(value, scope);
|
|
13957
|
+
}
|
|
13958
|
+
if (isArray(value)) {
|
|
13959
|
+
const results = await Promise.all(value.map((entry) => evaluateLookupCreateContextValue(entry, expressionEvaluator, scope)));
|
|
13960
|
+
return results;
|
|
13961
|
+
}
|
|
13962
|
+
if (isObjectLike(value)) {
|
|
13963
|
+
const result = {};
|
|
13964
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
13965
|
+
result[key] = await evaluateLookupCreateContextValue(entry, expressionEvaluator, scope);
|
|
13966
|
+
}
|
|
13967
|
+
return result;
|
|
13968
|
+
}
|
|
13969
|
+
return value;
|
|
13970
|
+
}
|
|
13971
|
+
/**
|
|
13972
|
+
* Removes null/undefined entries from resolved create context before Entity:Create.
|
|
13973
|
+
*/
|
|
13974
|
+
function compactLookupCreateContext(data) {
|
|
13975
|
+
const result = {};
|
|
13976
|
+
for (const [key, value] of Object.entries(cloneDeep(data))) {
|
|
13977
|
+
if (!isNil(value) && value !== '') {
|
|
13978
|
+
result[key] = value;
|
|
13979
|
+
}
|
|
13980
|
+
}
|
|
13981
|
+
return result;
|
|
13982
|
+
}
|
|
13983
|
+
//#endregion
|
|
13984
|
+
|
|
13985
|
+
//#endregion
|
|
13986
|
+
//#region ---- Resolution ----
|
|
13987
|
+
/**
|
|
13988
|
+
* Resolves lookup create options from `create` and legacy `allowCreate` (mode).
|
|
13989
|
+
*/
|
|
13990
|
+
function resolveLookupWidgetCreateOptions(options) {
|
|
13991
|
+
const create = options.create;
|
|
13992
|
+
const legacyMode = options.allowCreate;
|
|
13993
|
+
const context = create?.context;
|
|
13994
|
+
if (create?.enable !== undefined) {
|
|
13995
|
+
if (!create.enable) {
|
|
13996
|
+
return { enabled: false, mode: 'none', context };
|
|
13997
|
+
}
|
|
13998
|
+
const mode = legacyMode && legacyMode !== 'none' ? legacyMode : 'quick';
|
|
13999
|
+
return { enabled: true, mode, context };
|
|
14000
|
+
}
|
|
14001
|
+
const mode = legacyMode ?? 'none';
|
|
14002
|
+
return {
|
|
14003
|
+
enabled: mode !== 'none',
|
|
14004
|
+
mode,
|
|
14005
|
+
context,
|
|
14006
|
+
};
|
|
14007
|
+
}
|
|
14008
|
+
//#endregion
|
|
14009
|
+
|
|
13804
14010
|
//#endregion
|
|
13805
14011
|
class AXPEntityDataSelectorRowActionsService {
|
|
13806
14012
|
constructor() {
|
|
@@ -14077,11 +14283,20 @@ function mapLegacyEntityDataSelectorOptions(legacy) {
|
|
|
14077
14283
|
normalized.category = { enabled: legacy.showCategoryFilter };
|
|
14078
14284
|
}
|
|
14079
14285
|
if (legacy.allowCreate !== undefined) {
|
|
14080
|
-
normalized.create = {
|
|
14286
|
+
normalized.create = {
|
|
14287
|
+
...(legacy.allowCreate !== undefined && {
|
|
14288
|
+
enable: legacy.allowCreate !== 'none',
|
|
14289
|
+
mode: legacy.allowCreate,
|
|
14290
|
+
}),
|
|
14291
|
+
...normalized.create,
|
|
14292
|
+
};
|
|
14081
14293
|
}
|
|
14082
14294
|
if (legacy.rowActions !== undefined) {
|
|
14083
14295
|
normalized.rowActions = legacy.rowActions;
|
|
14084
14296
|
}
|
|
14297
|
+
if (legacy.contextStore !== undefined) {
|
|
14298
|
+
normalized.contextStore = legacy.contextStore;
|
|
14299
|
+
}
|
|
14085
14300
|
return normalized;
|
|
14086
14301
|
}
|
|
14087
14302
|
/**
|
|
@@ -14117,6 +14332,9 @@ function normalizeEntityDataSelectorOptions(options) {
|
|
|
14117
14332
|
if (nested.create) {
|
|
14118
14333
|
normalized.create = { ...normalized.create, ...nested.create };
|
|
14119
14334
|
}
|
|
14335
|
+
if (nested.contextStore !== undefined) {
|
|
14336
|
+
normalized.contextStore = nested.contextStore;
|
|
14337
|
+
}
|
|
14120
14338
|
if (nested.rowActions !== undefined) {
|
|
14121
14339
|
normalized.rowActions = nested.rowActions;
|
|
14122
14340
|
}
|
|
@@ -14134,9 +14352,21 @@ class AXPEntityDataSelectorService {
|
|
|
14134
14352
|
this.categoryTreeService = inject(AXPCategoryTreeService);
|
|
14135
14353
|
this.translationService = inject(AXTranslationService);
|
|
14136
14354
|
this.rowActionsService = inject(AXPEntityDataSelectorRowActionsService);
|
|
14355
|
+
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
14137
14356
|
}
|
|
14138
14357
|
//#endregion
|
|
14139
14358
|
//#region ---- Public Methods ----
|
|
14359
|
+
/**
|
|
14360
|
+
* Resolves lookup `create.context` templates using the provided form context store.
|
|
14361
|
+
*/
|
|
14362
|
+
async resolveCreateContext(template, contextStore) {
|
|
14363
|
+
if (!template || !contextStore) {
|
|
14364
|
+
return {};
|
|
14365
|
+
}
|
|
14366
|
+
const scope = buildLookupExpressionScope(contextStore);
|
|
14367
|
+
const resolved = await evaluateLookupCreateContext(template, this.expressionEvaluator, scope);
|
|
14368
|
+
return compactLookupCreateContext(resolved);
|
|
14369
|
+
}
|
|
14140
14370
|
/**
|
|
14141
14371
|
* Open entity data selector popup.
|
|
14142
14372
|
* Accepts nested {@link AXPEntityDataSelectorOpenOptions} or deprecated flat {@link AXPEntityDataSelectorOptions}.
|
|
@@ -14152,8 +14382,8 @@ class AXPEntityDataSelectorService {
|
|
|
14152
14382
|
* Execute Entity:Create and return created item.
|
|
14153
14383
|
* Used by lookup widget and data selector for inline create.
|
|
14154
14384
|
*/
|
|
14155
|
-
async executeEntityCreate(entity, mode) {
|
|
14156
|
-
return this.executeCreate(entity, mode);
|
|
14385
|
+
async executeEntityCreate(entity, mode, initialData = {}) {
|
|
14386
|
+
return this.executeCreate(entity, mode, initialData);
|
|
14157
14387
|
}
|
|
14158
14388
|
/**
|
|
14159
14389
|
* Normalize item's phones/emails for expose/display.
|
|
@@ -14216,7 +14446,16 @@ class AXPEntityDataSelectorService {
|
|
|
14216
14446
|
const dataSource = this.createDataSource(options);
|
|
14217
14447
|
const columns = this.createColumns(options);
|
|
14218
14448
|
const searchFields = this.getSearchFields(options);
|
|
14219
|
-
const
|
|
14449
|
+
const hasCreateConfig = options.create !== undefined;
|
|
14450
|
+
const resolvedCreate = resolveLookupWidgetCreateOptions({
|
|
14451
|
+
create: options.create,
|
|
14452
|
+
allowCreate: options.create?.mode,
|
|
14453
|
+
});
|
|
14454
|
+
const allowCreate = hasCreateConfig
|
|
14455
|
+
? resolvedCreate.enabled
|
|
14456
|
+
? resolvedCreate.mode
|
|
14457
|
+
: 'none'
|
|
14458
|
+
: this.getAllowCreate(options.entity);
|
|
14220
14459
|
const rowActions = options.rowActions
|
|
14221
14460
|
? this.rowActionsService.createHandler(options.entity, options.rowActions)
|
|
14222
14461
|
: undefined;
|
|
@@ -14241,7 +14480,12 @@ class AXPEntityDataSelectorService {
|
|
|
14241
14480
|
filter: options.filter?.value ? { value: options.filter.value } : undefined,
|
|
14242
14481
|
create: {
|
|
14243
14482
|
mode: allowCreate,
|
|
14244
|
-
onCreate: allowCreate !== 'none'
|
|
14483
|
+
onCreate: allowCreate !== 'none'
|
|
14484
|
+
? async (mode) => {
|
|
14485
|
+
const data = await this.resolveCreateContext(resolvedCreate.context, options.contextStore);
|
|
14486
|
+
return this.executeCreate(options.entity, mode, data);
|
|
14487
|
+
}
|
|
14488
|
+
: undefined,
|
|
14245
14489
|
},
|
|
14246
14490
|
rowActions,
|
|
14247
14491
|
};
|
|
@@ -14389,7 +14633,7 @@ class AXPEntityDataSelectorService {
|
|
|
14389
14633
|
/**
|
|
14390
14634
|
* Execute Entity:Create and return created item
|
|
14391
14635
|
*/
|
|
14392
|
-
async executeCreate(entity, mode) {
|
|
14636
|
+
async executeCreate(entity, mode, initialData = {}) {
|
|
14393
14637
|
const quickCreate = entity.interfaces?.master?.create?.quickCreate;
|
|
14394
14638
|
const options = {};
|
|
14395
14639
|
if (mode === 'quick' && quickCreate) {
|
|
@@ -14413,7 +14657,7 @@ class AXPEntityDataSelectorService {
|
|
|
14413
14657
|
title: entity.title,
|
|
14414
14658
|
parentKey: entity.parentKey,
|
|
14415
14659
|
},
|
|
14416
|
-
data:
|
|
14660
|
+
data: initialData,
|
|
14417
14661
|
options,
|
|
14418
14662
|
},
|
|
14419
14663
|
});
|
|
@@ -14890,6 +15134,7 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
14890
15134
|
this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
|
|
14891
15135
|
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
14892
15136
|
this.contextEvalFactory = inject(AXPContextEvalFactory);
|
|
15137
|
+
this.contextStore = inject(AXPContextStore, { optional: true });
|
|
14893
15138
|
//#endregion
|
|
14894
15139
|
//#region ---- Inputs ----
|
|
14895
15140
|
this.selectedItems = input.required(...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
|
|
@@ -14902,7 +15147,7 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
14902
15147
|
this.validationRules = input.required(...(ngDevMode ? [{ debugName: "validationRules" }] : /* istanbul ignore next */ []));
|
|
14903
15148
|
this.placeholder = input(...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
14904
15149
|
this.hasClearButton = input(false, ...(ngDevMode ? [{ debugName: "hasClearButton" }] : /* istanbul ignore next */ []));
|
|
14905
|
-
this.
|
|
15150
|
+
this.resolvedCreate = input({ enabled: false, mode: 'none' }, ...(ngDevMode ? [{ debugName: "resolvedCreate" }] : /* istanbul ignore next */ []));
|
|
14906
15151
|
this.allowUnselect = input(true, ...(ngDevMode ? [{ debugName: "allowUnselect" }] : /* istanbul ignore next */ []));
|
|
14907
15152
|
// Entity and configuration data (for showSelector and searchByValue)
|
|
14908
15153
|
this.entityDef = input.required(...(ngDevMode ? [{ debugName: "entityDef" }] : /* istanbul ignore next */ []));
|
|
@@ -15111,6 +15356,7 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
15111
15356
|
.map((item) => get(item, this.valueField()()))
|
|
15112
15357
|
.filter((id) => id != null);
|
|
15113
15358
|
try {
|
|
15359
|
+
const createOptions = this.resolvedCreate();
|
|
15114
15360
|
const result = await this.entityDataSelectorService.open({
|
|
15115
15361
|
entity,
|
|
15116
15362
|
title: `${this.translateService.translateSync(entity.formats.plural ?? '')}`,
|
|
@@ -15119,7 +15365,12 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
15119
15365
|
filters: this.customFilter()(),
|
|
15120
15366
|
parentFilters: this.parentFilters(),
|
|
15121
15367
|
columns: this.columns()(),
|
|
15122
|
-
|
|
15368
|
+
create: {
|
|
15369
|
+
enable: createOptions.enabled,
|
|
15370
|
+
mode: createOptions.mode,
|
|
15371
|
+
context: createOptions.context,
|
|
15372
|
+
},
|
|
15373
|
+
contextStore: this.contextStore ?? undefined,
|
|
15123
15374
|
initialSearchTerm: searchTerm,
|
|
15124
15375
|
selectedItemIds: selectedItemIds.length > 0 ? selectedItemIds : undefined,
|
|
15125
15376
|
rowActions: this.rowActions(),
|
|
@@ -15145,7 +15396,7 @@ class AXPLookupWidgetTagboxComponent extends LookupWidgetLookBase {
|
|
|
15145
15396
|
this.clear();
|
|
15146
15397
|
}
|
|
15147
15398
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetTagboxComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
15148
|
-
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 },
|
|
15399
|
+
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 }, resolvedCreate: { classPropertyName: "resolvedCreate", publicName: "resolvedCreate", isSignal: true, isRequired: false, transformFunction: null }, allowUnselect: { classPropertyName: "allowUnselect", publicName: "allowUnselect", 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 }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, onSetLoading: { classPropertyName: "onSetLoading", publicName: "onSetLoading", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { valueChanged: "valueChanged" }, providers: [
|
|
15149
15400
|
{
|
|
15150
15401
|
provide: LookupWidgetLookBase,
|
|
15151
15402
|
useExisting: AXPLookupWidgetTagboxComponent,
|
|
@@ -15284,7 +15535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
15284
15535
|
},
|
|
15285
15536
|
],
|
|
15286
15537
|
}]
|
|
15287
|
-
}], 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 }] }],
|
|
15538
|
+
}], 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 }] }], resolvedCreate: [{ type: i0.Input, args: [{ isSignal: true, alias: "resolvedCreate", required: false }] }], allowUnselect: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowUnselect", 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 }] }], rowActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowActions", 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 }] }] } });
|
|
15288
15539
|
|
|
15289
15540
|
class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
15290
15541
|
constructor() {
|
|
@@ -15327,7 +15578,10 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15327
15578
|
this.allowUnselect = computed(() => this.options()['allowUnselect'] ?? true, ...(ngDevMode ? [{ debugName: "allowUnselect" }] : /* istanbul ignore next */ []));
|
|
15328
15579
|
this.look = computed(() => this.options()['look'] ?? 'lookup', ...(ngDevMode ? [{ debugName: "look" }] : /* istanbul ignore next */ []));
|
|
15329
15580
|
this.displayField = computed(() => resolveLookupDisplayField(this.entityDef(), { textField: this.textField() }), ...(ngDevMode ? [{ debugName: "displayField" }] : /* istanbul ignore next */ []));
|
|
15330
|
-
this.
|
|
15581
|
+
this.resolvedCreate = computed(() => resolveLookupWidgetCreateOptions({
|
|
15582
|
+
create: this.options()['create'],
|
|
15583
|
+
allowCreate: this.options()['allowCreate'],
|
|
15584
|
+
}), ...(ngDevMode ? [{ debugName: "resolvedCreate" }] : /* istanbul ignore next */ []));
|
|
15331
15585
|
this.selectorRowActions = computed(() => this.options()['selectorRowActions'], ...(ngDevMode ? [{ debugName: "selectorRowActions" }] : /* istanbul ignore next */ []));
|
|
15332
15586
|
this.valueField = computed(() => this.entityDef()?.properties.find((c) => c.name == 'id')?.name ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : /* istanbul ignore next */ []));
|
|
15333
15587
|
this.displayFormat = computed(() => resolveLookupDisplayTemplate(this.entityDef(), {
|
|
@@ -15373,6 +15627,12 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15373
15627
|
//#region ---- Business Logic Methods (Passed to Dumb Components) ----
|
|
15374
15628
|
this.setLoading = (loading) => {
|
|
15375
15629
|
this.isLoading.set(loading);
|
|
15630
|
+
if (loading) {
|
|
15631
|
+
this.beginHydration();
|
|
15632
|
+
}
|
|
15633
|
+
else {
|
|
15634
|
+
this.endHydration();
|
|
15635
|
+
}
|
|
15376
15636
|
};
|
|
15377
15637
|
/** @param syncContext When false, only updates UI (hydration/revert); skips context writes. */
|
|
15378
15638
|
this.setItems = (items, syncContext = true) => {
|
|
@@ -15382,6 +15642,8 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15382
15642
|
items = items.filter((item) => item != null);
|
|
15383
15643
|
// Normalize phones/emails from repeater nested structure to { value: string }
|
|
15384
15644
|
items = items.map((item) => this.entityDataSelectorService.normalizeItemContactArrays(item));
|
|
15645
|
+
/** Preserve raw entity fields (e.g. MLS maps) before display-field resolution for expose writes. */
|
|
15646
|
+
const itemsForExpose = cloneDeep(items);
|
|
15385
15647
|
const displayField = this.displayField();
|
|
15386
15648
|
items = items.map((item) => {
|
|
15387
15649
|
const raw = get(item, displayField);
|
|
@@ -15396,10 +15658,32 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15396
15658
|
}
|
|
15397
15659
|
const keys = items.map((item) => get(item, this.valueField()));
|
|
15398
15660
|
const text = items.map((item) => this.mlsResolver.resolve(get(item, displayField)));
|
|
15661
|
+
const newValue = this.singleOrMultiple(keys);
|
|
15662
|
+
const widgetPath = this.fullPath();
|
|
15663
|
+
const savedWidgetValue = widgetPath ? this.contextService.getSavedValue(widgetPath) : undefined;
|
|
15664
|
+
const selectionMatchesSaved = this.contextService.isSavedCommitted() &&
|
|
15665
|
+
widgetPath != null &&
|
|
15666
|
+
isSelectionValueEqual(newValue, savedWidgetValue);
|
|
15399
15667
|
if (this.expose()) {
|
|
15400
|
-
|
|
15668
|
+
AXPDebugService.instance?.trace(FORM_DIRTY_TRACE_NS, 'lookup-widget', 'setItems expose', () => ({
|
|
15669
|
+
path: this.fullPath(),
|
|
15670
|
+
items: items.map((item) => get(item, this.valueField())),
|
|
15671
|
+
expose: this.expose(),
|
|
15672
|
+
selectionMatchesSaved,
|
|
15673
|
+
}));
|
|
15674
|
+
if (selectionMatchesSaved) {
|
|
15675
|
+
this.syncExposePathsToSavedBaseline();
|
|
15676
|
+
}
|
|
15677
|
+
else {
|
|
15678
|
+
this.expoesItems(itemsForExpose);
|
|
15679
|
+
}
|
|
15401
15680
|
}
|
|
15402
|
-
|
|
15681
|
+
AXPDebugService.instance?.trace(FORM_DIRTY_TRACE_NS, 'lookup-widget', 'setItems setValue', () => ({
|
|
15682
|
+
path: this.fullPath(),
|
|
15683
|
+
newValue,
|
|
15684
|
+
keys,
|
|
15685
|
+
syncContext,
|
|
15686
|
+
}));
|
|
15403
15687
|
if (this.filterMode()) {
|
|
15404
15688
|
this.setValue({
|
|
15405
15689
|
value: newValue,
|
|
@@ -15412,12 +15696,16 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15412
15696
|
else {
|
|
15413
15697
|
this.setValue(newValue);
|
|
15414
15698
|
}
|
|
15699
|
+
if (this.expose() && selectionMatchesSaved) {
|
|
15700
|
+
this.syncExposePathsToSavedBaseline();
|
|
15701
|
+
}
|
|
15415
15702
|
};
|
|
15416
15703
|
}
|
|
15417
15704
|
#efEntity;
|
|
15418
15705
|
#efValue;
|
|
15419
15706
|
async findByValue() {
|
|
15420
15707
|
this.isLoading.set(true);
|
|
15708
|
+
this.beginHydration();
|
|
15421
15709
|
const rawValue = this.getValue();
|
|
15422
15710
|
// When multiple is true, ensure we always work with arrays
|
|
15423
15711
|
const values = this.multiple()
|
|
@@ -15426,6 +15714,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15426
15714
|
if (!values.length) {
|
|
15427
15715
|
this.setItems([], false);
|
|
15428
15716
|
this.isLoading.set(false);
|
|
15717
|
+
this.endHydration();
|
|
15429
15718
|
return;
|
|
15430
15719
|
}
|
|
15431
15720
|
try {
|
|
@@ -15458,6 +15747,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15458
15747
|
}
|
|
15459
15748
|
finally {
|
|
15460
15749
|
this.isLoading.set(false);
|
|
15750
|
+
this.endHydration();
|
|
15461
15751
|
}
|
|
15462
15752
|
}
|
|
15463
15753
|
//#region ---- Event Handlers from Dumb Components ----
|
|
@@ -15468,7 +15758,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15468
15758
|
const entity = this.entityDef();
|
|
15469
15759
|
if (!entity || !entity.commands?.create?.execute)
|
|
15470
15760
|
return;
|
|
15471
|
-
const mode = this.
|
|
15761
|
+
const { mode } = this.resolvedCreate();
|
|
15472
15762
|
if (mode !== 'full' && mode !== 'quick')
|
|
15473
15763
|
return;
|
|
15474
15764
|
await this.executeCreate(mode);
|
|
@@ -15478,8 +15768,11 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15478
15768
|
if (!entity || !entity.commands?.create?.execute)
|
|
15479
15769
|
return;
|
|
15480
15770
|
this.isLoading.set(true);
|
|
15771
|
+
this.beginHydration();
|
|
15481
15772
|
try {
|
|
15482
|
-
const
|
|
15773
|
+
const { context } = this.resolvedCreate();
|
|
15774
|
+
const createData = await this.entityDataSelectorService.resolveCreateContext(context, this.contextService);
|
|
15775
|
+
const createdItem = await this.entityDataSelectorService.executeEntityCreate(entity, mode, createData);
|
|
15483
15776
|
if (createdItem) {
|
|
15484
15777
|
const currentItems = this.selectedItems();
|
|
15485
15778
|
const valueField = this.valueField();
|
|
@@ -15499,6 +15792,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15499
15792
|
}
|
|
15500
15793
|
finally {
|
|
15501
15794
|
this.isLoading.set(false);
|
|
15795
|
+
this.endHydration();
|
|
15502
15796
|
}
|
|
15503
15797
|
}
|
|
15504
15798
|
/**
|
|
@@ -15507,9 +15801,31 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15507
15801
|
* so e.g. `{ person: { educationLevel: { id, title } } }` would replace the entire `person`
|
|
15508
15802
|
* object and drop sibling fields like `person.educationLevelId`, causing a value/effect loop.
|
|
15509
15803
|
*/
|
|
15510
|
-
|
|
15804
|
+
syncExposePathsToSavedBaseline() {
|
|
15511
15805
|
const exposeValue = castArray(this.expose());
|
|
15512
|
-
const
|
|
15806
|
+
const parentPaths = new Set();
|
|
15807
|
+
exposeValue.forEach((item) => {
|
|
15808
|
+
const target = typeof item === 'string' ? item : item.target;
|
|
15809
|
+
if (target.includes('.')) {
|
|
15810
|
+
parentPaths.add(target.split('.').slice(0, -1).join('.'));
|
|
15811
|
+
}
|
|
15812
|
+
this.contextService.syncPathToSavedBaseline(target, { origin: 'system' });
|
|
15813
|
+
});
|
|
15814
|
+
const saved = this.contextService.saved();
|
|
15815
|
+
parentPaths.forEach((parentPath) => {
|
|
15816
|
+
if (!has(saved, parentPath)) {
|
|
15817
|
+
this.contextService.syncPathToSavedBaseline(parentPath, { origin: 'system' });
|
|
15818
|
+
}
|
|
15819
|
+
});
|
|
15820
|
+
AXPDebugService.instance?.trace(FORM_DIRTY_TRACE_NS, 'lookup-widget', 'syncExposePathsToSavedBaseline', () => ({
|
|
15821
|
+
path: this.fullPath(),
|
|
15822
|
+
expose: this.expose(),
|
|
15823
|
+
parentPaths: [...parentPaths],
|
|
15824
|
+
}));
|
|
15825
|
+
}
|
|
15826
|
+
expoesItems(sourceItems) {
|
|
15827
|
+
const exposeValue = castArray(this.expose());
|
|
15828
|
+
const items = sourceItems ?? this.selectedItems();
|
|
15513
15829
|
const isEmpty = !items || items.length === 0;
|
|
15514
15830
|
if (isEmpty) {
|
|
15515
15831
|
const parentPaths = new Set();
|
|
@@ -15520,7 +15836,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15520
15836
|
parentPaths.add(pathParts.slice(0, -1).join('.'));
|
|
15521
15837
|
}
|
|
15522
15838
|
else {
|
|
15523
|
-
this.contextService.update(i, null);
|
|
15839
|
+
this.contextService.update(i, null, { origin: 'user' });
|
|
15524
15840
|
}
|
|
15525
15841
|
}
|
|
15526
15842
|
else {
|
|
@@ -15529,25 +15845,25 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15529
15845
|
parentPaths.add(pathParts.slice(0, -1).join('.'));
|
|
15530
15846
|
}
|
|
15531
15847
|
else {
|
|
15532
|
-
this.contextService.update(i.target, null);
|
|
15848
|
+
this.contextService.update(i.target, null, { origin: 'user' });
|
|
15533
15849
|
}
|
|
15534
15850
|
}
|
|
15535
15851
|
});
|
|
15536
15852
|
parentPaths.forEach((parentPath) => {
|
|
15537
|
-
this.contextService.update(parentPath, null);
|
|
15853
|
+
this.contextService.update(parentPath, null, { origin: 'user' });
|
|
15538
15854
|
});
|
|
15539
15855
|
return;
|
|
15540
15856
|
}
|
|
15541
15857
|
exposeValue.forEach((i) => {
|
|
15542
15858
|
if (typeof i === 'string') {
|
|
15543
15859
|
const values = items.map((item) => set({}, i, get(item, i)));
|
|
15544
|
-
this.contextService.update(i, this.singleOrMultiple(values));
|
|
15860
|
+
this.contextService.update(i, this.singleOrMultiple(values), { origin: 'user' });
|
|
15545
15861
|
}
|
|
15546
15862
|
else {
|
|
15547
15863
|
const values = this.multiple()
|
|
15548
15864
|
? items.map((item) => set({}, i.source, get(item, i.source)))
|
|
15549
15865
|
: items.map((item) => get(item, i.source));
|
|
15550
|
-
this.contextService.update(i.target, this.singleOrMultiple(values));
|
|
15866
|
+
this.contextService.update(i.target, this.singleOrMultiple(values), { origin: 'user' });
|
|
15551
15867
|
}
|
|
15552
15868
|
});
|
|
15553
15869
|
}
|
|
@@ -15590,7 +15906,6 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15590
15906
|
[placeholder]="placeholder"
|
|
15591
15907
|
[validationRules]="validationRules"
|
|
15592
15908
|
[hasClearButton]="hasClearButton()"
|
|
15593
|
-
[allowCreate]="allowCreate()"
|
|
15594
15909
|
[showItemTooltip]="showItemTooltip()"
|
|
15595
15910
|
[isItemTruncated]="isItemTruncated()"
|
|
15596
15911
|
(valueChanged)="handleComponentValueChanged($event)"
|
|
@@ -15609,7 +15924,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15609
15924
|
[isLoading]="isLoading"
|
|
15610
15925
|
[validationRules]="validationRules"
|
|
15611
15926
|
[hasClearButton]="hasClearButton()"
|
|
15612
|
-
[
|
|
15927
|
+
[resolvedCreate]="resolvedCreate()"
|
|
15613
15928
|
[allowUnselect]="allowUnselect()"
|
|
15614
15929
|
[entityDef]="entityDef"
|
|
15615
15930
|
[customFilter]="customFilter"
|
|
@@ -15621,7 +15936,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15621
15936
|
/>
|
|
15622
15937
|
}
|
|
15623
15938
|
}
|
|
15624
|
-
@if (
|
|
15939
|
+
@if (resolvedCreate().enabled) {
|
|
15625
15940
|
<div class="ax-sm">
|
|
15626
15941
|
<ax-button
|
|
15627
15942
|
color="primary"
|
|
@@ -15636,7 +15951,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
15636
15951
|
}
|
|
15637
15952
|
</div>
|
|
15638
15953
|
}
|
|
15639
|
-
`, 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$2.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", "showItemTooltip", "isItemTruncated"], outputs: ["valueChanged"] }, { kind: "component", type: AXPLookupWidgetTagboxComponent, selector: "axp-lookup-widget-tagbox", inputs: ["selectedItems", "displayField", "valueField", "displayFormat", "disabled", "multiple", "isLoading", "validationRules", "placeholder", "hasClearButton", "
|
|
15954
|
+
`, 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$2.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", "showItemTooltip", "isItemTruncated"], outputs: ["valueChanged"] }, { kind: "component", type: AXPLookupWidgetTagboxComponent, selector: "axp-lookup-widget-tagbox", inputs: ["selectedItems", "displayField", "valueField", "displayFormat", "disabled", "multiple", "isLoading", "validationRules", "placeholder", "hasClearButton", "resolvedCreate", "allowUnselect", "entityDef", "customFilter", "columns", "parentFilters", "rowActions", "onSetLoading"], outputs: ["valueChanged"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
15640
15955
|
}
|
|
15641
15956
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
|
|
15642
15957
|
type: Component,
|
|
@@ -15659,7 +15974,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
15659
15974
|
[placeholder]="placeholder"
|
|
15660
15975
|
[validationRules]="validationRules"
|
|
15661
15976
|
[hasClearButton]="hasClearButton()"
|
|
15662
|
-
[allowCreate]="allowCreate()"
|
|
15663
15977
|
[showItemTooltip]="showItemTooltip()"
|
|
15664
15978
|
[isItemTruncated]="isItemTruncated()"
|
|
15665
15979
|
(valueChanged)="handleComponentValueChanged($event)"
|
|
@@ -15678,7 +15992,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
15678
15992
|
[isLoading]="isLoading"
|
|
15679
15993
|
[validationRules]="validationRules"
|
|
15680
15994
|
[hasClearButton]="hasClearButton()"
|
|
15681
|
-
[
|
|
15995
|
+
[resolvedCreate]="resolvedCreate()"
|
|
15682
15996
|
[allowUnselect]="allowUnselect()"
|
|
15683
15997
|
[entityDef]="entityDef"
|
|
15684
15998
|
[customFilter]="customFilter"
|
|
@@ -15690,7 +16004,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
15690
16004
|
/>
|
|
15691
16005
|
}
|
|
15692
16006
|
}
|
|
15693
|
-
@if (
|
|
16007
|
+
@if (resolvedCreate().enabled) {
|
|
15694
16008
|
<div class="ax-sm">
|
|
15695
16009
|
<ax-button
|
|
15696
16010
|
color="primary"
|
|
@@ -17003,8 +17317,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
17003
17317
|
* Multi-source selector popup component
|
|
17004
17318
|
*/
|
|
17005
17319
|
class AXPMultiSourceSelectorComponent extends AXBasePageComponent {
|
|
17320
|
+
//#endregion
|
|
17006
17321
|
constructor() {
|
|
17007
|
-
super(
|
|
17322
|
+
super();
|
|
17008
17323
|
//#region ---- Services & Dependencies ----
|
|
17009
17324
|
this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
|
|
17010
17325
|
this.entityResolver = inject(AXPEntityDefinitionRegistryService);
|
|
@@ -17027,8 +17342,20 @@ class AXPMultiSourceSelectorComponent extends AXBasePageComponent {
|
|
|
17027
17342
|
}, ...(ngDevMode ? [{ debugName: "activeSource" }] : /* istanbul ignore next */ []));
|
|
17028
17343
|
this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : /* istanbul ignore next */ []));
|
|
17029
17344
|
this.AXPMultiSourceType = AXPMultiSourceType;
|
|
17345
|
+
setupPopupFooterKeyboardShortcuts(() => [
|
|
17346
|
+
{
|
|
17347
|
+
title: '@general:actions.cancel.title',
|
|
17348
|
+
command: 'cancel',
|
|
17349
|
+
handler: () => this.handleCancel(),
|
|
17350
|
+
},
|
|
17351
|
+
{
|
|
17352
|
+
title: '@general:actions.select.title',
|
|
17353
|
+
command: 'select',
|
|
17354
|
+
disabled: () => this.selectedItems().length === 0,
|
|
17355
|
+
handler: () => this.handleConfirm(),
|
|
17356
|
+
},
|
|
17357
|
+
], { id: 'multi-source-selector-popup' });
|
|
17030
17358
|
}
|
|
17031
|
-
//#endregion
|
|
17032
17359
|
//#region ---- Lifecycle ----
|
|
17033
17360
|
ngOnInit() {
|
|
17034
17361
|
super.ngOnInit();
|
|
@@ -17105,7 +17432,7 @@ class AXPMultiSourceSelectorComponent extends AXBasePageComponent {
|
|
|
17105
17432
|
items: this.selectedItems(),
|
|
17106
17433
|
});
|
|
17107
17434
|
}
|
|
17108
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMultiSourceSelectorComponent, deps:
|
|
17435
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPMultiSourceSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
17109
17436
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPMultiSourceSelectorComponent, isStandalone: true, selector: "axp-multi-source-selector", usesInheritance: true, ngImport: i0, template: `
|
|
17110
17437
|
<div class="ax-flex ax-flex-col ax-h-full ax-overflow-hidden">
|
|
17111
17438
|
@if (definition().searchStrategy === 'tabs') {
|
|
@@ -17254,7 +17581,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
17254
17581
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
17255
17582
|
imports: [CommonModule, AXButtonModule, AXTabsModule, AXDecoratorModule, AXTranslationModule],
|
|
17256
17583
|
}]
|
|
17257
|
-
}] });
|
|
17584
|
+
}], ctorParameters: () => [] });
|
|
17258
17585
|
|
|
17259
17586
|
var multiSourceSelector_component = /*#__PURE__*/Object.freeze({
|
|
17260
17587
|
__proto__: null,
|
|
@@ -18689,7 +19016,7 @@ class AXPFileListComponent {
|
|
|
18689
19016
|
// ACoreX
|
|
18690
19017
|
AXFormModule }, { kind: "ngmodule", type: AXTextBoxModule }, { 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: AXLabelModule }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type:
|
|
18691
19018
|
// Platform
|
|
18692
|
-
AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "look"] }, { kind: "pipe", type:
|
|
19019
|
+
AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }, { kind: "pipe", type:
|
|
18693
19020
|
// Angular
|
|
18694
19021
|
AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXTranslatorPipe, name: "translate" }] }); }
|
|
18695
19022
|
}
|
|
@@ -22728,6 +23055,7 @@ class AXPMainEntityContentBuilder {
|
|
|
22728
23055
|
const tabListTabs = await this.buildTabLists(tabListEntities ?? [], rootContext, dependencies);
|
|
22729
23056
|
// Build actions from single interface
|
|
22730
23057
|
const actions = this.buildActions(entity, singleInterface);
|
|
23058
|
+
let cachedRootContext = rootContext;
|
|
22731
23059
|
//console.log({ rootContext, dependencies });
|
|
22732
23060
|
return {
|
|
22733
23061
|
id: entity?.name ?? '',
|
|
@@ -22764,14 +23092,15 @@ class AXPMainEntityContentBuilder {
|
|
|
22764
23092
|
},
|
|
22765
23093
|
load: async (params) => {
|
|
22766
23094
|
if (params?.forceRefresh) {
|
|
23095
|
+
cachedRootContext = await dependencies.reloadRootContext();
|
|
22767
23096
|
return {
|
|
22768
23097
|
success: true,
|
|
22769
|
-
data:
|
|
23098
|
+
data: cachedRootContext,
|
|
22770
23099
|
};
|
|
22771
23100
|
}
|
|
22772
23101
|
return {
|
|
22773
23102
|
success: true,
|
|
22774
|
-
data:
|
|
23103
|
+
data: cachedRootContext,
|
|
22775
23104
|
};
|
|
22776
23105
|
},
|
|
22777
23106
|
execute: async (e, context) => {
|
|
@@ -23339,27 +23668,44 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
23339
23668
|
}]
|
|
23340
23669
|
}], ctorParameters: () => [{ type: AXPRelatedEntityConverterFactory }, { type: AXPMainEntityContentBuilder }, { type: AXPLayoutAdapterBuilder }, { type: i4$2.AXPFilterOperatorMiddlewareService }] });
|
|
23341
23670
|
|
|
23342
|
-
|
|
23343
|
-
|
|
23344
|
-
|
|
23345
|
-
|
|
23346
|
-
|
|
23347
|
-
|
|
23348
|
-
expressionEvaluator
|
|
23349
|
-
session
|
|
23350
|
-
formatService
|
|
23351
|
-
workflowService
|
|
23352
|
-
commandService
|
|
23353
|
-
};
|
|
23354
|
-
try {
|
|
23355
|
-
return await layoutAdapterFactory.createDetailsViewAdapter(entityResolver, moduleName, entityName, id, dependencies);
|
|
23671
|
+
//#region ---- Entity Details View Adapter Loader ----
|
|
23672
|
+
class AXPEntityDetailsViewAdapterLoader {
|
|
23673
|
+
constructor() {
|
|
23674
|
+
//#region ---- Services & Dependencies ----
|
|
23675
|
+
this.entityResolver = inject(AXPEntityDefinitionRegistryService);
|
|
23676
|
+
this.layoutAdapterFactory = inject(AXPLayoutAdapterFactory);
|
|
23677
|
+
this.expressionEvaluator = inject(AXPExpressionEvaluatorService);
|
|
23678
|
+
this.session = inject(AXPSessionService);
|
|
23679
|
+
this.formatService = inject(AXFormatService);
|
|
23680
|
+
this.workflowService = inject(AXPWorkflowService);
|
|
23681
|
+
this.commandService = inject(AXPCommandService);
|
|
23356
23682
|
}
|
|
23357
|
-
|
|
23358
|
-
|
|
23359
|
-
|
|
23360
|
-
|
|
23361
|
-
|
|
23683
|
+
//#endregion
|
|
23684
|
+
/**
|
|
23685
|
+
* Builds the details-view adapter for an entity record (definition, layout pages, root context).
|
|
23686
|
+
*/
|
|
23687
|
+
async load(params) {
|
|
23688
|
+
const { moduleName, entityName, id } = params;
|
|
23689
|
+
const dependencies = {
|
|
23690
|
+
entityResolver: this.entityResolver,
|
|
23691
|
+
expressionEvaluator: this.expressionEvaluator,
|
|
23692
|
+
session: this.session,
|
|
23693
|
+
formatService: this.formatService,
|
|
23694
|
+
workflowService: this.workflowService,
|
|
23695
|
+
commandService: this.commandService,
|
|
23696
|
+
};
|
|
23697
|
+
return this.layoutAdapterFactory.createDetailsViewAdapter(this.entityResolver, moduleName, entityName, id, dependencies);
|
|
23362
23698
|
}
|
|
23699
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailsViewAdapterLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
23700
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailsViewAdapterLoader, providedIn: 'root' }); }
|
|
23701
|
+
}
|
|
23702
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityDetailsViewAdapterLoader, decorators: [{
|
|
23703
|
+
type: Injectable,
|
|
23704
|
+
args: [{ providedIn: 'root' }]
|
|
23705
|
+
}] });
|
|
23706
|
+
const AXP_ENTITY_DETAILS_VIEW_ADAPTER_LOADER_PROVIDER = {
|
|
23707
|
+
provide: AXP_LAYOUT_DETAILS_VIEW_ADAPTER_LOADER,
|
|
23708
|
+
useExisting: AXPEntityDetailsViewAdapterLoader,
|
|
23363
23709
|
};
|
|
23364
23710
|
|
|
23365
23711
|
class AXPEntityPreloadFilterGuard {
|
|
@@ -23422,9 +23768,7 @@ const eventDispatchMiddleware = {
|
|
|
23422
23768
|
if (ctx.op === 'create') {
|
|
23423
23769
|
const createdData = ctx.result ? { ...ctx.data, id: ctx.result } : ctx.data;
|
|
23424
23770
|
await dispatcher.dispatchInserted(ctx.entityName, { refType: ctx.entityName, data: createdData });
|
|
23425
|
-
|
|
23426
|
-
entity: ctx.entityName,
|
|
23427
|
-
}));
|
|
23771
|
+
// List refresh is dispatched after create UI closes (Entity:Create command / create-entity workflow).
|
|
23428
23772
|
}
|
|
23429
23773
|
else if (ctx.op === 'update') {
|
|
23430
23774
|
await dispatcher.dispatchUpdated(ctx.entityName, {
|
|
@@ -24089,8 +24433,8 @@ const AXPCrudModifier = {
|
|
|
24089
24433
|
if (!command?.create) {
|
|
24090
24434
|
command.create = {
|
|
24091
24435
|
execute: async (data) => {
|
|
24092
|
-
console.log('create', ctx.module.get() + '.' + ctx.name.get(), data);
|
|
24093
24436
|
const res = await dataService.insertOne(data);
|
|
24437
|
+
//await delay(2000);
|
|
24094
24438
|
return { id: res };
|
|
24095
24439
|
},
|
|
24096
24440
|
};
|
|
@@ -24110,7 +24454,9 @@ const AXPCrudModifier = {
|
|
|
24110
24454
|
if (id == null || id === '') {
|
|
24111
24455
|
throw new Error(`Update requires entity id (${entityKey})`);
|
|
24112
24456
|
}
|
|
24113
|
-
|
|
24457
|
+
const updated = await dataService.updateOne(id, patch);
|
|
24458
|
+
//await delay(2000);
|
|
24459
|
+
return updated;
|
|
24114
24460
|
},
|
|
24115
24461
|
};
|
|
24116
24462
|
}
|
|
@@ -24124,6 +24470,7 @@ const AXPCrudModifier = {
|
|
|
24124
24470
|
queries.byKey = {
|
|
24125
24471
|
execute: async (id) => {
|
|
24126
24472
|
const data = await dataService.getOne(id);
|
|
24473
|
+
//await delay(1000);
|
|
24127
24474
|
return data;
|
|
24128
24475
|
},
|
|
24129
24476
|
type: AXPEntityQueryType.Single,
|
|
@@ -24533,6 +24880,7 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
|
|
|
24533
24880
|
this.factory = inject(AXPEntityCreateViewModelFactory);
|
|
24534
24881
|
this.config = inject(AXP_ENTITY_CONFIG_TOKEN);
|
|
24535
24882
|
this.translateService = inject(AXTranslationService);
|
|
24883
|
+
this.settingsService = inject(AXPSettingsService);
|
|
24536
24884
|
}
|
|
24537
24885
|
async execute(context) {
|
|
24538
24886
|
const [module, entity] = context.getVariable('entity').split('.');
|
|
@@ -24564,8 +24912,22 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
|
|
|
24564
24912
|
const prevData = context.getVariable('data');
|
|
24565
24913
|
const prevMeta = context.getVariable('meta');
|
|
24566
24914
|
context.setVariable('data', { ...prevData, ...result.data.item });
|
|
24567
|
-
|
|
24568
|
-
|
|
24915
|
+
const createdItem = result.data.item;
|
|
24916
|
+
const highlightRowId = createdItem?.id ?? createdItem?._id;
|
|
24917
|
+
const { shouldRedirect, shouldHighlight } = await resolveEntityCreateListBehavior(this.settingsService, {
|
|
24918
|
+
redirect: process?.redirect,
|
|
24919
|
+
});
|
|
24920
|
+
context.setVariable('shouldRedirect', shouldRedirect);
|
|
24921
|
+
const meta = {
|
|
24922
|
+
...prevMeta,
|
|
24923
|
+
resetPagination: true,
|
|
24924
|
+
...(shouldHighlight && highlightRowId != null ? { highlightRowId } : {}),
|
|
24925
|
+
...(entityRef.parentKey && createdItem[entityRef.parentKey]
|
|
24926
|
+
? { refreshTargetId: createdItem[entityRef.parentKey] }
|
|
24927
|
+
: {}),
|
|
24928
|
+
};
|
|
24929
|
+
if (Object.keys(meta).length > 0) {
|
|
24930
|
+
context.setVariable('meta', meta);
|
|
24569
24931
|
}
|
|
24570
24932
|
}
|
|
24571
24933
|
}
|
|
@@ -24616,7 +24978,7 @@ const AXPCreateEntityWorkflow = {
|
|
|
24616
24978
|
action: 'AXPEntityCreateSubmittedAction',
|
|
24617
24979
|
nextSteps: [
|
|
24618
24980
|
{
|
|
24619
|
-
conditions: [{ type: 'SINGLE', expression: 'context.getVariable("
|
|
24981
|
+
conditions: [{ type: 'SINGLE', expression: 'context.getVariable("shouldRedirect") == true' }],
|
|
24620
24982
|
nextStepId: 'show-entity',
|
|
24621
24983
|
},
|
|
24622
24984
|
],
|
|
@@ -24957,17 +25319,10 @@ function routesFacory() {
|
|
|
24957
25319
|
// },
|
|
24958
25320
|
{
|
|
24959
25321
|
path: 'e/:entity/:id/view',
|
|
24960
|
-
resolve: { adapter: AXPLayoutDetailsViewRouteResolver },
|
|
24961
25322
|
loadComponent: () => {
|
|
24962
25323
|
return config.viewers.master.details();
|
|
24963
25324
|
},
|
|
24964
25325
|
canDeactivate: [axpDetailsViewCanDeactivateGuard],
|
|
24965
|
-
runGuardsAndResolvers: (from, to) => {
|
|
24966
|
-
const entityChanged = from.params['module'] !== to.params['module'] || from.params['entity'] !== to.params['entity'];
|
|
24967
|
-
const idChanged = from.params['id'] !== to.params['id'];
|
|
24968
|
-
const refreshChanged = from.queryParams['_ts'] !== to.queryParams['_ts'];
|
|
24969
|
-
return entityChanged || idChanged || refreshChanged;
|
|
24970
|
-
},
|
|
24971
25326
|
data: { reuse: 'queryParamsChange' },
|
|
24972
25327
|
},
|
|
24973
25328
|
{
|
|
@@ -25001,6 +25356,7 @@ class AXPEntityModule {
|
|
|
25001
25356
|
AXPAttachmentsPluginModule, i1$3.AXPWorkflowModule, AXPWidgetCoreModule,
|
|
25002
25357
|
LayoutBuilderModule] }); }
|
|
25003
25358
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPEntityModule, providers: [
|
|
25359
|
+
AXP_ENTITY_DETAILS_VIEW_ADAPTER_LOADER_PROVIDER,
|
|
25004
25360
|
{
|
|
25005
25361
|
provide: AXP_REPEATER_ENTITY_BY_KEY_LOOKUP,
|
|
25006
25362
|
useFactory: () => {
|
|
@@ -25201,6 +25557,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
25201
25557
|
exports: [],
|
|
25202
25558
|
declarations: [],
|
|
25203
25559
|
providers: [
|
|
25560
|
+
AXP_ENTITY_DETAILS_VIEW_ADAPTER_LOADER_PROVIDER,
|
|
25204
25561
|
{
|
|
25205
25562
|
provide: AXP_REPEATER_ENTITY_BY_KEY_LOOKUP,
|
|
25206
25563
|
useFactory: () => {
|
|
@@ -25537,5 +25894,5 @@ var getEntityDetails_query = /*#__PURE__*/Object.freeze({
|
|
|
25537
25894
|
* Generated bundle index. Do not edit.
|
|
25538
25895
|
*/
|
|
25539
25896
|
|
|
25540
|
-
export { ATTACHMENTS_PAGE_COMPONENT_KEY, AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCategoryTreeService, AXPCreateEntityCommand, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEditFileUploaderCommand, AXPEntitiesListDataSourceDefinition, AXPEntityApplyUpdatesAction, AXPEntityCategoryTreeSelectorComponent, AXPEntityCategoryWidget, AXPEntityCategoryWidgetColumnComponent, AXPEntityCategoryWidgetEditComponent, AXPEntityCategoryWidgetViewComponent, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorRowActionsService, AXPEntityDataSelectorService, AXPEntityDefinitionProviderWidget, AXPEntityDefinitionProviderWidgetEditComponent, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityFormBuilderService, AXPEntityListPersistenceModeDefault, AXPEntityListTableService, AXPEntityListToolbarService, AXPEntityListViewCardFieldViewModel, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListCardSelectActionName, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityPreloadFiltersContainerComponent, AXPEntityPreloadFiltersViewModel, AXPEntityPreloadFiltersViewModelResolver, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPFileListComponent, AXPFileUploaderLoadFilesQuery, AXPFileUploaderSaveFilesCommand, AXPFileUploaderWidget, AXPFileUploaderWidgetColumnComponent, AXPFileUploaderWidgetEditComponent, AXPFileUploaderWidgetService, AXPFileUploaderWidgetViewComponent, 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, ENTITY_LIST_ROUTE_CONTEXT_SESSION_KEY, EntityBuilder, EntityDataAccessor, actionExists, applyDataSourcePagingWithoutLoad, attachmentFieldCount, attachmentsPlugin, attachmentsSemanticallyEqual, axpCreateEntityAiToolInputDefaults, axpCreateEntityCommandDefinition, canPersistEntityListState, cloneLayoutArrays, columnOrderingMiddleware, columnOrderingMiddlewareProvider, columnWidthMiddleware, columnWidthMiddlewareProvider, commandMessageTextForError, committedAttachments, computeEntityAggregates, createColumnOrderingMiddlewareProvider, createLayoutOrderingMiddlewareProvider, createModifierContext, defaultCardLayoutMiddleware, defaultCardLayoutMiddlewareProvider, defaultMultiLanguageMiddleware, defaultMultiLanguageMiddlewareProvider, detectEntityChanges, ensureLayoutPropertyView, ensureLayoutSection, ensureListActions, eventDispatchMiddleware, filterSortEntityRows, findEntityListRowDataInTree, fingerprintAttachmentItem, fingerprintAttachments, formatLookupItemDisplay, formatLookupItemDisplayAsync, getDataSourcePageIndex, getEntityListRowId, getMasterInterfacePropertySortKey, hasFileUploaderTitleOrDescriptionFields, isAXPMiddlewareAbortError, isAttachmentListEntry, isCategoryEntity, isCategoryFilter, isFileListItem, isFileUploaderEditDialogAuto, isLegacyEntityDataSelectorOptions, layoutOrderingMiddlewareFactory, layoutOrderingMiddlewareProvider, mapEntityStorageErrorToCommandResult, mapLegacyEntityDataSelectorOptions, normalizeEntityDataSelectorOptions, normalizeEntityFieldToFileList, normalizeEntityListPersistenceMode, normalizeListPaging, persistedAttachments, provideEntity, resolveEntityPluginDetailPageOrder, resolveFileUploaderEditDialog, resolveFileUploaderEntityScope, resolveLookupDisplayField, resolveLookupDisplayTemplate, restoreEntityListExpandedRows, runEntityQuery, searchResultDescriptionMiddleware, searchResultDescriptionMiddlewareProvider, shouldLoadEntityListStateFromStorage, shouldResetEntityListStateOnRouteEntry };
|
|
25897
|
+
export { ATTACHMENTS_PAGE_COMPONENT_KEY, AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCategoryTreeService, AXPCreateEntityCommand, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEditFileUploaderCommand, AXPEntitiesListDataSourceDefinition, AXPEntityApplyUpdatesAction, AXPEntityCategoryTreeSelectorComponent, AXPEntityCategoryWidget, AXPEntityCategoryWidgetColumnComponent, AXPEntityCategoryWidgetEditComponent, AXPEntityCategoryWidgetViewComponent, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorRowActionsService, AXPEntityDataSelectorService, AXPEntityDefinitionProviderWidget, AXPEntityDefinitionProviderWidgetEditComponent, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityFormBuilderService, AXPEntityListPersistenceModeDefault, AXPEntityListTableService, AXPEntityListToolbarService, AXPEntityListViewCardFieldViewModel, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListCardSelectActionName, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityPreloadFiltersContainerComponent, AXPEntityPreloadFiltersViewModel, AXPEntityPreloadFiltersViewModelResolver, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPFileListComponent, AXPFileUploaderLoadFilesQuery, AXPFileUploaderSaveFilesCommand, AXPFileUploaderWidget, AXPFileUploaderWidgetColumnComponent, AXPFileUploaderWidgetEditComponent, AXPFileUploaderWidgetService, AXPFileUploaderWidgetViewComponent, 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_APPEARANCE_SECTION_ORDER, AXP_CATEGORY_TREE_ROOT_TITLE_I18N_KEY, AXP_CLASSIFICATION_SECTION_ORDER, 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, ENTITY_LIST_ROUTE_CONTEXT_SESSION_KEY, EntityBuilder, EntityDataAccessor, actionExists, applyDataSourcePagingWithoutLoad, attachmentFieldCount, attachmentsPlugin, attachmentsSemanticallyEqual, axpCreateEntityAiToolInputDefaults, axpCreateEntityCommandDefinition, canPersistEntityListState, cloneLayoutArrays, columnOrderingMiddleware, columnOrderingMiddlewareProvider, columnWidthMiddleware, columnWidthMiddlewareProvider, commandMessageTextForError, committedAttachments, computeEntityAggregates, createColumnOrderingMiddlewareProvider, createLayoutOrderingMiddlewareProvider, createModifierContext, defaultCardLayoutMiddleware, defaultCardLayoutMiddlewareProvider, defaultMultiLanguageMiddleware, defaultMultiLanguageMiddlewareProvider, detectEntityChanges, ensureLayoutPropertyView, ensureLayoutSection, ensureListActions, eventDispatchMiddleware, filterSortEntityRows, findEntityListRowDataInTree, fingerprintAttachmentItem, fingerprintAttachments, formatLookupItemDisplay, formatLookupItemDisplayAsync, getDataSourcePageIndex, getEntityListRowId, getMasterInterfacePropertySortKey, hasFileUploaderTitleOrDescriptionFields, isAXPMiddlewareAbortError, isAttachmentListEntry, isCategoryEntity, isCategoryFilter, isFileListItem, isFileUploaderEditDialogAuto, isLegacyEntityDataSelectorOptions, layoutOrderingMiddlewareFactory, layoutOrderingMiddlewareProvider, mapEntityStorageErrorToCommandResult, mapLegacyEntityDataSelectorOptions, normalizeEntityDataSelectorOptions, normalizeEntityFieldToFileList, normalizeEntityListPersistenceMode, normalizeListPaging, persistedAttachments, provideEntity, resolveEntityPluginDetailPageOrder, resolveFileUploaderEditDialog, resolveFileUploaderEntityScope, resolveLookupDisplayField, resolveLookupDisplayTemplate, restoreEntityListExpandedRows, runEntityQuery, searchResultDescriptionMiddleware, searchResultDescriptionMiddlewareProvider, shouldLoadEntityListStateFromStorage, shouldResetEntityListStateOnRouteEntry };
|
|
25541
25898
|
//# sourceMappingURL=acorex-platform-layout-entity.mjs.map
|