@acorex/platform 21.0.0-next.0 → 21.0.0-next.2
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 +238 -92
- package/common/index.d.ts +42 -606
- package/core/index.d.ts +432 -574
- package/fesm2022/acorex-platform-auth.mjs +200 -153
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +112 -1009
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +416 -694
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +11 -54
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +272 -414
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +3105 -2064
- 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 +648 -756
- 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 +174 -248
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs +50 -0
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs +42 -0
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs +55 -0
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs +50 -0
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs +48 -0
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs +42 -0
- package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs → acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs} +2 -2
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs} +2 -2
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +974 -2994
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs → acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs} +5 -26
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs → acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs} +5 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs +101 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs.map +1 -0
- package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs → acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs} +3 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +30 -166
- 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 +1 -4
- package/layout/components/index.d.ts +327 -405
- package/layout/designer/index.d.ts +3 -3
- package/layout/entity/index.d.ts +108 -163
- package/layout/widget-core/index.d.ts +49 -39
- package/layout/widgets/index.d.ts +54 -368
- package/package.json +1 -1
- package/themes/default/index.d.ts +2 -15
- package/themes/shared/index.d.ts +10 -10
- package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +0 -101
- package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +0 -1
|
@@ -2,13 +2,14 @@ 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
|
|
5
|
+
import { AXPSettingService, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPRefreshEvent, AXPReloadEvent, AXPCommonSettings, AXPCleanNestedFilters, AXPWorkflowNavigateAction, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER } from '@acorex/platform/common';
|
|
6
|
+
import * as i1$1 from '@acorex/platform/core';
|
|
7
|
+
import { AXPDeviceService, AXPBroadcastEventService, resolveActionLook, AXPExpressionEvaluatorService, AXPDistributedEventListenerService, AXPPlatformScope, AXHighlightService, extractValue, setSmart, getChangedPaths, AXPSystemActionType } from '@acorex/platform/core';
|
|
7
8
|
import * as i0 from '@angular/core';
|
|
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';
|
|
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, ViewChild, NgModule } from '@angular/core';
|
|
9
10
|
import { Subject, takeUntil } from 'rxjs';
|
|
10
11
|
import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
|
|
11
|
-
import { merge, castArray, get, cloneDeep, set, orderBy, isNil, isEmpty, isEqual } from 'lodash-es';
|
|
12
|
+
import { merge, castArray, get, cloneDeep, set, orderBy, isNil, isEmpty, isEqual, sortBy } from 'lodash-es';
|
|
12
13
|
import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
|
|
13
14
|
import { Router, RouterModule, ROUTES } from '@angular/router';
|
|
14
15
|
import * as i3 from '@acorex/components/button';
|
|
@@ -18,14 +19,14 @@ import { AXLoadingModule } from '@acorex/components/loading';
|
|
|
18
19
|
import * as i2 from '@acorex/components/popover';
|
|
19
20
|
import { AXPopoverModule } from '@acorex/components/popover';
|
|
20
21
|
import * as i3$1 from '@acorex/platform/layout/widget-core';
|
|
21
|
-
import { AXPWidgetsCatalog, AXPWidgetCoreModule, AXPPageStatus, AXPWidgetRegistryService, AXPColumnWidgetComponent, AXPValueWidgetComponent, AXPWidgetGroupEnum, AXPWidgetRendererDirective } from '@acorex/platform/layout/widget-core';
|
|
22
|
-
import { AXPCommandService, AXPQueryService,
|
|
22
|
+
import { AXPWidgetsCatalog, AXPWidgetCoreModule, AXPPageStatus, AXPWidgetRegistryService, AXPColumnWidgetComponent, AXPValueWidgetComponent, AXPWidgetGroupEnum, AXPWidgetRendererDirective, AXPLayoutBaseWidgetComponent, AXP_WIDGETS_EDITOR_CATEGORY } from '@acorex/platform/layout/widget-core';
|
|
23
|
+
import { AXPCommandService, AXPQueryService, provideCommandSetups, provideQuerySetups } from '@acorex/platform/runtime';
|
|
23
24
|
import * as i5 from '@angular/common';
|
|
24
25
|
import { CommonModule } from '@angular/common';
|
|
25
26
|
import { AXDataSource } from '@acorex/cdk/common';
|
|
26
27
|
import { AXFormatService } from '@acorex/core/format';
|
|
27
|
-
import * as
|
|
28
|
-
import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction,
|
|
28
|
+
import * as i2$4 from '@acorex/platform/workflow';
|
|
29
|
+
import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
|
|
29
30
|
import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
|
|
30
31
|
import { moveItemInArray } from '@angular/cdk/drag-drop';
|
|
31
32
|
import { AXDialogService } from '@acorex/components/dialog';
|
|
@@ -42,7 +43,7 @@ import { AXSearchBoxModule, AXSearchBoxComponent } from '@acorex/components/sear
|
|
|
42
43
|
import * as i5$1 from '@acorex/components/skeleton';
|
|
43
44
|
import { AXSkeletonModule } from '@acorex/components/skeleton';
|
|
44
45
|
import { AXTreeViewComponent } from '@acorex/components/tree-view';
|
|
45
|
-
import { AXPStateMessageComponent, AXPDataSelectorService } from '@acorex/platform/layout/components';
|
|
46
|
+
import { AXPStateMessageComponent, AXPDataSelectorService, AXPWidgetPropertyViewerComponent } from '@acorex/platform/layout/components';
|
|
46
47
|
import * as i1 from '@angular/forms';
|
|
47
48
|
import { FormsModule } from '@angular/forms';
|
|
48
49
|
import * as i2$2 from '@acorex/components/badge';
|
|
@@ -57,7 +58,8 @@ import * as i4$3 from '@acorex/components/dropdown';
|
|
|
57
58
|
import { AXDropdownModule } from '@acorex/components/dropdown';
|
|
58
59
|
import * as i7 from '@acorex/components/select-box';
|
|
59
60
|
import { AXSelectBoxModule } from '@acorex/components/select-box';
|
|
60
|
-
import
|
|
61
|
+
import * as i2$3 from '@acorex/components/text-box';
|
|
62
|
+
import { AXTextBoxModule, AXTextBoxComponent } from '@acorex/components/text-box';
|
|
61
63
|
import { transform, isEqual as isEqual$1 } from 'lodash';
|
|
62
64
|
|
|
63
65
|
function ensureListActions(ctx) {
|
|
@@ -378,8 +380,7 @@ class AXPEntityMiddleware {
|
|
|
378
380
|
}
|
|
379
381
|
// Apply all matching modifiers in order
|
|
380
382
|
for (const modifier of modifiers) {
|
|
381
|
-
|
|
382
|
-
runInInjectionContext(this.injector, () => modifier(context));
|
|
383
|
+
modifier(context);
|
|
383
384
|
}
|
|
384
385
|
return context.toEntity();
|
|
385
386
|
}
|
|
@@ -407,10 +408,8 @@ const AXP_ENTITY_DEFINITION_LOADER = new InjectionToken('AXP_ENTITY_DEFINITION_P
|
|
|
407
408
|
class AXPEntityResolver {
|
|
408
409
|
constructor() {
|
|
409
410
|
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)
|
|
414
413
|
if (Array.isArray(this.providers)) {
|
|
415
414
|
for (const loader of this.providers) {
|
|
416
415
|
const entity = await loader.get(moduleName, entityName);
|
|
@@ -420,18 +419,7 @@ class AXPEntityResolver {
|
|
|
420
419
|
}
|
|
421
420
|
}
|
|
422
421
|
else {
|
|
423
|
-
|
|
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
|
-
}
|
|
422
|
+
return await this.providers.get(moduleName, entityName);
|
|
435
423
|
}
|
|
436
424
|
return null;
|
|
437
425
|
}
|
|
@@ -445,9 +433,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
445
433
|
|
|
446
434
|
class AXPEntityDefinitionRegistryService {
|
|
447
435
|
constructor() {
|
|
436
|
+
this.providers = inject(AXP_ENTITY_DEFINITION_LOADER);
|
|
437
|
+
this.resolver = inject(AXPEntityResolver);
|
|
448
438
|
this.middleware = inject(AXPEntityMiddleware);
|
|
449
|
-
this.moduleProviderLoader = inject(AXP_MODULE_PROVIDER_LOADER, { optional: true });
|
|
450
|
-
this.manifestRegistry = inject(AXPModuleManifestRegistry, { optional: true });
|
|
451
439
|
this.onChanged = new Subject();
|
|
452
440
|
// Stores AXPEntityConfig objects, keyed by a combination of module and entity name.
|
|
453
441
|
this.entities = new Map();
|
|
@@ -457,6 +445,42 @@ class AXPEntityDefinitionRegistryService {
|
|
|
457
445
|
get onChanged$() {
|
|
458
446
|
return this.onChanged.asObservable();
|
|
459
447
|
}
|
|
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
|
+
}
|
|
460
484
|
async refresh(arg1, arg2) {
|
|
461
485
|
// No parameters: refresh all currently registered entities
|
|
462
486
|
if (typeof arg1 === 'undefined' && typeof arg2 === 'undefined') {
|
|
@@ -513,26 +537,6 @@ class AXPEntityDefinitionRegistryService {
|
|
|
513
537
|
getAll() {
|
|
514
538
|
return Array.from(this.entities.values());
|
|
515
539
|
}
|
|
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
|
-
}
|
|
536
540
|
/**
|
|
537
541
|
* Resolves an entity configuration based on module and entity name. If the configuration
|
|
538
542
|
* is not already registered, attempts to load it dynamically. Throws an error if the
|
|
@@ -547,8 +551,6 @@ class AXPEntityDefinitionRegistryService {
|
|
|
547
551
|
const key = this.createEntityKey(moduleName, entityName);
|
|
548
552
|
let config = this.entities.get(key) ?? null;
|
|
549
553
|
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);
|
|
552
554
|
try {
|
|
553
555
|
config = await this.entityResolver.get(moduleName, entityName);
|
|
554
556
|
if (config) {
|
|
@@ -566,50 +568,6 @@ class AXPEntityDefinitionRegistryService {
|
|
|
566
568
|
}
|
|
567
569
|
return config;
|
|
568
570
|
}
|
|
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
|
-
}
|
|
613
571
|
/**
|
|
614
572
|
* Creates a unique key for an entity based on its module and name.
|
|
615
573
|
*
|
|
@@ -1055,7 +1013,7 @@ function toCompatFormFieldBuilder(field) {
|
|
|
1055
1013
|
class AXPCreateEntityCommand {
|
|
1056
1014
|
constructor() {
|
|
1057
1015
|
this.entityForm = inject(AXPEntityFormBuilderService);
|
|
1058
|
-
this.settingsService = inject(
|
|
1016
|
+
this.settingsService = inject(AXPSettingService);
|
|
1059
1017
|
this.entityService = inject(AXPEntityDefinitionRegistryService);
|
|
1060
1018
|
this.toastService = inject(AXToastService);
|
|
1061
1019
|
this.translationService = inject(AXTranslationService);
|
|
@@ -1175,7 +1133,7 @@ class AXPUpdateEntityCommand {
|
|
|
1175
1133
|
constructor() {
|
|
1176
1134
|
//#region ---- Services & Dependencies ----
|
|
1177
1135
|
this.entityForm = inject(AXPEntityFormBuilderService);
|
|
1178
|
-
this.settingsService = inject(
|
|
1136
|
+
this.settingsService = inject(AXPSettingService);
|
|
1179
1137
|
this.entityService = inject(AXPEntityDefinitionRegistryService);
|
|
1180
1138
|
this.toastService = inject(AXToastService);
|
|
1181
1139
|
this.translationService = inject(AXTranslationService);
|
|
@@ -1664,9 +1622,9 @@ class AXPEntityDetailPopoverComponent {
|
|
|
1664
1622
|
AXPWidgetsCatalog.text,
|
|
1665
1623
|
AXPWidgetsCatalog.largeText,
|
|
1666
1624
|
AXPWidgetsCatalog.richText,
|
|
1667
|
-
//
|
|
1668
|
-
|
|
1669
|
-
AXPWidgetsCatalog.lookup,
|
|
1625
|
+
//
|
|
1626
|
+
AXPWidgetsCatalog.select,
|
|
1627
|
+
//AXPWidgetsCatalog.lookup,
|
|
1670
1628
|
//
|
|
1671
1629
|
AXPWidgetsCatalog.number,
|
|
1672
1630
|
AXPWidgetsCatalog.toggle,
|
|
@@ -1723,7 +1681,7 @@ class AXPEntityDetailPopoverComponent {
|
|
|
1723
1681
|
return importantProperties;
|
|
1724
1682
|
}
|
|
1725
1683
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
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"
|
|
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 }); }
|
|
1727
1685
|
}
|
|
1728
1686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailPopoverComponent, decorators: [{
|
|
1729
1687
|
type: Component,
|
|
@@ -1866,27 +1824,14 @@ class AXPEntityDetailListViewModel {
|
|
|
1866
1824
|
this.workflow = this.injector.get(AXPWorkflowService);
|
|
1867
1825
|
this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
|
|
1868
1826
|
this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
|
|
1869
|
-
this.queryExecutor = this.injector.get(AXPQueryExecutor);
|
|
1870
1827
|
this.dataSource = new AXDataSource({
|
|
1871
|
-
byKey:
|
|
1872
|
-
const
|
|
1873
|
-
|
|
1874
|
-
return await execute(key);
|
|
1875
|
-
}
|
|
1876
|
-
else if (typeof execute === 'string') {
|
|
1877
|
-
return await this.queryExecutor.fetch(execute, key);
|
|
1878
|
-
}
|
|
1879
|
-
return null;
|
|
1828
|
+
byKey: (key) => {
|
|
1829
|
+
const func = this.detailEntity()?.queries.byKey.execute;
|
|
1830
|
+
return func();
|
|
1880
1831
|
},
|
|
1881
|
-
load:
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1884
|
-
return await execute(e);
|
|
1885
|
-
}
|
|
1886
|
-
else if (typeof execute === 'string') {
|
|
1887
|
-
return await this.queryExecutor.fetch(execute, e);
|
|
1888
|
-
}
|
|
1889
|
-
return null;
|
|
1832
|
+
load: (e) => {
|
|
1833
|
+
const func = this.detailEntity()?.queries.list?.execute;
|
|
1834
|
+
return func(e);
|
|
1890
1835
|
},
|
|
1891
1836
|
pageSize: 5,
|
|
1892
1837
|
key: 'id',
|
|
@@ -2008,9 +1953,9 @@ class AXPEntityDetailListViewModel {
|
|
|
2008
1953
|
this.initialize();
|
|
2009
1954
|
}
|
|
2010
1955
|
async initialize() {
|
|
2011
|
-
const entityResolver = this.injector.get(
|
|
1956
|
+
const entityResolver = this.injector.get(AXPEntityResolver);
|
|
2012
1957
|
const [moduleName, entityName] = this.detailEntityConfig.entity.split('.');
|
|
2013
|
-
const entity = await entityResolver.
|
|
1958
|
+
const entity = await entityResolver.get(moduleName, entityName);
|
|
2014
1959
|
if (!entity) {
|
|
2015
1960
|
throw Error(`Invalid enitity name: ${this.detailEntityConfig.entity}`);
|
|
2016
1961
|
}
|
|
@@ -2423,12 +2368,11 @@ class AXPEntityMasterListViewModel {
|
|
|
2423
2368
|
this.formatService = this.injector.get(AXFormatService);
|
|
2424
2369
|
this.session = this.injector.get(AXPSessionService);
|
|
2425
2370
|
this.workflow = this.injector.get(AXPWorkflowService);
|
|
2426
|
-
this.settings = this.injector.get(
|
|
2371
|
+
this.settings = this.injector.get(AXPSettingService);
|
|
2427
2372
|
this.widgetResolver = this.injector.get(AXPWidgetRegistryService);
|
|
2428
2373
|
this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
|
|
2429
2374
|
this.commandService = this.injector.get(AXPCommandService);
|
|
2430
2375
|
this.eventService = this.injector.get(AXPBroadcastEventService);
|
|
2431
|
-
this.queryExecutor = this.injector.get(AXPQueryExecutor);
|
|
2432
2376
|
this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
|
|
2433
2377
|
this.settingEntityKey = `${this.config.module}:${this.config.name}`;
|
|
2434
2378
|
this.destroyed = new Subject();
|
|
@@ -2444,25 +2388,13 @@ class AXPEntityMasterListViewModel {
|
|
|
2444
2388
|
}, ...(ngDevMode ? [{ debugName: "views" }] : []));
|
|
2445
2389
|
this.view = signal(this.views()[0], ...(ngDevMode ? [{ debugName: "view" }] : []));
|
|
2446
2390
|
this.dataSource = new AXDataSource({
|
|
2447
|
-
byKey:
|
|
2448
|
-
const
|
|
2449
|
-
|
|
2450
|
-
return await execute(key);
|
|
2451
|
-
}
|
|
2452
|
-
else if (typeof execute === 'string') {
|
|
2453
|
-
return await this.queryExecutor.fetch(execute, key);
|
|
2454
|
-
}
|
|
2455
|
-
return null;
|
|
2391
|
+
byKey: (key) => {
|
|
2392
|
+
const func = this.entityDef.queries.byKey.execute;
|
|
2393
|
+
return func();
|
|
2456
2394
|
},
|
|
2457
|
-
load:
|
|
2458
|
-
const
|
|
2459
|
-
|
|
2460
|
-
return await execute(e);
|
|
2461
|
-
}
|
|
2462
|
-
else if (typeof execute === 'string') {
|
|
2463
|
-
return await this.queryExecutor.fetch(execute, e);
|
|
2464
|
-
}
|
|
2465
|
-
return null;
|
|
2395
|
+
load: (e) => {
|
|
2396
|
+
const func = this.entityDef.queries.list?.execute;
|
|
2397
|
+
return func(e);
|
|
2466
2398
|
},
|
|
2467
2399
|
pageSize: this.view().pageSize || 10,
|
|
2468
2400
|
key: 'id',
|
|
@@ -2990,363 +2922,13 @@ const AXPEntityListViewModelResolver = (route, state, service = inject(AXPEntity
|
|
|
2990
2922
|
return service.create(moduleName, entityName);
|
|
2991
2923
|
};
|
|
2992
2924
|
|
|
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
|
|
3317
2925
|
class AXPEntityService {
|
|
3318
2926
|
constructor() {
|
|
3319
2927
|
this.sessionService = inject(AXPSessionService);
|
|
3320
|
-
this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
|
|
3321
|
-
this.queryExecutor = inject(AXPQueryExecutor);
|
|
3322
|
-
this.commandService = inject(AXPCommandService);
|
|
3323
2928
|
}
|
|
3324
|
-
/**
|
|
3325
|
-
* @deprecated Use `withEntity(module, entity).createPath(path)` instead.
|
|
3326
|
-
* This method will be removed in a future version.
|
|
3327
|
-
*/
|
|
3328
2929
|
createPath(module, entity, path = 'list') {
|
|
3329
2930
|
return `/${this.sessionService.application?.name}/m/${module}/e/${entity}/${path}`;
|
|
3330
2931
|
}
|
|
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
|
-
}
|
|
3350
2932
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3351
2933
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityService, providedIn: 'root' }); }
|
|
3352
2934
|
}
|
|
@@ -3363,13 +2945,13 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
|
|
|
3363
2945
|
this.dialogService = inject(AXDialogService);
|
|
3364
2946
|
this.loadingDialog = inject(AXLoadingDialogService);
|
|
3365
2947
|
this.translationService = inject(AXTranslationService);
|
|
3366
|
-
this.
|
|
2948
|
+
this.settingService = inject(AXPSettingService);
|
|
3367
2949
|
}
|
|
3368
2950
|
async execute(context) {
|
|
3369
2951
|
const moduleEntity = context.getVariable('entity');
|
|
3370
2952
|
const data = context.getVariable('data');
|
|
3371
2953
|
const meta = context.getVariable('meta');
|
|
3372
|
-
const showResult = await this.
|
|
2954
|
+
const showResult = await this.settingService.get(AXPCommonSettings.EnableOperationToasts);
|
|
3373
2955
|
const entities = [];
|
|
3374
2956
|
if (moduleEntity != null) {
|
|
3375
2957
|
const ids = Array.isArray(data) ? data.map((c) => c.id) : [data.id];
|
|
@@ -3676,8 +3258,8 @@ class AXPEntityMasterUpdateViewModelFactory {
|
|
|
3676
3258
|
async create(moduleName, entityName, id, props) {
|
|
3677
3259
|
const config = await this.entityService.resolve(moduleName, entityName);
|
|
3678
3260
|
this.layout.setNavigationLoading(true);
|
|
3679
|
-
if (config.queries
|
|
3680
|
-
const func = config.queries
|
|
3261
|
+
if (config.queries.byKey) {
|
|
3262
|
+
const func = config.queries.byKey.execute;
|
|
3681
3263
|
const data = await func(id);
|
|
3682
3264
|
this.layout.setNavigationLoading(false);
|
|
3683
3265
|
return new AXPEntityMasterUpdateViewModel(this.injector, config, data, props);
|
|
@@ -4034,8 +3616,8 @@ class AXPEntityDetailViewModelFactory {
|
|
|
4034
3616
|
async create(moduleName, entityName, id) {
|
|
4035
3617
|
const config = await this.entityService.resolve(moduleName, entityName);
|
|
4036
3618
|
this.layout.setNavigationLoading(true);
|
|
4037
|
-
if (config.queries
|
|
4038
|
-
const func = config.queries
|
|
3619
|
+
if (config.queries.byKey) {
|
|
3620
|
+
const func = config.queries.byKey.execute;
|
|
4039
3621
|
const data = await func(id);
|
|
4040
3622
|
this.layout.setNavigationLoading(false);
|
|
4041
3623
|
return new AXPEntityMasterSingleViewModel(this.injector, config, data);
|
|
@@ -4058,6 +3640,138 @@ const AXPEntityDetailViewModelResolver = (route, state, service = inject(AXPEnti
|
|
|
4058
3640
|
return service.create(moduleName, entityName, id);
|
|
4059
3641
|
};
|
|
4060
3642
|
|
|
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
|
+
|
|
4061
3775
|
class AXPLayoutAdapterBuilder {
|
|
4062
3776
|
constructor() {
|
|
4063
3777
|
this.adapter = {};
|
|
@@ -5617,15 +5331,10 @@ const eventDispatchMiddleware = {
|
|
|
5617
5331
|
target: { ops: ['create', 'update', 'delete'], order: 90 },
|
|
5618
5332
|
execute: async (ctx, next) => {
|
|
5619
5333
|
const dispatcher = inject(AXPEntityEventDispatcherService);
|
|
5620
|
-
const workflowEventService = inject(AXPWorkflowEventService);
|
|
5621
5334
|
await next();
|
|
5622
5335
|
if (ctx.op === 'create') {
|
|
5623
5336
|
const createdData = ctx.result ? { ...ctx.data, id: ctx.result } : ctx.data;
|
|
5624
5337
|
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
|
-
}));
|
|
5629
5338
|
}
|
|
5630
5339
|
else if (ctx.op === 'update') {
|
|
5631
5340
|
await dispatcher.dispatchUpdated(ctx.entityName, {
|
|
@@ -5633,18 +5342,10 @@ const eventDispatchMiddleware = {
|
|
|
5633
5342
|
data: ctx.result,
|
|
5634
5343
|
changes: ctx.locals.get('changes'),
|
|
5635
5344
|
});
|
|
5636
|
-
// Dispatch workflow refresh event to trigger entity list refresh
|
|
5637
|
-
workflowEventService.dispatch(AXPRefreshEvent({
|
|
5638
|
-
entity: ctx.entityName,
|
|
5639
|
-
}));
|
|
5640
5345
|
}
|
|
5641
5346
|
else if (ctx.op === 'delete') {
|
|
5642
5347
|
// For delete, prefer previous entity if available
|
|
5643
5348
|
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
|
-
}));
|
|
5648
5349
|
}
|
|
5649
5350
|
},
|
|
5650
5351
|
};
|
|
@@ -5870,72 +5571,10 @@ const createLayoutOrderingMiddlewareProvider = (config = {}, entityName = '*') =
|
|
|
5870
5571
|
}),
|
|
5871
5572
|
};
|
|
5872
5573
|
};
|
|
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
|
-
};
|
|
5574
|
+
/**
|
|
5575
|
+
* Default provider registered with the default configuration
|
|
5576
|
+
*/
|
|
5577
|
+
const layoutOrderingMiddlewareProvider = createLayoutOrderingMiddlewareProvider();
|
|
5939
5578
|
//#endregion
|
|
5940
5579
|
|
|
5941
5580
|
class AXPEntityCommandSearchDefinitionProvider {
|
|
@@ -6109,7 +5748,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
6109
5748
|
class AXPCategoryTreeService {
|
|
6110
5749
|
constructor() {
|
|
6111
5750
|
//#region ---- Services & Dependencies ----
|
|
6112
|
-
this.entityResolver = inject(
|
|
5751
|
+
this.entityResolver = inject(AXPEntityResolver);
|
|
6113
5752
|
this.translate = inject(AXTranslationService);
|
|
6114
5753
|
}
|
|
6115
5754
|
//#endregion
|
|
@@ -6127,8 +5766,8 @@ class AXPCategoryTreeService {
|
|
|
6127
5766
|
if (!module || !entity) {
|
|
6128
5767
|
return null;
|
|
6129
5768
|
}
|
|
6130
|
-
const categoryEntityDef = await this.entityResolver.
|
|
6131
|
-
if (!categoryEntityDef?.queries
|
|
5769
|
+
const categoryEntityDef = await this.entityResolver.get(module, entity);
|
|
5770
|
+
if (!categoryEntityDef?.queries.list?.execute) {
|
|
6132
5771
|
return null;
|
|
6133
5772
|
}
|
|
6134
5773
|
const categoryEntityQueryFunc = categoryEntityDef.queries.list.execute;
|
|
@@ -8394,7 +8033,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
8394
8033
|
//#region ---- Services & Dependencies ----
|
|
8395
8034
|
this.entityDetailPopoverService = inject(AXPEntityDetailPopoverService);
|
|
8396
8035
|
this.formatService = inject(AXFormatService);
|
|
8397
|
-
this.entityResolver = inject(
|
|
8036
|
+
this.entityResolver = inject(AXPEntityResolver);
|
|
8398
8037
|
//#endregion
|
|
8399
8038
|
//#region ---- Inputs ----
|
|
8400
8039
|
this.rawValueSignal = signal(null, ...(ngDevMode ? [{ debugName: "rawValueSignal" }] : []));
|
|
@@ -8431,7 +8070,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
8431
8070
|
if (!module || !entity) {
|
|
8432
8071
|
return;
|
|
8433
8072
|
}
|
|
8434
|
-
this.entityDef.set(await this.entityResolver.
|
|
8073
|
+
this.entityDef.set(await this.entityResolver.get(module, entity));
|
|
8435
8074
|
}, ...(ngDevMode ? [{ debugName: "efEntity" }] : []));
|
|
8436
8075
|
this.efDisplay = effect(async () => {
|
|
8437
8076
|
const value = this.rawValueSignal();
|
|
@@ -8523,7 +8162,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
8523
8162
|
}
|
|
8524
8163
|
else {
|
|
8525
8164
|
// If item is just an ID, fetch the full item
|
|
8526
|
-
const byKey = this.entityDef()?.queries
|
|
8165
|
+
const byKey = this.entityDef()?.queries.byKey?.execute;
|
|
8527
8166
|
if (byKey) {
|
|
8528
8167
|
try {
|
|
8529
8168
|
itemObj = await byKey(item);
|
|
@@ -8567,7 +8206,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
8567
8206
|
}
|
|
8568
8207
|
const valueField = this.valueField();
|
|
8569
8208
|
const textField = this.displayField();
|
|
8570
|
-
const byKey = this.entityDef()?.queries
|
|
8209
|
+
const byKey = this.entityDef()?.queries.byKey?.execute;
|
|
8571
8210
|
if (!byKey) {
|
|
8572
8211
|
return item;
|
|
8573
8212
|
}
|
|
@@ -9052,7 +8691,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
9052
8691
|
constructor() {
|
|
9053
8692
|
super(...arguments);
|
|
9054
8693
|
//#region ---- Services & Dependencies ----
|
|
9055
|
-
this.entityResolver = inject(
|
|
8694
|
+
this.entityResolver = inject(AXPEntityResolver);
|
|
9056
8695
|
this.popupService = inject(AXPopupService);
|
|
9057
8696
|
this.translateService = inject(AXTranslationService);
|
|
9058
8697
|
this.cdr = inject(ChangeDetectorRef);
|
|
@@ -9095,7 +8734,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
9095
8734
|
if (!entityKey)
|
|
9096
8735
|
return;
|
|
9097
8736
|
const [module, entity] = entityKey.split('.');
|
|
9098
|
-
this.entityDef.set(await this.entityResolver.
|
|
8737
|
+
this.entityDef.set(await this.entityResolver.get(module, entity));
|
|
9099
8738
|
}, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
|
|
9100
8739
|
this.#efValue = effect(() => {
|
|
9101
8740
|
const value = this.getValue();
|
|
@@ -9208,7 +8847,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
9208
8847
|
const excludedNodeId = currentEntityId ? String(currentEntityId) : undefined;
|
|
9209
8848
|
try {
|
|
9210
8849
|
const result = await this.popupService.open(AXPEntityCategoryTreeSelectorComponent, {
|
|
9211
|
-
title: `${this.translateService.translateSync('@general:widgets.lookup.search
|
|
8850
|
+
title: `${this.translateService.translateSync('@general:widgets.lookup.search')} ${this.translateService.translateSync(this.entityDef()?.formats.plural ?? '')}`,
|
|
9212
8851
|
size: 'md',
|
|
9213
8852
|
data: {
|
|
9214
8853
|
entityKey: signal(this.entity()),
|
|
@@ -9286,7 +8925,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
9286
8925
|
return;
|
|
9287
8926
|
}
|
|
9288
8927
|
const values = castArray(rawValue);
|
|
9289
|
-
const byKey = this.entityDef()?.queries
|
|
8928
|
+
const byKey = this.entityDef()?.queries.byKey?.execute;
|
|
9290
8929
|
if (!byKey) {
|
|
9291
8930
|
this.setItems([]);
|
|
9292
8931
|
this.isLoading.set(false);
|
|
@@ -9453,7 +9092,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
9453
9092
|
}
|
|
9454
9093
|
const valueField = this.valueField();
|
|
9455
9094
|
const textField = this.displayField();
|
|
9456
|
-
const byKey = this.entityDef()?.queries
|
|
9095
|
+
const byKey = this.entityDef()?.queries.byKey?.execute;
|
|
9457
9096
|
if (!byKey) {
|
|
9458
9097
|
return item;
|
|
9459
9098
|
}
|
|
@@ -9627,7 +9266,7 @@ class AXPEntityCategoryWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
9627
9266
|
super(...arguments);
|
|
9628
9267
|
//#region ---- Services & Dependencies ----
|
|
9629
9268
|
this.formatService = inject(AXFormatService);
|
|
9630
|
-
this.entityResolver = inject(
|
|
9269
|
+
this.entityResolver = inject(AXPEntityResolver);
|
|
9631
9270
|
//#endregion
|
|
9632
9271
|
//#region ---- Computed Properties ----
|
|
9633
9272
|
this.entity = computed(() => this.options()['entity'] ?? '', ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
@@ -9657,7 +9296,7 @@ class AXPEntityCategoryWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
9657
9296
|
if (!module || !entity) {
|
|
9658
9297
|
return;
|
|
9659
9298
|
}
|
|
9660
|
-
this.entityDef.set(await this.entityResolver.
|
|
9299
|
+
this.entityDef.set(await this.entityResolver.get(module, entity));
|
|
9661
9300
|
}, ...(ngDevMode ? [{ debugName: "efEntity" }] : []));
|
|
9662
9301
|
this.efDisplay = effect(async () => {
|
|
9663
9302
|
const value = this.getValue();
|
|
@@ -9680,7 +9319,7 @@ class AXPEntityCategoryWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
9680
9319
|
};
|
|
9681
9320
|
}
|
|
9682
9321
|
const def = this.entityDef();
|
|
9683
|
-
const byKey = def?.queries
|
|
9322
|
+
const byKey = def?.queries.byKey?.execute;
|
|
9684
9323
|
if (byKey) {
|
|
9685
9324
|
this.loading.set(true);
|
|
9686
9325
|
try {
|
|
@@ -9980,12 +9619,12 @@ class AXPEntityListTableService {
|
|
|
9980
9619
|
createDataSource(entity) {
|
|
9981
9620
|
return new AXDataSource({
|
|
9982
9621
|
byKey: (key) => {
|
|
9983
|
-
const func = entity.queries
|
|
9622
|
+
const func = entity.queries.byKey.execute;
|
|
9984
9623
|
return func(key);
|
|
9985
9624
|
},
|
|
9986
9625
|
load: (e) => {
|
|
9987
|
-
const func = entity.queries
|
|
9988
|
-
if (!func
|
|
9626
|
+
const func = entity.queries.list?.execute;
|
|
9627
|
+
if (!func) {
|
|
9989
9628
|
throw new Error(`Entity ${entity.name} does not have a list query`);
|
|
9990
9629
|
}
|
|
9991
9630
|
return func(e);
|
|
@@ -10065,6 +9704,7 @@ class AXPEntityListTableService {
|
|
|
10065
9704
|
options: options,
|
|
10066
9705
|
metadata: action?.metadata,
|
|
10067
9706
|
});
|
|
9707
|
+
console.log('Entity List - Row command:', e.name, e.data);
|
|
10068
9708
|
}
|
|
10069
9709
|
/**
|
|
10070
9710
|
* Create default events
|
|
@@ -10646,7 +10286,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10646
10286
|
></ng-container>
|
|
10647
10287
|
}
|
|
10648
10288
|
</div>
|
|
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"
|
|
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 }); }
|
|
10650
10290
|
}
|
|
10651
10291
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListWidgetViewComponent, decorators: [{
|
|
10652
10292
|
type: Component,
|
|
@@ -10811,6 +10451,144 @@ const AXPEntityListWidget = {
|
|
|
10811
10451
|
},
|
|
10812
10452
|
};
|
|
10813
10453
|
|
|
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
|
+
|
|
10814
10592
|
class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
10815
10593
|
constructor() {
|
|
10816
10594
|
super(...arguments);
|
|
@@ -10939,7 +10717,7 @@ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
10939
10717
|
[node]="lookupNode()"
|
|
10940
10718
|
[mode]="'edit'"
|
|
10941
10719
|
></ng-container>
|
|
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"
|
|
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 }); }
|
|
10943
10721
|
}
|
|
10944
10722
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, decorators: [{
|
|
10945
10723
|
type: Component,
|
|
@@ -10991,7 +10769,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
10991
10769
|
constructor() {
|
|
10992
10770
|
super(...arguments);
|
|
10993
10771
|
this.formatService = inject(AXFormatService);
|
|
10994
|
-
this.entityResolver = inject(
|
|
10772
|
+
this.entityResolver = inject(AXPEntityResolver);
|
|
10995
10773
|
this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
|
|
10996
10774
|
this.multiple = computed(() => this.options()['multiple'], ...(ngDevMode ? [{ debugName: "multiple" }] : []));
|
|
10997
10775
|
this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
|
|
@@ -11009,7 +10787,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
11009
10787
|
this.displayItems = signal([], ...(ngDevMode ? [{ debugName: "displayItems" }] : []));
|
|
11010
10788
|
this.efEntity = effect(async () => {
|
|
11011
10789
|
const [module, entity] = this.entity().split('.');
|
|
11012
|
-
this.entityDef.set(await this.entityResolver.
|
|
10790
|
+
this.entityDef.set(await this.entityResolver.get(module, entity));
|
|
11013
10791
|
}, ...(ngDevMode ? [{ debugName: "efEntity" }] : []));
|
|
11014
10792
|
this.efDisplay = effect(async () => {
|
|
11015
10793
|
const value = this.getValue();
|
|
@@ -11030,7 +10808,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
11030
10808
|
};
|
|
11031
10809
|
}
|
|
11032
10810
|
const def = this.entityDef();
|
|
11033
|
-
const byKey = def?.queries
|
|
10811
|
+
const byKey = def?.queries.byKey?.execute;
|
|
11034
10812
|
if (byKey) {
|
|
11035
10813
|
this.loading.set(true);
|
|
11036
10814
|
const fetchedItem = await byKey(item);
|
|
@@ -11046,9 +10824,6 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
11046
10824
|
};
|
|
11047
10825
|
}
|
|
11048
10826
|
getDisplayText(item) {
|
|
11049
|
-
if (!item) {
|
|
11050
|
-
return '';
|
|
11051
|
-
}
|
|
11052
10827
|
const template = this.displayFormat();
|
|
11053
10828
|
if (template) {
|
|
11054
10829
|
const formatted = this.formatService.format(template, 'string', item);
|
|
@@ -11056,7 +10831,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
|
|
|
11056
10831
|
return formatted;
|
|
11057
10832
|
}
|
|
11058
10833
|
}
|
|
11059
|
-
return
|
|
10834
|
+
return this.formatService.format(this.displayField(), 'string', item);
|
|
11060
10835
|
}
|
|
11061
10836
|
get __class() {
|
|
11062
10837
|
const cls = {};
|
|
@@ -11174,7 +10949,6 @@ class AXPEntityDataSelectorService {
|
|
|
11174
10949
|
parentField: options.entity.parentKey,
|
|
11175
10950
|
filters: options.filters || undefined,
|
|
11176
10951
|
allowCreate: options.allowCreate ?? this.canCreate(options.entity),
|
|
11177
|
-
selectedItemIds: options.selectedItemIds,
|
|
11178
10952
|
// Note: Custom filters will be applied to the dataSource in createDataSource
|
|
11179
10953
|
};
|
|
11180
10954
|
}
|
|
@@ -11185,14 +10959,11 @@ class AXPEntityDataSelectorService {
|
|
|
11185
10959
|
const { entity, filters, parentFilters } = options;
|
|
11186
10960
|
return new AXDataSource({
|
|
11187
10961
|
byKey: (key) => {
|
|
11188
|
-
const func = entity.queries
|
|
11189
|
-
return func(
|
|
10962
|
+
const func = entity.queries.byKey.execute;
|
|
10963
|
+
return func();
|
|
11190
10964
|
},
|
|
11191
10965
|
load: (e) => {
|
|
11192
|
-
const func = entity.queries
|
|
11193
|
-
if (!func || typeof func !== 'function') {
|
|
11194
|
-
throw new Error(`Entity ${entity.name} does not have a list query`);
|
|
11195
|
-
}
|
|
10966
|
+
const func = entity.queries.list?.execute;
|
|
11196
10967
|
this.mergeFilters(e, filters, parentFilters);
|
|
11197
10968
|
return func(e);
|
|
11198
10969
|
},
|
|
@@ -11326,7 +11097,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11326
11097
|
constructor() {
|
|
11327
11098
|
super(...arguments);
|
|
11328
11099
|
this.injector = inject(Injector);
|
|
11329
|
-
this.entityResolver = inject(
|
|
11100
|
+
this.entityResolver = inject(AXPEntityResolver);
|
|
11330
11101
|
this.formatService = inject(AXFormatService);
|
|
11331
11102
|
this.popupService = inject(AXPopupService);
|
|
11332
11103
|
this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
|
|
@@ -11345,13 +11116,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11345
11116
|
this.look = computed(() => this.options()['look'] ?? 'lookup', ...(ngDevMode ? [{ debugName: "look" }] : []));
|
|
11346
11117
|
this.allowClear = computed(() => (this.options()['allowClear'] ?? false), ...(ngDevMode ? [{ debugName: "allowClear" }] : []));
|
|
11347
11118
|
this.defaultTextField = computed(() => {
|
|
11348
|
-
const
|
|
11349
|
-
'title',
|
|
11350
|
-
'name',
|
|
11351
|
-
'code',
|
|
11352
|
-
'description',
|
|
11353
|
-
];
|
|
11354
|
-
const textField = list.find((c) => this.entityDef()?.properties.find((p) => p.name == c)) ?? 'title';
|
|
11119
|
+
const textField = this.entityDef()?.formats.lookup ?? this.entityDef()?.properties.find((c) => c.name != 'id')?.name ?? 'title';
|
|
11355
11120
|
return textField;
|
|
11356
11121
|
}, ...(ngDevMode ? [{ debugName: "defaultTextField" }] : []));
|
|
11357
11122
|
this.displayField = computed(() => {
|
|
@@ -11371,44 +11136,18 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11371
11136
|
return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
|
|
11372
11137
|
}, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
|
|
11373
11138
|
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" }] : []));
|
|
11392
11139
|
this.dataSource = computed(() => {
|
|
11393
11140
|
const entity = this.entityDef();
|
|
11394
11141
|
if (!entity)
|
|
11395
11142
|
return null;
|
|
11396
|
-
const defaultSorts = this.defaultSorts();
|
|
11397
11143
|
return new AXDataSource({
|
|
11398
11144
|
byKey: (key) => {
|
|
11399
|
-
const func = entity.queries
|
|
11145
|
+
const func = entity.queries.byKey.execute;
|
|
11400
11146
|
return func();
|
|
11401
11147
|
},
|
|
11402
11148
|
load: (e) => {
|
|
11403
|
-
const func = entity.queries
|
|
11404
|
-
if (!func || typeof func !== 'function') {
|
|
11405
|
-
throw new Error(`Entity ${entity.name} does not have a list query`);
|
|
11406
|
-
}
|
|
11149
|
+
const func = entity.queries.list?.execute;
|
|
11407
11150
|
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
|
-
}
|
|
11412
11151
|
return func(e);
|
|
11413
11152
|
},
|
|
11414
11153
|
pageSize: 10,
|
|
@@ -11416,7 +11155,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11416
11155
|
});
|
|
11417
11156
|
}, ...(ngDevMode ? [{ debugName: "dataSource" }] : []));
|
|
11418
11157
|
this.searchTerm = signal(null, ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
|
|
11419
|
-
|
|
11158
|
+
this.searchPlaceholderText = signal('', ...(ngDevMode ? [{ debugName: "searchPlaceholderText" }] : []));
|
|
11420
11159
|
this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
|
|
11421
11160
|
this.textbox = viewChild(AXTagBoxComponent, ...(ngDevMode ? [{ debugName: "textbox" }] : []));
|
|
11422
11161
|
this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
@@ -11424,7 +11163,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11424
11163
|
this.placeholderUpdateToken = 0;
|
|
11425
11164
|
this.#efEntity = effect(async () => {
|
|
11426
11165
|
const [module, entity] = this.entity().split('.');
|
|
11427
|
-
this.entityDef.set(await this.entityResolver.
|
|
11166
|
+
this.entityDef.set(await this.entityResolver.get(module, entity));
|
|
11428
11167
|
}, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
|
|
11429
11168
|
this.#efValue = effect(() => {
|
|
11430
11169
|
if (this.getValue()) {
|
|
@@ -11434,6 +11173,32 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11434
11173
|
this.clear();
|
|
11435
11174
|
}
|
|
11436
11175
|
}, ...(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" }] : []));
|
|
11437
11202
|
//#region ---- Focus Management ----
|
|
11438
11203
|
/**
|
|
11439
11204
|
* Reactive effect to auto-focus when viewChild is ready
|
|
@@ -11477,31 +11242,21 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11477
11242
|
}
|
|
11478
11243
|
#efEntity;
|
|
11479
11244
|
#efValue;
|
|
11245
|
+
#efSearchPlaceholder;
|
|
11480
11246
|
async findByValue() {
|
|
11481
11247
|
this.isLoading.set(true);
|
|
11482
11248
|
const rawValue = this.getValue();
|
|
11483
|
-
|
|
11484
|
-
const
|
|
11485
|
-
const byKey = this.entityDef()?.queries?.byKey?.execute;
|
|
11249
|
+
const values = castArray(rawValue);
|
|
11250
|
+
const byKey = this.entityDef()?.queries.byKey?.execute;
|
|
11486
11251
|
if (byKey && values.length) {
|
|
11487
11252
|
if (this.multiple()) {
|
|
11488
|
-
const items = await Promise.all(values
|
|
11489
|
-
|
|
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);
|
|
11253
|
+
const items = await Promise.all(values.map((value) => byKey(extractValue(value, this.valueField()))));
|
|
11254
|
+
this.setItems(items);
|
|
11495
11255
|
}
|
|
11496
11256
|
else {
|
|
11497
11257
|
const id = extractValue(values[0], this.valueField());
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
this.setItems(item != null ? [item] : []);
|
|
11501
|
-
}
|
|
11502
|
-
else {
|
|
11503
|
-
this.setItems([]);
|
|
11504
|
-
}
|
|
11258
|
+
const item = await byKey(id);
|
|
11259
|
+
this.setItems(item);
|
|
11505
11260
|
}
|
|
11506
11261
|
}
|
|
11507
11262
|
else {
|
|
@@ -11516,10 +11271,6 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11516
11271
|
this.isOpen.set(true);
|
|
11517
11272
|
const inlineSearchValue = (this.searchTerm() ?? '').trim();
|
|
11518
11273
|
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);
|
|
11523
11274
|
try {
|
|
11524
11275
|
const result = await this.entityDataSelectorService.open({
|
|
11525
11276
|
entity: this.entityDef(),
|
|
@@ -11530,23 +11281,9 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11530
11281
|
columns: this.columns(),
|
|
11531
11282
|
allowCreate: true,
|
|
11532
11283
|
initialSearchTerm,
|
|
11533
|
-
selectedItemIds: selectedItemIds.length > 0 ? selectedItemIds : undefined,
|
|
11534
11284
|
});
|
|
11535
11285
|
if (result && 'items' in result) {
|
|
11536
|
-
|
|
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
|
-
}
|
|
11286
|
+
this.setItems(result.items);
|
|
11550
11287
|
}
|
|
11551
11288
|
}
|
|
11552
11289
|
catch (error) {
|
|
@@ -11591,9 +11328,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11591
11328
|
this.isLoading.set(true);
|
|
11592
11329
|
const result = await this.searchByValue(value);
|
|
11593
11330
|
if (result?.total == 1) {
|
|
11594
|
-
|
|
11595
|
-
const shouldMerge = this.multiple() && this.selectedItems().length > 0;
|
|
11596
|
-
this.setItems(result.items[0], shouldMerge);
|
|
11331
|
+
this.setItems(result.items[0]);
|
|
11597
11332
|
}
|
|
11598
11333
|
else {
|
|
11599
11334
|
this.showSelector();
|
|
@@ -11604,27 +11339,13 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11604
11339
|
this.showSelector();
|
|
11605
11340
|
}
|
|
11606
11341
|
}
|
|
11607
|
-
setItems(items
|
|
11608
|
-
|
|
11609
|
-
|
|
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
|
-
}
|
|
11342
|
+
setItems(items) {
|
|
11343
|
+
if (!items || items.length == 0) {
|
|
11344
|
+
this.selectedItems.set([]);
|
|
11616
11345
|
return;
|
|
11617
11346
|
}
|
|
11618
|
-
//
|
|
11619
|
-
|
|
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
|
-
}
|
|
11347
|
+
//
|
|
11348
|
+
items = castArray(items);
|
|
11628
11349
|
this.clearInput();
|
|
11629
11350
|
this.selectedItems.set(items);
|
|
11630
11351
|
//
|
|
@@ -11686,6 +11407,39 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11686
11407
|
}
|
|
11687
11408
|
return get(item, this.displayField()) ?? '';
|
|
11688
11409
|
}
|
|
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
|
+
}
|
|
11689
11443
|
async searchByValue(value) {
|
|
11690
11444
|
if (!this.entityDef())
|
|
11691
11445
|
return null;
|
|
@@ -11706,10 +11460,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11706
11460
|
});
|
|
11707
11461
|
});
|
|
11708
11462
|
}
|
|
11709
|
-
const func = entity.queries
|
|
11710
|
-
if (!func || typeof func !== 'function') {
|
|
11711
|
-
throw new Error(`Entity ${entity.name} does not have a list query`);
|
|
11712
|
-
}
|
|
11463
|
+
const func = entity.queries.list?.execute;
|
|
11713
11464
|
return await func({ filter: inlineFilters, take: 10 });
|
|
11714
11465
|
}
|
|
11715
11466
|
mergeFilter(request, filter) {
|
|
@@ -11748,7 +11499,6 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11748
11499
|
@if (look() == 'select') {
|
|
11749
11500
|
<ax-select-box
|
|
11750
11501
|
#selectBox
|
|
11751
|
-
[placeholder]="('@general:widgets.lookup.placeholder' | translate | async)!"
|
|
11752
11502
|
[dataSource]="dataSource()!"
|
|
11753
11503
|
[ngModel]="selectedItems()"
|
|
11754
11504
|
[textField]="displayField()"
|
|
@@ -11761,7 +11511,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11761
11511
|
<ax-clear-button></ax-clear-button>
|
|
11762
11512
|
}
|
|
11763
11513
|
<ax-search-box
|
|
11764
|
-
[placeholder]="(
|
|
11514
|
+
[placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
|
|
11765
11515
|
(onValueChanged)="handleSearchInputChange($event)"
|
|
11766
11516
|
>
|
|
11767
11517
|
<ax-clear-button></ax-clear-button>
|
|
@@ -11785,7 +11535,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11785
11535
|
[textField]="displayField()"
|
|
11786
11536
|
[valueField]="valueField()"
|
|
11787
11537
|
(onValueChanged)="handleValueChange($event)"
|
|
11788
|
-
[placeholder]="selectedItems().length ? '' : (
|
|
11538
|
+
[placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
|
|
11789
11539
|
[addOnEnter]="false"
|
|
11790
11540
|
[addOnComma]="false"
|
|
11791
11541
|
[disabled]="disabled()"
|
|
@@ -11830,7 +11580,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
|
|
|
11830
11580
|
}
|
|
11831
11581
|
`, 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:
|
|
11832
11582
|
//
|
|
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"] }
|
|
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 }); }
|
|
11834
11584
|
}
|
|
11835
11585
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
|
|
11836
11586
|
type: Component,
|
|
@@ -11841,7 +11591,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
11841
11591
|
@if (look() == 'select') {
|
|
11842
11592
|
<ax-select-box
|
|
11843
11593
|
#selectBox
|
|
11844
|
-
[placeholder]="('@general:widgets.lookup.placeholder' | translate | async)!"
|
|
11845
11594
|
[dataSource]="dataSource()!"
|
|
11846
11595
|
[ngModel]="selectedItems()"
|
|
11847
11596
|
[textField]="displayField()"
|
|
@@ -11854,7 +11603,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
11854
11603
|
<ax-clear-button></ax-clear-button>
|
|
11855
11604
|
}
|
|
11856
11605
|
<ax-search-box
|
|
11857
|
-
[placeholder]="(
|
|
11606
|
+
[placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
|
|
11858
11607
|
(onValueChanged)="handleSearchInputChange($event)"
|
|
11859
11608
|
>
|
|
11860
11609
|
<ax-clear-button></ax-clear-button>
|
|
@@ -11878,7 +11627,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
11878
11627
|
[textField]="displayField()"
|
|
11879
11628
|
[valueField]="valueField()"
|
|
11880
11629
|
(onValueChanged)="handleValueChange($event)"
|
|
11881
|
-
[placeholder]="selectedItems().length ? '' : (
|
|
11630
|
+
[placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
|
|
11882
11631
|
[addOnEnter]="false"
|
|
11883
11632
|
[addOnComma]="false"
|
|
11884
11633
|
[disabled]="disabled()"
|
|
@@ -11967,9 +11716,6 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
11967
11716
|
const template = this.options['displayFormat'];
|
|
11968
11717
|
return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
|
|
11969
11718
|
}, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
|
|
11970
|
-
this.displayField = computed(() => {
|
|
11971
|
-
return this.textField ?? 'title';
|
|
11972
|
-
}, ...(ngDevMode ? [{ debugName: "displayField" }] : []));
|
|
11973
11719
|
//#endregion
|
|
11974
11720
|
//#region ---- Signals ----
|
|
11975
11721
|
this.isMorePopoverOpen = signal(false, ...(ngDevMode ? [{ debugName: "isMorePopoverOpen" }] : []));
|
|
@@ -12059,7 +11805,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
|
|
|
12059
11805
|
return formatted;
|
|
12060
11806
|
}
|
|
12061
11807
|
}
|
|
12062
|
-
return
|
|
11808
|
+
return item?.[this.textField] ?? '';
|
|
12063
11809
|
}
|
|
12064
11810
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
12065
11811
|
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 }); }
|
|
@@ -12146,6 +11892,153 @@ const AXPLookupWidget = {
|
|
|
12146
11892
|
},
|
|
12147
11893
|
};
|
|
12148
11894
|
|
|
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
|
+
|
|
12149
12042
|
const AXPEntityCreateEvent = createWorkFlowEvent('[Entity] Created!');
|
|
12150
12043
|
class AXPEntityCreatePopupAction extends AXPWorkflowAction {
|
|
12151
12044
|
constructor() {
|
|
@@ -12570,8 +12463,20 @@ function routesFacory() {
|
|
|
12570
12463
|
return routes;
|
|
12571
12464
|
}
|
|
12572
12465
|
class AXPEntityModule {
|
|
12573
|
-
|
|
12574
|
-
|
|
12466
|
+
constructor(appInitService, injector) {
|
|
12467
|
+
const service = injector.get(AXPEntityDefinitionRegistryService);
|
|
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] }); }
|
|
12575
12480
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, providers: [
|
|
12576
12481
|
{
|
|
12577
12482
|
provide: ROUTES,
|
|
@@ -12595,11 +12500,6 @@ class AXPEntityModule {
|
|
|
12595
12500
|
useValue: columnWidthMiddlewareProvider,
|
|
12596
12501
|
multi: true,
|
|
12597
12502
|
},
|
|
12598
|
-
{
|
|
12599
|
-
provide: AXP_ENTITY_MODIFIER,
|
|
12600
|
-
useValue: AXPCrudModifier,
|
|
12601
|
-
multi: true,
|
|
12602
|
-
},
|
|
12603
12503
|
// {
|
|
12604
12504
|
// provide: AXP_ENTITY_MODIFIER,
|
|
12605
12505
|
// useValue: layoutOrderingMiddlewareProvider,
|
|
@@ -12658,7 +12558,14 @@ class AXPEntityModule {
|
|
|
12658
12558
|
functions: {},
|
|
12659
12559
|
}),
|
|
12660
12560
|
AXPWidgetCoreModule.forChild({
|
|
12661
|
-
widgets: [
|
|
12561
|
+
widgets: [
|
|
12562
|
+
AXPLookupWidget,
|
|
12563
|
+
AXPLookupFilterWidget,
|
|
12564
|
+
AXPWidgetSelectorWidget,
|
|
12565
|
+
AXPEntityListWidget,
|
|
12566
|
+
AXPEntityReferenceWidget,
|
|
12567
|
+
AXPEntityCategoryWidget,
|
|
12568
|
+
],
|
|
12662
12569
|
})] }); }
|
|
12663
12570
|
}
|
|
12664
12571
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, decorators: [{
|
|
@@ -12694,7 +12601,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
12694
12601
|
functions: {},
|
|
12695
12602
|
}),
|
|
12696
12603
|
AXPWidgetCoreModule.forChild({
|
|
12697
|
-
widgets: [
|
|
12604
|
+
widgets: [
|
|
12605
|
+
AXPLookupWidget,
|
|
12606
|
+
AXPLookupFilterWidget,
|
|
12607
|
+
AXPWidgetSelectorWidget,
|
|
12608
|
+
AXPEntityListWidget,
|
|
12609
|
+
AXPEntityReferenceWidget,
|
|
12610
|
+
AXPEntityCategoryWidget,
|
|
12611
|
+
],
|
|
12698
12612
|
}),
|
|
12699
12613
|
],
|
|
12700
12614
|
exports: [],
|
|
@@ -12722,11 +12636,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
12722
12636
|
useValue: columnWidthMiddlewareProvider,
|
|
12723
12637
|
multi: true,
|
|
12724
12638
|
},
|
|
12725
|
-
{
|
|
12726
|
-
provide: AXP_ENTITY_MODIFIER,
|
|
12727
|
-
useValue: AXPCrudModifier,
|
|
12728
|
-
multi: true,
|
|
12729
|
-
},
|
|
12730
12639
|
// {
|
|
12731
12640
|
// provide: AXP_ENTITY_MODIFIER,
|
|
12732
12641
|
// useValue: layoutOrderingMiddlewareProvider,
|
|
@@ -12758,7 +12667,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
12758
12667
|
]),
|
|
12759
12668
|
],
|
|
12760
12669
|
}]
|
|
12761
|
-
}] });
|
|
12670
|
+
}], ctorParameters: () => [{ type: i1$1.AXPAppStartUpService }, { type: i0.Injector }] });
|
|
12762
12671
|
|
|
12763
12672
|
//#endregion
|
|
12764
12673
|
//#region ---- Get Entity Details Query ----
|
|
@@ -12981,25 +12890,8 @@ function entityOverrideDetailsViewAction() {
|
|
|
12981
12890
|
scope: AXPEntityCommandScope.Individual,
|
|
12982
12891
|
};
|
|
12983
12892
|
}
|
|
12984
|
-
function entityDetailsCrudActions(parentId
|
|
12985
|
-
|
|
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;
|
|
12893
|
+
function entityDetailsCrudActions(parentId) {
|
|
12894
|
+
return [entityDetailsCreateActions(parentId), entityDetailsEditAction(), entityOverrideDetailsViewAction()];
|
|
13003
12895
|
}
|
|
13004
12896
|
function entityDetailsReferenceCreateActions(type) {
|
|
13005
12897
|
return [
|
|
@@ -13065,5 +12957,5 @@ function detectEntityChanges(oldObj, newObj) {
|
|
|
13065
12957
|
* Generated bundle index. Do not edit.
|
|
13066
12958
|
*/
|
|
13067
12959
|
|
|
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,
|
|
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, AXPEntityReferenceWidget, AXPEntityReferenceWidgetColumnComponent, AXPEntityReferenceWidgetDesignerComponent, AXPEntityReferenceWidgetEditComponent, AXPEntityReferenceWidgetPrintComponent, AXPEntityReferenceWidgetViewComponent, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPGetEntityDetailsQuery, AXPLookupFilterWidget, AXPLookupFilterWidgetEditComponent, AXPLookupWidget, AXPLookupWidgetColumnComponent, AXPLookupWidgetEditComponent, AXPLookupWidgetViewComponent, AXPMiddlewareAbortError, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXPTruncatedBreadcrumbComponent, AXPUpdateEntityCommand, AXPViewEntityDetailsCommand, AXPWidgetSelectorWidget, AXPWidgetSelectorWidgetEditComponent, AXPWidgetSelectorWidgetViewComponent, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_BACKEND, AXP_ENTITY_STORAGE_MIDDLEWARE, DEFAULT_COLUMN_WIDTHS, DEFAULT_PROPERTY_ORDER, DEFAULT_SECTION_ORDER, actionExists, 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 };
|
|
13069
12961
|
//# sourceMappingURL=acorex-platform-layout-entity.mjs.map
|