@acorex/platform 21.0.0-next.2 → 21.0.0-next.3
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/auth/index.d.ts +97 -238
- package/common/index.d.ts +778 -213
- package/core/index.d.ts +562 -433
- package/fesm2022/acorex-platform-auth.mjs +160 -200
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +1012 -125
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +685 -400
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +54 -11
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +412 -270
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +2112 -3153
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +7 -7
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +756 -648
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +4 -4
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +248 -174
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs → acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs} +2 -2
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs} +2 -2
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +3058 -1038
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs → acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs} +26 -5
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs → acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs} +4 -5
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +101 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs → acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +166 -30
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +27 -27
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/layout/builder/index.d.ts +4 -1
- package/layout/components/index.d.ts +405 -327
- package/layout/designer/index.d.ts +3 -3
- package/layout/entity/index.d.ts +163 -108
- package/layout/widget-core/index.d.ts +39 -49
- package/layout/widgets/index.d.ts +368 -54
- package/package.json +5 -5
- package/themes/default/index.d.ts +15 -2
- package/themes/shared/index.d.ts +10 -10
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs +0 -50
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs +0 -42
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs +0 -55
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs +0 -50
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs +0 -48
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs +0 -42
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs +0 -101
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs.map +0 -1
|
@@ -2,14 +2,13 @@ import { AXToastService } from '@acorex/components/toast';
|
|
|
2
2
|
import * as i6 from '@acorex/core/translation';
|
|
3
3
|
import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
|
|
4
4
|
import * as i4$1 from '@acorex/platform/common';
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { AXPDeviceService, AXPBroadcastEventService, resolveActionLook, AXPExpressionEvaluatorService, AXPDistributedEventListenerService, AXPPlatformScope, AXHighlightService, extractValue, setSmart, getChangedPaths, AXPSystemActionType } from '@acorex/platform/core';
|
|
5
|
+
import { AXPSettingsService, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPRefreshEvent, AXPReloadEvent, AXPCommonSettings, AXPEntityQueryType, AXPCleanNestedFilters, AXPWorkflowNavigateAction, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER } from '@acorex/platform/common';
|
|
6
|
+
import { AXPModuleProviderRegistry, AXP_MODULE_PROVIDER_LOADER, AXPModuleManifestRegistry, AXPDeviceService, AXPBroadcastEventService, resolveActionLook, AXPExpressionEvaluatorService, AXPDistributedEventListenerService, AXPPlatformScope, AXHighlightService, extractValue, setSmart, getChangedPaths, AXPSystemActionType } from '@acorex/platform/core';
|
|
8
7
|
import * as i0 from '@angular/core';
|
|
9
|
-
import { InjectionToken, inject, Injector, runInInjectionContext, Injectable, input, viewChild, signal, ElementRef, ChangeDetectionStrategy, Component, ApplicationRef, EnvironmentInjector, createComponent, computed, effect, Input, afterNextRender, ViewEncapsulation, ChangeDetectorRef, viewChildren, linkedSignal, untracked, HostBinding,
|
|
8
|
+
import { InjectionToken, inject, Injector, runInInjectionContext, Injectable, input, viewChild, signal, ElementRef, ChangeDetectionStrategy, Component, ApplicationRef, EnvironmentInjector, createComponent, computed, effect, Input, afterNextRender, ViewEncapsulation, ChangeDetectorRef, viewChildren, linkedSignal, untracked, HostBinding, NgModule } from '@angular/core';
|
|
10
9
|
import { Subject, takeUntil } from 'rxjs';
|
|
11
10
|
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
12
|
-
import { merge, castArray, get, cloneDeep, set, orderBy, isNil, isEmpty, isEqual
|
|
11
|
+
import { merge, castArray, get, cloneDeep, set, orderBy, isNil, isEmpty, isEqual } from 'lodash-es';
|
|
13
12
|
import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
|
|
14
13
|
import { Router, RouterModule, ROUTES } from '@angular/router';
|
|
15
14
|
import * as i3 from '@acorex/components/button';
|
|
@@ -19,14 +18,14 @@ import { AXLoadingModule } from '@acorex/components/loading';
|
|
|
19
18
|
import * as i2 from '@acorex/components/popover';
|
|
20
19
|
import { AXPopoverModule } from '@acorex/components/popover';
|
|
21
20
|
import * as i3$1 from '@acorex/platform/layout/widget-core';
|
|
22
|
-
import { AXPWidgetsCatalog, AXPWidgetCoreModule, AXPPageStatus, AXPWidgetRegistryService, AXPColumnWidgetComponent, AXPValueWidgetComponent, AXPWidgetGroupEnum, AXPWidgetRendererDirective
|
|
23
|
-
import { AXPCommandService, AXPQueryService, provideCommandSetups, provideQuerySetups } from '@acorex/platform/runtime';
|
|
21
|
+
import { AXPWidgetsCatalog, AXPWidgetCoreModule, AXPPageStatus, AXPWidgetRegistryService, AXPColumnWidgetComponent, AXPValueWidgetComponent, AXPWidgetGroupEnum, AXPWidgetRendererDirective } from '@acorex/platform/layout/widget-core';
|
|
22
|
+
import { AXPCommandService, AXPQueryService, AXPQueryExecutor, provideCommandSetups, provideQuerySetups } from '@acorex/platform/runtime';
|
|
24
23
|
import * as i5 from '@angular/common';
|
|
25
24
|
import { CommonModule } from '@angular/common';
|
|
26
25
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
27
26
|
import { AXFormatService } from '@acorex/core/format';
|
|
28
|
-
import * as
|
|
29
|
-
import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
27
|
+
import * as i1$1 from '@acorex/platform/workflow';
|
|
28
|
+
import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowEventService, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
30
29
|
import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
|
|
31
30
|
import { moveItemInArray } from '@angular/cdk/drag-drop';
|
|
32
31
|
import { AXDialogService } from '@acorex/components/dialog';
|
|
@@ -43,7 +42,7 @@ import { AXSearchBoxModule, AXSearchBoxComponent } from '@acorex/components/sear
|
|
|
43
42
|
import * as i5$1 from '@acorex/components/skeleton';
|
|
44
43
|
import { AXSkeletonModule } from '@acorex/components/skeleton';
|
|
45
44
|
import { AXTreeViewComponent } from '@acorex/components/tree-view';
|
|
46
|
-
import { AXPStateMessageComponent, AXPDataSelectorService
|
|
45
|
+
import { AXPStateMessageComponent, AXPDataSelectorService } from '@acorex/platform/layout/components';
|
|
47
46
|
import * as i1 from '@angular/forms';
|
|
48
47
|
import { FormsModule } from '@angular/forms';
|
|
49
48
|
import * as i2$2 from '@acorex/components/badge';
|
|
@@ -58,8 +57,7 @@ import * as i4$3 from '@acorex/components/dropdown';
|
|
|
58
57
|
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
59
58
|
import * as i7 from '@acorex/components/select-box';
|
|
60
59
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
61
|
-
import
|
|
62
|
-
import { AXTextBoxModule, AXTextBoxComponent } from '@acorex/components/text-box';
|
|
60
|
+
import { AXTextBoxModule } from '@acorex/components/text-box';
|
|
63
61
|
import { transform, isEqual as isEqual$1 } from 'lodash';
|
|
64
62
|
|
|
65
63
|
function ensureListActions(ctx) {
|
|
@@ -380,7 +378,8 @@ class AXPEntityMiddleware {
|
|
|
380
378
|
}
|
|
381
379
|
// Apply all matching modifiers in order
|
|
382
380
|
for (const modifier of modifiers) {
|
|
383
|
-
|
|
381
|
+
//TODO Check side EFFECTS
|
|
382
|
+
runInInjectionContext(this.injector, () => modifier(context));
|
|
384
383
|
}
|
|
385
384
|
return context.toEntity();
|
|
386
385
|
}
|
|
@@ -408,8 +407,10 @@ const AXP_ENTITY_DEFINITION_LOADER = new InjectionToken('AXP_ENTITY_DEFINITION_P
|
|
|
408
407
|
class AXPEntityResolver {
|
|
409
408
|
constructor() {
|
|
410
409
|
this.providers = inject(AXP_ENTITY_DEFINITION_LOADER);
|
|
410
|
+
this.providerRegistry = inject(AXPModuleProviderRegistry);
|
|
411
411
|
}
|
|
412
412
|
async get(moduleName, entityName) {
|
|
413
|
+
// Load from DI tokens (backward compatibility)
|
|
413
414
|
if (Array.isArray(this.providers)) {
|
|
414
415
|
for (const loader of this.providers) {
|
|
415
416
|
const entity = await loader.get(moduleName, entityName);
|
|
@@ -419,7 +420,18 @@ class AXPEntityResolver {
|
|
|
419
420
|
}
|
|
420
421
|
}
|
|
421
422
|
else {
|
|
422
|
-
|
|
423
|
+
const entity = await this.providers.get(moduleName, entityName);
|
|
424
|
+
if (entity) {
|
|
425
|
+
return entity;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
// Load from registry (manifest-based, conditionally loaded)
|
|
429
|
+
const registryProviders = this.providerRegistry.getEntityProviders();
|
|
430
|
+
for (const loader of registryProviders) {
|
|
431
|
+
const entity = await loader.get(moduleName, entityName);
|
|
432
|
+
if (entity) {
|
|
433
|
+
return entity;
|
|
434
|
+
}
|
|
423
435
|
}
|
|
424
436
|
return null;
|
|
425
437
|
}
|
|
@@ -433,9 +445,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
433
445
|
|
|
434
446
|
class AXPEntityDefinitionRegistryService {
|
|
435
447
|
constructor() {
|
|
436
|
-
this.providers = inject(AXP_ENTITY_DEFINITION_LOADER);
|
|
437
|
-
this.resolver = inject(AXPEntityResolver);
|
|
438
448
|
this.middleware = inject(AXPEntityMiddleware);
|
|
449
|
+
this.moduleProviderLoader = inject(AXP_MODULE_PROVIDER_LOADER, { optional: true });
|
|
450
|
+
this.manifestRegistry = inject(AXPModuleManifestRegistry, { optional: true });
|
|
439
451
|
this.onChanged = new Subject();
|
|
440
452
|
// Stores AXPEntityConfig objects, keyed by a combination of module and entity name.
|
|
441
453
|
this.entities = new Map();
|
|
@@ -445,42 +457,6 @@ class AXPEntityDefinitionRegistryService {
|
|
|
445
457
|
get onChanged$() {
|
|
446
458
|
return this.onChanged.asObservable();
|
|
447
459
|
}
|
|
448
|
-
async preload() {
|
|
449
|
-
const providers = Array.isArray(this.providers)
|
|
450
|
-
? this.providers
|
|
451
|
-
: [this.providers];
|
|
452
|
-
const promises = [];
|
|
453
|
-
// Helper to wrap a promise with a timeout
|
|
454
|
-
function withTimeout(promise, ms = 10000, info = '') {
|
|
455
|
-
return Promise.race([
|
|
456
|
-
promise,
|
|
457
|
-
new Promise((_, reject) => setTimeout(() => reject(new Error(`Timeout after ${ms}ms: ${info}`)), ms))
|
|
458
|
-
]);
|
|
459
|
-
}
|
|
460
|
-
providers.forEach((provider) => {
|
|
461
|
-
const items = typeof provider.preload == 'function' ? provider.preload() : [];
|
|
462
|
-
items.forEach((item) => {
|
|
463
|
-
//console.log('[AXPEntityDefinitionRegistryService] Preloading entity:', item.module, item.entity);
|
|
464
|
-
promises.push(withTimeout(this.resolver.get(item.module, item.entity)
|
|
465
|
-
.catch(err => {
|
|
466
|
-
console.error(`[AXPEntityDefinitionRegistryService] Failed to load entity ${item.module}.${item.entity}:`, err);
|
|
467
|
-
return null;
|
|
468
|
-
}), 10000, `${item.module}.${item.entity}`));
|
|
469
|
-
});
|
|
470
|
-
});
|
|
471
|
-
const results = await Promise.allSettled(promises);
|
|
472
|
-
const loadedEntities = [];
|
|
473
|
-
results.forEach(async (result, idx) => {
|
|
474
|
-
if (result.status === 'fulfilled' && result.value != null) {
|
|
475
|
-
this.register(await this.middleware.process(result.value));
|
|
476
|
-
loadedEntities.push(result.value);
|
|
477
|
-
}
|
|
478
|
-
else if (result.status === 'rejected') {
|
|
479
|
-
console.error('[AXPEntityDefinitionRegistryService] Entity preload failed:', result.reason);
|
|
480
|
-
}
|
|
481
|
-
});
|
|
482
|
-
//console.log('[AXPEntityDefinitionRegistryService] Loaded entities:', loadedEntities);
|
|
483
|
-
}
|
|
484
460
|
async refresh(arg1, arg2) {
|
|
485
461
|
// No parameters: refresh all currently registered entities
|
|
486
462
|
if (typeof arg1 === 'undefined' && typeof arg2 === 'undefined') {
|
|
@@ -537,6 +513,26 @@ class AXPEntityDefinitionRegistryService {
|
|
|
537
513
|
getAll() {
|
|
538
514
|
return Array.from(this.entities.values());
|
|
539
515
|
}
|
|
516
|
+
/**
|
|
517
|
+
* Clear all registered entity configurations.
|
|
518
|
+
* Should be called when modules are cleared to prevent stale entity data.
|
|
519
|
+
* @param preserveModules Optional list of module names whose entities should be preserved
|
|
520
|
+
*/
|
|
521
|
+
clear(preserveModules) {
|
|
522
|
+
if (preserveModules && preserveModules.length > 0) {
|
|
523
|
+
const preserveSet = new Set(preserveModules);
|
|
524
|
+
// Remove only entities from non-preserved modules
|
|
525
|
+
for (const [key, entity] of this.entities.entries()) {
|
|
526
|
+
if (!preserveSet.has(entity.module)) {
|
|
527
|
+
this.entities.delete(key);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
this.entities.clear();
|
|
533
|
+
}
|
|
534
|
+
this.onChanged.next({ name: '' });
|
|
535
|
+
}
|
|
540
536
|
/**
|
|
541
537
|
* Resolves an entity configuration based on module and entity name. If the configuration
|
|
542
538
|
* is not already registered, attempts to load it dynamically. Throws an error if the
|
|
@@ -551,6 +547,8 @@ class AXPEntityDefinitionRegistryService {
|
|
|
551
547
|
const key = this.createEntityKey(moduleName, entityName);
|
|
552
548
|
let config = this.entities.get(key) ?? null;
|
|
553
549
|
if (!config) {
|
|
550
|
+
// Wait for module provider to be loaded if module exists in manifest but provider isn't registered yet
|
|
551
|
+
await this.waitForModuleProviderIfNeeded(moduleName);
|
|
554
552
|
try {
|
|
555
553
|
config = await this.entityResolver.get(moduleName, entityName);
|
|
556
554
|
if (config) {
|
|
@@ -568,6 +566,50 @@ class AXPEntityDefinitionRegistryService {
|
|
|
568
566
|
}
|
|
569
567
|
return config;
|
|
570
568
|
}
|
|
569
|
+
async exists(moduleName, entityName) {
|
|
570
|
+
const key = this.createEntityKey(moduleName, entityName);
|
|
571
|
+
return this.entities.has(key);
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Waits for module provider to be loaded if the module exists in manifest but provider isn't registered yet.
|
|
575
|
+
* This handles race conditions where entity resolution happens before module providers finish loading.
|
|
576
|
+
* Only waits for required modules or waits briefly for non-required modules (which may not be accessible to current user).
|
|
577
|
+
*/
|
|
578
|
+
async waitForModuleProviderIfNeeded(moduleName) {
|
|
579
|
+
if (!this.moduleProviderLoader || !this.manifestRegistry) {
|
|
580
|
+
return;
|
|
581
|
+
}
|
|
582
|
+
try {
|
|
583
|
+
await this.manifestRegistry.initialize();
|
|
584
|
+
const manifest = this.manifestRegistry.get(moduleName);
|
|
585
|
+
if (!manifest || this.moduleProviderLoader.isModuleRegistered(moduleName)) {
|
|
586
|
+
return;
|
|
587
|
+
}
|
|
588
|
+
const isRequired = manifest.required === true;
|
|
589
|
+
// Increase wait time for non-required modules to handle cases where providers are still loading
|
|
590
|
+
// This prevents "Invalid entity name" errors during page refresh when entities are accessed
|
|
591
|
+
// before module providers finish loading
|
|
592
|
+
const maxRetries = isRequired ? 10 : 20; // Increased from 2 to 20 for non-required modules
|
|
593
|
+
const retryDelay = isRequired ? 100 : 100; // Increased from 50ms to 100ms for consistency
|
|
594
|
+
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
595
|
+
await new Promise((resolve) => setTimeout(resolve, retryDelay));
|
|
596
|
+
if (this.moduleProviderLoader.isModuleRegistered(moduleName)) {
|
|
597
|
+
return;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
// Warn for both required and non-required modules if provider still not registered
|
|
601
|
+
// This helps debug race conditions during page refresh
|
|
602
|
+
console.warn(`[AXPEntityDefinitionRegistryService] Module '${moduleName}' exists in manifest but provider not registered after ${maxRetries} retries (${maxRetries * retryDelay}ms). ` +
|
|
603
|
+
`Entity resolution will proceed, but may fail if provider is not available.`);
|
|
604
|
+
}
|
|
605
|
+
catch (error) {
|
|
606
|
+
// Only log for required modules to reduce noise
|
|
607
|
+
const manifest = this.manifestRegistry?.get(moduleName);
|
|
608
|
+
if (manifest?.required) {
|
|
609
|
+
console.warn(`[AXPEntityDefinitionRegistryService] Error checking module provider status for '${moduleName}':`, error);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
571
613
|
/**
|
|
572
614
|
* Creates a unique key for an entity based on its module and name.
|
|
573
615
|
*
|
|
@@ -1013,7 +1055,7 @@ function toCompatFormFieldBuilder(field) {
|
|
|
1013
1055
|
class AXPCreateEntityCommand {
|
|
1014
1056
|
constructor() {
|
|
1015
1057
|
this.entityForm = inject(AXPEntityFormBuilderService);
|
|
1016
|
-
this.settingsService = inject(
|
|
1058
|
+
this.settingsService = inject(AXPSettingsService);
|
|
1017
1059
|
this.entityService = inject(AXPEntityDefinitionRegistryService);
|
|
1018
1060
|
this.toastService = inject(AXToastService);
|
|
1019
1061
|
this.translationService = inject(AXTranslationService);
|
|
@@ -1133,7 +1175,7 @@ class AXPUpdateEntityCommand {
|
|
|
1133
1175
|
constructor() {
|
|
1134
1176
|
//#region ---- Services & Dependencies ----
|
|
1135
1177
|
this.entityForm = inject(AXPEntityFormBuilderService);
|
|
1136
|
-
this.settingsService = inject(
|
|
1178
|
+
this.settingsService = inject(AXPSettingsService);
|
|
1137
1179
|
this.entityService = inject(AXPEntityDefinitionRegistryService);
|
|
1138
1180
|
this.toastService = inject(AXToastService);
|
|
1139
1181
|
this.translationService = inject(AXTranslationService);
|
|
@@ -1622,9 +1664,9 @@ class AXPEntityDetailPopoverComponent {
|
|
|
1622
1664
|
AXPWidgetsCatalog.text,
|
|
1623
1665
|
AXPWidgetsCatalog.largeText,
|
|
1624
1666
|
AXPWidgetsCatalog.richText,
|
|
1625
|
-
//
|
|
1626
|
-
AXPWidgetsCatalog.select,
|
|
1627
|
-
|
|
1667
|
+
// TODO: Blinking issue with select widget, it seems rendering issue with select widget.
|
|
1668
|
+
//AXPWidgetsCatalog.select,
|
|
1669
|
+
AXPWidgetsCatalog.lookup,
|
|
1628
1670
|
//
|
|
1629
1671
|
AXPWidgetsCatalog.number,
|
|
1630
1672
|
AXPWidgetsCatalog.toggle,
|
|
@@ -1681,7 +1723,7 @@ class AXPEntityDetailPopoverComponent {
|
|
|
1681
1723
|
return importantProperties;
|
|
1682
1724
|
}
|
|
1683
1725
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1684
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPEntityDetailPopoverComponent, isStandalone: true, selector: "axp-entity-detail-popover", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "detailPopover", first: true, predicate: ["detailPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[textField()]) {\n {{ entityDetails()?.entityData[textField()] }}\n } @else {\n {{ item()?.[textField()] }}\n }\n </h3>\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button [color]=\"'primary'\" [look]=\"'solid'\" text=\"Open Details\" (click)=\"navigateToDetails()\"> </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1726
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPEntityDetailPopoverComponent, isStandalone: true, selector: "axp-entity-detail-popover", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "detailPopover", first: true, predicate: ["detailPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[textField()]) {\n {{ entityDetails()?.entityData[textField()] }}\n } @else {\n {{ item()?.[textField()] }}\n }\n </h3>\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button [color]=\"'primary'\" [look]=\"'solid'\" text=\"Open Details\" (click)=\"navigateToDetails()\"> </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1685
1727
|
}
|
|
1686
1728
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailPopoverComponent, decorators: [{
|
|
1687
1729
|
type: Component,
|
|
@@ -1824,14 +1866,27 @@ class AXPEntityDetailListViewModel {
|
|
|
1824
1866
|
this.workflow = this.injector.get(AXPWorkflowService);
|
|
1825
1867
|
this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
|
|
1826
1868
|
this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
|
|
1869
|
+
this.queryExecutor = this.injector.get(AXPQueryExecutor);
|
|
1827
1870
|
this.dataSource = new AXDataSource({
|
|
1828
|
-
byKey: (key) => {
|
|
1829
|
-
const
|
|
1830
|
-
|
|
1871
|
+
byKey: async (key) => {
|
|
1872
|
+
const execute = this.detailEntity()?.queries?.byKey?.execute;
|
|
1873
|
+
if (typeof execute === 'function') {
|
|
1874
|
+
return await execute(key);
|
|
1875
|
+
}
|
|
1876
|
+
else if (typeof execute === 'string') {
|
|
1877
|
+
return await this.queryExecutor.fetch(execute, key);
|
|
1878
|
+
}
|
|
1879
|
+
return null;
|
|
1831
1880
|
},
|
|
1832
|
-
load: (e) => {
|
|
1833
|
-
const
|
|
1834
|
-
|
|
1881
|
+
load: async (e) => {
|
|
1882
|
+
const execute = this.detailEntity()?.queries?.list?.execute;
|
|
1883
|
+
if (typeof execute === 'function') {
|
|
1884
|
+
return await execute(e);
|
|
1885
|
+
}
|
|
1886
|
+
else if (typeof execute === 'string') {
|
|
1887
|
+
return await this.queryExecutor.fetch(execute, e);
|
|
1888
|
+
}
|
|
1889
|
+
return null;
|
|
1835
1890
|
},
|
|
1836
1891
|
pageSize: 5,
|
|
1837
1892
|
key: 'id',
|
|
@@ -1953,9 +2008,9 @@ class AXPEntityDetailListViewModel {
|
|
|
1953
2008
|
this.initialize();
|
|
1954
2009
|
}
|
|
1955
2010
|
async initialize() {
|
|
1956
|
-
const entityResolver = this.injector.get(
|
|
2011
|
+
const entityResolver = this.injector.get(AXPEntityDefinitionRegistryService);
|
|
1957
2012
|
const [moduleName, entityName] = this.detailEntityConfig.entity.split('.');
|
|
1958
|
-
const entity = await entityResolver.
|
|
2013
|
+
const entity = await entityResolver.resolve(moduleName, entityName);
|
|
1959
2014
|
if (!entity) {
|
|
1960
2015
|
throw Error(`Invalid enitity name: ${this.detailEntityConfig.entity}`);
|
|
1961
2016
|
}
|
|
@@ -2368,11 +2423,12 @@ class AXPEntityMasterListViewModel {
|
|
|
2368
2423
|
this.formatService = this.injector.get(AXFormatService);
|
|
2369
2424
|
this.session = this.injector.get(AXPSessionService);
|
|
2370
2425
|
this.workflow = this.injector.get(AXPWorkflowService);
|
|
2371
|
-
this.settings = this.injector.get(
|
|
2426
|
+
this.settings = this.injector.get(AXPSettingsService);
|
|
2372
2427
|
this.widgetResolver = this.injector.get(AXPWidgetRegistryService);
|
|
2373
2428
|
this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
|
|
2374
2429
|
this.commandService = this.injector.get(AXPCommandService);
|
|
2375
2430
|
this.eventService = this.injector.get(AXPBroadcastEventService);
|
|
2431
|
+
this.queryExecutor = this.injector.get(AXPQueryExecutor);
|
|
2376
2432
|
this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
|
|
2377
2433
|
this.settingEntityKey = `${this.config.module}:${this.config.name}`;
|
|
2378
2434
|
this.destroyed = new Subject();
|
|
@@ -2388,13 +2444,25 @@ class AXPEntityMasterListViewModel {
|
|
|
2388
2444
|
}, ...(ngDevMode ? [{ debugName: "views" }] : []));
|
|
2389
2445
|
this.view = signal(this.views()[0], ...(ngDevMode ? [{ debugName: "view" }] : []));
|
|
2390
2446
|
this.dataSource = new AXDataSource({
|
|
2391
|
-
byKey: (key) => {
|
|
2392
|
-
const
|
|
2393
|
-
|
|
2447
|
+
byKey: async (key) => {
|
|
2448
|
+
const execute = this.entityDef.queries?.byKey?.execute;
|
|
2449
|
+
if (typeof execute === 'function') {
|
|
2450
|
+
return await execute(key);
|
|
2451
|
+
}
|
|
2452
|
+
else if (typeof execute === 'string') {
|
|
2453
|
+
return await this.queryExecutor.fetch(execute, key);
|
|
2454
|
+
}
|
|
2455
|
+
return null;
|
|
2394
2456
|
},
|
|
2395
|
-
load: (e) => {
|
|
2396
|
-
const
|
|
2397
|
-
|
|
2457
|
+
load: async (e) => {
|
|
2458
|
+
const execute = this.entityDef.queries?.list?.execute;
|
|
2459
|
+
if (typeof execute === 'function') {
|
|
2460
|
+
return await execute(e);
|
|
2461
|
+
}
|
|
2462
|
+
else if (typeof execute === 'string') {
|
|
2463
|
+
return await this.queryExecutor.fetch(execute, e);
|
|
2464
|
+
}
|
|
2465
|
+
return null;
|
|
2398
2466
|
},
|
|
2399
2467
|
pageSize: this.view().pageSize || 10,
|
|
2400
2468
|
key: 'id',
|
|
@@ -2922,13 +2990,363 @@ const AXPEntityListViewModelResolver = (route, state, service = inject(AXPEntity
|
|
|
2922
2990
|
return service.create(moduleName, entityName);
|
|
2923
2991
|
};
|
|
2924
2992
|
|
|
2993
|
+
class AXPEntityStorageService {
|
|
2994
|
+
}
|
|
2995
|
+
class AXPEntityDataProvider {
|
|
2996
|
+
}
|
|
2997
|
+
class AXPEntityDataProviderImpl {
|
|
2998
|
+
constructor(storageService, entityName) {
|
|
2999
|
+
this.storageService = storageService;
|
|
3000
|
+
this.entityName = entityName;
|
|
3001
|
+
}
|
|
3002
|
+
async initial(collection) {
|
|
3003
|
+
await this.storageService.initial(this.entityName, collection);
|
|
3004
|
+
}
|
|
3005
|
+
getOne(id) {
|
|
3006
|
+
return this.storageService.getOne(this.entityName, id);
|
|
3007
|
+
}
|
|
3008
|
+
getAll() {
|
|
3009
|
+
return this.storageService.getAll(this.entityName);
|
|
3010
|
+
}
|
|
3011
|
+
query(request) {
|
|
3012
|
+
return this.storageService.query(this.entityName, request);
|
|
3013
|
+
}
|
|
3014
|
+
updateOne(id, keyValues) {
|
|
3015
|
+
return this.storageService.updateOne(this.entityName, id, keyValues);
|
|
3016
|
+
}
|
|
3017
|
+
deleteOne(id) {
|
|
3018
|
+
return this.storageService.deleteOne(this.entityName, id);
|
|
3019
|
+
}
|
|
3020
|
+
insertOne(entity) {
|
|
3021
|
+
return this.storageService.insertOne(this.entityName, entity);
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
class AXMEntityCrudService {
|
|
3025
|
+
}
|
|
3026
|
+
class AXMEntityCrudServiceImpl {
|
|
3027
|
+
constructor(entityName) {
|
|
3028
|
+
this.entityName = entityName;
|
|
3029
|
+
this._storageService = inject(AXPEntityStorageService);
|
|
3030
|
+
this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
|
|
3031
|
+
this._entityDataProvider = new AXPEntityDataProviderImpl(this._storageService, this.entityName);
|
|
3032
|
+
this._entityCategoryDataProvider = new AXPEntityDataProviderImpl(this._storageService, `${this.entityName}Category`);
|
|
3033
|
+
}
|
|
3034
|
+
async insertOne(request) {
|
|
3035
|
+
return this._entityDataProvider.insertOne(request);
|
|
3036
|
+
}
|
|
3037
|
+
async getOne(id) {
|
|
3038
|
+
return this._entityDataProvider.getOne(id);
|
|
3039
|
+
}
|
|
3040
|
+
//DELETE
|
|
3041
|
+
async deleteOne(id) {
|
|
3042
|
+
return this._entityDataProvider.deleteOne(id);
|
|
3043
|
+
}
|
|
3044
|
+
async updateOne(id, values) {
|
|
3045
|
+
return this._entityDataProvider.updateOne(id, values);
|
|
3046
|
+
}
|
|
3047
|
+
async query(request = { skip: 0, take: 100 }) {
|
|
3048
|
+
const [moduleName, entityName] = this._entityDataProvider.entityName.split('.');
|
|
3049
|
+
try {
|
|
3050
|
+
const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
|
|
3051
|
+
if (entityRef.parentKey) {
|
|
3052
|
+
if (!request.filter?.filters?.length && request.filter?.field !== entityRef.parentKey) {
|
|
3053
|
+
request.filter = {
|
|
3054
|
+
value: true,
|
|
3055
|
+
field: entityRef.parentKey,
|
|
3056
|
+
operator: {
|
|
3057
|
+
type: 'isEmpty',
|
|
3058
|
+
},
|
|
3059
|
+
};
|
|
3060
|
+
}
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
catch (error) {
|
|
3064
|
+
console.error(error);
|
|
3065
|
+
}
|
|
3066
|
+
return this._entityDataProvider.query(request);
|
|
3067
|
+
}
|
|
3068
|
+
async findOne(filter) {
|
|
3069
|
+
const result = await this._entityDataProvider.query({ filter, skip: 0, take: 1 });
|
|
3070
|
+
return result.items[0];
|
|
3071
|
+
}
|
|
3072
|
+
async getRoots(request) {
|
|
3073
|
+
const queryRequest = {
|
|
3074
|
+
skip: 0,
|
|
3075
|
+
take: 1000,
|
|
3076
|
+
filter: {
|
|
3077
|
+
value: true,
|
|
3078
|
+
field: 'parentId',
|
|
3079
|
+
operator: {
|
|
3080
|
+
type: 'isEmpty',
|
|
3081
|
+
},
|
|
3082
|
+
},
|
|
3083
|
+
};
|
|
3084
|
+
const result = await this._entityDataProvider.query(queryRequest);
|
|
3085
|
+
return result;
|
|
3086
|
+
}
|
|
3087
|
+
async getChildren(request) {
|
|
3088
|
+
const parentKey = request.parentKey ?? 'parentId';
|
|
3089
|
+
const queryRequest = {
|
|
3090
|
+
skip: 0,
|
|
3091
|
+
take: 1000,
|
|
3092
|
+
filter: {
|
|
3093
|
+
value: request.parentId,
|
|
3094
|
+
field: parentKey,
|
|
3095
|
+
operator: {
|
|
3096
|
+
type: 'equal',
|
|
3097
|
+
},
|
|
3098
|
+
},
|
|
3099
|
+
};
|
|
3100
|
+
const result = await this._entityDataProvider.query(queryRequest);
|
|
3101
|
+
return result;
|
|
3102
|
+
}
|
|
3103
|
+
async getByCategory(request) {
|
|
3104
|
+
const queryRequest = {
|
|
3105
|
+
skip: 0,
|
|
3106
|
+
take: 1000,
|
|
3107
|
+
filter: {
|
|
3108
|
+
value: request.categoryId,
|
|
3109
|
+
field: request.categoryKey ?? 'categoryIds',
|
|
3110
|
+
operator: {
|
|
3111
|
+
type: 'contains',
|
|
3112
|
+
},
|
|
3113
|
+
},
|
|
3114
|
+
};
|
|
3115
|
+
const result = await this._entityDataProvider.query(queryRequest);
|
|
3116
|
+
return result;
|
|
3117
|
+
}
|
|
3118
|
+
async getCategoriesList(request = { skip: 0, take: 1000 }) {
|
|
3119
|
+
return this._entityCategoryDataProvider.query(request);
|
|
3120
|
+
}
|
|
3121
|
+
get storageService() {
|
|
3122
|
+
return this._storageService;
|
|
3123
|
+
}
|
|
3124
|
+
async custom(request) { }
|
|
3125
|
+
}
|
|
3126
|
+
|
|
3127
|
+
//#region ---- EntityDataAccessor ----
|
|
3128
|
+
/**
|
|
3129
|
+
* Data accessor for entity operations.
|
|
3130
|
+
* Provides methods to query and execute commands with smart resolution:
|
|
3131
|
+
* 1. Checks entity definition queries/commands first
|
|
3132
|
+
* 2. Falls back to CRUD service if not defined
|
|
3133
|
+
*/
|
|
3134
|
+
class EntityDataAccessor {
|
|
3135
|
+
constructor(module, entity, entityRegistry, queryExecutor, commandService) {
|
|
3136
|
+
this.module = module;
|
|
3137
|
+
this.entity = entity;
|
|
3138
|
+
this.entityRegistry = entityRegistry;
|
|
3139
|
+
this.queryExecutor = queryExecutor;
|
|
3140
|
+
this.commandService = commandService;
|
|
3141
|
+
this.crudService = null;
|
|
3142
|
+
this.entityDef = null;
|
|
3143
|
+
this.entityDefPromise = null;
|
|
3144
|
+
}
|
|
3145
|
+
/**
|
|
3146
|
+
* Resolves the entity definition lazily and caches it.
|
|
3147
|
+
* @returns The resolved entity definition
|
|
3148
|
+
*/
|
|
3149
|
+
async resolveEntityDef() {
|
|
3150
|
+
if (this.entityDef) {
|
|
3151
|
+
return this.entityDef;
|
|
3152
|
+
}
|
|
3153
|
+
if (!this.entityDefPromise) {
|
|
3154
|
+
this.entityDefPromise = this.entityRegistry.resolve(this.module, this.entity);
|
|
3155
|
+
}
|
|
3156
|
+
this.entityDef = await this.entityDefPromise;
|
|
3157
|
+
if (!this.entityDef) {
|
|
3158
|
+
throw new Error(`Entity "${this.module}.${this.entity}" could not be resolved`);
|
|
3159
|
+
}
|
|
3160
|
+
return this.entityDef;
|
|
3161
|
+
}
|
|
3162
|
+
/**
|
|
3163
|
+
* Gets a single entity by key.
|
|
3164
|
+
* @param key - The entity key
|
|
3165
|
+
* @returns The entity detail or null if not found
|
|
3166
|
+
*/
|
|
3167
|
+
async byKey(key) {
|
|
3168
|
+
const entityDef = await this.resolveEntityDef();
|
|
3169
|
+
const execute = entityDef.queries?.byKey?.execute;
|
|
3170
|
+
if (typeof execute === 'function') {
|
|
3171
|
+
return await execute(key);
|
|
3172
|
+
}
|
|
3173
|
+
else if (typeof execute === 'string') {
|
|
3174
|
+
return await this.queryExecutor.fetch(execute, key);
|
|
3175
|
+
}
|
|
3176
|
+
// Fallback to CRUD service
|
|
3177
|
+
if (!this.crudService) {
|
|
3178
|
+
this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
|
|
3179
|
+
}
|
|
3180
|
+
return await this.crudService.getOne(key);
|
|
3181
|
+
}
|
|
3182
|
+
/**
|
|
3183
|
+
* Queries a list of entities.
|
|
3184
|
+
* @param request - The query request (optional)
|
|
3185
|
+
* @returns The paged list result
|
|
3186
|
+
*/
|
|
3187
|
+
async query(request) {
|
|
3188
|
+
const entityDef = await this.resolveEntityDef();
|
|
3189
|
+
const defaultRequest = { skip: 0, take: 10 };
|
|
3190
|
+
const queryRequest = request || defaultRequest;
|
|
3191
|
+
const execute = entityDef.queries?.list?.execute;
|
|
3192
|
+
if (typeof execute === 'function') {
|
|
3193
|
+
return await execute(queryRequest);
|
|
3194
|
+
}
|
|
3195
|
+
else if (typeof execute === 'string') {
|
|
3196
|
+
const result = await this.queryExecutor.fetch(execute, queryRequest);
|
|
3197
|
+
if (!result) {
|
|
3198
|
+
throw new Error(`Query "${execute}" returned null`);
|
|
3199
|
+
}
|
|
3200
|
+
return result;
|
|
3201
|
+
}
|
|
3202
|
+
// Fallback to CRUD service
|
|
3203
|
+
if (!this.crudService) {
|
|
3204
|
+
this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
|
|
3205
|
+
}
|
|
3206
|
+
return await this.crudService.query(queryRequest);
|
|
3207
|
+
}
|
|
3208
|
+
/**
|
|
3209
|
+
* Creates a new entity.
|
|
3210
|
+
* @param data - The entity data to create
|
|
3211
|
+
* @returns The created entity key
|
|
3212
|
+
*/
|
|
3213
|
+
async create(data) {
|
|
3214
|
+
const entityDef = await this.resolveEntityDef();
|
|
3215
|
+
const execute = entityDef.commands?.create?.execute;
|
|
3216
|
+
if (typeof execute === 'function') {
|
|
3217
|
+
const result = await execute(data);
|
|
3218
|
+
return result?.id || result;
|
|
3219
|
+
}
|
|
3220
|
+
else if (typeof execute === 'string') {
|
|
3221
|
+
const result = await this.commandService.execute(execute, data);
|
|
3222
|
+
if (!result?.success) {
|
|
3223
|
+
throw new Error(result?.message?.text || 'Failed to create entity');
|
|
3224
|
+
}
|
|
3225
|
+
return result.data?.id || result.data;
|
|
3226
|
+
}
|
|
3227
|
+
// Fallback to CRUD service
|
|
3228
|
+
if (!this.crudService) {
|
|
3229
|
+
this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
|
|
3230
|
+
}
|
|
3231
|
+
return await this.crudService.insertOne(data);
|
|
3232
|
+
}
|
|
3233
|
+
/**
|
|
3234
|
+
* Updates an existing entity.
|
|
3235
|
+
* @param id - The entity key
|
|
3236
|
+
* @param data - The entity data to update
|
|
3237
|
+
* @returns The updated entity
|
|
3238
|
+
*/
|
|
3239
|
+
async update(id, data) {
|
|
3240
|
+
const entityDef = await this.resolveEntityDef();
|
|
3241
|
+
const execute = entityDef.commands?.update?.execute;
|
|
3242
|
+
const updateData = { id, ...data };
|
|
3243
|
+
if (typeof execute === 'function') {
|
|
3244
|
+
return await execute(updateData);
|
|
3245
|
+
}
|
|
3246
|
+
else if (typeof execute === 'string') {
|
|
3247
|
+
const result = await this.commandService.execute(execute, updateData);
|
|
3248
|
+
if (!result?.success) {
|
|
3249
|
+
throw new Error(result?.message?.text || 'Failed to update entity');
|
|
3250
|
+
}
|
|
3251
|
+
return result.data;
|
|
3252
|
+
}
|
|
3253
|
+
// Fallback to CRUD service
|
|
3254
|
+
if (!this.crudService) {
|
|
3255
|
+
this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
|
|
3256
|
+
}
|
|
3257
|
+
return await this.crudService.updateOne(id, data);
|
|
3258
|
+
}
|
|
3259
|
+
/**
|
|
3260
|
+
* Deletes an entity.
|
|
3261
|
+
* @param id - The entity key
|
|
3262
|
+
*/
|
|
3263
|
+
async delete(id) {
|
|
3264
|
+
const entityDef = await this.resolveEntityDef();
|
|
3265
|
+
const execute = entityDef.commands?.delete?.execute;
|
|
3266
|
+
if (typeof execute === 'function') {
|
|
3267
|
+
await execute(id);
|
|
3268
|
+
return;
|
|
3269
|
+
}
|
|
3270
|
+
else if (typeof execute === 'string') {
|
|
3271
|
+
const result = await this.commandService.execute(execute, id);
|
|
3272
|
+
if (!result?.success) {
|
|
3273
|
+
throw new Error(result?.message?.text || 'Failed to delete entity');
|
|
3274
|
+
}
|
|
3275
|
+
return;
|
|
3276
|
+
}
|
|
3277
|
+
// Fallback to CRUD service
|
|
3278
|
+
if (!this.crudService) {
|
|
3279
|
+
this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
|
|
3280
|
+
}
|
|
3281
|
+
return await this.crudService.deleteOne(id);
|
|
3282
|
+
}
|
|
3283
|
+
}
|
|
3284
|
+
//#endregion
|
|
3285
|
+
//#region ---- EntityBuilder ----
|
|
3286
|
+
/**
|
|
3287
|
+
* Builder class for entity operations.
|
|
3288
|
+
* Provides methods to create paths and access entity data.
|
|
3289
|
+
*/
|
|
3290
|
+
class EntityBuilder {
|
|
3291
|
+
constructor(module, entity, sessionService, entityRegistry, queryExecutor, commandService) {
|
|
3292
|
+
this.sessionService = sessionService;
|
|
3293
|
+
this.entityRegistry = entityRegistry;
|
|
3294
|
+
this.queryExecutor = queryExecutor;
|
|
3295
|
+
this.commandService = commandService;
|
|
3296
|
+
this.module = module;
|
|
3297
|
+
this.entity = entity;
|
|
3298
|
+
}
|
|
3299
|
+
/**
|
|
3300
|
+
* Creates a path for the entity.
|
|
3301
|
+
* @param path - The path segment (defaults to 'list')
|
|
3302
|
+
* @returns The full path string
|
|
3303
|
+
*/
|
|
3304
|
+
createPath(path = 'list') {
|
|
3305
|
+
return `/${this.sessionService.application?.name}/m/${this.module}/e/${this.entity}/${path}`;
|
|
3306
|
+
}
|
|
3307
|
+
/**
|
|
3308
|
+
* Gets the data accessor for the entity with generic type support.
|
|
3309
|
+
* Entity definition is resolved lazily on first method call.
|
|
3310
|
+
* @returns An EntityDataAccessor instance
|
|
3311
|
+
*/
|
|
3312
|
+
data() {
|
|
3313
|
+
return new EntityDataAccessor(this.module, this.entity, this.entityRegistry, this.queryExecutor, this.commandService);
|
|
3314
|
+
}
|
|
3315
|
+
}
|
|
3316
|
+
//#endregion
|
|
2925
3317
|
class AXPEntityService {
|
|
2926
3318
|
constructor() {
|
|
2927
3319
|
this.sessionService = inject(AXPSessionService);
|
|
3320
|
+
this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
|
|
3321
|
+
this.queryExecutor = inject(AXPQueryExecutor);
|
|
3322
|
+
this.commandService = inject(AXPCommandService);
|
|
2928
3323
|
}
|
|
3324
|
+
/**
|
|
3325
|
+
* @deprecated Use `withEntity(module, entity).createPath(path)` instead.
|
|
3326
|
+
* This method will be removed in a future version.
|
|
3327
|
+
*/
|
|
2929
3328
|
createPath(module, entity, path = 'list') {
|
|
2930
3329
|
return `/${this.sessionService.application?.name}/m/${module}/e/${entity}/${path}`;
|
|
2931
3330
|
}
|
|
3331
|
+
withEntity(moduleOrEntityKey, entity) {
|
|
3332
|
+
let module;
|
|
3333
|
+
let entityName;
|
|
3334
|
+
if (entity !== undefined) {
|
|
3335
|
+
// Two parameters: module and entity
|
|
3336
|
+
module = moduleOrEntityKey;
|
|
3337
|
+
entityName = entity;
|
|
3338
|
+
}
|
|
3339
|
+
else {
|
|
3340
|
+
// Single parameter: "module.entity" format
|
|
3341
|
+
const dotIndex = moduleOrEntityKey.indexOf('.');
|
|
3342
|
+
if (dotIndex === -1) {
|
|
3343
|
+
throw new Error(`Invalid entity key format: "${moduleOrEntityKey}". Expected format: "module.entity"`);
|
|
3344
|
+
}
|
|
3345
|
+
module = moduleOrEntityKey.substring(0, dotIndex);
|
|
3346
|
+
entityName = moduleOrEntityKey.substring(dotIndex + 1);
|
|
3347
|
+
}
|
|
3348
|
+
return new EntityBuilder(module, entityName, this.sessionService, this.entityRegistry, this.queryExecutor, this.commandService);
|
|
3349
|
+
}
|
|
2932
3350
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2933
3351
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityService, providedIn: 'root' }); }
|
|
2934
3352
|
}
|
|
@@ -2945,13 +3363,13 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
|
|
|
2945
3363
|
this.dialogService = inject(AXDialogService);
|
|
2946
3364
|
this.loadingDialog = inject(AXLoadingDialogService);
|
|
2947
3365
|
this.translationService = inject(AXTranslationService);
|
|
2948
|
-
this.
|
|
3366
|
+
this.settingsService = inject(AXPSettingsService);
|
|
2949
3367
|
}
|
|
2950
3368
|
async execute(context) {
|
|
2951
3369
|
const moduleEntity = context.getVariable('entity');
|
|
2952
3370
|
const data = context.getVariable('data');
|
|
2953
3371
|
const meta = context.getVariable('meta');
|
|
2954
|
-
const showResult = await this.
|
|
3372
|
+
const showResult = await this.settingsService.get(AXPCommonSettings.EnableOperationToasts);
|
|
2955
3373
|
const entities = [];
|
|
2956
3374
|
if (moduleEntity != null) {
|
|
2957
3375
|
const ids = Array.isArray(data) ? data.map((c) => c.id) : [data.id];
|
|
@@ -3258,8 +3676,8 @@ class AXPEntityMasterUpdateViewModelFactory {
|
|
|
3258
3676
|
async create(moduleName, entityName, id, props) {
|
|
3259
3677
|
const config = await this.entityService.resolve(moduleName, entityName);
|
|
3260
3678
|
this.layout.setNavigationLoading(true);
|
|
3261
|
-
if (config.queries
|
|
3262
|
-
const func = config.queries
|
|
3679
|
+
if (config.queries?.byKey) {
|
|
3680
|
+
const func = config.queries?.byKey?.execute;
|
|
3263
3681
|
const data = await func(id);
|
|
3264
3682
|
this.layout.setNavigationLoading(false);
|
|
3265
3683
|
return new AXPEntityMasterUpdateViewModel(this.injector, config, data, props);
|
|
@@ -3616,8 +4034,8 @@ class AXPEntityDetailViewModelFactory {
|
|
|
3616
4034
|
async create(moduleName, entityName, id) {
|
|
3617
4035
|
const config = await this.entityService.resolve(moduleName, entityName);
|
|
3618
4036
|
this.layout.setNavigationLoading(true);
|
|
3619
|
-
if (config.queries
|
|
3620
|
-
const func = config.queries
|
|
4037
|
+
if (config.queries?.byKey) {
|
|
4038
|
+
const func = config.queries?.byKey?.execute;
|
|
3621
4039
|
const data = await func(id);
|
|
3622
4040
|
this.layout.setNavigationLoading(false);
|
|
3623
4041
|
return new AXPEntityMasterSingleViewModel(this.injector, config, data);
|
|
@@ -3640,138 +4058,6 @@ const AXPEntityDetailViewModelResolver = (route, state, service = inject(AXPEnti
|
|
|
3640
4058
|
return service.create(moduleName, entityName, id);
|
|
3641
4059
|
};
|
|
3642
4060
|
|
|
3643
|
-
class AXPEntityStorageService {
|
|
3644
|
-
}
|
|
3645
|
-
class AXPEntityDataProvider {
|
|
3646
|
-
}
|
|
3647
|
-
class AXPEntityDataProviderImpl {
|
|
3648
|
-
constructor(storageService, entityName) {
|
|
3649
|
-
this.storageService = storageService;
|
|
3650
|
-
this.entityName = entityName;
|
|
3651
|
-
}
|
|
3652
|
-
async initial(collection) {
|
|
3653
|
-
await this.storageService.initial(this.entityName, collection);
|
|
3654
|
-
}
|
|
3655
|
-
getOne(id) {
|
|
3656
|
-
return this.storageService.getOne(this.entityName, id);
|
|
3657
|
-
}
|
|
3658
|
-
getAll() {
|
|
3659
|
-
return this.storageService.getAll(this.entityName);
|
|
3660
|
-
}
|
|
3661
|
-
query(request) {
|
|
3662
|
-
return this.storageService.query(this.entityName, request);
|
|
3663
|
-
}
|
|
3664
|
-
updateOne(id, keyValues) {
|
|
3665
|
-
return this.storageService.updateOne(this.entityName, id, keyValues);
|
|
3666
|
-
}
|
|
3667
|
-
deleteOne(id) {
|
|
3668
|
-
return this.storageService.deleteOne(this.entityName, id);
|
|
3669
|
-
}
|
|
3670
|
-
insertOne(entity) {
|
|
3671
|
-
return this.storageService.insertOne(this.entityName, entity);
|
|
3672
|
-
}
|
|
3673
|
-
}
|
|
3674
|
-
class AXMEntityCrudService {
|
|
3675
|
-
}
|
|
3676
|
-
class AXMEntityCrudServiceImpl {
|
|
3677
|
-
constructor(entityName) {
|
|
3678
|
-
this.entityName = entityName;
|
|
3679
|
-
this._storageService = inject(AXPEntityStorageService);
|
|
3680
|
-
this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
|
|
3681
|
-
this._entityDataProvider = new AXPEntityDataProviderImpl(this._storageService, this.entityName);
|
|
3682
|
-
this._entityCategoryDataProvider = new AXPEntityDataProviderImpl(this._storageService, `${this.entityName}Category`);
|
|
3683
|
-
}
|
|
3684
|
-
async insertOne(request) {
|
|
3685
|
-
return this._entityDataProvider.insertOne(request);
|
|
3686
|
-
}
|
|
3687
|
-
async getOne(id) {
|
|
3688
|
-
return this._entityDataProvider.getOne(id);
|
|
3689
|
-
}
|
|
3690
|
-
async deleteOne(id) {
|
|
3691
|
-
return this._entityDataProvider.deleteOne(id);
|
|
3692
|
-
}
|
|
3693
|
-
async updateOne(id, values) {
|
|
3694
|
-
return this._entityDataProvider.updateOne(id, values);
|
|
3695
|
-
}
|
|
3696
|
-
async query(request = { skip: 0, take: 100 }) {
|
|
3697
|
-
const [moduleName, entityName] = this._entityDataProvider.entityName.split('.');
|
|
3698
|
-
try {
|
|
3699
|
-
const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
|
|
3700
|
-
if (entityRef.parentKey) {
|
|
3701
|
-
if (!request.filter?.filters?.length && request.filter?.field !== entityRef.parentKey) {
|
|
3702
|
-
request.filter = {
|
|
3703
|
-
value: true,
|
|
3704
|
-
field: entityRef.parentKey,
|
|
3705
|
-
operator: {
|
|
3706
|
-
type: 'isEmpty',
|
|
3707
|
-
},
|
|
3708
|
-
};
|
|
3709
|
-
}
|
|
3710
|
-
}
|
|
3711
|
-
}
|
|
3712
|
-
catch (error) {
|
|
3713
|
-
console.error(error);
|
|
3714
|
-
}
|
|
3715
|
-
return this._entityDataProvider.query(request);
|
|
3716
|
-
}
|
|
3717
|
-
async findOne(filter) {
|
|
3718
|
-
const result = await this._entityDataProvider.query({ filter, skip: 0, take: 1 });
|
|
3719
|
-
return result.items[0];
|
|
3720
|
-
}
|
|
3721
|
-
async getRoots(request) {
|
|
3722
|
-
const queryRequest = {
|
|
3723
|
-
skip: 0,
|
|
3724
|
-
take: 1000,
|
|
3725
|
-
filter: {
|
|
3726
|
-
value: true,
|
|
3727
|
-
field: 'parentId',
|
|
3728
|
-
operator: {
|
|
3729
|
-
type: 'isEmpty',
|
|
3730
|
-
},
|
|
3731
|
-
},
|
|
3732
|
-
};
|
|
3733
|
-
const result = await this._entityDataProvider.query(queryRequest);
|
|
3734
|
-
return result;
|
|
3735
|
-
}
|
|
3736
|
-
async getChildren(request) {
|
|
3737
|
-
const parentKey = request.parentKey ?? 'parentId';
|
|
3738
|
-
const queryRequest = {
|
|
3739
|
-
skip: 0,
|
|
3740
|
-
take: 1000,
|
|
3741
|
-
filter: {
|
|
3742
|
-
value: request.parentId,
|
|
3743
|
-
field: parentKey,
|
|
3744
|
-
operator: {
|
|
3745
|
-
type: 'equal',
|
|
3746
|
-
},
|
|
3747
|
-
},
|
|
3748
|
-
};
|
|
3749
|
-
const result = await this._entityDataProvider.query(queryRequest);
|
|
3750
|
-
return result;
|
|
3751
|
-
}
|
|
3752
|
-
async getByCategory(request) {
|
|
3753
|
-
const queryRequest = {
|
|
3754
|
-
skip: 0,
|
|
3755
|
-
take: 1000,
|
|
3756
|
-
filter: {
|
|
3757
|
-
value: request.categoryId,
|
|
3758
|
-
field: request.categoryKey ?? 'categoryIds',
|
|
3759
|
-
operator: {
|
|
3760
|
-
type: 'contains',
|
|
3761
|
-
},
|
|
3762
|
-
},
|
|
3763
|
-
};
|
|
3764
|
-
const result = await this._entityDataProvider.query(queryRequest);
|
|
3765
|
-
return result;
|
|
3766
|
-
}
|
|
3767
|
-
async getCategoriesList(request = { skip: 0, take: 1000 }) {
|
|
3768
|
-
return this._entityCategoryDataProvider.query(request);
|
|
3769
|
-
}
|
|
3770
|
-
get storageService() {
|
|
3771
|
-
return this._storageService;
|
|
3772
|
-
}
|
|
3773
|
-
}
|
|
3774
|
-
|
|
3775
4061
|
class AXPLayoutAdapterBuilder {
|
|
3776
4062
|
constructor() {
|
|
3777
4063
|
this.adapter = {};
|
|
@@ -5331,10 +5617,15 @@ const eventDispatchMiddleware = {
|
|
|
5331
5617
|
target: { ops: ['create', 'update', 'delete'], order: 90 },
|
|
5332
5618
|
execute: async (ctx, next) => {
|
|
5333
5619
|
const dispatcher = inject(AXPEntityEventDispatcherService);
|
|
5620
|
+
const workflowEventService = inject(AXPWorkflowEventService);
|
|
5334
5621
|
await next();
|
|
5335
5622
|
if (ctx.op === 'create') {
|
|
5336
5623
|
const createdData = ctx.result ? { ...ctx.data, id: ctx.result } : ctx.data;
|
|
5337
5624
|
await dispatcher.dispatchInserted(ctx.entityName, { refType: ctx.entityName, data: createdData });
|
|
5625
|
+
// Dispatch workflow refresh event to trigger entity list refresh
|
|
5626
|
+
workflowEventService.dispatch(AXPRefreshEvent({
|
|
5627
|
+
entity: ctx.entityName,
|
|
5628
|
+
}));
|
|
5338
5629
|
}
|
|
5339
5630
|
else if (ctx.op === 'update') {
|
|
5340
5631
|
await dispatcher.dispatchUpdated(ctx.entityName, {
|
|
@@ -5342,10 +5633,18 @@ const eventDispatchMiddleware = {
|
|
|
5342
5633
|
data: ctx.result,
|
|
5343
5634
|
changes: ctx.locals.get('changes'),
|
|
5344
5635
|
});
|
|
5636
|
+
// Dispatch workflow refresh event to trigger entity list refresh
|
|
5637
|
+
workflowEventService.dispatch(AXPRefreshEvent({
|
|
5638
|
+
entity: ctx.entityName,
|
|
5639
|
+
}));
|
|
5345
5640
|
}
|
|
5346
5641
|
else if (ctx.op === 'delete') {
|
|
5347
5642
|
// For delete, prefer previous entity if available
|
|
5348
5643
|
await dispatcher.dispatchDeleted(ctx.entityName, { refType: ctx.entityName, data: ctx.result ?? ctx.previous });
|
|
5644
|
+
// Dispatch workflow refresh event to trigger entity list refresh
|
|
5645
|
+
workflowEventService.dispatch(AXPRefreshEvent({
|
|
5646
|
+
entity: ctx.entityName,
|
|
5647
|
+
}));
|
|
5349
5648
|
}
|
|
5350
5649
|
},
|
|
5351
5650
|
};
|
|
@@ -5571,10 +5870,72 @@ const createLayoutOrderingMiddlewareProvider = (config = {}, entityName = '*') =
|
|
|
5571
5870
|
}),
|
|
5572
5871
|
};
|
|
5573
5872
|
};
|
|
5574
|
-
/**
|
|
5575
|
-
* Default provider registered with the default configuration
|
|
5576
|
-
*/
|
|
5577
|
-
const layoutOrderingMiddlewareProvider = createLayoutOrderingMiddlewareProvider();
|
|
5873
|
+
/**
|
|
5874
|
+
* Default provider registered with the default configuration
|
|
5875
|
+
*/
|
|
5876
|
+
const layoutOrderingMiddlewareProvider = createLayoutOrderingMiddlewareProvider();
|
|
5877
|
+
//#endregion
|
|
5878
|
+
|
|
5879
|
+
/**
|
|
5880
|
+
* Factory to create a column width middleware using provided config map.
|
|
5881
|
+
* Sets width for columns defined in the map if not already defined on the column.
|
|
5882
|
+
*/
|
|
5883
|
+
const AXPCrudModifier = {
|
|
5884
|
+
entityName: '*',
|
|
5885
|
+
modifier: (ctx) => {
|
|
5886
|
+
const dataService = new AXMEntityCrudServiceImpl(ctx.module.get() + '.' + ctx.name.get());
|
|
5887
|
+
ctx.commands.update((command) => {
|
|
5888
|
+
if (!command) {
|
|
5889
|
+
command = {};
|
|
5890
|
+
}
|
|
5891
|
+
if (!command?.create) {
|
|
5892
|
+
command.create = {
|
|
5893
|
+
execute: async (data) => {
|
|
5894
|
+
const res = await dataService.insertOne(data);
|
|
5895
|
+
return { id: res };
|
|
5896
|
+
},
|
|
5897
|
+
};
|
|
5898
|
+
}
|
|
5899
|
+
if (!command?.delete) {
|
|
5900
|
+
command.delete = {
|
|
5901
|
+
execute: async (id) => {
|
|
5902
|
+
return await dataService.deleteOne(id);
|
|
5903
|
+
},
|
|
5904
|
+
};
|
|
5905
|
+
}
|
|
5906
|
+
if (!command?.update) {
|
|
5907
|
+
command.update = {
|
|
5908
|
+
execute: async (data) => {
|
|
5909
|
+
return await dataService.updateOne(data.id, data);
|
|
5910
|
+
},
|
|
5911
|
+
};
|
|
5912
|
+
}
|
|
5913
|
+
return command;
|
|
5914
|
+
});
|
|
5915
|
+
ctx.queries.update((queries) => {
|
|
5916
|
+
if (!queries) {
|
|
5917
|
+
queries = {};
|
|
5918
|
+
}
|
|
5919
|
+
if (!queries?.byKey) {
|
|
5920
|
+
queries.byKey = {
|
|
5921
|
+
execute: async (id) => {
|
|
5922
|
+
return await dataService.getOne(id);
|
|
5923
|
+
},
|
|
5924
|
+
type: AXPEntityQueryType.Single,
|
|
5925
|
+
};
|
|
5926
|
+
}
|
|
5927
|
+
if (!queries?.list) {
|
|
5928
|
+
queries.list = {
|
|
5929
|
+
execute: async (e) => {
|
|
5930
|
+
return await dataService.query(e);
|
|
5931
|
+
},
|
|
5932
|
+
type: AXPEntityQueryType.List,
|
|
5933
|
+
};
|
|
5934
|
+
}
|
|
5935
|
+
return queries;
|
|
5936
|
+
});
|
|
5937
|
+
},
|
|
5938
|
+
};
|
|
5578
5939
|
//#endregion
|
|
5579
5940
|
|
|
5580
5941
|
class AXPEntityCommandSearchDefinitionProvider {
|
|
@@ -5748,7 +6109,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
5748
6109
|
class AXPCategoryTreeService {
|
|
5749
6110
|
constructor() {
|
|
5750
6111
|
//#region ---- Services & Dependencies ----
|
|
5751
|
-
this.entityResolver = inject(
|
|
6112
|
+
this.entityResolver = inject(AXPEntityDefinitionRegistryService);
|
|
5752
6113
|
this.translate = inject(AXTranslationService);
|
|
5753
6114
|
}
|
|
5754
6115
|
//#endregion
|
|
@@ -5766,8 +6127,8 @@ class AXPCategoryTreeService {
|
|
|
5766
6127
|
if (!module || !entity) {
|
|
5767
6128
|
return null;
|
|
5768
6129
|
}
|
|
5769
|
-
const categoryEntityDef = await this.entityResolver.
|
|
5770
|
-
if (!categoryEntityDef?.queries
|
|
6130
|
+
const categoryEntityDef = await this.entityResolver.resolve(module, entity);
|
|
6131
|
+
if (!categoryEntityDef?.queries?.list?.execute || typeof categoryEntityDef.queries.list.execute !== 'function') {
|
|
5771
6132
|
return null;
|
|
5772
6133
|
}
|
|
5773
6134
|
const categoryEntityQueryFunc = categoryEntityDef.queries.list.execute;
|
|
@@ -8033,7 +8394,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
8033
8394
|
//#region ---- Services & Dependencies ----
|
|
8034
8395
|
this.entityDetailPopoverService = inject(AXPEntityDetailPopoverService);
|
|
8035
8396
|
this.formatService = inject(AXFormatService);
|
|
8036
|
-
this.entityResolver = inject(
|
|
8397
|
+
this.entityResolver = inject(AXPEntityDefinitionRegistryService);
|
|
8037
8398
|
//#endregion
|
|
8038
8399
|
//#region ---- Inputs ----
|
|
8039
8400
|
this.rawValueSignal = signal(null, ...(ngDevMode ? [{ debugName: "rawValueSignal" }] : []));
|
|
@@ -8070,7 +8431,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
8070
8431
|
if (!module || !entity) {
|
|
8071
8432
|
return;
|
|
8072
8433
|
}
|
|
8073
|
-
this.entityDef.set(await this.entityResolver.
|
|
8434
|
+
this.entityDef.set(await this.entityResolver.resolve(module, entity));
|
|
8074
8435
|
}, ...(ngDevMode ? [{ debugName: "efEntity" }] : []));
|
|
8075
8436
|
this.efDisplay = effect(async () => {
|
|
8076
8437
|
const value = this.rawValueSignal();
|
|
@@ -8162,7 +8523,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
8162
8523
|
}
|
|
8163
8524
|
else {
|
|
8164
8525
|
// If item is just an ID, fetch the full item
|
|
8165
|
-
const byKey = this.entityDef()?.queries
|
|
8526
|
+
const byKey = this.entityDef()?.queries?.byKey?.execute;
|
|
8166
8527
|
if (byKey) {
|
|
8167
8528
|
try {
|
|
8168
8529
|
itemObj = await byKey(item);
|
|
@@ -8206,7 +8567,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
8206
8567
|
}
|
|
8207
8568
|
const valueField = this.valueField();
|
|
8208
8569
|
const textField = this.displayField();
|
|
8209
|
-
const byKey = this.entityDef()?.queries
|
|
8570
|
+
const byKey = this.entityDef()?.queries?.byKey?.execute;
|
|
8210
8571
|
if (!byKey) {
|
|
8211
8572
|
return item;
|
|
8212
8573
|
}
|
|
@@ -8691,7 +9052,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
8691
9052
|
constructor() {
|
|
8692
9053
|
super(...arguments);
|
|
8693
9054
|
//#region ---- Services & Dependencies ----
|
|
8694
|
-
this.entityResolver = inject(
|
|
9055
|
+
this.entityResolver = inject(AXPEntityDefinitionRegistryService);
|
|
8695
9056
|
this.popupService = inject(AXPopupService);
|
|
8696
9057
|
this.translateService = inject(AXTranslationService);
|
|
8697
9058
|
this.cdr = inject(ChangeDetectorRef);
|
|
@@ -8734,7 +9095,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
8734
9095
|
if (!entityKey)
|
|
8735
9096
|
return;
|
|
8736
9097
|
const [module, entity] = entityKey.split('.');
|
|
8737
|
-
this.entityDef.set(await this.entityResolver.
|
|
9098
|
+
this.entityDef.set(await this.entityResolver.resolve(module, entity));
|
|
8738
9099
|
}, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
|
|
8739
9100
|
this.#efValue = effect(() => {
|
|
8740
9101
|
const value = this.getValue();
|
|
@@ -8847,7 +9208,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
8847
9208
|
const excludedNodeId = currentEntityId ? String(currentEntityId) : undefined;
|
|
8848
9209
|
try {
|
|
8849
9210
|
const result = await this.popupService.open(AXPEntityCategoryTreeSelectorComponent, {
|
|
8850
|
-
title: `${this.translateService.translateSync('@general:widgets.lookup.search')} ${this.translateService.translateSync(this.entityDef()?.formats.plural ?? '')}`,
|
|
9211
|
+
title: `${this.translateService.translateSync('@general:widgets.lookup.search.placeholder')} ${this.translateService.translateSync(this.entityDef()?.formats.plural ?? '')}`,
|
|
8851
9212
|
size: 'md',
|
|
8852
9213
|
data: {
|
|
8853
9214
|
entityKey: signal(this.entity()),
|
|
@@ -8925,7 +9286,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
8925
9286
|
return;
|
|
8926
9287
|
}
|
|
8927
9288
|
const values = castArray(rawValue);
|
|
8928
|
-
const byKey = this.entityDef()?.queries
|
|
9289
|
+
const byKey = this.entityDef()?.queries?.byKey?.execute;
|
|
8929
9290
|
if (!byKey) {
|
|
8930
9291
|
this.setItems([]);
|
|
8931
9292
|
this.isLoading.set(false);
|
|
@@ -9092,7 +9453,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
9092
9453
|
}
|
|
9093
9454
|
const valueField = this.valueField();
|
|
9094
9455
|
const textField = this.displayField();
|
|
9095
|
-
const byKey = this.entityDef()?.queries
|
|
9456
|
+
const byKey = this.entityDef()?.queries?.byKey?.execute;
|
|
9096
9457
|
if (!byKey) {
|
|
9097
9458
|
return item;
|
|
9098
9459
|
}
|
|
@@ -9266,7 +9627,7 @@ class AXPEntityCategoryWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
9266
9627
|
super(...arguments);
|
|
9267
9628
|
//#region ---- Services & Dependencies ----
|
|
9268
9629
|
this.formatService = inject(AXFormatService);
|
|
9269
|
-
this.entityResolver = inject(
|
|
9630
|
+
this.entityResolver = inject(AXPEntityDefinitionRegistryService);
|
|
9270
9631
|
//#endregion
|
|
9271
9632
|
//#region ---- Computed Properties ----
|
|
9272
9633
|
this.entity = computed(() => this.options()['entity'] ?? '', ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
@@ -9296,7 +9657,7 @@ class AXPEntityCategoryWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
9296
9657
|
if (!module || !entity) {
|
|
9297
9658
|
return;
|
|
9298
9659
|
}
|
|
9299
|
-
this.entityDef.set(await this.entityResolver.
|
|
9660
|
+
this.entityDef.set(await this.entityResolver.resolve(module, entity));
|
|
9300
9661
|
}, ...(ngDevMode ? [{ debugName: "efEntity" }] : []));
|
|
9301
9662
|
this.efDisplay = effect(async () => {
|
|
9302
9663
|
const value = this.getValue();
|
|
@@ -9319,7 +9680,7 @@ class AXPEntityCategoryWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
9319
9680
|
};
|
|
9320
9681
|
}
|
|
9321
9682
|
const def = this.entityDef();
|
|
9322
|
-
const byKey = def?.queries
|
|
9683
|
+
const byKey = def?.queries?.byKey?.execute;
|
|
9323
9684
|
if (byKey) {
|
|
9324
9685
|
this.loading.set(true);
|
|
9325
9686
|
try {
|
|
@@ -9619,12 +9980,12 @@ class AXPEntityListTableService {
|
|
|
9619
9980
|
createDataSource(entity) {
|
|
9620
9981
|
return new AXDataSource({
|
|
9621
9982
|
byKey: (key) => {
|
|
9622
|
-
const func = entity.queries
|
|
9983
|
+
const func = entity.queries?.byKey?.execute;
|
|
9623
9984
|
return func(key);
|
|
9624
9985
|
},
|
|
9625
9986
|
load: (e) => {
|
|
9626
|
-
const func = entity.queries
|
|
9627
|
-
if (!func) {
|
|
9987
|
+
const func = entity.queries?.list?.execute;
|
|
9988
|
+
if (!func || typeof func !== 'function') {
|
|
9628
9989
|
throw new Error(`Entity ${entity.name} does not have a list query`);
|
|
9629
9990
|
}
|
|
9630
9991
|
return func(e);
|
|
@@ -9704,7 +10065,6 @@ class AXPEntityListTableService {
|
|
|
9704
10065
|
options: options,
|
|
9705
10066
|
metadata: action?.metadata,
|
|
9706
10067
|
});
|
|
9707
|
-
console.log('Entity List - Row command:', e.name, e.data);
|
|
9708
10068
|
}
|
|
9709
10069
|
/**
|
|
9710
10070
|
* Create default events
|
|
@@ -10286,7 +10646,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10286
10646
|
></ng-container>
|
|
10287
10647
|
}
|
|
10288
10648
|
</div>
|
|
10289
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4$3.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10649
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4$3.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10290
10650
|
}
|
|
10291
10651
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListWidgetViewComponent, decorators: [{
|
|
10292
10652
|
type: Component,
|
|
@@ -10451,144 +10811,6 @@ const AXPEntityListWidget = {
|
|
|
10451
10811
|
},
|
|
10452
10812
|
};
|
|
10453
10813
|
|
|
10454
|
-
class AXPEntityReferenceWidgetViewComponent extends AXPLayoutBaseWidgetComponent {
|
|
10455
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
10456
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10457
|
-
}
|
|
10458
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, decorators: [{
|
|
10459
|
-
type: Component,
|
|
10460
|
-
args: [{
|
|
10461
|
-
template: ``,
|
|
10462
|
-
standalone: true,
|
|
10463
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10464
|
-
imports: [CommonModule],
|
|
10465
|
-
}]
|
|
10466
|
-
}] });
|
|
10467
|
-
|
|
10468
|
-
var entityReferenceWidgetView_component = /*#__PURE__*/Object.freeze({
|
|
10469
|
-
__proto__: null,
|
|
10470
|
-
AXPEntityReferenceWidgetViewComponent: AXPEntityReferenceWidgetViewComponent
|
|
10471
|
-
});
|
|
10472
|
-
|
|
10473
|
-
class AXPEntityReferenceWidgetEditComponent extends AXPLayoutBaseWidgetComponent {
|
|
10474
|
-
constructor() {
|
|
10475
|
-
super(...arguments);
|
|
10476
|
-
this.injector = inject(Injector);
|
|
10477
|
-
this.entityResolver = inject(AXPEntityResolver);
|
|
10478
|
-
this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
10479
|
-
this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : []));
|
|
10480
|
-
this.#efEntity = effect(async () => {
|
|
10481
|
-
const [module, entity] = this.entity().split('.');
|
|
10482
|
-
this.entityDef.set(await this.entityResolver.get(module, entity));
|
|
10483
|
-
console.log(this.entityDef());
|
|
10484
|
-
}, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
|
|
10485
|
-
}
|
|
10486
|
-
#efEntity;
|
|
10487
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
10488
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetEditComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10489
|
-
}
|
|
10490
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, decorators: [{
|
|
10491
|
-
type: Component,
|
|
10492
|
-
args: [{
|
|
10493
|
-
template: ``,
|
|
10494
|
-
standalone: true,
|
|
10495
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10496
|
-
imports: [CommonModule, FormsModule],
|
|
10497
|
-
}]
|
|
10498
|
-
}] });
|
|
10499
|
-
|
|
10500
|
-
var entityReferenceWidgetEdit_component = /*#__PURE__*/Object.freeze({
|
|
10501
|
-
__proto__: null,
|
|
10502
|
-
AXPEntityReferenceWidgetEditComponent: AXPEntityReferenceWidgetEditComponent
|
|
10503
|
-
});
|
|
10504
|
-
|
|
10505
|
-
class AXPEntityReferenceWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
10506
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
10507
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue" }, usesInheritance: true, ngImport: i0, template: `{{rawValue}}`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10508
|
-
}
|
|
10509
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, decorators: [{
|
|
10510
|
-
type: Component,
|
|
10511
|
-
args: [{
|
|
10512
|
-
template: `{{rawValue}}`,
|
|
10513
|
-
standalone: true,
|
|
10514
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10515
|
-
imports: [CommonModule],
|
|
10516
|
-
inputs: ['rawValue']
|
|
10517
|
-
}]
|
|
10518
|
-
}] });
|
|
10519
|
-
|
|
10520
|
-
var entityReferenceWidgetColumn_component = /*#__PURE__*/Object.freeze({
|
|
10521
|
-
__proto__: null,
|
|
10522
|
-
AXPEntityReferenceWidgetColumnComponent: AXPEntityReferenceWidgetColumnComponent
|
|
10523
|
-
});
|
|
10524
|
-
|
|
10525
|
-
class AXPEntityReferenceWidgetPrintComponent extends AXPLayoutBaseWidgetComponent {
|
|
10526
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
10527
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10528
|
-
}
|
|
10529
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, decorators: [{
|
|
10530
|
-
type: Component,
|
|
10531
|
-
args: [{
|
|
10532
|
-
template: ``,
|
|
10533
|
-
standalone: true,
|
|
10534
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10535
|
-
imports: [CommonModule],
|
|
10536
|
-
inputs: [],
|
|
10537
|
-
}]
|
|
10538
|
-
}] });
|
|
10539
|
-
|
|
10540
|
-
var entityReferenceWidgetPrint_component = /*#__PURE__*/Object.freeze({
|
|
10541
|
-
__proto__: null,
|
|
10542
|
-
AXPEntityReferenceWidgetPrintComponent: AXPEntityReferenceWidgetPrintComponent
|
|
10543
|
-
});
|
|
10544
|
-
|
|
10545
|
-
class AXPEntityReferenceWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {
|
|
10546
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
10547
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetDesignerComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10548
|
-
}
|
|
10549
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, decorators: [{
|
|
10550
|
-
type: Component,
|
|
10551
|
-
args: [{
|
|
10552
|
-
template: ``,
|
|
10553
|
-
standalone: true,
|
|
10554
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10555
|
-
imports: [CommonModule],
|
|
10556
|
-
}]
|
|
10557
|
-
}] });
|
|
10558
|
-
|
|
10559
|
-
var entityReferenceWidgetDesigner_component = /*#__PURE__*/Object.freeze({
|
|
10560
|
-
__proto__: null,
|
|
10561
|
-
AXPEntityReferenceWidgetDesignerComponent: AXPEntityReferenceWidgetDesignerComponent
|
|
10562
|
-
});
|
|
10563
|
-
|
|
10564
|
-
const AXPEntityReferenceWidget = {
|
|
10565
|
-
name: 'entity-reference',
|
|
10566
|
-
title: 'Entity Reference',
|
|
10567
|
-
description: '',
|
|
10568
|
-
type: 'view',
|
|
10569
|
-
categories: [],
|
|
10570
|
-
groups: [AXPWidgetGroupEnum.EntityWidget],
|
|
10571
|
-
icon: 'fa-solid fa-square',
|
|
10572
|
-
properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY],
|
|
10573
|
-
components: {
|
|
10574
|
-
view: {
|
|
10575
|
-
component: () => Promise.resolve().then(function () { return entityReferenceWidgetView_component; }).then((c) => c.AXPEntityReferenceWidgetViewComponent),
|
|
10576
|
-
},
|
|
10577
|
-
edit: {
|
|
10578
|
-
component: () => Promise.resolve().then(function () { return entityReferenceWidgetEdit_component; }).then((c) => c.AXPEntityReferenceWidgetEditComponent),
|
|
10579
|
-
},
|
|
10580
|
-
column: {
|
|
10581
|
-
component: () => Promise.resolve().then(function () { return entityReferenceWidgetColumn_component; }).then((c) => c.AXPEntityReferenceWidgetColumnComponent),
|
|
10582
|
-
},
|
|
10583
|
-
print: {
|
|
10584
|
-
component: () => Promise.resolve().then(function () { return entityReferenceWidgetPrint_component; }).then((c) => c.AXPEntityReferenceWidgetPrintComponent),
|
|
10585
|
-
},
|
|
10586
|
-
designer: {
|
|
10587
|
-
component: () => Promise.resolve().then(function () { return entityReferenceWidgetDesigner_component; }).then((c) => c.AXPEntityReferenceWidgetDesignerComponent),
|
|
10588
|
-
},
|
|
10589
|
-
},
|
|
10590
|
-
};
|
|
10591
|
-
|
|
10592
10814
|
class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
10593
10815
|
constructor() {
|
|
10594
10816
|
super(...arguments);
|
|
@@ -10717,7 +10939,7 @@ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
10717
10939
|
[node]="lookupNode()"
|
|
10718
10940
|
[mode]="'edit'"
|
|
10719
10941
|
></ng-container>
|
|
10720
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10942
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
10721
10943
|
}
|
|
10722
10944
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, decorators: [{
|
|
10723
10945
|
type: Component,
|
|
@@ -10769,7 +10991,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10769
10991
|
constructor() {
|
|
10770
10992
|
super(...arguments);
|
|
10771
10993
|
this.formatService = inject(AXFormatService);
|
|
10772
|
-
this.entityResolver = inject(
|
|
10994
|
+
this.entityResolver = inject(AXPEntityDefinitionRegistryService);
|
|
10773
10995
|
this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
10774
10996
|
this.multiple = computed(() => this.options()['multiple'], ...(ngDevMode ? [{ debugName: "multiple" }] : []));
|
|
10775
10997
|
this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
|
|
@@ -10787,7 +11009,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10787
11009
|
this.displayItems = signal([], ...(ngDevMode ? [{ debugName: "displayItems" }] : []));
|
|
10788
11010
|
this.efEntity = effect(async () => {
|
|
10789
11011
|
const [module, entity] = this.entity().split('.');
|
|
10790
|
-
this.entityDef.set(await this.entityResolver.
|
|
11012
|
+
this.entityDef.set(await this.entityResolver.resolve(module, entity));
|
|
10791
11013
|
}, ...(ngDevMode ? [{ debugName: "efEntity" }] : []));
|
|
10792
11014
|
this.efDisplay = effect(async () => {
|
|
10793
11015
|
const value = this.getValue();
|
|
@@ -10808,7 +11030,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10808
11030
|
};
|
|
10809
11031
|
}
|
|
10810
11032
|
const def = this.entityDef();
|
|
10811
|
-
const byKey = def?.queries
|
|
11033
|
+
const byKey = def?.queries?.byKey?.execute;
|
|
10812
11034
|
if (byKey) {
|
|
10813
11035
|
this.loading.set(true);
|
|
10814
11036
|
const fetchedItem = await byKey(item);
|
|
@@ -10824,6 +11046,9 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10824
11046
|
};
|
|
10825
11047
|
}
|
|
10826
11048
|
getDisplayText(item) {
|
|
11049
|
+
if (!item) {
|
|
11050
|
+
return '';
|
|
11051
|
+
}
|
|
10827
11052
|
const template = this.displayFormat();
|
|
10828
11053
|
if (template) {
|
|
10829
11054
|
const formatted = this.formatService.format(template, 'string', item);
|
|
@@ -10831,7 +11056,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10831
11056
|
return formatted;
|
|
10832
11057
|
}
|
|
10833
11058
|
}
|
|
10834
|
-
return
|
|
11059
|
+
return get(item, this.displayField()) ?? '';
|
|
10835
11060
|
}
|
|
10836
11061
|
get __class() {
|
|
10837
11062
|
const cls = {};
|
|
@@ -10949,6 +11174,7 @@ class AXPEntityDataSelectorService {
|
|
|
10949
11174
|
parentField: options.entity.parentKey,
|
|
10950
11175
|
filters: options.filters || undefined,
|
|
10951
11176
|
allowCreate: options.allowCreate ?? this.canCreate(options.entity),
|
|
11177
|
+
selectedItemIds: options.selectedItemIds,
|
|
10952
11178
|
// Note: Custom filters will be applied to the dataSource in createDataSource
|
|
10953
11179
|
};
|
|
10954
11180
|
}
|
|
@@ -10959,11 +11185,14 @@ class AXPEntityDataSelectorService {
|
|
|
10959
11185
|
const { entity, filters, parentFilters } = options;
|
|
10960
11186
|
return new AXDataSource({
|
|
10961
11187
|
byKey: (key) => {
|
|
10962
|
-
const func = entity.queries
|
|
10963
|
-
return func();
|
|
11188
|
+
const func = entity.queries?.byKey?.execute;
|
|
11189
|
+
return func(key);
|
|
10964
11190
|
},
|
|
10965
11191
|
load: (e) => {
|
|
10966
|
-
const func = entity.queries
|
|
11192
|
+
const func = entity.queries?.list?.execute;
|
|
11193
|
+
if (!func || typeof func !== 'function') {
|
|
11194
|
+
throw new Error(`Entity ${entity.name} does not have a list query`);
|
|
11195
|
+
}
|
|
10967
11196
|
this.mergeFilters(e, filters, parentFilters);
|
|
10968
11197
|
return func(e);
|
|
10969
11198
|
},
|
|
@@ -11097,7 +11326,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11097
11326
|
constructor() {
|
|
11098
11327
|
super(...arguments);
|
|
11099
11328
|
this.injector = inject(Injector);
|
|
11100
|
-
this.entityResolver = inject(
|
|
11329
|
+
this.entityResolver = inject(AXPEntityDefinitionRegistryService);
|
|
11101
11330
|
this.formatService = inject(AXFormatService);
|
|
11102
11331
|
this.popupService = inject(AXPopupService);
|
|
11103
11332
|
this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
|
|
@@ -11116,7 +11345,13 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11116
11345
|
this.look = computed(() => this.options()['look'] ?? 'lookup', ...(ngDevMode ? [{ debugName: "look" }] : []));
|
|
11117
11346
|
this.allowClear = computed(() => (this.options()['allowClear'] ?? false), ...(ngDevMode ? [{ debugName: "allowClear" }] : []));
|
|
11118
11347
|
this.defaultTextField = computed(() => {
|
|
11119
|
-
const
|
|
11348
|
+
const list = [
|
|
11349
|
+
'title',
|
|
11350
|
+
'name',
|
|
11351
|
+
'code',
|
|
11352
|
+
'description',
|
|
11353
|
+
];
|
|
11354
|
+
const textField = list.find((c) => this.entityDef()?.properties.find((p) => p.name == c)) ?? 'title';
|
|
11120
11355
|
return textField;
|
|
11121
11356
|
}, ...(ngDevMode ? [{ debugName: "defaultTextField" }] : []));
|
|
11122
11357
|
this.displayField = computed(() => {
|
|
@@ -11136,18 +11371,44 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11136
11371
|
return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
|
|
11137
11372
|
}, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
|
|
11138
11373
|
this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : []));
|
|
11374
|
+
/**
|
|
11375
|
+
* Get default sort order from entity's first list view
|
|
11376
|
+
*/
|
|
11377
|
+
this.defaultSorts = computed(() => {
|
|
11378
|
+
const entity = this.entityDef();
|
|
11379
|
+
if (!entity)
|
|
11380
|
+
return [];
|
|
11381
|
+
// Get the first view from the list views (usually the "all" view)
|
|
11382
|
+
const firstView = entity.interfaces?.master?.list?.views?.[0];
|
|
11383
|
+
if (!firstView?.sorts || firstView.sorts.length === 0) {
|
|
11384
|
+
return [];
|
|
11385
|
+
}
|
|
11386
|
+
// Convert AXPQuerySort[] (with 'name') to AXDataSourceSortOption[] (with 'field')
|
|
11387
|
+
return firstView.sorts.map((sort) => ({
|
|
11388
|
+
field: sort.name,
|
|
11389
|
+
dir: sort.dir,
|
|
11390
|
+
}));
|
|
11391
|
+
}, ...(ngDevMode ? [{ debugName: "defaultSorts" }] : []));
|
|
11139
11392
|
this.dataSource = computed(() => {
|
|
11140
11393
|
const entity = this.entityDef();
|
|
11141
11394
|
if (!entity)
|
|
11142
11395
|
return null;
|
|
11396
|
+
const defaultSorts = this.defaultSorts();
|
|
11143
11397
|
return new AXDataSource({
|
|
11144
11398
|
byKey: (key) => {
|
|
11145
|
-
const func = entity.queries
|
|
11399
|
+
const func = entity.queries?.byKey?.execute;
|
|
11146
11400
|
return func();
|
|
11147
11401
|
},
|
|
11148
11402
|
load: (e) => {
|
|
11149
|
-
const func = entity.queries
|
|
11403
|
+
const func = entity.queries?.list?.execute;
|
|
11404
|
+
if (!func || typeof func !== 'function') {
|
|
11405
|
+
throw new Error(`Entity ${entity.name} does not have a list query`);
|
|
11406
|
+
}
|
|
11150
11407
|
this.mergeFilter(e, this.customFilter());
|
|
11408
|
+
// Apply default sort order if no sort is already specified
|
|
11409
|
+
if (defaultSorts.length > 0 && (!e.sort || e.sort.length === 0)) {
|
|
11410
|
+
e.sort = defaultSorts;
|
|
11411
|
+
}
|
|
11151
11412
|
return func(e);
|
|
11152
11413
|
},
|
|
11153
11414
|
pageSize: 10,
|
|
@@ -11155,7 +11416,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11155
11416
|
});
|
|
11156
11417
|
}, ...(ngDevMode ? [{ debugName: "dataSource" }] : []));
|
|
11157
11418
|
this.searchTerm = signal(null, ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
|
|
11158
|
-
|
|
11419
|
+
// protected searchPlaceholderText = signal<string>('');
|
|
11159
11420
|
this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
|
|
11160
11421
|
this.textbox = viewChild(AXTagBoxComponent, ...(ngDevMode ? [{ debugName: "textbox" }] : []));
|
|
11161
11422
|
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
@@ -11163,7 +11424,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11163
11424
|
this.placeholderUpdateToken = 0;
|
|
11164
11425
|
this.#efEntity = effect(async () => {
|
|
11165
11426
|
const [module, entity] = this.entity().split('.');
|
|
11166
|
-
this.entityDef.set(await this.entityResolver.
|
|
11427
|
+
this.entityDef.set(await this.entityResolver.resolve(module, entity));
|
|
11167
11428
|
}, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
|
|
11168
11429
|
this.#efValue = effect(() => {
|
|
11169
11430
|
if (this.getValue()) {
|
|
@@ -11173,32 +11434,6 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11173
11434
|
this.clear();
|
|
11174
11435
|
}
|
|
11175
11436
|
}, ...(ngDevMode ? [{ debugName: "#efValue" }] : []));
|
|
11176
|
-
this.#efSearchPlaceholder = effect(() => {
|
|
11177
|
-
const entity = this.entityDef();
|
|
11178
|
-
if (!entity) {
|
|
11179
|
-
this.searchPlaceholderText.set('');
|
|
11180
|
-
return;
|
|
11181
|
-
}
|
|
11182
|
-
let inlineFields = entity.properties
|
|
11183
|
-
.filter((property) => property.options?.filter?.inline?.enabled)
|
|
11184
|
-
.map((property) => ({
|
|
11185
|
-
title: property.title,
|
|
11186
|
-
name: property.name,
|
|
11187
|
-
})) ?? [];
|
|
11188
|
-
if (!inlineFields.length) {
|
|
11189
|
-
const displayFieldName = this.displayField();
|
|
11190
|
-
const displayProperty = entity.properties.find((property) => property.name === displayFieldName);
|
|
11191
|
-
if (displayProperty) {
|
|
11192
|
-
inlineFields = [
|
|
11193
|
-
{
|
|
11194
|
-
title: displayProperty.title,
|
|
11195
|
-
name: displayProperty.name,
|
|
11196
|
-
},
|
|
11197
|
-
];
|
|
11198
|
-
}
|
|
11199
|
-
}
|
|
11200
|
-
void this.updateSearchPlaceholder(inlineFields);
|
|
11201
|
-
}, ...(ngDevMode ? [{ debugName: "#efSearchPlaceholder" }] : []));
|
|
11202
11437
|
//#region ---- Focus Management ----
|
|
11203
11438
|
/**
|
|
11204
11439
|
* Reactive effect to auto-focus when viewChild is ready
|
|
@@ -11242,21 +11477,31 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11242
11477
|
}
|
|
11243
11478
|
#efEntity;
|
|
11244
11479
|
#efValue;
|
|
11245
|
-
#efSearchPlaceholder;
|
|
11246
11480
|
async findByValue() {
|
|
11247
11481
|
this.isLoading.set(true);
|
|
11248
11482
|
const rawValue = this.getValue();
|
|
11249
|
-
|
|
11250
|
-
const
|
|
11483
|
+
// When multiple is true, ensure we always work with arrays
|
|
11484
|
+
const values = this.multiple() ? castArray(rawValue) : [rawValue].filter(v => v != null);
|
|
11485
|
+
const byKey = this.entityDef()?.queries?.byKey?.execute;
|
|
11251
11486
|
if (byKey && values.length) {
|
|
11252
11487
|
if (this.multiple()) {
|
|
11253
|
-
const items = await Promise.all(values
|
|
11254
|
-
|
|
11488
|
+
const items = await Promise.all(values
|
|
11489
|
+
.map((value) => extractValue(value, this.valueField()))
|
|
11490
|
+
.filter(id => id != null)
|
|
11491
|
+
.map((id) => byKey(id)));
|
|
11492
|
+
// Filter out null/undefined results
|
|
11493
|
+
const validItems = items.filter(item => item != null);
|
|
11494
|
+
this.setItems(validItems);
|
|
11255
11495
|
}
|
|
11256
11496
|
else {
|
|
11257
11497
|
const id = extractValue(values[0], this.valueField());
|
|
11258
|
-
|
|
11259
|
-
|
|
11498
|
+
if (id != null) {
|
|
11499
|
+
const item = await byKey(id);
|
|
11500
|
+
this.setItems(item != null ? [item] : []);
|
|
11501
|
+
}
|
|
11502
|
+
else {
|
|
11503
|
+
this.setItems([]);
|
|
11504
|
+
}
|
|
11260
11505
|
}
|
|
11261
11506
|
}
|
|
11262
11507
|
else {
|
|
@@ -11271,6 +11516,10 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11271
11516
|
this.isOpen.set(true);
|
|
11272
11517
|
const inlineSearchValue = (this.searchTerm() ?? '').trim();
|
|
11273
11518
|
const initialSearchTerm = inlineSearchValue.length > 0 ? inlineSearchValue : undefined;
|
|
11519
|
+
// Extract current selected item IDs to pre-select them in the data selector
|
|
11520
|
+
const selectedItemIds = this.selectedItems()
|
|
11521
|
+
.map((item) => get(item, this.valueField()))
|
|
11522
|
+
.filter((id) => id != null);
|
|
11274
11523
|
try {
|
|
11275
11524
|
const result = await this.entityDataSelectorService.open({
|
|
11276
11525
|
entity: this.entityDef(),
|
|
@@ -11281,9 +11530,23 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11281
11530
|
columns: this.columns(),
|
|
11282
11531
|
allowCreate: true,
|
|
11283
11532
|
initialSearchTerm,
|
|
11533
|
+
selectedItemIds: selectedItemIds.length > 0 ? selectedItemIds : undefined,
|
|
11284
11534
|
});
|
|
11285
11535
|
if (result && 'items' in result) {
|
|
11286
|
-
|
|
11536
|
+
// If selectedItemIds was provided, the selector returns the final selection
|
|
11537
|
+
// (all currently selected items, including kept initial items and newly added items)
|
|
11538
|
+
// In this case, we should REPLACE the selection (not merge)
|
|
11539
|
+
// Otherwise, if no selectedItemIds, merge with existing items when multiple is true
|
|
11540
|
+
const hadInitialSelection = selectedItemIds && selectedItemIds.length > 0;
|
|
11541
|
+
if (hadInitialSelection) {
|
|
11542
|
+
// Replace the selection with the final selection from the selector
|
|
11543
|
+
this.setItems(result.items, false); // false = replace, not merge
|
|
11544
|
+
}
|
|
11545
|
+
else {
|
|
11546
|
+
// No initial selection, normal merge behavior
|
|
11547
|
+
const shouldMerge = this.multiple() && this.selectedItems().length > 0;
|
|
11548
|
+
this.setItems(result.items, shouldMerge);
|
|
11549
|
+
}
|
|
11287
11550
|
}
|
|
11288
11551
|
}
|
|
11289
11552
|
catch (error) {
|
|
@@ -11328,7 +11591,9 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11328
11591
|
this.isLoading.set(true);
|
|
11329
11592
|
const result = await this.searchByValue(value);
|
|
11330
11593
|
if (result?.total == 1) {
|
|
11331
|
-
|
|
11594
|
+
// When multiple is true, merge with existing items
|
|
11595
|
+
const shouldMerge = this.multiple() && this.selectedItems().length > 0;
|
|
11596
|
+
this.setItems(result.items[0], shouldMerge);
|
|
11332
11597
|
}
|
|
11333
11598
|
else {
|
|
11334
11599
|
this.showSelector();
|
|
@@ -11339,13 +11604,27 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11339
11604
|
this.showSelector();
|
|
11340
11605
|
}
|
|
11341
11606
|
}
|
|
11342
|
-
setItems(items) {
|
|
11343
|
-
|
|
11344
|
-
|
|
11607
|
+
setItems(items, mergeWithExisting = false) {
|
|
11608
|
+
// Ensure items is always an array
|
|
11609
|
+
items = castArray(items);
|
|
11610
|
+
// Filter out null/undefined items
|
|
11611
|
+
items = items.filter(item => item != null);
|
|
11612
|
+
if (items.length == 0) {
|
|
11613
|
+
if (!mergeWithExisting) {
|
|
11614
|
+
this.selectedItems.set([]);
|
|
11615
|
+
}
|
|
11345
11616
|
return;
|
|
11346
11617
|
}
|
|
11347
|
-
//
|
|
11348
|
-
|
|
11618
|
+
// If merging and multiple is enabled, combine with existing items
|
|
11619
|
+
if (mergeWithExisting && this.multiple()) {
|
|
11620
|
+
const existingItems = this.selectedItems();
|
|
11621
|
+
const existingKeys = new Set(existingItems.map((item) => get(item, this.valueField())));
|
|
11622
|
+
const newItems = items.filter((item) => {
|
|
11623
|
+
const key = get(item, this.valueField());
|
|
11624
|
+
return !existingKeys.has(key);
|
|
11625
|
+
});
|
|
11626
|
+
items = [...existingItems, ...newItems];
|
|
11627
|
+
}
|
|
11349
11628
|
this.clearInput();
|
|
11350
11629
|
this.selectedItems.set(items);
|
|
11351
11630
|
//
|
|
@@ -11407,39 +11686,6 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11407
11686
|
}
|
|
11408
11687
|
return get(item, this.displayField()) ?? '';
|
|
11409
11688
|
}
|
|
11410
|
-
async updateSearchPlaceholder(fields) {
|
|
11411
|
-
const updateToken = ++this.placeholderUpdateToken;
|
|
11412
|
-
if (!fields || fields.length === 0) {
|
|
11413
|
-
const fallback = await this.translateService.translateAsync('@general:actions.search.title');
|
|
11414
|
-
if (updateToken !== this.placeholderUpdateToken) {
|
|
11415
|
-
return;
|
|
11416
|
-
}
|
|
11417
|
-
this.searchPlaceholderText.set(fallback ? `${fallback}...` : '');
|
|
11418
|
-
return;
|
|
11419
|
-
}
|
|
11420
|
-
const translatedFields = await Promise.all(fields.map(async (field) => {
|
|
11421
|
-
const translated = await this.translateService.translateAsync(field.title || field.name);
|
|
11422
|
-
return translated ?? field.title ?? field.name;
|
|
11423
|
-
}));
|
|
11424
|
-
const translatedText = translatedFields
|
|
11425
|
-
.filter((value) => Boolean(value && value.trim().length > 0))
|
|
11426
|
-
.join(', ');
|
|
11427
|
-
const fallbackText = fields
|
|
11428
|
-
.map((field) => field.title || field.name)
|
|
11429
|
-
.filter((value) => Boolean(value && value.trim().length > 0))
|
|
11430
|
-
.join(', ');
|
|
11431
|
-
let fieldsText = translatedText || fallbackText;
|
|
11432
|
-
if (!fieldsText) {
|
|
11433
|
-
fieldsText = (await this.translateService.translateAsync('@general:terms.items')) ?? 'items';
|
|
11434
|
-
}
|
|
11435
|
-
const placeholder = await this.translateService.translateAsync('@general:widgets.lookup.search-placeholder', {
|
|
11436
|
-
params: { fields: fieldsText },
|
|
11437
|
-
});
|
|
11438
|
-
if (updateToken !== this.placeholderUpdateToken) {
|
|
11439
|
-
return;
|
|
11440
|
-
}
|
|
11441
|
-
this.searchPlaceholderText.set(placeholder ?? `Search in ${fieldsText}...`);
|
|
11442
|
-
}
|
|
11443
11689
|
async searchByValue(value) {
|
|
11444
11690
|
if (!this.entityDef())
|
|
11445
11691
|
return null;
|
|
@@ -11460,7 +11706,10 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11460
11706
|
});
|
|
11461
11707
|
});
|
|
11462
11708
|
}
|
|
11463
|
-
const func = entity.queries
|
|
11709
|
+
const func = entity.queries?.list?.execute;
|
|
11710
|
+
if (!func || typeof func !== 'function') {
|
|
11711
|
+
throw new Error(`Entity ${entity.name} does not have a list query`);
|
|
11712
|
+
}
|
|
11464
11713
|
return await func({ filter: inlineFilters, take: 10 });
|
|
11465
11714
|
}
|
|
11466
11715
|
mergeFilter(request, filter) {
|
|
@@ -11499,6 +11748,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11499
11748
|
@if (look() == 'select') {
|
|
11500
11749
|
<ax-select-box
|
|
11501
11750
|
#selectBox
|
|
11751
|
+
[placeholder]="('@general:widgets.lookup.placeholder' | translate | async)!"
|
|
11502
11752
|
[dataSource]="dataSource()!"
|
|
11503
11753
|
[ngModel]="selectedItems()"
|
|
11504
11754
|
[textField]="displayField()"
|
|
@@ -11511,7 +11761,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11511
11761
|
<ax-clear-button></ax-clear-button>
|
|
11512
11762
|
}
|
|
11513
11763
|
<ax-search-box
|
|
11514
|
-
[placeholder]="
|
|
11764
|
+
[placeholder]="('@general:widgets.lookup.search.placeholder' | translate | async)!"
|
|
11515
11765
|
(onValueChanged)="handleSearchInputChange($event)"
|
|
11516
11766
|
>
|
|
11517
11767
|
<ax-clear-button></ax-clear-button>
|
|
@@ -11535,7 +11785,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11535
11785
|
[textField]="displayField()"
|
|
11536
11786
|
[valueField]="valueField()"
|
|
11537
11787
|
(onValueChanged)="handleValueChange($event)"
|
|
11538
|
-
[placeholder]="selectedItems().length ? '' :
|
|
11788
|
+
[placeholder]="selectedItems().length ? '' : ('@general:widgets.lookup.placeholder' | translate | async)!"
|
|
11539
11789
|
[addOnEnter]="false"
|
|
11540
11790
|
[addOnComma]="false"
|
|
11541
11791
|
[disabled]="disabled()"
|
|
@@ -11580,7 +11830,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11580
11830
|
}
|
|
11581
11831
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type:
|
|
11582
11832
|
//
|
|
11583
|
-
AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$2.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i6$1.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues", "tagTemplate"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onTagClick", "onTagDblClick", "onTagContextMenu"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i7.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "component", type: AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11833
|
+
AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$2.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i6$1.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues", "tagTemplate"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onTagClick", "onTagDblClick", "onTagContextMenu"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i7.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "component", type: AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11584
11834
|
}
|
|
11585
11835
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
|
|
11586
11836
|
type: Component,
|
|
@@ -11591,6 +11841,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
11591
11841
|
@if (look() == 'select') {
|
|
11592
11842
|
<ax-select-box
|
|
11593
11843
|
#selectBox
|
|
11844
|
+
[placeholder]="('@general:widgets.lookup.placeholder' | translate | async)!"
|
|
11594
11845
|
[dataSource]="dataSource()!"
|
|
11595
11846
|
[ngModel]="selectedItems()"
|
|
11596
11847
|
[textField]="displayField()"
|
|
@@ -11603,7 +11854,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
11603
11854
|
<ax-clear-button></ax-clear-button>
|
|
11604
11855
|
}
|
|
11605
11856
|
<ax-search-box
|
|
11606
|
-
[placeholder]="
|
|
11857
|
+
[placeholder]="('@general:widgets.lookup.search.placeholder' | translate | async)!"
|
|
11607
11858
|
(onValueChanged)="handleSearchInputChange($event)"
|
|
11608
11859
|
>
|
|
11609
11860
|
<ax-clear-button></ax-clear-button>
|
|
@@ -11627,7 +11878,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
11627
11878
|
[textField]="displayField()"
|
|
11628
11879
|
[valueField]="valueField()"
|
|
11629
11880
|
(onValueChanged)="handleValueChange($event)"
|
|
11630
|
-
[placeholder]="selectedItems().length ? '' :
|
|
11881
|
+
[placeholder]="selectedItems().length ? '' : ('@general:widgets.lookup.placeholder' | translate | async)!"
|
|
11631
11882
|
[addOnEnter]="false"
|
|
11632
11883
|
[addOnComma]="false"
|
|
11633
11884
|
[disabled]="disabled()"
|
|
@@ -11716,6 +11967,9 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
11716
11967
|
const template = this.options['displayFormat'];
|
|
11717
11968
|
return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
|
|
11718
11969
|
}, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
|
|
11970
|
+
this.displayField = computed(() => {
|
|
11971
|
+
return this.textField ?? 'title';
|
|
11972
|
+
}, ...(ngDevMode ? [{ debugName: "displayField" }] : []));
|
|
11719
11973
|
//#endregion
|
|
11720
11974
|
//#region ---- Signals ----
|
|
11721
11975
|
this.isMorePopoverOpen = signal(false, ...(ngDevMode ? [{ debugName: "isMorePopoverOpen" }] : []));
|
|
@@ -11805,7 +12059,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
11805
12059
|
return formatted;
|
|
11806
12060
|
}
|
|
11807
12061
|
}
|
|
11808
|
-
return item
|
|
12062
|
+
return get(item, this.displayField()) ?? '';
|
|
11809
12063
|
}
|
|
11810
12064
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
11811
12065
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, viewQueries: [{ propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-gap-1 ax-items-center\">\n @if (visibleItems().length > 0) {\n @for (item of visibleItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"handleItemClick($index)\">\n {{ getDisplayText(item) }}\n </span>\n @if ($index < visibleItems().length - 1) { <span class=\"ax-text-muted\">\u2022</span>\n }\n }\n } @else {\n <span class=\"ax-text-muted\">---</span>\n }\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3\">\n @for (item of allItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"showItemDetail(item, $index)\">\n {{ getDisplayText(item) }}\n </span>\n }\n </div>\n </div>\n</ax-popover>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
@@ -11892,153 +12146,6 @@ const AXPLookupWidget = {
|
|
|
11892
12146
|
},
|
|
11893
12147
|
};
|
|
11894
12148
|
|
|
11895
|
-
class AXPWidgetSelectorWidgetEditComponent extends AXPValueWidgetComponent {
|
|
11896
|
-
constructor() {
|
|
11897
|
-
super(...arguments);
|
|
11898
|
-
this.popupService = inject(AXPopupService);
|
|
11899
|
-
this.widgetRegisteryService = inject(AXPWidgetRegistryService);
|
|
11900
|
-
this.searchTerm = signal(null, ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
|
|
11901
|
-
this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
11902
|
-
this.textField = signal('', ...(ngDevMode ? [{ debugName: "textField" }] : []));
|
|
11903
|
-
this.displayText = computed(() => this.getValue()?.title || '', ...(ngDevMode ? [{ debugName: "displayText" }] : []));
|
|
11904
|
-
this.selectedWidgetNode = signal(null, ...(ngDevMode ? [{ debugName: "selectedWidgetNode" }] : []));
|
|
11905
|
-
this.selectedItem = signal(null, ...(ngDevMode ? [{ debugName: "selectedItem" }] : []));
|
|
11906
|
-
this.placeholder = computed(() => this.options()['placeholder'] ?? '', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
11907
|
-
this.loading = computed(() => this.options()['loading'] ?? false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
11908
|
-
}
|
|
11909
|
-
ngAfterViewInit() {
|
|
11910
|
-
if (this.getValue()) {
|
|
11911
|
-
this.selectedWidgetNode.set(this.getValue());
|
|
11912
|
-
}
|
|
11913
|
-
}
|
|
11914
|
-
async showSelector() {
|
|
11915
|
-
const com = await import('@acorex/platform/layout/designer').then((c) => c.AXPDesignerWidgetPickerComponent);
|
|
11916
|
-
const result = await this.popupService.open(com, {
|
|
11917
|
-
title: 'Widget Gallery',
|
|
11918
|
-
size: 'md',
|
|
11919
|
-
closeButton: true,
|
|
11920
|
-
data: {
|
|
11921
|
-
widgets: sortBy(this.widgetRegisteryService.all(), (c) => c.title),
|
|
11922
|
-
},
|
|
11923
|
-
});
|
|
11924
|
-
if ((result.data?.widgets ?? []).length) {
|
|
11925
|
-
const selected = result.data?.widgets;
|
|
11926
|
-
const selectedNode = this.convertWidgetConfigToNode(selected[0]);
|
|
11927
|
-
this.selectedWidgetNode.set(selectedNode);
|
|
11928
|
-
}
|
|
11929
|
-
}
|
|
11930
|
-
convertWidgetConfigToNode(config) {
|
|
11931
|
-
return {
|
|
11932
|
-
type: config.name,
|
|
11933
|
-
};
|
|
11934
|
-
}
|
|
11935
|
-
handleChangeWidget(e) {
|
|
11936
|
-
const widget = this.widgetRegisteryService.resolve(e.values.type);
|
|
11937
|
-
this.setValue({ title: widget?.title, ...e.values });
|
|
11938
|
-
}
|
|
11939
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
11940
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPWidgetSelectorWidgetEditComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
|
|
11941
|
-
<ax-text-box [ngModel]="displayText()" [placeholder]="placeholder()" [readonly]="true">
|
|
11942
|
-
@for (validation of validationRules(); track $index) {
|
|
11943
|
-
<ax-validation-rule
|
|
11944
|
-
[rule]="validation.rule"
|
|
11945
|
-
[message]="validation.options?.message"
|
|
11946
|
-
[options]="validation.options"
|
|
11947
|
-
></ax-validation-rule>
|
|
11948
|
-
}
|
|
11949
|
-
<ax-suffix>
|
|
11950
|
-
<ax-button color="ghost" look="twotone" (onClick)="showSelector()">
|
|
11951
|
-
<ax-icon icon="far fa-search"> </ax-icon>
|
|
11952
|
-
</ax-button>
|
|
11953
|
-
</ax-suffix>
|
|
11954
|
-
</ax-text-box>
|
|
11955
|
-
@if(selectedWidgetNode()){
|
|
11956
|
-
<axp-widget-property-viewer [widget]="selectedWidgetNode()!" (onChanged)="handleChangeWidget($event)">
|
|
11957
|
-
</axp-widget-property-viewer>
|
|
11958
|
-
}
|
|
11959
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2$3.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$2.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget", "mode"], outputs: ["onChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
11960
|
-
}
|
|
11961
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, decorators: [{
|
|
11962
|
-
type: Component,
|
|
11963
|
-
args: [{
|
|
11964
|
-
template: `
|
|
11965
|
-
<ax-text-box [ngModel]="displayText()" [placeholder]="placeholder()" [readonly]="true">
|
|
11966
|
-
@for (validation of validationRules(); track $index) {
|
|
11967
|
-
<ax-validation-rule
|
|
11968
|
-
[rule]="validation.rule"
|
|
11969
|
-
[message]="validation.options?.message"
|
|
11970
|
-
[options]="validation.options"
|
|
11971
|
-
></ax-validation-rule>
|
|
11972
|
-
}
|
|
11973
|
-
<ax-suffix>
|
|
11974
|
-
<ax-button color="ghost" look="twotone" (onClick)="showSelector()">
|
|
11975
|
-
<ax-icon icon="far fa-search"> </ax-icon>
|
|
11976
|
-
</ax-button>
|
|
11977
|
-
</ax-suffix>
|
|
11978
|
-
</ax-text-box>
|
|
11979
|
-
@if(selectedWidgetNode()){
|
|
11980
|
-
<axp-widget-property-viewer [widget]="selectedWidgetNode()!" (onChanged)="handleChangeWidget($event)">
|
|
11981
|
-
</axp-widget-property-viewer>
|
|
11982
|
-
}
|
|
11983
|
-
`,
|
|
11984
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11985
|
-
imports: [
|
|
11986
|
-
FormsModule,
|
|
11987
|
-
AXSelectBoxModule,
|
|
11988
|
-
AXTextBoxModule,
|
|
11989
|
-
AXButtonModule,
|
|
11990
|
-
AXDecoratorModule,
|
|
11991
|
-
AXLoadingModule,
|
|
11992
|
-
AXValidationModule,
|
|
11993
|
-
AXFormModule,
|
|
11994
|
-
AXPWidgetPropertyViewerComponent
|
|
11995
|
-
]
|
|
11996
|
-
}]
|
|
11997
|
-
}], propDecorators: { textbox: [{
|
|
11998
|
-
type: ViewChild,
|
|
11999
|
-
args: [AXTextBoxComponent]
|
|
12000
|
-
}] } });
|
|
12001
|
-
|
|
12002
|
-
var widgetSelectorWidgetEdit_component = /*#__PURE__*/Object.freeze({
|
|
12003
|
-
__proto__: null,
|
|
12004
|
-
AXPWidgetSelectorWidgetEditComponent: AXPWidgetSelectorWidgetEditComponent
|
|
12005
|
-
});
|
|
12006
|
-
|
|
12007
|
-
class AXPWidgetSelectorWidgetViewComponent extends AXPValueWidgetComponent {
|
|
12008
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
12009
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPWidgetSelectorWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `{{ getValue()?.title }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12010
|
-
}
|
|
12011
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, decorators: [{
|
|
12012
|
-
type: Component,
|
|
12013
|
-
args: [{
|
|
12014
|
-
template: `{{ getValue()?.title }}`,
|
|
12015
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12016
|
-
imports: []
|
|
12017
|
-
}]
|
|
12018
|
-
}] });
|
|
12019
|
-
|
|
12020
|
-
var widgetSelectorWidgetView_component = /*#__PURE__*/Object.freeze({
|
|
12021
|
-
__proto__: null,
|
|
12022
|
-
AXPWidgetSelectorWidgetViewComponent: AXPWidgetSelectorWidgetViewComponent
|
|
12023
|
-
});
|
|
12024
|
-
|
|
12025
|
-
const AXPWidgetSelectorWidget = {
|
|
12026
|
-
name: 'widget-selector',
|
|
12027
|
-
title: 'Widget Selector',
|
|
12028
|
-
categories: AXP_WIDGETS_EDITOR_CATEGORY,
|
|
12029
|
-
type: 'editor',
|
|
12030
|
-
icon: 'fa-light fa-square',
|
|
12031
|
-
properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
|
|
12032
|
-
components: {
|
|
12033
|
-
view: {
|
|
12034
|
-
component: () => Promise.resolve().then(function () { return widgetSelectorWidgetView_component; }).then((c) => c.AXPWidgetSelectorWidgetViewComponent),
|
|
12035
|
-
},
|
|
12036
|
-
edit: {
|
|
12037
|
-
component: () => Promise.resolve().then(function () { return widgetSelectorWidgetEdit_component; }).then((c) => c.AXPWidgetSelectorWidgetEditComponent),
|
|
12038
|
-
},
|
|
12039
|
-
},
|
|
12040
|
-
};
|
|
12041
|
-
|
|
12042
12149
|
const AXPEntityCreateEvent = createWorkFlowEvent('[Entity] Created!');
|
|
12043
12150
|
class AXPEntityCreatePopupAction extends AXPWorkflowAction {
|
|
12044
12151
|
constructor() {
|
|
@@ -12463,20 +12570,8 @@ function routesFacory() {
|
|
|
12463
12570
|
return routes;
|
|
12464
12571
|
}
|
|
12465
12572
|
class AXPEntityModule {
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
appInitService.registerTask({
|
|
12469
|
-
name: 'layout-theme',
|
|
12470
|
-
statusText: 'Preload entities ...',
|
|
12471
|
-
priority: 100,
|
|
12472
|
-
run: async () => {
|
|
12473
|
-
// load in background
|
|
12474
|
-
service.preload();
|
|
12475
|
-
},
|
|
12476
|
-
});
|
|
12477
|
-
}
|
|
12478
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, deps: [{ token: i1$1.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
12479
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i2$4.AXPWorkflowModule, i3$1.AXPWidgetCoreModule] }); }
|
|
12573
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
12574
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i1$1.AXPWorkflowModule, i3$1.AXPWidgetCoreModule] }); }
|
|
12480
12575
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, providers: [
|
|
12481
12576
|
{
|
|
12482
12577
|
provide: ROUTES,
|
|
@@ -12500,6 +12595,11 @@ class AXPEntityModule {
|
|
|
12500
12595
|
useValue: columnWidthMiddlewareProvider,
|
|
12501
12596
|
multi: true,
|
|
12502
12597
|
},
|
|
12598
|
+
{
|
|
12599
|
+
provide: AXP_ENTITY_MODIFIER,
|
|
12600
|
+
useValue: AXPCrudModifier,
|
|
12601
|
+
multi: true,
|
|
12602
|
+
},
|
|
12503
12603
|
// {
|
|
12504
12604
|
// provide: AXP_ENTITY_MODIFIER,
|
|
12505
12605
|
// useValue: layoutOrderingMiddlewareProvider,
|
|
@@ -12558,14 +12658,7 @@ class AXPEntityModule {
|
|
|
12558
12658
|
functions: {},
|
|
12559
12659
|
}),
|
|
12560
12660
|
AXPWidgetCoreModule.forChild({
|
|
12561
|
-
widgets: [
|
|
12562
|
-
AXPLookupWidget,
|
|
12563
|
-
AXPLookupFilterWidget,
|
|
12564
|
-
AXPWidgetSelectorWidget,
|
|
12565
|
-
AXPEntityListWidget,
|
|
12566
|
-
AXPEntityReferenceWidget,
|
|
12567
|
-
AXPEntityCategoryWidget,
|
|
12568
|
-
],
|
|
12661
|
+
widgets: [AXPLookupWidget, AXPLookupFilterWidget, AXPEntityListWidget, AXPEntityCategoryWidget],
|
|
12569
12662
|
})] }); }
|
|
12570
12663
|
}
|
|
12571
12664
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, decorators: [{
|
|
@@ -12601,14 +12694,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
12601
12694
|
functions: {},
|
|
12602
12695
|
}),
|
|
12603
12696
|
AXPWidgetCoreModule.forChild({
|
|
12604
|
-
widgets: [
|
|
12605
|
-
AXPLookupWidget,
|
|
12606
|
-
AXPLookupFilterWidget,
|
|
12607
|
-
AXPWidgetSelectorWidget,
|
|
12608
|
-
AXPEntityListWidget,
|
|
12609
|
-
AXPEntityReferenceWidget,
|
|
12610
|
-
AXPEntityCategoryWidget,
|
|
12611
|
-
],
|
|
12697
|
+
widgets: [AXPLookupWidget, AXPLookupFilterWidget, AXPEntityListWidget, AXPEntityCategoryWidget],
|
|
12612
12698
|
}),
|
|
12613
12699
|
],
|
|
12614
12700
|
exports: [],
|
|
@@ -12636,6 +12722,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
12636
12722
|
useValue: columnWidthMiddlewareProvider,
|
|
12637
12723
|
multi: true,
|
|
12638
12724
|
},
|
|
12725
|
+
{
|
|
12726
|
+
provide: AXP_ENTITY_MODIFIER,
|
|
12727
|
+
useValue: AXPCrudModifier,
|
|
12728
|
+
multi: true,
|
|
12729
|
+
},
|
|
12639
12730
|
// {
|
|
12640
12731
|
// provide: AXP_ENTITY_MODIFIER,
|
|
12641
12732
|
// useValue: layoutOrderingMiddlewareProvider,
|
|
@@ -12667,7 +12758,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
12667
12758
|
]),
|
|
12668
12759
|
],
|
|
12669
12760
|
}]
|
|
12670
|
-
}]
|
|
12761
|
+
}] });
|
|
12671
12762
|
|
|
12672
12763
|
//#endregion
|
|
12673
12764
|
//#region ---- Get Entity Details Query ----
|
|
@@ -12890,8 +12981,25 @@ function entityOverrideDetailsViewAction() {
|
|
|
12890
12981
|
scope: AXPEntityCommandScope.Individual,
|
|
12891
12982
|
};
|
|
12892
12983
|
}
|
|
12893
|
-
function entityDetailsCrudActions(parentId) {
|
|
12894
|
-
|
|
12984
|
+
function entityDetailsCrudActions(parentId, options) {
|
|
12985
|
+
const opts = {
|
|
12986
|
+
create: true,
|
|
12987
|
+
delete: true,
|
|
12988
|
+
view: true,
|
|
12989
|
+
edit: true,
|
|
12990
|
+
...options,
|
|
12991
|
+
};
|
|
12992
|
+
const actions = [];
|
|
12993
|
+
if (opts.create) {
|
|
12994
|
+
actions.push(entityDetailsCreateActions(parentId));
|
|
12995
|
+
}
|
|
12996
|
+
if (opts.edit) {
|
|
12997
|
+
actions.push(entityDetailsEditAction());
|
|
12998
|
+
}
|
|
12999
|
+
if (opts.view) {
|
|
13000
|
+
actions.push(entityOverrideDetailsViewAction());
|
|
13001
|
+
}
|
|
13002
|
+
return actions;
|
|
12895
13003
|
}
|
|
12896
13004
|
function entityDetailsReferenceCreateActions(type) {
|
|
12897
13005
|
return [
|
|
@@ -12957,5 +13065,5 @@ function detectEntityChanges(oldObj, newObj) {
|
|
|
12957
13065
|
* Generated bundle index. Do not edit.
|
|
12958
13066
|
*/
|
|
12959
13067
|
|
|
12960
|
-
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCategoryTreeService, AXPCreateEntityCommand, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCategoryTreeSelectorComponent, AXPEntityCategoryWidget, AXPEntityCategoryWidgetColumnComponent, AXPEntityCategoryWidgetEditComponent, AXPEntityCategoryWidgetViewComponent, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityEventsKeys, AXPEntityFormBuilderService, AXPEntityListTableService, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction,
|
|
13068
|
+
export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCategoryTreeService, AXPCreateEntityCommand, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCategoryTreeSelectorComponent, AXPEntityCategoryWidget, AXPEntityCategoryWidgetColumnComponent, AXPEntityCategoryWidgetEditComponent, AXPEntityCategoryWidgetViewComponent, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityEventsKeys, AXPEntityFormBuilderService, AXPEntityListTableService, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPGetEntityDetailsQuery, AXPLookupFilterWidget, AXPLookupFilterWidgetEditComponent, AXPLookupWidget, AXPLookupWidgetColumnComponent, AXPLookupWidgetEditComponent, AXPLookupWidgetViewComponent, AXPMiddlewareAbortError, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXPTruncatedBreadcrumbComponent, AXPUpdateEntityCommand, AXPViewEntityDetailsCommand, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_BACKEND, AXP_ENTITY_STORAGE_MIDDLEWARE, DEFAULT_COLUMN_WIDTHS, DEFAULT_PROPERTY_ORDER, DEFAULT_SECTION_ORDER, EntityBuilder, EntityDataAccessor, actionExists, cloneLayoutArrays, columnWidthMiddlewareFactory, columnWidthMiddlewareProvider, createColumnWidthMiddlewareProvider, createLayoutOrderingMiddlewareProvider, createModifierContext, detectEntityChanges, ensureLayoutPropertyView, ensureLayoutSection, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsNewEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware, isAXPMiddlewareAbortError, layoutOrderingMiddlewareFactory, layoutOrderingMiddlewareProvider };
|
|
12961
13069
|
//# sourceMappingURL=acorex-platform-layout-entity.mjs.map
|