@acorex/platform 21.0.0-next.2 → 21.0.0-next.5

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.
Files changed (72) hide show
  1. package/auth/index.d.ts +97 -238
  2. package/common/index.d.ts +783 -213
  3. package/core/index.d.ts +311 -442
  4. package/fesm2022/acorex-platform-auth.mjs +156 -200
  5. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  6. package/fesm2022/acorex-platform-common.mjs +1038 -127
  7. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  8. package/fesm2022/acorex-platform-core.mjs +602 -413
  9. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  10. package/fesm2022/acorex-platform-domain.mjs +54 -11
  11. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  12. package/fesm2022/acorex-platform-layout-builder.mjs +412 -270
  13. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  14. package/fesm2022/acorex-platform-layout-components.mjs +2100 -3141
  15. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  16. package/fesm2022/acorex-platform-layout-designer.mjs +7 -7
  17. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  18. package/fesm2022/acorex-platform-layout-entity.mjs +730 -652
  19. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  20. package/fesm2022/acorex-platform-layout-views.mjs +4 -4
  21. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  22. package/fesm2022/acorex-platform-layout-widget-core.mjs +249 -205
  23. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  24. package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs → acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs} +2 -2
  25. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +1 -0
  26. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs} +2 -2
  27. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +1 -0
  28. package/fesm2022/acorex-platform-layout-widgets.mjs +3066 -1040
  29. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  30. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs → acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs} +26 -5
  31. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +1 -0
  32. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs → acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs} +4 -5
  33. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs.map +1 -0
  34. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +101 -0
  35. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +1 -0
  36. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs → acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs} +3 -3
  37. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +1 -0
  38. package/fesm2022/acorex-platform-themes-default.mjs +166 -30
  39. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  40. package/fesm2022/acorex-platform-themes-shared.mjs +27 -27
  41. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  42. package/fesm2022/acorex-platform-workflow.mjs +474 -1527
  43. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  44. package/layout/builder/index.d.ts +4 -1
  45. package/layout/components/index.d.ts +405 -327
  46. package/layout/designer/index.d.ts +3 -3
  47. package/layout/entity/index.d.ts +154 -108
  48. package/layout/widget-core/index.d.ts +39 -52
  49. package/layout/widgets/index.d.ts +368 -54
  50. package/package.json +9 -9
  51. package/themes/default/index.d.ts +15 -2
  52. package/themes/shared/index.d.ts +10 -10
  53. package/workflow/index.d.ts +182 -817
  54. package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs +0 -50
  55. package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs.map +0 -1
  56. package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs +0 -42
  57. package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs.map +0 -1
  58. package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs +0 -55
  59. package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs.map +0 -1
  60. package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs +0 -50
  61. package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs.map +0 -1
  62. package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs +0 -48
  63. package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs.map +0 -1
  64. package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs +0 -42
  65. package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs.map +0 -1
  66. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs.map +0 -1
  67. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs.map +0 -1
  68. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs.map +0 -1
  69. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs.map +0 -1
  70. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs +0 -101
  71. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs.map +0 -1
  72. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs.map +0 -1
@@ -2,14 +2,13 @@ import { AXToastService } from '@acorex/components/toast';
2
2
  import * as i6 from '@acorex/core/translation';
3
3
  import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
4
4
  import * as i4$1 from '@acorex/platform/common';
5
- import { 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';
5
+ import { AXPSettingsService, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPRefreshEvent, AXPReloadEvent, AXPCommonSettings, AXPEntityQueryType, AXPCleanNestedFilters, AXPWorkflowNavigateAction, AXPToastAction, AXP_SEARCH_DEFINITION_PROVIDER } from '@acorex/platform/common';
7
6
  import { AXPDeviceService, AXPBroadcastEventService, resolveActionLook, AXPExpressionEvaluatorService, AXPDistributedEventListenerService, AXPPlatformScope, AXHighlightService, extractValue, setSmart, getChangedPaths, AXPSystemActionType } from '@acorex/platform/core';
8
7
  import * as i0 from '@angular/core';
9
- import { InjectionToken, inject, Injector, runInInjectionContext, Injectable, input, viewChild, signal, ElementRef, ChangeDetectionStrategy, Component, ApplicationRef, EnvironmentInjector, createComponent, computed, effect, Input, afterNextRender, ViewEncapsulation, ChangeDetectorRef, viewChildren, linkedSignal, untracked, HostBinding, ViewChild, NgModule } 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';
10
9
  import { Subject, takeUntil } from 'rxjs';
11
10
  import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
12
- import { merge, castArray, get, cloneDeep, set, orderBy, isNil, isEmpty, isEqual, sortBy } from 'lodash-es';
11
+ import { merge, castArray, get, cloneDeep, set, orderBy, isNil, isEmpty, isEqual } from 'lodash-es';
13
12
  import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
14
13
  import { Router, RouterModule, ROUTES } from '@angular/router';
15
14
  import * as i3 from '@acorex/components/button';
@@ -19,14 +18,14 @@ import { AXLoadingModule } from '@acorex/components/loading';
19
18
  import * as i2 from '@acorex/components/popover';
20
19
  import { AXPopoverModule } from '@acorex/components/popover';
21
20
  import * as i3$1 from '@acorex/platform/layout/widget-core';
22
- import { AXPWidgetsCatalog, AXPWidgetCoreModule, AXPPageStatus, AXPWidgetRegistryService, AXPColumnWidgetComponent, AXPValueWidgetComponent, AXPWidgetGroupEnum, AXPWidgetRendererDirective, AXPLayoutBaseWidgetComponent, AXP_WIDGETS_EDITOR_CATEGORY } from '@acorex/platform/layout/widget-core';
23
- import { AXPCommandService, AXPQueryService, provideCommandSetups, provideQuerySetups } from '@acorex/platform/runtime';
21
+ import { AXPWidgetsCatalog, AXPWidgetCoreModule, AXPPageStatus, AXPWidgetRegistryService, AXPColumnWidgetComponent, AXPValueWidgetComponent, AXPWidgetGroupEnum, AXPWidgetRendererDirective } from '@acorex/platform/layout/widget-core';
22
+ import { AXPCommandService, AXPQueryService, AXPQueryExecutor, provideCommandSetups, provideQuerySetups } from '@acorex/platform/runtime';
24
23
  import * as i5 from '@angular/common';
25
24
  import { CommonModule } from '@angular/common';
26
25
  import { AXDataSource } from '@acorex/cdk/common';
27
26
  import { AXFormatService } from '@acorex/core/format';
28
- import * as i2$4 from '@acorex/platform/workflow';
29
- import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
27
+ import * as i1$1 from '@acorex/platform/workflow';
28
+ import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowEventService, AXPWorkflowModule } from '@acorex/platform/workflow';
30
29
  import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
31
30
  import { moveItemInArray } from '@angular/cdk/drag-drop';
32
31
  import { AXDialogService } from '@acorex/components/dialog';
@@ -43,7 +42,7 @@ import { AXSearchBoxModule, AXSearchBoxComponent } from '@acorex/components/sear
43
42
  import * as i5$1 from '@acorex/components/skeleton';
44
43
  import { AXSkeletonModule } from '@acorex/components/skeleton';
45
44
  import { AXTreeViewComponent } from '@acorex/components/tree-view';
46
- import { AXPStateMessageComponent, AXPDataSelectorService, AXPWidgetPropertyViewerComponent } from '@acorex/platform/layout/components';
45
+ import { AXPStateMessageComponent, AXPDataSelectorService } from '@acorex/platform/layout/components';
47
46
  import * as i1 from '@angular/forms';
48
47
  import { FormsModule } from '@angular/forms';
49
48
  import * as i2$2 from '@acorex/components/badge';
@@ -58,8 +57,7 @@ import * as i4$3 from '@acorex/components/dropdown';
58
57
  import { AXDropdownModule } from '@acorex/components/dropdown';
59
58
  import * as i7 from '@acorex/components/select-box';
60
59
  import { AXSelectBoxModule } from '@acorex/components/select-box';
61
- import * as i2$3 from '@acorex/components/text-box';
62
- import { AXTextBoxModule, AXTextBoxComponent } from '@acorex/components/text-box';
60
+ import { AXTextBoxModule } from '@acorex/components/text-box';
63
61
  import { transform, isEqual as isEqual$1 } from 'lodash';
64
62
 
65
63
  function ensureListActions(ctx) {
@@ -380,7 +378,8 @@ class AXPEntityMiddleware {
380
378
  }
381
379
  // Apply all matching modifiers in order
382
380
  for (const modifier of modifiers) {
383
- modifier(context);
381
+ //TODO Check side EFFECTS
382
+ runInInjectionContext(this.injector, () => modifier(context));
384
383
  }
385
384
  return context.toEntity();
386
385
  }
@@ -410,16 +409,38 @@ class AXPEntityResolver {
410
409
  this.providers = inject(AXP_ENTITY_DEFINITION_LOADER);
411
410
  }
412
411
  async get(moduleName, entityName) {
412
+ // Load from DI tokens
413
413
  if (Array.isArray(this.providers)) {
414
414
  for (const loader of this.providers) {
415
- const entity = await loader.get(moduleName, entityName);
415
+ let resolvedLoader;
416
+ if (loader instanceof Promise) {
417
+ // If loader is a promise, resolve it
418
+ resolvedLoader = await loader;
419
+ }
420
+ else {
421
+ // If loader is a direct instance, use it directly
422
+ resolvedLoader = loader;
423
+ }
424
+ const entity = await resolvedLoader.get(moduleName, entityName);
416
425
  if (entity) {
417
426
  return entity;
418
427
  }
419
428
  }
420
429
  }
421
430
  else {
422
- return await this.providers.get(moduleName, entityName);
431
+ let resolvedLoader;
432
+ if (this.providers instanceof Promise) {
433
+ // If loader is a promise, resolve it
434
+ resolvedLoader = await this.providers;
435
+ }
436
+ else {
437
+ // If loader is a direct instance, use it directly
438
+ resolvedLoader = this.providers;
439
+ }
440
+ const entity = await resolvedLoader.get(moduleName, entityName);
441
+ if (entity) {
442
+ return entity;
443
+ }
423
444
  }
424
445
  return null;
425
446
  }
@@ -433,8 +454,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
433
454
 
434
455
  class AXPEntityDefinitionRegistryService {
435
456
  constructor() {
436
- this.providers = inject(AXP_ENTITY_DEFINITION_LOADER);
437
- this.resolver = inject(AXPEntityResolver);
438
457
  this.middleware = inject(AXPEntityMiddleware);
439
458
  this.onChanged = new Subject();
440
459
  // Stores AXPEntityConfig objects, keyed by a combination of module and entity name.
@@ -445,42 +464,6 @@ class AXPEntityDefinitionRegistryService {
445
464
  get onChanged$() {
446
465
  return this.onChanged.asObservable();
447
466
  }
448
- async preload() {
449
- const providers = Array.isArray(this.providers)
450
- ? this.providers
451
- : [this.providers];
452
- const promises = [];
453
- // Helper to wrap a promise with a timeout
454
- function withTimeout(promise, ms = 10000, info = '') {
455
- return Promise.race([
456
- promise,
457
- new Promise((_, reject) => setTimeout(() => reject(new Error(`Timeout after ${ms}ms: ${info}`)), ms))
458
- ]);
459
- }
460
- providers.forEach((provider) => {
461
- const items = typeof provider.preload == 'function' ? provider.preload() : [];
462
- items.forEach((item) => {
463
- //console.log('[AXPEntityDefinitionRegistryService] Preloading entity:', item.module, item.entity);
464
- promises.push(withTimeout(this.resolver.get(item.module, item.entity)
465
- .catch(err => {
466
- console.error(`[AXPEntityDefinitionRegistryService] Failed to load entity ${item.module}.${item.entity}:`, err);
467
- return null;
468
- }), 10000, `${item.module}.${item.entity}`));
469
- });
470
- });
471
- const results = await Promise.allSettled(promises);
472
- const loadedEntities = [];
473
- results.forEach(async (result, idx) => {
474
- if (result.status === 'fulfilled' && result.value != null) {
475
- this.register(await this.middleware.process(result.value));
476
- loadedEntities.push(result.value);
477
- }
478
- else if (result.status === 'rejected') {
479
- console.error('[AXPEntityDefinitionRegistryService] Entity preload failed:', result.reason);
480
- }
481
- });
482
- //console.log('[AXPEntityDefinitionRegistryService] Loaded entities:', loadedEntities);
483
- }
484
467
  async refresh(arg1, arg2) {
485
468
  // No parameters: refresh all currently registered entities
486
469
  if (typeof arg1 === 'undefined' && typeof arg2 === 'undefined') {
@@ -537,6 +520,26 @@ class AXPEntityDefinitionRegistryService {
537
520
  getAll() {
538
521
  return Array.from(this.entities.values());
539
522
  }
523
+ /**
524
+ * Clear all registered entity configurations.
525
+ * Should be called when modules are cleared to prevent stale entity data.
526
+ * @param preserveModules Optional list of module names whose entities should be preserved
527
+ */
528
+ clear(preserveModules) {
529
+ if (preserveModules && preserveModules.length > 0) {
530
+ const preserveSet = new Set(preserveModules);
531
+ // Remove only entities from non-preserved modules
532
+ for (const [key, entity] of this.entities.entries()) {
533
+ if (!preserveSet.has(entity.module)) {
534
+ this.entities.delete(key);
535
+ }
536
+ }
537
+ }
538
+ else {
539
+ this.entities.clear();
540
+ }
541
+ this.onChanged.next({ name: '' });
542
+ }
540
543
  /**
541
544
  * Resolves an entity configuration based on module and entity name. If the configuration
542
545
  * is not already registered, attempts to load it dynamically. Throws an error if the
@@ -568,6 +571,10 @@ class AXPEntityDefinitionRegistryService {
568
571
  }
569
572
  return config;
570
573
  }
574
+ async exists(moduleName, entityName) {
575
+ const key = this.createEntityKey(moduleName, entityName);
576
+ return this.entities.has(key);
577
+ }
571
578
  /**
572
579
  * Creates a unique key for an entity based on its module and name.
573
580
  *
@@ -1013,7 +1020,7 @@ function toCompatFormFieldBuilder(field) {
1013
1020
  class AXPCreateEntityCommand {
1014
1021
  constructor() {
1015
1022
  this.entityForm = inject(AXPEntityFormBuilderService);
1016
- this.settingsService = inject(AXPSettingService);
1023
+ this.settingsService = inject(AXPSettingsService);
1017
1024
  this.entityService = inject(AXPEntityDefinitionRegistryService);
1018
1025
  this.toastService = inject(AXToastService);
1019
1026
  this.translationService = inject(AXTranslationService);
@@ -1133,7 +1140,7 @@ class AXPUpdateEntityCommand {
1133
1140
  constructor() {
1134
1141
  //#region ---- Services & Dependencies ----
1135
1142
  this.entityForm = inject(AXPEntityFormBuilderService);
1136
- this.settingsService = inject(AXPSettingService);
1143
+ this.settingsService = inject(AXPSettingsService);
1137
1144
  this.entityService = inject(AXPEntityDefinitionRegistryService);
1138
1145
  this.toastService = inject(AXToastService);
1139
1146
  this.translationService = inject(AXTranslationService);
@@ -1622,9 +1629,9 @@ class AXPEntityDetailPopoverComponent {
1622
1629
  AXPWidgetsCatalog.text,
1623
1630
  AXPWidgetsCatalog.largeText,
1624
1631
  AXPWidgetsCatalog.richText,
1625
- //
1626
- AXPWidgetsCatalog.select,
1627
- //AXPWidgetsCatalog.lookup,
1632
+ // TODO: Blinking issue with select widget, it seems rendering issue with select widget.
1633
+ //AXPWidgetsCatalog.select,
1634
+ AXPWidgetsCatalog.lookup,
1628
1635
  //
1629
1636
  AXPWidgetsCatalog.number,
1630
1637
  AXPWidgetsCatalog.toggle,
@@ -1681,7 +1688,7 @@ class AXPEntityDetailPopoverComponent {
1681
1688
  return importantProperties;
1682
1689
  }
1683
1690
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailPopoverComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1684
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPEntityDetailPopoverComponent, isStandalone: true, selector: "axp-entity-detail-popover", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "detailPopover", first: true, predicate: ["detailPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[textField()]) {\n {{ entityDetails()?.entityData[textField()] }}\n } @else {\n {{ item()?.[textField()] }}\n }\n </h3>\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button [color]=\"'primary'\" [look]=\"'solid'\" text=\"Open Details\" (click)=\"navigateToDetails()\"> </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1691
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPEntityDetailPopoverComponent, isStandalone: true, selector: "axp-entity-detail-popover", inputs: { entity: { classPropertyName: "entity", publicName: "entity", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "detailPopover", first: true, predicate: ["detailPopover"], descendants: true, isSignal: true }], ngImport: i0, template: "<ax-popover [openOn]=\"'manual'\" #detailPopover (openChange)=\"onDetailPopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[400px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold ax-text-on-lightest-surface\">\n @if (entityDetails()?.entityData?.[textField()]) {\n {{ entityDetails()?.entityData[textField()] }}\n } @else {\n {{ item()?.[textField()] }}\n }\n </h3>\n </div>\n @if (isLoadingDetails()) {\n <div class=\"ax-flex ax-items-center ax-justify-center ax-py-8\">\n <ax-loading>Loading details...</ax-loading>\n </div>\n } @else if (entityDetails()) {\n <div class=\"ax-space-y-3 ax-mb-4\">\n <!-- Important Entity Data -->\n @if (entityDetails()?.entityData) {\n <axp-widgets-container [context]=\"entityDetails()?.entityData\">\n <div class=\"ax-space-y-2\">\n @for (item of getEntityPropertiesWithWidgets(); track item.name) {\n <div class=\"ax-flex ax-justify-between ax-items-center\">\n <span class=\"ax-text-sm ax-font-medium\">{{ item.title | translate | async }}:</span>\n <div class=\"ax-flex-1 ax-ml-2 ax-max-w-48\">\n <ng-container axp-widget-renderer [node]=\"item.node\" [mode]=\"'view'\"></ng-container>\n </div>\n </div>\n }\n </div>\n </axp-widgets-container>\n }\n </div>\n <div class=\"ax-flex ax-gap-2 ax-justify-end ax-sm\">\n <ax-button [color]=\"'primary'\" [look]=\"'solid'\" text=\"Open Details\" (click)=\"navigateToDetails()\"> </ax-button>\n </div>\n }\n </div>\n</ax-popover>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: i3$1.AXPWidgetContainerComponent, selector: "axp-widgets-container", inputs: ["context", "functions"], outputs: ["onContextChanged"] }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1685
1692
  }
1686
1693
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityDetailPopoverComponent, decorators: [{
1687
1694
  type: Component,
@@ -1765,7 +1772,15 @@ class AXPDataSeederService {
1765
1772
  }
1766
1773
  async seed() {
1767
1774
  for (const loader of castArray(this.loaders)) {
1768
- await loader?.seed();
1775
+ if (!loader)
1776
+ continue;
1777
+ const seederName = loader.constructor?.name || 'UnknownSeeder';
1778
+ const startTime = performance.now();
1779
+ await loader.seed();
1780
+ const duration = performance.now() - startTime;
1781
+ if (duration > 3000) {
1782
+ console.warn(`[AXPDataSeeder] Seeder "${seederName}" took ${duration.toFixed(2)}ms (>3000ms threshold)`);
1783
+ }
1769
1784
  }
1770
1785
  }
1771
1786
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDataSeederService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -1824,14 +1839,27 @@ class AXPEntityDetailListViewModel {
1824
1839
  this.workflow = this.injector.get(AXPWorkflowService);
1825
1840
  this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
1826
1841
  this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
1842
+ this.queryExecutor = this.injector.get(AXPQueryExecutor);
1827
1843
  this.dataSource = new AXDataSource({
1828
- byKey: (key) => {
1829
- const func = this.detailEntity()?.queries.byKey.execute;
1830
- return func();
1844
+ byKey: async (key) => {
1845
+ const execute = this.detailEntity()?.queries?.byKey?.execute;
1846
+ if (typeof execute === 'function') {
1847
+ return await execute(key);
1848
+ }
1849
+ else if (typeof execute === 'string') {
1850
+ return await this.queryExecutor.fetch(execute, key);
1851
+ }
1852
+ return null;
1831
1853
  },
1832
- load: (e) => {
1833
- const func = this.detailEntity()?.queries.list?.execute;
1834
- return func(e);
1854
+ load: async (e) => {
1855
+ const execute = this.detailEntity()?.queries?.list?.execute;
1856
+ if (typeof execute === 'function') {
1857
+ return await execute(e);
1858
+ }
1859
+ else if (typeof execute === 'string') {
1860
+ return await this.queryExecutor.fetch(execute, e);
1861
+ }
1862
+ return null;
1835
1863
  },
1836
1864
  pageSize: 5,
1837
1865
  key: 'id',
@@ -1953,9 +1981,9 @@ class AXPEntityDetailListViewModel {
1953
1981
  this.initialize();
1954
1982
  }
1955
1983
  async initialize() {
1956
- const entityResolver = this.injector.get(AXPEntityResolver);
1984
+ const entityResolver = this.injector.get(AXPEntityDefinitionRegistryService);
1957
1985
  const [moduleName, entityName] = this.detailEntityConfig.entity.split('.');
1958
- const entity = await entityResolver.get(moduleName, entityName);
1986
+ const entity = await entityResolver.resolve(moduleName, entityName);
1959
1987
  if (!entity) {
1960
1988
  throw Error(`Invalid enitity name: ${this.detailEntityConfig.entity}`);
1961
1989
  }
@@ -2229,7 +2257,6 @@ class AXPEntityCreateViewElementViewModel {
2229
2257
  path: this.name(),
2230
2258
  name: this.name(),
2231
2259
  children: widget.children,
2232
- formula: widget.formula,
2233
2260
  triggers: widget.triggers,
2234
2261
  defaultValue: schema.defaultValue,
2235
2262
  valueTransforms: widget.valueTransforms,
@@ -2368,11 +2395,12 @@ class AXPEntityMasterListViewModel {
2368
2395
  this.formatService = this.injector.get(AXFormatService);
2369
2396
  this.session = this.injector.get(AXPSessionService);
2370
2397
  this.workflow = this.injector.get(AXPWorkflowService);
2371
- this.settings = this.injector.get(AXPSettingService);
2398
+ this.settings = this.injector.get(AXPSettingsService);
2372
2399
  this.widgetResolver = this.injector.get(AXPWidgetRegistryService);
2373
2400
  this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
2374
2401
  this.commandService = this.injector.get(AXPCommandService);
2375
2402
  this.eventService = this.injector.get(AXPBroadcastEventService);
2403
+ this.queryExecutor = this.injector.get(AXPQueryExecutor);
2376
2404
  this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
2377
2405
  this.settingEntityKey = `${this.config.module}:${this.config.name}`;
2378
2406
  this.destroyed = new Subject();
@@ -2388,13 +2416,25 @@ class AXPEntityMasterListViewModel {
2388
2416
  }, ...(ngDevMode ? [{ debugName: "views" }] : []));
2389
2417
  this.view = signal(this.views()[0], ...(ngDevMode ? [{ debugName: "view" }] : []));
2390
2418
  this.dataSource = new AXDataSource({
2391
- byKey: (key) => {
2392
- const func = this.entityDef.queries.byKey.execute;
2393
- return func();
2419
+ byKey: async (key) => {
2420
+ const execute = this.entityDef.queries?.byKey?.execute;
2421
+ if (typeof execute === 'function') {
2422
+ return await execute(key);
2423
+ }
2424
+ else if (typeof execute === 'string') {
2425
+ return await this.queryExecutor.fetch(execute, key);
2426
+ }
2427
+ return null;
2394
2428
  },
2395
- load: (e) => {
2396
- const func = this.entityDef.queries.list?.execute;
2397
- return func(e);
2429
+ load: async (e) => {
2430
+ const execute = this.entityDef.queries?.list?.execute;
2431
+ if (typeof execute === 'function') {
2432
+ return await execute(e);
2433
+ }
2434
+ else if (typeof execute === 'string') {
2435
+ return await this.queryExecutor.fetch(execute, e);
2436
+ }
2437
+ return null;
2398
2438
  },
2399
2439
  pageSize: this.view().pageSize || 10,
2400
2440
  key: 'id',
@@ -2922,13 +2962,363 @@ const AXPEntityListViewModelResolver = (route, state, service = inject(AXPEntity
2922
2962
  return service.create(moduleName, entityName);
2923
2963
  };
2924
2964
 
2965
+ class AXPEntityStorageService {
2966
+ }
2967
+ class AXPEntityDataProvider {
2968
+ }
2969
+ class AXPEntityDataProviderImpl {
2970
+ constructor(storageService, entityName) {
2971
+ this.storageService = storageService;
2972
+ this.entityName = entityName;
2973
+ }
2974
+ async initial(collection) {
2975
+ await this.storageService.initial(this.entityName, collection);
2976
+ }
2977
+ getOne(id) {
2978
+ return this.storageService.getOne(this.entityName, id);
2979
+ }
2980
+ getAll() {
2981
+ return this.storageService.getAll(this.entityName);
2982
+ }
2983
+ query(request) {
2984
+ return this.storageService.query(this.entityName, request);
2985
+ }
2986
+ updateOne(id, keyValues) {
2987
+ return this.storageService.updateOne(this.entityName, id, keyValues);
2988
+ }
2989
+ deleteOne(id) {
2990
+ return this.storageService.deleteOne(this.entityName, id);
2991
+ }
2992
+ insertOne(entity) {
2993
+ return this.storageService.insertOne(this.entityName, entity);
2994
+ }
2995
+ }
2996
+ class AXMEntityCrudService {
2997
+ }
2998
+ class AXMEntityCrudServiceImpl {
2999
+ constructor(entityName) {
3000
+ this.entityName = entityName;
3001
+ this._storageService = inject(AXPEntityStorageService);
3002
+ this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
3003
+ this._entityDataProvider = new AXPEntityDataProviderImpl(this._storageService, this.entityName);
3004
+ this._entityCategoryDataProvider = new AXPEntityDataProviderImpl(this._storageService, `${this.entityName}Category`);
3005
+ }
3006
+ async insertOne(request) {
3007
+ return this._entityDataProvider.insertOne(request);
3008
+ }
3009
+ async getOne(id) {
3010
+ return this._entityDataProvider.getOne(id);
3011
+ }
3012
+ //DELETE
3013
+ async deleteOne(id) {
3014
+ return this._entityDataProvider.deleteOne(id);
3015
+ }
3016
+ async updateOne(id, values) {
3017
+ return this._entityDataProvider.updateOne(id, values);
3018
+ }
3019
+ async query(request = { skip: 0, take: 100 }) {
3020
+ const [moduleName, entityName] = this._entityDataProvider.entityName.split('.');
3021
+ try {
3022
+ const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
3023
+ if (entityRef.parentKey) {
3024
+ if (!request.filter?.filters?.length && request.filter?.field !== entityRef.parentKey) {
3025
+ request.filter = {
3026
+ value: true,
3027
+ field: entityRef.parentKey,
3028
+ operator: {
3029
+ type: 'isEmpty',
3030
+ },
3031
+ };
3032
+ }
3033
+ }
3034
+ }
3035
+ catch (error) {
3036
+ console.error(error);
3037
+ }
3038
+ return this._entityDataProvider.query(request);
3039
+ }
3040
+ async findOne(filter) {
3041
+ const result = await this._entityDataProvider.query({ filter, skip: 0, take: 1 });
3042
+ return result.items[0];
3043
+ }
3044
+ async getRoots(request) {
3045
+ const queryRequest = {
3046
+ skip: 0,
3047
+ take: 1000,
3048
+ filter: {
3049
+ value: true,
3050
+ field: 'parentId',
3051
+ operator: {
3052
+ type: 'isEmpty',
3053
+ },
3054
+ },
3055
+ };
3056
+ const result = await this._entityDataProvider.query(queryRequest);
3057
+ return result;
3058
+ }
3059
+ async getChildren(request) {
3060
+ const parentKey = request.parentKey ?? 'parentId';
3061
+ const queryRequest = {
3062
+ skip: 0,
3063
+ take: 1000,
3064
+ filter: {
3065
+ value: request.parentId,
3066
+ field: parentKey,
3067
+ operator: {
3068
+ type: 'equal',
3069
+ },
3070
+ },
3071
+ };
3072
+ const result = await this._entityDataProvider.query(queryRequest);
3073
+ return result;
3074
+ }
3075
+ async getByCategory(request) {
3076
+ const queryRequest = {
3077
+ skip: 0,
3078
+ take: 1000,
3079
+ filter: {
3080
+ value: request.categoryId,
3081
+ field: request.categoryKey ?? 'categoryIds',
3082
+ operator: {
3083
+ type: 'contains',
3084
+ },
3085
+ },
3086
+ };
3087
+ const result = await this._entityDataProvider.query(queryRequest);
3088
+ return result;
3089
+ }
3090
+ async getCategoriesList(request = { skip: 0, take: 1000 }) {
3091
+ return this._entityCategoryDataProvider.query(request);
3092
+ }
3093
+ get storageService() {
3094
+ return this._storageService;
3095
+ }
3096
+ async custom(request) { }
3097
+ }
3098
+
3099
+ //#region ---- EntityDataAccessor ----
3100
+ /**
3101
+ * Data accessor for entity operations.
3102
+ * Provides methods to query and execute commands with smart resolution:
3103
+ * 1. Checks entity definition queries/commands first
3104
+ * 2. Falls back to CRUD service if not defined
3105
+ */
3106
+ class EntityDataAccessor {
3107
+ constructor(module, entity, entityRegistry, queryExecutor, commandService) {
3108
+ this.module = module;
3109
+ this.entity = entity;
3110
+ this.entityRegistry = entityRegistry;
3111
+ this.queryExecutor = queryExecutor;
3112
+ this.commandService = commandService;
3113
+ this.crudService = null;
3114
+ this.entityDef = null;
3115
+ this.entityDefPromise = null;
3116
+ }
3117
+ /**
3118
+ * Resolves the entity definition lazily and caches it.
3119
+ * @returns The resolved entity definition
3120
+ */
3121
+ async resolveEntityDef() {
3122
+ if (this.entityDef) {
3123
+ return this.entityDef;
3124
+ }
3125
+ if (!this.entityDefPromise) {
3126
+ this.entityDefPromise = this.entityRegistry.resolve(this.module, this.entity);
3127
+ }
3128
+ this.entityDef = await this.entityDefPromise;
3129
+ if (!this.entityDef) {
3130
+ throw new Error(`Entity "${this.module}.${this.entity}" could not be resolved`);
3131
+ }
3132
+ return this.entityDef;
3133
+ }
3134
+ /**
3135
+ * Gets a single entity by key.
3136
+ * @param key - The entity key
3137
+ * @returns The entity detail or null if not found
3138
+ */
3139
+ async byKey(key) {
3140
+ const entityDef = await this.resolveEntityDef();
3141
+ const execute = entityDef.queries?.byKey?.execute;
3142
+ if (typeof execute === 'function') {
3143
+ return await execute(key);
3144
+ }
3145
+ else if (typeof execute === 'string') {
3146
+ return await this.queryExecutor.fetch(execute, key);
3147
+ }
3148
+ // Fallback to CRUD service
3149
+ if (!this.crudService) {
3150
+ this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
3151
+ }
3152
+ return await this.crudService.getOne(key);
3153
+ }
3154
+ /**
3155
+ * Queries a list of entities.
3156
+ * @param request - The query request (optional)
3157
+ * @returns The paged list result
3158
+ */
3159
+ async query(request) {
3160
+ const entityDef = await this.resolveEntityDef();
3161
+ const defaultRequest = { skip: 0, take: 10 };
3162
+ const queryRequest = request || defaultRequest;
3163
+ const execute = entityDef.queries?.list?.execute;
3164
+ if (typeof execute === 'function') {
3165
+ return await execute(queryRequest);
3166
+ }
3167
+ else if (typeof execute === 'string') {
3168
+ const result = await this.queryExecutor.fetch(execute, queryRequest);
3169
+ if (!result) {
3170
+ throw new Error(`Query "${execute}" returned null`);
3171
+ }
3172
+ return result;
3173
+ }
3174
+ // Fallback to CRUD service
3175
+ if (!this.crudService) {
3176
+ this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
3177
+ }
3178
+ return await this.crudService.query(queryRequest);
3179
+ }
3180
+ /**
3181
+ * Creates a new entity.
3182
+ * @param data - The entity data to create
3183
+ * @returns The created entity key
3184
+ */
3185
+ async create(data) {
3186
+ const entityDef = await this.resolveEntityDef();
3187
+ const execute = entityDef.commands?.create?.execute;
3188
+ if (typeof execute === 'function') {
3189
+ const result = await execute(data);
3190
+ return result?.id || result;
3191
+ }
3192
+ else if (typeof execute === 'string') {
3193
+ const result = await this.commandService.execute(execute, data);
3194
+ if (!result?.success) {
3195
+ throw new Error(result?.message?.text || 'Failed to create entity');
3196
+ }
3197
+ return result.data?.id || result.data;
3198
+ }
3199
+ // Fallback to CRUD service
3200
+ if (!this.crudService) {
3201
+ this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
3202
+ }
3203
+ return await this.crudService.insertOne(data);
3204
+ }
3205
+ /**
3206
+ * Updates an existing entity.
3207
+ * @param id - The entity key
3208
+ * @param data - The entity data to update
3209
+ * @returns The updated entity
3210
+ */
3211
+ async update(id, data) {
3212
+ const entityDef = await this.resolveEntityDef();
3213
+ const execute = entityDef.commands?.update?.execute;
3214
+ const updateData = { id, ...data };
3215
+ if (typeof execute === 'function') {
3216
+ return await execute(updateData);
3217
+ }
3218
+ else if (typeof execute === 'string') {
3219
+ const result = await this.commandService.execute(execute, updateData);
3220
+ if (!result?.success) {
3221
+ throw new Error(result?.message?.text || 'Failed to update entity');
3222
+ }
3223
+ return result.data;
3224
+ }
3225
+ // Fallback to CRUD service
3226
+ if (!this.crudService) {
3227
+ this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
3228
+ }
3229
+ return await this.crudService.updateOne(id, data);
3230
+ }
3231
+ /**
3232
+ * Deletes an entity.
3233
+ * @param id - The entity key
3234
+ */
3235
+ async delete(id) {
3236
+ const entityDef = await this.resolveEntityDef();
3237
+ const execute = entityDef.commands?.delete?.execute;
3238
+ if (typeof execute === 'function') {
3239
+ await execute(id);
3240
+ return;
3241
+ }
3242
+ else if (typeof execute === 'string') {
3243
+ const result = await this.commandService.execute(execute, id);
3244
+ if (!result?.success) {
3245
+ throw new Error(result?.message?.text || 'Failed to delete entity');
3246
+ }
3247
+ return;
3248
+ }
3249
+ // Fallback to CRUD service
3250
+ if (!this.crudService) {
3251
+ this.crudService = new AXMEntityCrudServiceImpl(`${this.module}.${this.entity}`);
3252
+ }
3253
+ return await this.crudService.deleteOne(id);
3254
+ }
3255
+ }
3256
+ //#endregion
3257
+ //#region ---- EntityBuilder ----
3258
+ /**
3259
+ * Builder class for entity operations.
3260
+ * Provides methods to create paths and access entity data.
3261
+ */
3262
+ class EntityBuilder {
3263
+ constructor(module, entity, sessionService, entityRegistry, queryExecutor, commandService) {
3264
+ this.sessionService = sessionService;
3265
+ this.entityRegistry = entityRegistry;
3266
+ this.queryExecutor = queryExecutor;
3267
+ this.commandService = commandService;
3268
+ this.module = module;
3269
+ this.entity = entity;
3270
+ }
3271
+ /**
3272
+ * Creates a path for the entity.
3273
+ * @param path - The path segment (defaults to 'list')
3274
+ * @returns The full path string
3275
+ */
3276
+ createPath(path = 'list') {
3277
+ return `/${this.sessionService.application?.name}/m/${this.module}/e/${this.entity}/${path}`;
3278
+ }
3279
+ /**
3280
+ * Gets the data accessor for the entity with generic type support.
3281
+ * Entity definition is resolved lazily on first method call.
3282
+ * @returns An EntityDataAccessor instance
3283
+ */
3284
+ data() {
3285
+ return new EntityDataAccessor(this.module, this.entity, this.entityRegistry, this.queryExecutor, this.commandService);
3286
+ }
3287
+ }
3288
+ //#endregion
2925
3289
  class AXPEntityService {
2926
3290
  constructor() {
2927
3291
  this.sessionService = inject(AXPSessionService);
3292
+ this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
3293
+ this.queryExecutor = inject(AXPQueryExecutor);
3294
+ this.commandService = inject(AXPCommandService);
2928
3295
  }
3296
+ /**
3297
+ * @deprecated Use `withEntity(module, entity).createPath(path)` instead.
3298
+ * This method will be removed in a future version.
3299
+ */
2929
3300
  createPath(module, entity, path = 'list') {
2930
3301
  return `/${this.sessionService.application?.name}/m/${module}/e/${entity}/${path}`;
2931
3302
  }
3303
+ withEntity(moduleOrEntityKey, entity) {
3304
+ let module;
3305
+ let entityName;
3306
+ if (entity !== undefined) {
3307
+ // Two parameters: module and entity
3308
+ module = moduleOrEntityKey;
3309
+ entityName = entity;
3310
+ }
3311
+ else {
3312
+ // Single parameter: "module.entity" format
3313
+ const dotIndex = moduleOrEntityKey.indexOf('.');
3314
+ if (dotIndex === -1) {
3315
+ throw new Error(`Invalid entity key format: "${moduleOrEntityKey}". Expected format: "module.entity"`);
3316
+ }
3317
+ module = moduleOrEntityKey.substring(0, dotIndex);
3318
+ entityName = moduleOrEntityKey.substring(dotIndex + 1);
3319
+ }
3320
+ return new EntityBuilder(module, entityName, this.sessionService, this.entityRegistry, this.queryExecutor, this.commandService);
3321
+ }
2932
3322
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2933
3323
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityService, providedIn: 'root' }); }
2934
3324
  }
@@ -2945,13 +3335,13 @@ class AXPEntityPerformDeleteAction extends AXPWorkflowAction {
2945
3335
  this.dialogService = inject(AXDialogService);
2946
3336
  this.loadingDialog = inject(AXLoadingDialogService);
2947
3337
  this.translationService = inject(AXTranslationService);
2948
- this.settingService = inject(AXPSettingService);
3338
+ this.settingsService = inject(AXPSettingsService);
2949
3339
  }
2950
3340
  async execute(context) {
2951
3341
  const moduleEntity = context.getVariable('entity');
2952
3342
  const data = context.getVariable('data');
2953
3343
  const meta = context.getVariable('meta');
2954
- const showResult = await this.settingService.get(AXPCommonSettings.EnableOperationToasts);
3344
+ const showResult = await this.settingsService.get(AXPCommonSettings.EnableOperationToasts);
2955
3345
  const entities = [];
2956
3346
  if (moduleEntity != null) {
2957
3347
  const ids = Array.isArray(data) ? data.map((c) => c.id) : [data.id];
@@ -3176,7 +3566,6 @@ class AXPEntityMasterUpdateElementViewModel {
3176
3566
  path: this.name(),
3177
3567
  name: this.name(),
3178
3568
  children: widget.children,
3179
- formula: widget.formula,
3180
3569
  triggers: widget.triggers,
3181
3570
  valueTransforms: widget.valueTransforms,
3182
3571
  options: merge(schema.interface?.options, {
@@ -3258,8 +3647,8 @@ class AXPEntityMasterUpdateViewModelFactory {
3258
3647
  async create(moduleName, entityName, id, props) {
3259
3648
  const config = await this.entityService.resolve(moduleName, entityName);
3260
3649
  this.layout.setNavigationLoading(true);
3261
- if (config.queries.byKey) {
3262
- const func = config.queries.byKey.execute;
3650
+ if (config.queries?.byKey) {
3651
+ const func = config.queries?.byKey?.execute;
3263
3652
  const data = await func(id);
3264
3653
  this.layout.setNavigationLoading(false);
3265
3654
  return new AXPEntityMasterUpdateViewModel(this.injector, config, data, props);
@@ -3434,7 +3823,6 @@ class AXPEntityMasterSingleElementViewModel {
3434
3823
  mode: 'view',
3435
3824
  path: this.path(),
3436
3825
  children: widget.children,
3437
- formula: widget.formula,
3438
3826
  valueTransforms: widget.valueTransforms,
3439
3827
  options: merge(schema.interface?.options),
3440
3828
  };
@@ -3616,8 +4004,8 @@ class AXPEntityDetailViewModelFactory {
3616
4004
  async create(moduleName, entityName, id) {
3617
4005
  const config = await this.entityService.resolve(moduleName, entityName);
3618
4006
  this.layout.setNavigationLoading(true);
3619
- if (config.queries.byKey) {
3620
- const func = config.queries.byKey.execute;
4007
+ if (config.queries?.byKey) {
4008
+ const func = config.queries?.byKey?.execute;
3621
4009
  const data = await func(id);
3622
4010
  this.layout.setNavigationLoading(false);
3623
4011
  return new AXPEntityMasterSingleViewModel(this.injector, config, data);
@@ -3640,138 +4028,6 @@ const AXPEntityDetailViewModelResolver = (route, state, service = inject(AXPEnti
3640
4028
  return service.create(moduleName, entityName, id);
3641
4029
  };
3642
4030
 
3643
- class AXPEntityStorageService {
3644
- }
3645
- class AXPEntityDataProvider {
3646
- }
3647
- class AXPEntityDataProviderImpl {
3648
- constructor(storageService, entityName) {
3649
- this.storageService = storageService;
3650
- this.entityName = entityName;
3651
- }
3652
- async initial(collection) {
3653
- await this.storageService.initial(this.entityName, collection);
3654
- }
3655
- getOne(id) {
3656
- return this.storageService.getOne(this.entityName, id);
3657
- }
3658
- getAll() {
3659
- return this.storageService.getAll(this.entityName);
3660
- }
3661
- query(request) {
3662
- return this.storageService.query(this.entityName, request);
3663
- }
3664
- updateOne(id, keyValues) {
3665
- return this.storageService.updateOne(this.entityName, id, keyValues);
3666
- }
3667
- deleteOne(id) {
3668
- return this.storageService.deleteOne(this.entityName, id);
3669
- }
3670
- insertOne(entity) {
3671
- return this.storageService.insertOne(this.entityName, entity);
3672
- }
3673
- }
3674
- class AXMEntityCrudService {
3675
- }
3676
- class AXMEntityCrudServiceImpl {
3677
- constructor(entityName) {
3678
- this.entityName = entityName;
3679
- this._storageService = inject(AXPEntityStorageService);
3680
- this.entityRegistery = inject(AXPEntityDefinitionRegistryService);
3681
- this._entityDataProvider = new AXPEntityDataProviderImpl(this._storageService, this.entityName);
3682
- this._entityCategoryDataProvider = new AXPEntityDataProviderImpl(this._storageService, `${this.entityName}Category`);
3683
- }
3684
- async insertOne(request) {
3685
- return this._entityDataProvider.insertOne(request);
3686
- }
3687
- async getOne(id) {
3688
- return this._entityDataProvider.getOne(id);
3689
- }
3690
- async deleteOne(id) {
3691
- return this._entityDataProvider.deleteOne(id);
3692
- }
3693
- async updateOne(id, values) {
3694
- return this._entityDataProvider.updateOne(id, values);
3695
- }
3696
- async query(request = { skip: 0, take: 100 }) {
3697
- const [moduleName, entityName] = this._entityDataProvider.entityName.split('.');
3698
- try {
3699
- const entityRef = await this.entityRegistery.resolve(moduleName, entityName);
3700
- if (entityRef.parentKey) {
3701
- if (!request.filter?.filters?.length && request.filter?.field !== entityRef.parentKey) {
3702
- request.filter = {
3703
- value: true,
3704
- field: entityRef.parentKey,
3705
- operator: {
3706
- type: 'isEmpty',
3707
- },
3708
- };
3709
- }
3710
- }
3711
- }
3712
- catch (error) {
3713
- console.error(error);
3714
- }
3715
- return this._entityDataProvider.query(request);
3716
- }
3717
- async findOne(filter) {
3718
- const result = await this._entityDataProvider.query({ filter, skip: 0, take: 1 });
3719
- return result.items[0];
3720
- }
3721
- async getRoots(request) {
3722
- const queryRequest = {
3723
- skip: 0,
3724
- take: 1000,
3725
- filter: {
3726
- value: true,
3727
- field: 'parentId',
3728
- operator: {
3729
- type: 'isEmpty',
3730
- },
3731
- },
3732
- };
3733
- const result = await this._entityDataProvider.query(queryRequest);
3734
- return result;
3735
- }
3736
- async getChildren(request) {
3737
- const parentKey = request.parentKey ?? 'parentId';
3738
- const queryRequest = {
3739
- skip: 0,
3740
- take: 1000,
3741
- filter: {
3742
- value: request.parentId,
3743
- field: parentKey,
3744
- operator: {
3745
- type: 'equal',
3746
- },
3747
- },
3748
- };
3749
- const result = await this._entityDataProvider.query(queryRequest);
3750
- return result;
3751
- }
3752
- async getByCategory(request) {
3753
- const queryRequest = {
3754
- skip: 0,
3755
- take: 1000,
3756
- filter: {
3757
- value: request.categoryId,
3758
- field: request.categoryKey ?? 'categoryIds',
3759
- operator: {
3760
- type: 'contains',
3761
- },
3762
- },
3763
- };
3764
- const result = await this._entityDataProvider.query(queryRequest);
3765
- return result;
3766
- }
3767
- async getCategoriesList(request = { skip: 0, take: 1000 }) {
3768
- return this._entityCategoryDataProvider.query(request);
3769
- }
3770
- get storageService() {
3771
- return this._storageService;
3772
- }
3773
- }
3774
-
3775
4031
  class AXPLayoutAdapterBuilder {
3776
4032
  constructor() {
3777
4033
  this.adapter = {};
@@ -5331,10 +5587,15 @@ const eventDispatchMiddleware = {
5331
5587
  target: { ops: ['create', 'update', 'delete'], order: 90 },
5332
5588
  execute: async (ctx, next) => {
5333
5589
  const dispatcher = inject(AXPEntityEventDispatcherService);
5590
+ const workflowEventService = inject(AXPWorkflowEventService);
5334
5591
  await next();
5335
5592
  if (ctx.op === 'create') {
5336
5593
  const createdData = ctx.result ? { ...ctx.data, id: ctx.result } : ctx.data;
5337
5594
  await dispatcher.dispatchInserted(ctx.entityName, { refType: ctx.entityName, data: createdData });
5595
+ // Dispatch workflow refresh event to trigger entity list refresh
5596
+ workflowEventService.dispatch(AXPRefreshEvent({
5597
+ entity: ctx.entityName,
5598
+ }));
5338
5599
  }
5339
5600
  else if (ctx.op === 'update') {
5340
5601
  await dispatcher.dispatchUpdated(ctx.entityName, {
@@ -5342,10 +5603,18 @@ const eventDispatchMiddleware = {
5342
5603
  data: ctx.result,
5343
5604
  changes: ctx.locals.get('changes'),
5344
5605
  });
5606
+ // Dispatch workflow refresh event to trigger entity list refresh
5607
+ workflowEventService.dispatch(AXPRefreshEvent({
5608
+ entity: ctx.entityName,
5609
+ }));
5345
5610
  }
5346
5611
  else if (ctx.op === 'delete') {
5347
5612
  // For delete, prefer previous entity if available
5348
5613
  await dispatcher.dispatchDeleted(ctx.entityName, { refType: ctx.entityName, data: ctx.result ?? ctx.previous });
5614
+ // Dispatch workflow refresh event to trigger entity list refresh
5615
+ workflowEventService.dispatch(AXPRefreshEvent({
5616
+ entity: ctx.entityName,
5617
+ }));
5349
5618
  }
5350
5619
  },
5351
5620
  };
@@ -5571,10 +5840,72 @@ const createLayoutOrderingMiddlewareProvider = (config = {}, entityName = '*') =
5571
5840
  }),
5572
5841
  };
5573
5842
  };
5574
- /**
5575
- * Default provider registered with the default configuration
5576
- */
5577
- const layoutOrderingMiddlewareProvider = createLayoutOrderingMiddlewareProvider();
5843
+ /**
5844
+ * Default provider registered with the default configuration
5845
+ */
5846
+ const layoutOrderingMiddlewareProvider = createLayoutOrderingMiddlewareProvider();
5847
+ //#endregion
5848
+
5849
+ /**
5850
+ * Factory to create a column width middleware using provided config map.
5851
+ * Sets width for columns defined in the map if not already defined on the column.
5852
+ */
5853
+ const AXPCrudModifier = {
5854
+ entityName: '*',
5855
+ modifier: (ctx) => {
5856
+ const dataService = new AXMEntityCrudServiceImpl(ctx.module.get() + '.' + ctx.name.get());
5857
+ ctx.commands.update((command) => {
5858
+ if (!command) {
5859
+ command = {};
5860
+ }
5861
+ if (!command?.create) {
5862
+ command.create = {
5863
+ execute: async (data) => {
5864
+ const res = await dataService.insertOne(data);
5865
+ return { id: res };
5866
+ },
5867
+ };
5868
+ }
5869
+ if (!command?.delete) {
5870
+ command.delete = {
5871
+ execute: async (id) => {
5872
+ return await dataService.deleteOne(id);
5873
+ },
5874
+ };
5875
+ }
5876
+ if (!command?.update) {
5877
+ command.update = {
5878
+ execute: async (data) => {
5879
+ return await dataService.updateOne(data.id, data);
5880
+ },
5881
+ };
5882
+ }
5883
+ return command;
5884
+ });
5885
+ ctx.queries.update((queries) => {
5886
+ if (!queries) {
5887
+ queries = {};
5888
+ }
5889
+ if (!queries?.byKey) {
5890
+ queries.byKey = {
5891
+ execute: async (id) => {
5892
+ return await dataService.getOne(id);
5893
+ },
5894
+ type: AXPEntityQueryType.Single,
5895
+ };
5896
+ }
5897
+ if (!queries?.list) {
5898
+ queries.list = {
5899
+ execute: async (e) => {
5900
+ return await dataService.query(e);
5901
+ },
5902
+ type: AXPEntityQueryType.List,
5903
+ };
5904
+ }
5905
+ return queries;
5906
+ });
5907
+ },
5908
+ };
5578
5909
  //#endregion
5579
5910
 
5580
5911
  class AXPEntityCommandSearchDefinitionProvider {
@@ -5748,7 +6079,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
5748
6079
  class AXPCategoryTreeService {
5749
6080
  constructor() {
5750
6081
  //#region ---- Services & Dependencies ----
5751
- this.entityResolver = inject(AXPEntityResolver);
6082
+ this.entityResolver = inject(AXPEntityDefinitionRegistryService);
5752
6083
  this.translate = inject(AXTranslationService);
5753
6084
  }
5754
6085
  //#endregion
@@ -5766,8 +6097,8 @@ class AXPCategoryTreeService {
5766
6097
  if (!module || !entity) {
5767
6098
  return null;
5768
6099
  }
5769
- const categoryEntityDef = await this.entityResolver.get(module, entity);
5770
- if (!categoryEntityDef?.queries.list?.execute) {
6100
+ const categoryEntityDef = await this.entityResolver.resolve(module, entity);
6101
+ if (!categoryEntityDef?.queries?.list?.execute || typeof categoryEntityDef.queries.list.execute !== 'function') {
5771
6102
  return null;
5772
6103
  }
5773
6104
  const categoryEntityQueryFunc = categoryEntityDef.queries.list.execute;
@@ -8033,7 +8364,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
8033
8364
  //#region ---- Services & Dependencies ----
8034
8365
  this.entityDetailPopoverService = inject(AXPEntityDetailPopoverService);
8035
8366
  this.formatService = inject(AXFormatService);
8036
- this.entityResolver = inject(AXPEntityResolver);
8367
+ this.entityResolver = inject(AXPEntityDefinitionRegistryService);
8037
8368
  //#endregion
8038
8369
  //#region ---- Inputs ----
8039
8370
  this.rawValueSignal = signal(null, ...(ngDevMode ? [{ debugName: "rawValueSignal" }] : []));
@@ -8070,7 +8401,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
8070
8401
  if (!module || !entity) {
8071
8402
  return;
8072
8403
  }
8073
- this.entityDef.set(await this.entityResolver.get(module, entity));
8404
+ this.entityDef.set(await this.entityResolver.resolve(module, entity));
8074
8405
  }, ...(ngDevMode ? [{ debugName: "efEntity" }] : []));
8075
8406
  this.efDisplay = effect(async () => {
8076
8407
  const value = this.rawValueSignal();
@@ -8162,7 +8493,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
8162
8493
  }
8163
8494
  else {
8164
8495
  // If item is just an ID, fetch the full item
8165
- const byKey = this.entityDef()?.queries.byKey?.execute;
8496
+ const byKey = this.entityDef()?.queries?.byKey?.execute;
8166
8497
  if (byKey) {
8167
8498
  try {
8168
8499
  itemObj = await byKey(item);
@@ -8206,7 +8537,7 @@ class AXPEntityCategoryWidgetColumnComponent extends AXPColumnWidgetComponent {
8206
8537
  }
8207
8538
  const valueField = this.valueField();
8208
8539
  const textField = this.displayField();
8209
- const byKey = this.entityDef()?.queries.byKey?.execute;
8540
+ const byKey = this.entityDef()?.queries?.byKey?.execute;
8210
8541
  if (!byKey) {
8211
8542
  return item;
8212
8543
  }
@@ -8691,7 +9022,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
8691
9022
  constructor() {
8692
9023
  super(...arguments);
8693
9024
  //#region ---- Services & Dependencies ----
8694
- this.entityResolver = inject(AXPEntityResolver);
9025
+ this.entityResolver = inject(AXPEntityDefinitionRegistryService);
8695
9026
  this.popupService = inject(AXPopupService);
8696
9027
  this.translateService = inject(AXTranslationService);
8697
9028
  this.cdr = inject(ChangeDetectorRef);
@@ -8734,7 +9065,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
8734
9065
  if (!entityKey)
8735
9066
  return;
8736
9067
  const [module, entity] = entityKey.split('.');
8737
- this.entityDef.set(await this.entityResolver.get(module, entity));
9068
+ this.entityDef.set(await this.entityResolver.resolve(module, entity));
8738
9069
  }, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
8739
9070
  this.#efValue = effect(() => {
8740
9071
  const value = this.getValue();
@@ -8847,7 +9178,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
8847
9178
  const excludedNodeId = currentEntityId ? String(currentEntityId) : undefined;
8848
9179
  try {
8849
9180
  const result = await this.popupService.open(AXPEntityCategoryTreeSelectorComponent, {
8850
- title: `${this.translateService.translateSync('@general:widgets.lookup.search')} ${this.translateService.translateSync(this.entityDef()?.formats.plural ?? '')}`,
9181
+ title: `${this.translateService.translateSync('@general:widgets.lookup.search.placeholder')} ${this.translateService.translateSync(this.entityDef()?.formats.plural ?? '')}`,
8851
9182
  size: 'md',
8852
9183
  data: {
8853
9184
  entityKey: signal(this.entity()),
@@ -8925,7 +9256,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
8925
9256
  return;
8926
9257
  }
8927
9258
  const values = castArray(rawValue);
8928
- const byKey = this.entityDef()?.queries.byKey?.execute;
9259
+ const byKey = this.entityDef()?.queries?.byKey?.execute;
8929
9260
  if (!byKey) {
8930
9261
  this.setItems([]);
8931
9262
  this.isLoading.set(false);
@@ -9092,7 +9423,7 @@ class AXPEntityCategoryWidgetEditComponent extends AXPValueWidgetComponent {
9092
9423
  }
9093
9424
  const valueField = this.valueField();
9094
9425
  const textField = this.displayField();
9095
- const byKey = this.entityDef()?.queries.byKey?.execute;
9426
+ const byKey = this.entityDef()?.queries?.byKey?.execute;
9096
9427
  if (!byKey) {
9097
9428
  return item;
9098
9429
  }
@@ -9266,7 +9597,7 @@ class AXPEntityCategoryWidgetViewComponent extends AXPValueWidgetComponent {
9266
9597
  super(...arguments);
9267
9598
  //#region ---- Services & Dependencies ----
9268
9599
  this.formatService = inject(AXFormatService);
9269
- this.entityResolver = inject(AXPEntityResolver);
9600
+ this.entityResolver = inject(AXPEntityDefinitionRegistryService);
9270
9601
  //#endregion
9271
9602
  //#region ---- Computed Properties ----
9272
9603
  this.entity = computed(() => this.options()['entity'] ?? '', ...(ngDevMode ? [{ debugName: "entity" }] : []));
@@ -9296,7 +9627,7 @@ class AXPEntityCategoryWidgetViewComponent extends AXPValueWidgetComponent {
9296
9627
  if (!module || !entity) {
9297
9628
  return;
9298
9629
  }
9299
- this.entityDef.set(await this.entityResolver.get(module, entity));
9630
+ this.entityDef.set(await this.entityResolver.resolve(module, entity));
9300
9631
  }, ...(ngDevMode ? [{ debugName: "efEntity" }] : []));
9301
9632
  this.efDisplay = effect(async () => {
9302
9633
  const value = this.getValue();
@@ -9319,7 +9650,7 @@ class AXPEntityCategoryWidgetViewComponent extends AXPValueWidgetComponent {
9319
9650
  };
9320
9651
  }
9321
9652
  const def = this.entityDef();
9322
- const byKey = def?.queries.byKey?.execute;
9653
+ const byKey = def?.queries?.byKey?.execute;
9323
9654
  if (byKey) {
9324
9655
  this.loading.set(true);
9325
9656
  try {
@@ -9619,12 +9950,12 @@ class AXPEntityListTableService {
9619
9950
  createDataSource(entity) {
9620
9951
  return new AXDataSource({
9621
9952
  byKey: (key) => {
9622
- const func = entity.queries.byKey.execute;
9953
+ const func = entity.queries?.byKey?.execute;
9623
9954
  return func(key);
9624
9955
  },
9625
9956
  load: (e) => {
9626
- const func = entity.queries.list?.execute;
9627
- if (!func) {
9957
+ const func = entity.queries?.list?.execute;
9958
+ if (!func || typeof func !== 'function') {
9628
9959
  throw new Error(`Entity ${entity.name} does not have a list query`);
9629
9960
  }
9630
9961
  return func(e);
@@ -9704,7 +10035,6 @@ class AXPEntityListTableService {
9704
10035
  options: options,
9705
10036
  metadata: action?.metadata,
9706
10037
  });
9707
- console.log('Entity List - Row command:', e.name, e.data);
9708
10038
  }
9709
10039
  /**
9710
10040
  * Create default events
@@ -10286,7 +10616,7 @@ class AXPEntityListWidgetViewComponent extends AXPValueWidgetComponent {
10286
10616
  ></ng-container>
10287
10617
  }
10288
10618
  </div>
10289
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4$3.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10619
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i3.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i3.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i4$3.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10290
10620
  }
10291
10621
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityListWidgetViewComponent, decorators: [{
10292
10622
  type: Component,
@@ -10451,144 +10781,6 @@ const AXPEntityListWidget = {
10451
10781
  },
10452
10782
  };
10453
10783
 
10454
- class AXPEntityReferenceWidgetViewComponent extends AXPLayoutBaseWidgetComponent {
10455
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
10456
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10457
- }
10458
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetViewComponent, decorators: [{
10459
- type: Component,
10460
- args: [{
10461
- template: ``,
10462
- standalone: true,
10463
- changeDetection: ChangeDetectionStrategy.OnPush,
10464
- imports: [CommonModule],
10465
- }]
10466
- }] });
10467
-
10468
- var entityReferenceWidgetView_component = /*#__PURE__*/Object.freeze({
10469
- __proto__: null,
10470
- AXPEntityReferenceWidgetViewComponent: AXPEntityReferenceWidgetViewComponent
10471
- });
10472
-
10473
- class AXPEntityReferenceWidgetEditComponent extends AXPLayoutBaseWidgetComponent {
10474
- constructor() {
10475
- super(...arguments);
10476
- this.injector = inject(Injector);
10477
- this.entityResolver = inject(AXPEntityResolver);
10478
- this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
10479
- this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : []));
10480
- this.#efEntity = effect(async () => {
10481
- const [module, entity] = this.entity().split('.');
10482
- this.entityDef.set(await this.entityResolver.get(module, entity));
10483
- console.log(this.entityDef());
10484
- }, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
10485
- }
10486
- #efEntity;
10487
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
10488
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetEditComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10489
- }
10490
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetEditComponent, decorators: [{
10491
- type: Component,
10492
- args: [{
10493
- template: ``,
10494
- standalone: true,
10495
- changeDetection: ChangeDetectionStrategy.OnPush,
10496
- imports: [CommonModule, FormsModule],
10497
- }]
10498
- }] });
10499
-
10500
- var entityReferenceWidgetEdit_component = /*#__PURE__*/Object.freeze({
10501
- __proto__: null,
10502
- AXPEntityReferenceWidgetEditComponent: AXPEntityReferenceWidgetEditComponent
10503
- });
10504
-
10505
- class AXPEntityReferenceWidgetColumnComponent extends AXPColumnWidgetComponent {
10506
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
10507
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue" }, usesInheritance: true, ngImport: i0, template: `{{rawValue}}`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10508
- }
10509
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetColumnComponent, decorators: [{
10510
- type: Component,
10511
- args: [{
10512
- template: `{{rawValue}}`,
10513
- standalone: true,
10514
- changeDetection: ChangeDetectionStrategy.OnPush,
10515
- imports: [CommonModule],
10516
- inputs: ['rawValue']
10517
- }]
10518
- }] });
10519
-
10520
- var entityReferenceWidgetColumn_component = /*#__PURE__*/Object.freeze({
10521
- __proto__: null,
10522
- AXPEntityReferenceWidgetColumnComponent: AXPEntityReferenceWidgetColumnComponent
10523
- });
10524
-
10525
- class AXPEntityReferenceWidgetPrintComponent extends AXPLayoutBaseWidgetComponent {
10526
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
10527
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetPrintComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10528
- }
10529
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetPrintComponent, decorators: [{
10530
- type: Component,
10531
- args: [{
10532
- template: ``,
10533
- standalone: true,
10534
- changeDetection: ChangeDetectionStrategy.OnPush,
10535
- imports: [CommonModule],
10536
- inputs: [],
10537
- }]
10538
- }] });
10539
-
10540
- var entityReferenceWidgetPrint_component = /*#__PURE__*/Object.freeze({
10541
- __proto__: null,
10542
- AXPEntityReferenceWidgetPrintComponent: AXPEntityReferenceWidgetPrintComponent
10543
- });
10544
-
10545
- class AXPEntityReferenceWidgetDesignerComponent extends AXPLayoutBaseWidgetComponent {
10546
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
10547
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPEntityReferenceWidgetDesignerComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: ``, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10548
- }
10549
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityReferenceWidgetDesignerComponent, decorators: [{
10550
- type: Component,
10551
- args: [{
10552
- template: ``,
10553
- standalone: true,
10554
- changeDetection: ChangeDetectionStrategy.OnPush,
10555
- imports: [CommonModule],
10556
- }]
10557
- }] });
10558
-
10559
- var entityReferenceWidgetDesigner_component = /*#__PURE__*/Object.freeze({
10560
- __proto__: null,
10561
- AXPEntityReferenceWidgetDesignerComponent: AXPEntityReferenceWidgetDesignerComponent
10562
- });
10563
-
10564
- const AXPEntityReferenceWidget = {
10565
- name: 'entity-reference',
10566
- title: 'Entity Reference',
10567
- description: '',
10568
- type: 'view',
10569
- categories: [],
10570
- groups: [AXPWidgetGroupEnum.EntityWidget],
10571
- icon: 'fa-solid fa-square',
10572
- properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY],
10573
- components: {
10574
- view: {
10575
- component: () => Promise.resolve().then(function () { return entityReferenceWidgetView_component; }).then((c) => c.AXPEntityReferenceWidgetViewComponent),
10576
- },
10577
- edit: {
10578
- component: () => Promise.resolve().then(function () { return entityReferenceWidgetEdit_component; }).then((c) => c.AXPEntityReferenceWidgetEditComponent),
10579
- },
10580
- column: {
10581
- component: () => Promise.resolve().then(function () { return entityReferenceWidgetColumn_component; }).then((c) => c.AXPEntityReferenceWidgetColumnComponent),
10582
- },
10583
- print: {
10584
- component: () => Promise.resolve().then(function () { return entityReferenceWidgetPrint_component; }).then((c) => c.AXPEntityReferenceWidgetPrintComponent),
10585
- },
10586
- designer: {
10587
- component: () => Promise.resolve().then(function () { return entityReferenceWidgetDesigner_component; }).then((c) => c.AXPEntityReferenceWidgetDesignerComponent),
10588
- },
10589
- },
10590
- };
10591
-
10592
10784
  class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
10593
10785
  constructor() {
10594
10786
  super(...arguments);
@@ -10717,7 +10909,7 @@ class AXPLookupFilterWidgetEditComponent extends AXPValueWidgetComponent {
10717
10909
  [node]="lookupNode()"
10718
10910
  [mode]="'edit'"
10719
10911
  ></ng-container>
10720
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10912
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "directive", type: i3$1.AXPWidgetRendererDirective, selector: "[axp-widget-renderer]", inputs: ["parentNode", "index", "mode", "node"], outputs: ["onOptionsChanged", "onValueChanged", "onLoad"], exportAs: ["widgetRenderer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
10721
10913
  }
10722
10914
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupFilterWidgetEditComponent, decorators: [{
10723
10915
  type: Component,
@@ -10769,7 +10961,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
10769
10961
  constructor() {
10770
10962
  super(...arguments);
10771
10963
  this.formatService = inject(AXFormatService);
10772
- this.entityResolver = inject(AXPEntityResolver);
10964
+ this.entityResolver = inject(AXPEntityDefinitionRegistryService);
10773
10965
  this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
10774
10966
  this.multiple = computed(() => this.options()['multiple'], ...(ngDevMode ? [{ debugName: "multiple" }] : []));
10775
10967
  this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
@@ -10787,7 +10979,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
10787
10979
  this.displayItems = signal([], ...(ngDevMode ? [{ debugName: "displayItems" }] : []));
10788
10980
  this.efEntity = effect(async () => {
10789
10981
  const [module, entity] = this.entity().split('.');
10790
- this.entityDef.set(await this.entityResolver.get(module, entity));
10982
+ this.entityDef.set(await this.entityResolver.resolve(module, entity));
10791
10983
  }, ...(ngDevMode ? [{ debugName: "efEntity" }] : []));
10792
10984
  this.efDisplay = effect(async () => {
10793
10985
  const value = this.getValue();
@@ -10808,7 +11000,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
10808
11000
  };
10809
11001
  }
10810
11002
  const def = this.entityDef();
10811
- const byKey = def?.queries.byKey?.execute;
11003
+ const byKey = def?.queries?.byKey?.execute;
10812
11004
  if (byKey) {
10813
11005
  this.loading.set(true);
10814
11006
  const fetchedItem = await byKey(item);
@@ -10824,6 +11016,9 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
10824
11016
  };
10825
11017
  }
10826
11018
  getDisplayText(item) {
11019
+ if (!item) {
11020
+ return '';
11021
+ }
10827
11022
  const template = this.displayFormat();
10828
11023
  if (template) {
10829
11024
  const formatted = this.formatService.format(template, 'string', item);
@@ -10831,7 +11026,7 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
10831
11026
  return formatted;
10832
11027
  }
10833
11028
  }
10834
- return this.formatService.format(this.displayField(), 'string', item);
11029
+ return get(item, this.displayField()) ?? '';
10835
11030
  }
10836
11031
  get __class() {
10837
11032
  const cls = {};
@@ -10949,6 +11144,7 @@ class AXPEntityDataSelectorService {
10949
11144
  parentField: options.entity.parentKey,
10950
11145
  filters: options.filters || undefined,
10951
11146
  allowCreate: options.allowCreate ?? this.canCreate(options.entity),
11147
+ selectedItemIds: options.selectedItemIds,
10952
11148
  // Note: Custom filters will be applied to the dataSource in createDataSource
10953
11149
  };
10954
11150
  }
@@ -10959,11 +11155,14 @@ class AXPEntityDataSelectorService {
10959
11155
  const { entity, filters, parentFilters } = options;
10960
11156
  return new AXDataSource({
10961
11157
  byKey: (key) => {
10962
- const func = entity.queries.byKey.execute;
10963
- return func();
11158
+ const func = entity.queries?.byKey?.execute;
11159
+ return func(key);
10964
11160
  },
10965
11161
  load: (e) => {
10966
- const func = entity.queries.list?.execute;
11162
+ const func = entity.queries?.list?.execute;
11163
+ if (!func || typeof func !== 'function') {
11164
+ throw new Error(`Entity ${entity.name} does not have a list query`);
11165
+ }
10967
11166
  this.mergeFilters(e, filters, parentFilters);
10968
11167
  return func(e);
10969
11168
  },
@@ -11097,7 +11296,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11097
11296
  constructor() {
11098
11297
  super(...arguments);
11099
11298
  this.injector = inject(Injector);
11100
- this.entityResolver = inject(AXPEntityResolver);
11299
+ this.entityResolver = inject(AXPEntityDefinitionRegistryService);
11101
11300
  this.formatService = inject(AXFormatService);
11102
11301
  this.popupService = inject(AXPopupService);
11103
11302
  this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
@@ -11116,7 +11315,13 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11116
11315
  this.look = computed(() => this.options()['look'] ?? 'lookup', ...(ngDevMode ? [{ debugName: "look" }] : []));
11117
11316
  this.allowClear = computed(() => (this.options()['allowClear'] ?? false), ...(ngDevMode ? [{ debugName: "allowClear" }] : []));
11118
11317
  this.defaultTextField = computed(() => {
11119
- const textField = this.entityDef()?.formats.lookup ?? this.entityDef()?.properties.find((c) => c.name != 'id')?.name ?? 'title';
11318
+ const list = [
11319
+ 'title',
11320
+ 'name',
11321
+ 'code',
11322
+ 'description',
11323
+ ];
11324
+ const textField = list.find((c) => this.entityDef()?.properties.find((p) => p.name == c)) ?? 'title';
11120
11325
  return textField;
11121
11326
  }, ...(ngDevMode ? [{ debugName: "defaultTextField" }] : []));
11122
11327
  this.displayField = computed(() => {
@@ -11136,18 +11341,44 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11136
11341
  return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
11137
11342
  }, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
11138
11343
  this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : []));
11344
+ /**
11345
+ * Get default sort order from entity's first list view
11346
+ */
11347
+ this.defaultSorts = computed(() => {
11348
+ const entity = this.entityDef();
11349
+ if (!entity)
11350
+ return [];
11351
+ // Get the first view from the list views (usually the "all" view)
11352
+ const firstView = entity.interfaces?.master?.list?.views?.[0];
11353
+ if (!firstView?.sorts || firstView.sorts.length === 0) {
11354
+ return [];
11355
+ }
11356
+ // Convert AXPQuerySort[] (with 'name') to AXDataSourceSortOption[] (with 'field')
11357
+ return firstView.sorts.map((sort) => ({
11358
+ field: sort.name,
11359
+ dir: sort.dir,
11360
+ }));
11361
+ }, ...(ngDevMode ? [{ debugName: "defaultSorts" }] : []));
11139
11362
  this.dataSource = computed(() => {
11140
11363
  const entity = this.entityDef();
11141
11364
  if (!entity)
11142
11365
  return null;
11366
+ const defaultSorts = this.defaultSorts();
11143
11367
  return new AXDataSource({
11144
11368
  byKey: (key) => {
11145
- const func = entity.queries.byKey.execute;
11369
+ const func = entity.queries?.byKey?.execute;
11146
11370
  return func();
11147
11371
  },
11148
11372
  load: (e) => {
11149
- const func = entity.queries.list?.execute;
11373
+ const func = entity.queries?.list?.execute;
11374
+ if (!func || typeof func !== 'function') {
11375
+ throw new Error(`Entity ${entity.name} does not have a list query`);
11376
+ }
11150
11377
  this.mergeFilter(e, this.customFilter());
11378
+ // Apply default sort order if no sort is already specified
11379
+ if (defaultSorts.length > 0 && (!e.sort || e.sort.length === 0)) {
11380
+ e.sort = defaultSorts;
11381
+ }
11151
11382
  return func(e);
11152
11383
  },
11153
11384
  pageSize: 10,
@@ -11155,7 +11386,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11155
11386
  });
11156
11387
  }, ...(ngDevMode ? [{ debugName: "dataSource" }] : []));
11157
11388
  this.searchTerm = signal(null, ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
11158
- this.searchPlaceholderText = signal('', ...(ngDevMode ? [{ debugName: "searchPlaceholderText" }] : []));
11389
+ // protected searchPlaceholderText = signal<string>('');
11159
11390
  this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
11160
11391
  this.textbox = viewChild(AXTagBoxComponent, ...(ngDevMode ? [{ debugName: "textbox" }] : []));
11161
11392
  this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
@@ -11163,7 +11394,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11163
11394
  this.placeholderUpdateToken = 0;
11164
11395
  this.#efEntity = effect(async () => {
11165
11396
  const [module, entity] = this.entity().split('.');
11166
- this.entityDef.set(await this.entityResolver.get(module, entity));
11397
+ this.entityDef.set(await this.entityResolver.resolve(module, entity));
11167
11398
  }, ...(ngDevMode ? [{ debugName: "#efEntity" }] : []));
11168
11399
  this.#efValue = effect(() => {
11169
11400
  if (this.getValue()) {
@@ -11173,32 +11404,6 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11173
11404
  this.clear();
11174
11405
  }
11175
11406
  }, ...(ngDevMode ? [{ debugName: "#efValue" }] : []));
11176
- this.#efSearchPlaceholder = effect(() => {
11177
- const entity = this.entityDef();
11178
- if (!entity) {
11179
- this.searchPlaceholderText.set('');
11180
- return;
11181
- }
11182
- let inlineFields = entity.properties
11183
- .filter((property) => property.options?.filter?.inline?.enabled)
11184
- .map((property) => ({
11185
- title: property.title,
11186
- name: property.name,
11187
- })) ?? [];
11188
- if (!inlineFields.length) {
11189
- const displayFieldName = this.displayField();
11190
- const displayProperty = entity.properties.find((property) => property.name === displayFieldName);
11191
- if (displayProperty) {
11192
- inlineFields = [
11193
- {
11194
- title: displayProperty.title,
11195
- name: displayProperty.name,
11196
- },
11197
- ];
11198
- }
11199
- }
11200
- void this.updateSearchPlaceholder(inlineFields);
11201
- }, ...(ngDevMode ? [{ debugName: "#efSearchPlaceholder" }] : []));
11202
11407
  //#region ---- Focus Management ----
11203
11408
  /**
11204
11409
  * Reactive effect to auto-focus when viewChild is ready
@@ -11242,21 +11447,31 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11242
11447
  }
11243
11448
  #efEntity;
11244
11449
  #efValue;
11245
- #efSearchPlaceholder;
11246
11450
  async findByValue() {
11247
11451
  this.isLoading.set(true);
11248
11452
  const rawValue = this.getValue();
11249
- const values = castArray(rawValue);
11250
- const byKey = this.entityDef()?.queries.byKey?.execute;
11453
+ // When multiple is true, ensure we always work with arrays
11454
+ const values = this.multiple() ? castArray(rawValue) : [rawValue].filter(v => v != null);
11455
+ const byKey = this.entityDef()?.queries?.byKey?.execute;
11251
11456
  if (byKey && values.length) {
11252
11457
  if (this.multiple()) {
11253
- const items = await Promise.all(values.map((value) => byKey(extractValue(value, this.valueField()))));
11254
- this.setItems(items);
11458
+ const items = await Promise.all(values
11459
+ .map((value) => extractValue(value, this.valueField()))
11460
+ .filter(id => id != null)
11461
+ .map((id) => byKey(id)));
11462
+ // Filter out null/undefined results
11463
+ const validItems = items.filter(item => item != null);
11464
+ this.setItems(validItems);
11255
11465
  }
11256
11466
  else {
11257
11467
  const id = extractValue(values[0], this.valueField());
11258
- const item = await byKey(id);
11259
- this.setItems(item);
11468
+ if (id != null) {
11469
+ const item = await byKey(id);
11470
+ this.setItems(item != null ? [item] : []);
11471
+ }
11472
+ else {
11473
+ this.setItems([]);
11474
+ }
11260
11475
  }
11261
11476
  }
11262
11477
  else {
@@ -11271,6 +11486,10 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11271
11486
  this.isOpen.set(true);
11272
11487
  const inlineSearchValue = (this.searchTerm() ?? '').trim();
11273
11488
  const initialSearchTerm = inlineSearchValue.length > 0 ? inlineSearchValue : undefined;
11489
+ // Extract current selected item IDs to pre-select them in the data selector
11490
+ const selectedItemIds = this.selectedItems()
11491
+ .map((item) => get(item, this.valueField()))
11492
+ .filter((id) => id != null);
11274
11493
  try {
11275
11494
  const result = await this.entityDataSelectorService.open({
11276
11495
  entity: this.entityDef(),
@@ -11281,9 +11500,23 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11281
11500
  columns: this.columns(),
11282
11501
  allowCreate: true,
11283
11502
  initialSearchTerm,
11503
+ selectedItemIds: selectedItemIds.length > 0 ? selectedItemIds : undefined,
11284
11504
  });
11285
11505
  if (result && 'items' in result) {
11286
- this.setItems(result.items);
11506
+ // If selectedItemIds was provided, the selector returns the final selection
11507
+ // (all currently selected items, including kept initial items and newly added items)
11508
+ // In this case, we should REPLACE the selection (not merge)
11509
+ // Otherwise, if no selectedItemIds, merge with existing items when multiple is true
11510
+ const hadInitialSelection = selectedItemIds && selectedItemIds.length > 0;
11511
+ if (hadInitialSelection) {
11512
+ // Replace the selection with the final selection from the selector
11513
+ this.setItems(result.items, false); // false = replace, not merge
11514
+ }
11515
+ else {
11516
+ // No initial selection, normal merge behavior
11517
+ const shouldMerge = this.multiple() && this.selectedItems().length > 0;
11518
+ this.setItems(result.items, shouldMerge);
11519
+ }
11287
11520
  }
11288
11521
  }
11289
11522
  catch (error) {
@@ -11328,7 +11561,9 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11328
11561
  this.isLoading.set(true);
11329
11562
  const result = await this.searchByValue(value);
11330
11563
  if (result?.total == 1) {
11331
- this.setItems(result.items[0]);
11564
+ // When multiple is true, merge with existing items
11565
+ const shouldMerge = this.multiple() && this.selectedItems().length > 0;
11566
+ this.setItems(result.items[0], shouldMerge);
11332
11567
  }
11333
11568
  else {
11334
11569
  this.showSelector();
@@ -11339,13 +11574,27 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11339
11574
  this.showSelector();
11340
11575
  }
11341
11576
  }
11342
- setItems(items) {
11343
- if (!items || items.length == 0) {
11344
- this.selectedItems.set([]);
11577
+ setItems(items, mergeWithExisting = false) {
11578
+ // Ensure items is always an array
11579
+ items = castArray(items);
11580
+ // Filter out null/undefined items
11581
+ items = items.filter(item => item != null);
11582
+ if (items.length == 0) {
11583
+ if (!mergeWithExisting) {
11584
+ this.selectedItems.set([]);
11585
+ }
11345
11586
  return;
11346
11587
  }
11347
- //
11348
- items = castArray(items);
11588
+ // If merging and multiple is enabled, combine with existing items
11589
+ if (mergeWithExisting && this.multiple()) {
11590
+ const existingItems = this.selectedItems();
11591
+ const existingKeys = new Set(existingItems.map((item) => get(item, this.valueField())));
11592
+ const newItems = items.filter((item) => {
11593
+ const key = get(item, this.valueField());
11594
+ return !existingKeys.has(key);
11595
+ });
11596
+ items = [...existingItems, ...newItems];
11597
+ }
11349
11598
  this.clearInput();
11350
11599
  this.selectedItems.set(items);
11351
11600
  //
@@ -11407,39 +11656,6 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11407
11656
  }
11408
11657
  return get(item, this.displayField()) ?? '';
11409
11658
  }
11410
- async updateSearchPlaceholder(fields) {
11411
- const updateToken = ++this.placeholderUpdateToken;
11412
- if (!fields || fields.length === 0) {
11413
- const fallback = await this.translateService.translateAsync('@general:actions.search.title');
11414
- if (updateToken !== this.placeholderUpdateToken) {
11415
- return;
11416
- }
11417
- this.searchPlaceholderText.set(fallback ? `${fallback}...` : '');
11418
- return;
11419
- }
11420
- const translatedFields = await Promise.all(fields.map(async (field) => {
11421
- const translated = await this.translateService.translateAsync(field.title || field.name);
11422
- return translated ?? field.title ?? field.name;
11423
- }));
11424
- const translatedText = translatedFields
11425
- .filter((value) => Boolean(value && value.trim().length > 0))
11426
- .join(', ');
11427
- const fallbackText = fields
11428
- .map((field) => field.title || field.name)
11429
- .filter((value) => Boolean(value && value.trim().length > 0))
11430
- .join(', ');
11431
- let fieldsText = translatedText || fallbackText;
11432
- if (!fieldsText) {
11433
- fieldsText = (await this.translateService.translateAsync('@general:terms.items')) ?? 'items';
11434
- }
11435
- const placeholder = await this.translateService.translateAsync('@general:widgets.lookup.search-placeholder', {
11436
- params: { fields: fieldsText },
11437
- });
11438
- if (updateToken !== this.placeholderUpdateToken) {
11439
- return;
11440
- }
11441
- this.searchPlaceholderText.set(placeholder ?? `Search in ${fieldsText}...`);
11442
- }
11443
11659
  async searchByValue(value) {
11444
11660
  if (!this.entityDef())
11445
11661
  return null;
@@ -11460,7 +11676,10 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11460
11676
  });
11461
11677
  });
11462
11678
  }
11463
- const func = entity.queries.list?.execute;
11679
+ const func = entity.queries?.list?.execute;
11680
+ if (!func || typeof func !== 'function') {
11681
+ throw new Error(`Entity ${entity.name} does not have a list query`);
11682
+ }
11464
11683
  return await func({ filter: inlineFilters, take: 10 });
11465
11684
  }
11466
11685
  mergeFilter(request, filter) {
@@ -11499,6 +11718,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11499
11718
  @if (look() == 'select') {
11500
11719
  <ax-select-box
11501
11720
  #selectBox
11721
+ [placeholder]="('@general:widgets.lookup.placeholder' | translate | async)!"
11502
11722
  [dataSource]="dataSource()!"
11503
11723
  [ngModel]="selectedItems()"
11504
11724
  [textField]="displayField()"
@@ -11511,7 +11731,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11511
11731
  <ax-clear-button></ax-clear-button>
11512
11732
  }
11513
11733
  <ax-search-box
11514
- [placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
11734
+ [placeholder]="('@general:widgets.lookup.search.placeholder' | translate | async)!"
11515
11735
  (onValueChanged)="handleSearchInputChange($event)"
11516
11736
  >
11517
11737
  <ax-clear-button></ax-clear-button>
@@ -11535,7 +11755,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11535
11755
  [textField]="displayField()"
11536
11756
  [valueField]="valueField()"
11537
11757
  (onValueChanged)="handleValueChange($event)"
11538
- [placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
11758
+ [placeholder]="selectedItems().length ? '' : ('@general:widgets.lookup.placeholder' | translate | async)!"
11539
11759
  [addOnEnter]="false"
11540
11760
  [addOnComma]="false"
11541
11761
  [disabled]="disabled()"
@@ -11580,7 +11800,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
11580
11800
  }
11581
11801
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type:
11582
11802
  //
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 }); }
11803
+ AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorClearButtonComponent, selector: "ax-clear-button", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "component", type: i4.AXLoadingComponent, selector: "ax-loading", inputs: ["visible", "type", "context"], outputs: ["visibleChange"] }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$2.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "ngmodule", type: AXTagBoxModule }, { kind: "component", type: i6$1.AXTagBoxComponent, selector: "ax-tag-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "allowNull", "type", "look", "addOnComma", "addOnEnter", "valueField", "textField", "readonlyField", "allowDuplicateValues", "tagTemplate"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onTagClick", "onTagDblClick", "onTagContextMenu"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i7.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "component", type: AXSearchBoxComponent, selector: "ax-search-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "class", "delayTime", "type", "autoSearch"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11584
11804
  }
11585
11805
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
11586
11806
  type: Component,
@@ -11591,6 +11811,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
11591
11811
  @if (look() == 'select') {
11592
11812
  <ax-select-box
11593
11813
  #selectBox
11814
+ [placeholder]="('@general:widgets.lookup.placeholder' | translate | async)!"
11594
11815
  [dataSource]="dataSource()!"
11595
11816
  [ngModel]="selectedItems()"
11596
11817
  [textField]="displayField()"
@@ -11603,7 +11824,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
11603
11824
  <ax-clear-button></ax-clear-button>
11604
11825
  }
11605
11826
  <ax-search-box
11606
- [placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
11827
+ [placeholder]="('@general:widgets.lookup.search.placeholder' | translate | async)!"
11607
11828
  (onValueChanged)="handleSearchInputChange($event)"
11608
11829
  >
11609
11830
  <ax-clear-button></ax-clear-button>
@@ -11627,7 +11848,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
11627
11848
  [textField]="displayField()"
11628
11849
  [valueField]="valueField()"
11629
11850
  (onValueChanged)="handleValueChange($event)"
11630
- [placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
11851
+ [placeholder]="selectedItems().length ? '' : ('@general:widgets.lookup.placeholder' | translate | async)!"
11631
11852
  [addOnEnter]="false"
11632
11853
  [addOnComma]="false"
11633
11854
  [disabled]="disabled()"
@@ -11716,6 +11937,9 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
11716
11937
  const template = this.options['displayFormat'];
11717
11938
  return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
11718
11939
  }, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
11940
+ this.displayField = computed(() => {
11941
+ return this.textField ?? 'title';
11942
+ }, ...(ngDevMode ? [{ debugName: "displayField" }] : []));
11719
11943
  //#endregion
11720
11944
  //#region ---- Signals ----
11721
11945
  this.isMorePopoverOpen = signal(false, ...(ngDevMode ? [{ debugName: "isMorePopoverOpen" }] : []));
@@ -11805,7 +12029,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
11805
12029
  return formatted;
11806
12030
  }
11807
12031
  }
11808
- return item?.[this.textField] ?? '';
12032
+ return get(item, this.displayField()) ?? '';
11809
12033
  }
11810
12034
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
11811
12035
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPLookupWidgetColumnComponent, isStandalone: true, selector: "ng-component", inputs: { rawValue: "rawValue", rowData: "rowData" }, viewQueries: [{ propertyName: "moreButton", first: true, predicate: ["moreButton"], descendants: true, isSignal: true }, { propertyName: "morePopover", first: true, predicate: ["morePopover"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-flex ax-gap-1 ax-items-center\">\n @if (visibleItems().length > 0) {\n @for (item of visibleItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"handleItemClick($index)\">\n {{ getDisplayText(item) }}\n </span>\n @if ($index < visibleItems().length - 1) { <span class=\"ax-text-muted\">\u2022</span>\n }\n }\n } @else {\n <span class=\"ax-text-muted\">---</span>\n }\n\n @if (hasMoreItems()) {\n <span\n class=\"ax-absolute ax-flex ax-items-center ax-end-0 ax-px-1 ax-cursor-pointer ax-h-full hover:ax-primary-lighter\"\n (click)=\"showMoreItems()\" #moreButton>\n <i class=\"fa-light fa-ellipsis-vertical\"></i>\n </span>\n }\n</div>\n\n<!-- More Items Popover -->\n<ax-popover [openOn]=\"'manual'\" #morePopover (openChange)=\"onMorePopoverOpenChange($event)\">\n <div class=\"ax-lightest-surface ax-border ax-rounded-lg ax-shadow-lg ax-p-4 ax-min-w-[280px]\">\n <div class=\"ax-mb-4 ax-border-b ax-pb-2\">\n <h3 class=\"ax-text-base ax-font-semibold\">All {{ allItems().length }} Items</h3>\n </div>\n <div class=\"ax-max-h-64 ax-flex ax-flex-col ax-gap-3\">\n @for (item of allItems(); track $index) {\n <span class=\"ax-cursor-pointer hover:ax-text-primary hover:ax-underline\" (click)=\"showItemDetail(item, $index)\">\n {{ getDisplayText(item) }}\n </span>\n }\n </div>\n </div>\n</ax-popover>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -11892,153 +12116,6 @@ const AXPLookupWidget = {
11892
12116
  },
11893
12117
  };
11894
12118
 
11895
- class AXPWidgetSelectorWidgetEditComponent extends AXPValueWidgetComponent {
11896
- constructor() {
11897
- super(...arguments);
11898
- this.popupService = inject(AXPopupService);
11899
- this.widgetRegisteryService = inject(AXPWidgetRegistryService);
11900
- this.searchTerm = signal(null, ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
11901
- this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
11902
- this.textField = signal('', ...(ngDevMode ? [{ debugName: "textField" }] : []));
11903
- this.displayText = computed(() => this.getValue()?.title || '', ...(ngDevMode ? [{ debugName: "displayText" }] : []));
11904
- this.selectedWidgetNode = signal(null, ...(ngDevMode ? [{ debugName: "selectedWidgetNode" }] : []));
11905
- this.selectedItem = signal(null, ...(ngDevMode ? [{ debugName: "selectedItem" }] : []));
11906
- this.placeholder = computed(() => this.options()['placeholder'] ?? '', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
11907
- this.loading = computed(() => this.options()['loading'] ?? false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
11908
- }
11909
- ngAfterViewInit() {
11910
- if (this.getValue()) {
11911
- this.selectedWidgetNode.set(this.getValue());
11912
- }
11913
- }
11914
- async showSelector() {
11915
- const com = await import('@acorex/platform/layout/designer').then((c) => c.AXPDesignerWidgetPickerComponent);
11916
- const result = await this.popupService.open(com, {
11917
- title: 'Widget Gallery',
11918
- size: 'md',
11919
- closeButton: true,
11920
- data: {
11921
- widgets: sortBy(this.widgetRegisteryService.all(), (c) => c.title),
11922
- },
11923
- });
11924
- if ((result.data?.widgets ?? []).length) {
11925
- const selected = result.data?.widgets;
11926
- const selectedNode = this.convertWidgetConfigToNode(selected[0]);
11927
- this.selectedWidgetNode.set(selectedNode);
11928
- }
11929
- }
11930
- convertWidgetConfigToNode(config) {
11931
- return {
11932
- type: config.name,
11933
- };
11934
- }
11935
- handleChangeWidget(e) {
11936
- const widget = this.widgetRegisteryService.resolve(e.values.type);
11937
- this.setValue({ title: widget?.title, ...e.values });
11938
- }
11939
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
11940
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPWidgetSelectorWidgetEditComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "textbox", first: true, predicate: AXTextBoxComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: `
11941
- <ax-text-box [ngModel]="displayText()" [placeholder]="placeholder()" [readonly]="true">
11942
- @for (validation of validationRules(); track $index) {
11943
- <ax-validation-rule
11944
- [rule]="validation.rule"
11945
- [message]="validation.options?.message"
11946
- [options]="validation.options"
11947
- ></ax-validation-rule>
11948
- }
11949
- <ax-suffix>
11950
- <ax-button color="ghost" look="twotone" (onClick)="showSelector()">
11951
- <ax-icon icon="far fa-search"> </ax-icon>
11952
- </ax-button>
11953
- </ax-suffix>
11954
- </ax-text-box>
11955
- @if(selectedWidgetNode()){
11956
- <axp-widget-property-viewer [widget]="selectedWidgetNode()!" (onChanged)="handleChangeWidget($event)">
11957
- </axp-widget-property-viewer>
11958
- }
11959
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXSelectBoxModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i2$3.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3$2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i3$2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXLoadingModule }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXFormModule }, { kind: "directive", type: i5$2.AXValidationRuleDirective, selector: "ax-validation-rule", inputs: ["rule", "options", "message", "disabled"] }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget", "mode"], outputs: ["onChanged"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11960
- }
11961
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetEditComponent, decorators: [{
11962
- type: Component,
11963
- args: [{
11964
- template: `
11965
- <ax-text-box [ngModel]="displayText()" [placeholder]="placeholder()" [readonly]="true">
11966
- @for (validation of validationRules(); track $index) {
11967
- <ax-validation-rule
11968
- [rule]="validation.rule"
11969
- [message]="validation.options?.message"
11970
- [options]="validation.options"
11971
- ></ax-validation-rule>
11972
- }
11973
- <ax-suffix>
11974
- <ax-button color="ghost" look="twotone" (onClick)="showSelector()">
11975
- <ax-icon icon="far fa-search"> </ax-icon>
11976
- </ax-button>
11977
- </ax-suffix>
11978
- </ax-text-box>
11979
- @if(selectedWidgetNode()){
11980
- <axp-widget-property-viewer [widget]="selectedWidgetNode()!" (onChanged)="handleChangeWidget($event)">
11981
- </axp-widget-property-viewer>
11982
- }
11983
- `,
11984
- changeDetection: ChangeDetectionStrategy.OnPush,
11985
- imports: [
11986
- FormsModule,
11987
- AXSelectBoxModule,
11988
- AXTextBoxModule,
11989
- AXButtonModule,
11990
- AXDecoratorModule,
11991
- AXLoadingModule,
11992
- AXValidationModule,
11993
- AXFormModule,
11994
- AXPWidgetPropertyViewerComponent
11995
- ]
11996
- }]
11997
- }], propDecorators: { textbox: [{
11998
- type: ViewChild,
11999
- args: [AXTextBoxComponent]
12000
- }] } });
12001
-
12002
- var widgetSelectorWidgetEdit_component = /*#__PURE__*/Object.freeze({
12003
- __proto__: null,
12004
- AXPWidgetSelectorWidgetEditComponent: AXPWidgetSelectorWidgetEditComponent
12005
- });
12006
-
12007
- class AXPWidgetSelectorWidgetViewComponent extends AXPValueWidgetComponent {
12008
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
12009
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: AXPWidgetSelectorWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: `{{ getValue()?.title }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
12010
- }
12011
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPWidgetSelectorWidgetViewComponent, decorators: [{
12012
- type: Component,
12013
- args: [{
12014
- template: `{{ getValue()?.title }}`,
12015
- changeDetection: ChangeDetectionStrategy.OnPush,
12016
- imports: []
12017
- }]
12018
- }] });
12019
-
12020
- var widgetSelectorWidgetView_component = /*#__PURE__*/Object.freeze({
12021
- __proto__: null,
12022
- AXPWidgetSelectorWidgetViewComponent: AXPWidgetSelectorWidgetViewComponent
12023
- });
12024
-
12025
- const AXPWidgetSelectorWidget = {
12026
- name: 'widget-selector',
12027
- title: 'Widget Selector',
12028
- categories: AXP_WIDGETS_EDITOR_CATEGORY,
12029
- type: 'editor',
12030
- icon: 'fa-light fa-square',
12031
- properties: [AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DISABLED_PROPERTY],
12032
- components: {
12033
- view: {
12034
- component: () => Promise.resolve().then(function () { return widgetSelectorWidgetView_component; }).then((c) => c.AXPWidgetSelectorWidgetViewComponent),
12035
- },
12036
- edit: {
12037
- component: () => Promise.resolve().then(function () { return widgetSelectorWidgetEdit_component; }).then((c) => c.AXPWidgetSelectorWidgetEditComponent),
12038
- },
12039
- },
12040
- };
12041
-
12042
12119
  const AXPEntityCreateEvent = createWorkFlowEvent('[Entity] Created!');
12043
12120
  class AXPEntityCreatePopupAction extends AXPWorkflowAction {
12044
12121
  constructor() {
@@ -12463,20 +12540,8 @@ function routesFacory() {
12463
12540
  return routes;
12464
12541
  }
12465
12542
  class AXPEntityModule {
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] }); }
12543
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
12544
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i1$1.AXPWorkflowModule, i3$1.AXPWidgetCoreModule] }); }
12480
12545
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, providers: [
12481
12546
  {
12482
12547
  provide: ROUTES,
@@ -12500,6 +12565,11 @@ class AXPEntityModule {
12500
12565
  useValue: columnWidthMiddlewareProvider,
12501
12566
  multi: true,
12502
12567
  },
12568
+ {
12569
+ provide: AXP_ENTITY_MODIFIER,
12570
+ useValue: AXPCrudModifier,
12571
+ multi: true,
12572
+ },
12503
12573
  // {
12504
12574
  // provide: AXP_ENTITY_MODIFIER,
12505
12575
  // useValue: layoutOrderingMiddlewareProvider,
@@ -12558,14 +12628,7 @@ class AXPEntityModule {
12558
12628
  functions: {},
12559
12629
  }),
12560
12630
  AXPWidgetCoreModule.forChild({
12561
- widgets: [
12562
- AXPLookupWidget,
12563
- AXPLookupFilterWidget,
12564
- AXPWidgetSelectorWidget,
12565
- AXPEntityListWidget,
12566
- AXPEntityReferenceWidget,
12567
- AXPEntityCategoryWidget,
12568
- ],
12631
+ widgets: [AXPLookupWidget, AXPLookupFilterWidget, AXPEntityListWidget, AXPEntityCategoryWidget],
12569
12632
  })] }); }
12570
12633
  }
12571
12634
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPEntityModule, decorators: [{
@@ -12601,14 +12664,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
12601
12664
  functions: {},
12602
12665
  }),
12603
12666
  AXPWidgetCoreModule.forChild({
12604
- widgets: [
12605
- AXPLookupWidget,
12606
- AXPLookupFilterWidget,
12607
- AXPWidgetSelectorWidget,
12608
- AXPEntityListWidget,
12609
- AXPEntityReferenceWidget,
12610
- AXPEntityCategoryWidget,
12611
- ],
12667
+ widgets: [AXPLookupWidget, AXPLookupFilterWidget, AXPEntityListWidget, AXPEntityCategoryWidget],
12612
12668
  }),
12613
12669
  ],
12614
12670
  exports: [],
@@ -12636,6 +12692,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
12636
12692
  useValue: columnWidthMiddlewareProvider,
12637
12693
  multi: true,
12638
12694
  },
12695
+ {
12696
+ provide: AXP_ENTITY_MODIFIER,
12697
+ useValue: AXPCrudModifier,
12698
+ multi: true,
12699
+ },
12639
12700
  // {
12640
12701
  // provide: AXP_ENTITY_MODIFIER,
12641
12702
  // useValue: layoutOrderingMiddlewareProvider,
@@ -12667,7 +12728,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
12667
12728
  ]),
12668
12729
  ],
12669
12730
  }]
12670
- }], ctorParameters: () => [{ type: i1$1.AXPAppStartUpService }, { type: i0.Injector }] });
12731
+ }] });
12671
12732
 
12672
12733
  //#endregion
12673
12734
  //#region ---- Get Entity Details Query ----
@@ -12890,8 +12951,25 @@ function entityOverrideDetailsViewAction() {
12890
12951
  scope: AXPEntityCommandScope.Individual,
12891
12952
  };
12892
12953
  }
12893
- function entityDetailsCrudActions(parentId) {
12894
- return [entityDetailsCreateActions(parentId), entityDetailsEditAction(), entityOverrideDetailsViewAction()];
12954
+ function entityDetailsCrudActions(parentId, options) {
12955
+ const opts = {
12956
+ create: true,
12957
+ delete: true,
12958
+ view: true,
12959
+ edit: true,
12960
+ ...options,
12961
+ };
12962
+ const actions = [];
12963
+ if (opts.create) {
12964
+ actions.push(entityDetailsCreateActions(parentId));
12965
+ }
12966
+ if (opts.edit) {
12967
+ actions.push(entityDetailsEditAction());
12968
+ }
12969
+ if (opts.view) {
12970
+ actions.push(entityOverrideDetailsViewAction());
12971
+ }
12972
+ return actions;
12895
12973
  }
12896
12974
  function entityDetailsReferenceCreateActions(type) {
12897
12975
  return [
@@ -12957,5 +13035,5 @@ function detectEntityChanges(oldObj, newObj) {
12957
13035
  * Generated bundle index. Do not edit.
12958
13036
  */
12959
13037
 
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 };
13038
+ export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCategoryTreeService, AXPCreateEntityCommand, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCategoryTreeSelectorComponent, AXPEntityCategoryWidget, AXPEntityCategoryWidgetColumnComponent, AXPEntityCategoryWidgetEditComponent, AXPEntityCategoryWidgetViewComponent, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityEventDispatcherService, AXPEntityEventsKeys, AXPEntityFormBuilderService, AXPEntityListTableService, AXPEntityListViewColumnViewModel, AXPEntityListViewModelFactory, AXPEntityListViewModelResolver, AXPEntityListWidget, AXPEntityListWidgetViewComponent, AXPEntityMasterCreateViewModel, AXPEntityMasterListViewModel, AXPEntityMasterListViewQueryViewModel, AXPEntityMasterSingleElementViewModel, AXPEntityMasterSingleViewGroupViewModel, AXPEntityMasterSingleViewModel, AXPEntityMasterUpdateElementViewModel, AXPEntityMasterUpdateViewModel, AXPEntityMasterUpdateViewModelFactory, AXPEntityMiddleware, AXPEntityModifyConfirmedAction, AXPEntityModifyEvent, AXPEntityModifySectionPopupAction, AXPEntityModule, AXPEntityPerformDeleteAction, AXPEntityResolver, AXPEntityService, AXPEntityStorageService, AXPEntityUpdateViewSectionViewModel, AXPGetEntityDetailsQuery, AXPLookupFilterWidget, AXPLookupFilterWidgetEditComponent, AXPLookupWidget, AXPLookupWidgetColumnComponent, AXPLookupWidgetEditComponent, AXPLookupWidgetViewComponent, AXPMiddlewareAbortError, AXPMiddlewareEntityStorageService, AXPModifyEntitySectionWorkflow, AXPOpenEntityDetailsCommand, AXPQuickEntityModifyPopupAction, AXPQuickModifyEntityWorkflow, AXPShowDetailViewAction, AXPShowDetailsViewWorkflow, AXPShowListViewAction, AXPShowListViewWorkflow, AXPTruncatedBreadcrumbComponent, AXPUpdateEntityCommand, AXPViewEntityDetailsCommand, AXP_DATA_SEEDER_TOKEN, AXP_ENTITY_ACTION_PLUGIN, AXP_ENTITY_CONFIG_TOKEN, AXP_ENTITY_DEFINITION_LOADER, AXP_ENTITY_MODIFIER, AXP_ENTITY_STORAGE_BACKEND, AXP_ENTITY_STORAGE_MIDDLEWARE, DEFAULT_COLUMN_WIDTHS, DEFAULT_PROPERTY_ORDER, DEFAULT_SECTION_ORDER, EntityBuilder, EntityDataAccessor, actionExists, cloneLayoutArrays, columnWidthMiddlewareFactory, columnWidthMiddlewareProvider, createColumnWidthMiddlewareProvider, createLayoutOrderingMiddlewareProvider, createModifierContext, detectEntityChanges, ensureLayoutPropertyView, ensureLayoutSection, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsNewEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware, isAXPMiddlewareAbortError, layoutOrderingMiddlewareFactory, layoutOrderingMiddlewareProvider };
12961
13039
  //# sourceMappingURL=acorex-platform-layout-entity.mjs.map