@acorex/platform 20.6.0-next.10 → 20.6.0-next.11

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 (44) hide show
  1. package/common/index.d.ts +3 -0
  2. package/core/index.d.ts +102 -32
  3. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  4. package/fesm2022/acorex-platform-core.mjs +44 -22
  5. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  6. package/fesm2022/acorex-platform-domain.mjs +49 -4
  7. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  8. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-layout-components.mjs +873 -140
  10. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-designer.mjs +2 -2
  12. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  13. package/fesm2022/{acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs → acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs} +37 -6
  14. package/fesm2022/acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-layout-entity.mjs +528 -118
  16. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-views.mjs +7 -7
  18. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-layout-widget-core.mjs +2 -8
  20. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-layout-widgets.mjs +761 -336
  22. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  23. package/fesm2022/acorex-platform-runtime.mjs +79 -3
  24. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  25. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs → acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs} +3 -3
  26. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-themes-default.mjs +112 -11
  28. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  29. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs +55 -0
  30. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-themes-shared.mjs +3 -3
  32. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  33. package/fesm2022/acorex-platform-workflow.mjs +277 -38
  34. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  35. package/layout/components/index.d.ts +248 -11
  36. package/layout/entity/index.d.ts +57 -9
  37. package/layout/widget-core/index.d.ts +4 -5
  38. package/layout/widgets/index.d.ts +57 -23
  39. package/package.json +1 -1
  40. package/runtime/index.d.ts +36 -8
  41. package/themes/default/index.d.ts +25 -2
  42. package/workflow/index.d.ts +38 -37
  43. package/fesm2022/acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs.map +0 -1
  44. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs.map +0 -1
@@ -15,7 +15,7 @@ import { AXPWidgetsCatalog, AXPWidgetCoreModule, AXPPageStatus, AXPWidgetRegistr
15
15
  import { AXPCommandService, AXPQueryService, provideCommandSetups, provideQuerySetups } from '@acorex/platform/runtime';
16
16
  import * as i5 from '@angular/common';
17
17
  import { CommonModule } from '@angular/common';
18
- import { castArray, get, cloneDeep, set, merge, isEqual, isNil, isEmpty, sortBy } from 'lodash-es';
18
+ import { castArray, get, cloneDeep, set, merge, orderBy, isEqual, isNil, isEmpty, sortBy } from 'lodash-es';
19
19
  import { AXDataSource } from '@acorex/cdk/common';
20
20
  import { AXFormatService } from '@acorex/core/format';
21
21
  import * as i4$1 from '@acorex/platform/common';
@@ -76,19 +76,36 @@ class AXPOpenEntityDetailsCommand {
76
76
  async execute(input) {
77
77
  const { entity, data } = input;
78
78
  if (!entity) {
79
- throw new Error('Entity name is required for opening details view');
79
+ return {
80
+ success: false,
81
+ message: {
82
+ text: 'Entity name is required for opening details view'
83
+ }
84
+ };
80
85
  }
81
86
  if (!data?.id) {
82
- throw new Error('Entity ID is required for opening details view');
87
+ return {
88
+ success: false,
89
+ message: {
90
+ text: 'Entity ID is required for opening details view'
91
+ }
92
+ };
83
93
  }
84
94
  const [module, entityName] = entity.split('.');
85
95
  if (!module || !entityName) {
86
- throw new Error('Entity must be in format "ModuleName.EntityName"');
96
+ return {
97
+ success: false,
98
+ message: {
99
+ text: 'Entity must be in format "ModuleName.EntityName"'
100
+ }
101
+ };
87
102
  }
88
103
  const url = `/${this.sessionService.application?.name}/m/${module}/e/${entityName}/${data.id}/new-view`;
89
104
  // Navigate to the entity details page
90
105
  this.router.navigate([url]);
91
- return { success: true };
106
+ return {
107
+ success: true,
108
+ };
92
109
  }
93
110
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPOpenEntityDetailsCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
94
111
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPOpenEntityDetailsCommand, providedIn: 'root' }); }
@@ -507,6 +524,7 @@ class AXPEntityCommandTriggerViewModel {
507
524
  this.disabled = action.disabled ?? false;
508
525
  this.default = action.default ?? false;
509
526
  this.scope = action.scope;
527
+ this.order = action.order ?? 0;
510
528
  }
511
529
  }
512
530
  class AXPEntityListViewColumnViewModel {
@@ -1120,7 +1138,9 @@ class AXPEntityMiddleware {
1120
1138
  this.providedModifiers = inject(AXP_ENTITY_MODIFIER, { optional: true }) || [];
1121
1139
  this.providedActionPlugins = inject(AXP_ENTITY_ACTION_PLUGIN, { optional: true }) || [];
1122
1140
  this.injector = inject(Injector);
1141
+ console.log('[AXPEntityMiddleware] Registering', this.providedModifiers.length, 'modifiers');
1123
1142
  for (const { entityName, modifier } of this.providedModifiers) {
1143
+ console.log('[AXPEntityMiddleware] Registering modifier for pattern:', entityName);
1124
1144
  this.register(entityName, modifier);
1125
1145
  }
1126
1146
  }
@@ -1159,13 +1179,26 @@ class AXPEntityMiddleware {
1159
1179
  }
1160
1180
  }
1161
1181
  // Then apply entity-specific modifiers
1182
+ // Collect all matching modifiers
1183
+ const modifiers = [];
1162
1184
  // Exact match first
1163
1185
  const exact = this.exactModifiers.get(entity.name);
1164
- const modifier = exact ?? this.patternModifiers.find((x) => x.pattern.test(entity.name))?.modifier;
1165
- if (!modifier) {
1166
- return context.toEntity();
1186
+ if (exact) {
1187
+ console.log('[AXPEntityMiddleware] Found exact modifier for:', entity.name);
1188
+ modifiers.push(exact);
1189
+ }
1190
+ // Then all pattern matches
1191
+ for (const { pattern, modifier } of this.patternModifiers) {
1192
+ if (pattern.test(entity.name)) {
1193
+ console.log('[AXPEntityMiddleware] Pattern matched for', entity.name, '- pattern:', pattern);
1194
+ modifiers.push(modifier);
1195
+ }
1196
+ }
1197
+ console.log('[AXPEntityMiddleware] Applying', modifiers.length, 'modifiers to entity:', entity.name);
1198
+ // Apply all matching modifiers in order
1199
+ for (const modifier of modifiers) {
1200
+ modifier(context);
1167
1201
  }
1168
- modifier(context);
1169
1202
  return context.toEntity();
1170
1203
  }
1171
1204
  //#endregion
@@ -1605,7 +1638,9 @@ class AXPEntityMasterListViewModel {
1605
1638
  //****************** Actions ******************//
1606
1639
  this.allActions = computed(() => {
1607
1640
  const list = this.entityDef.interfaces?.master?.list?.actions ?? [];
1608
- return list.map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? [];
1641
+ const actions = list.map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? [];
1642
+ const orderedActions = orderBy(actions, 'order', 'asc');
1643
+ return orderedActions;
1609
1644
  }, ...(ngDevMode ? [{ debugName: "allActions" }] : []));
1610
1645
  this.selectedScopeActionsCount = computed(() => {
1611
1646
  return this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Selected).length;
@@ -2018,20 +2053,33 @@ class AXPEntityMasterListViewModel {
2018
2053
  });
2019
2054
  }
2020
2055
  else {
2021
- // this.commandService.execute(command, options);
2022
- this.commandService.execute(command, {
2023
- entity: getEntityInfo(this.entityDef).source,
2024
- entityInfo: {
2025
- name: this.entityDef.name,
2026
- module: this.entityDef.module,
2027
- title: this.entityDef.title,
2028
- parentKey: this.entityDef.parentKey,
2029
- source: `${this.entityDef.module}.${this.entityDef.name}`,
2056
+ const commandOptions = merge(options, {
2057
+ __context__: {
2058
+ data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
2059
+ entity: getEntityInfo(this.entityDef).source,
2060
+ entityInfo: {
2061
+ name: this.entityDef.name,
2062
+ module: this.entityDef.module,
2063
+ title: this.entityDef.title,
2064
+ parentKey: this.entityDef.parentKey,
2065
+ },
2030
2066
  },
2031
- data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
2032
- options: options,
2033
- metadata: action?.metadata,
2034
- });
2067
+ __metadata__: action?.metadata,
2068
+ }, options);
2069
+ this.commandService.execute(command, commandOptions);
2070
+ // this.commandService.execute(command, {
2071
+ // entity: getEntityInfo(this.entityDef).source,
2072
+ // entityInfo: {
2073
+ // name: this.entityDef.name,
2074
+ // module: this.entityDef.module,
2075
+ // title: this.entityDef.title,
2076
+ // parentKey: this.entityDef.parentKey,
2077
+ // source: `${this.entityDef.module}.${this.entityDef.name}`,
2078
+ // },
2079
+ // data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
2080
+ // options: options,
2081
+ // metadata: action?.metadata,
2082
+ // });
2035
2083
  }
2036
2084
  }
2037
2085
  async execute(command) {
@@ -2513,8 +2561,8 @@ const AXPModifyEntitySectionWorkflow = {
2513
2561
  action: 'AXPToastAction',
2514
2562
  input: {
2515
2563
  color: 'success',
2516
- title: 'workflow.entity-modified-title',
2517
- content: 'workflow.entity-modified-body',
2564
+ title: '@general:workflow.entity-modified-title',
2565
+ content: '@general:workflow.entity-modified-body',
2518
2566
  },
2519
2567
  nextSteps: [
2520
2568
  {
@@ -3001,7 +3049,6 @@ class AXPLayoutAdapterBuilder {
3001
3049
  }
3002
3050
  createExecuteFunction() {
3003
3051
  return (command, context) => {
3004
- console.log('layout execute', command, context);
3005
3052
  return Promise.resolve({ success: true });
3006
3053
  };
3007
3054
  }
@@ -3009,7 +3056,7 @@ class AXPLayoutAdapterBuilder {
3009
3056
  return async () => {
3010
3057
  return {
3011
3058
  success: true,
3012
- result: this.rootContext,
3059
+ data: this.rootContext,
3013
3060
  };
3014
3061
  };
3015
3062
  }
@@ -3239,7 +3286,7 @@ class AXPPageDetailsConverter extends AXPBaseRelatedEntityConverter {
3239
3286
  const evaluatedConditionValues = await Promise.all(conditionValues.map((c) => evaluateExpressions(c)));
3240
3287
  const id = evaluatedConditionValues[0];
3241
3288
  const result = await fn(id);
3242
- return { success: true, result };
3289
+ return { success: true, data: result };
3243
3290
  };
3244
3291
  }
3245
3292
  createExecuteFunction(entityDef) {
@@ -3247,12 +3294,15 @@ class AXPPageDetailsConverter extends AXPBaseRelatedEntityConverter {
3247
3294
  if (e.name === 'update-entity') {
3248
3295
  const fn = entityDef?.commands?.update?.execute;
3249
3296
  const result = await fn(context);
3250
- return { success: true, result };
3297
+ return { success: true, data: result };
3251
3298
  }
3252
3299
  else {
3253
3300
  return {
3254
3301
  success: false,
3255
- error: { code: 'invalid_command', message: 'Invalid command' },
3302
+ message: {
3303
+ code: 'invalid_command',
3304
+ text: 'Invalid command'
3305
+ }
3256
3306
  };
3257
3307
  }
3258
3308
  };
@@ -3356,11 +3406,10 @@ class AXPPageListConverter extends AXPBaseRelatedEntityConverter {
3356
3406
  console.warn(`Action ${commandName} not found in entity definition`);
3357
3407
  return {
3358
3408
  success: false,
3359
- error: {
3409
+ message: {
3360
3410
  code: 'ACTION_NOT_FOUND',
3361
- message: `Action ${commandName} not found`,
3362
- details: command,
3363
- },
3411
+ text: `Action ${commandName} not found`,
3412
+ }
3364
3413
  };
3365
3414
  }
3366
3415
  await context.workflowService.execute(commandName, {
@@ -3384,10 +3433,9 @@ class AXPPageListConverter extends AXPBaseRelatedEntityConverter {
3384
3433
  console.error('Error executing command:', error);
3385
3434
  return {
3386
3435
  success: false,
3387
- error: {
3436
+ message: {
3388
3437
  code: 'EXECUTION_ERROR',
3389
- message: error instanceof Error ? error.message : 'Unknown error occurred',
3390
- details: error,
3438
+ text: error instanceof Error ? error.message : 'Unknown error occurred',
3391
3439
  },
3392
3440
  };
3393
3441
  }
@@ -3841,7 +3889,7 @@ class AXPMainEntityContentBuilder {
3841
3889
  const tabListTabs = await this.buildTabLists(tabListEntities ?? [], rootContext, dependencies);
3842
3890
  // Build actions from single interface
3843
3891
  const actions = this.buildActions(entity, singleInterface);
3844
- console.log({ rootContext, dependencies });
3892
+ //console.log({ rootContext, dependencies });
3845
3893
  return {
3846
3894
  id: entity?.name ?? '',
3847
3895
  // title: singleInterface?.title ?? entity?.formats.individual ?? '',
@@ -3874,12 +3922,12 @@ class AXPMainEntityContentBuilder {
3874
3922
  if (params?.forceRefresh) {
3875
3923
  return {
3876
3924
  success: true,
3877
- result: await dependencies.reloadRootContext(),
3925
+ data: await dependencies.reloadRootContext(),
3878
3926
  };
3879
3927
  }
3880
3928
  return {
3881
3929
  success: true,
3882
- result: rootContext,
3930
+ data: rootContext,
3883
3931
  };
3884
3932
  },
3885
3933
  execute: async (e, context) => {
@@ -3889,7 +3937,7 @@ class AXPMainEntityContentBuilder {
3889
3937
  const result = await fn(context);
3890
3938
  return {
3891
3939
  success: true,
3892
- result: result,
3940
+ data: result,
3893
3941
  };
3894
3942
  }
3895
3943
  else {
@@ -3932,9 +3980,9 @@ class AXPMainEntityContentBuilder {
3932
3980
  }
3933
3981
  return {
3934
3982
  success: false,
3935
- error: {
3983
+ message: {
3936
3984
  code: 'invalid_command',
3937
- message: 'Invalid command',
3985
+ text: 'Invalid command',
3938
3986
  },
3939
3987
  };
3940
3988
  }
@@ -3942,9 +3990,8 @@ class AXPMainEntityContentBuilder {
3942
3990
  catch (error) {
3943
3991
  return {
3944
3992
  success: false,
3945
- error: {
3946
- //TODO: handle error as object
3947
- message: error,
3993
+ message: {
3994
+ text: error,
3948
3995
  },
3949
3996
  };
3950
3997
  }
@@ -4329,6 +4376,29 @@ const AXPLayoutDetailsViewRouteResolver = async (route, state, entityResolver =
4329
4376
  return await layoutAdapterFactory.createDetailsViewAdapter(entityResolver, moduleName, entityName, id, dependencies);
4330
4377
  };
4331
4378
 
4379
+ const eventDispatchMiddleware = {
4380
+ target: { ops: ['create', 'update', 'delete'], order: 90 },
4381
+ execute: async (ctx, next) => {
4382
+ const dispatcher = inject(AXPEntityEventDispatcherService);
4383
+ await next();
4384
+ if (ctx.op === 'create') {
4385
+ const createdData = ctx.result ? { ...ctx.data, id: ctx.result } : ctx.data;
4386
+ await dispatcher.dispatchInserted(ctx.entityName, { refType: ctx.entityName, data: createdData });
4387
+ }
4388
+ else if (ctx.op === 'update') {
4389
+ await dispatcher.dispatchUpdated(ctx.entityName, {
4390
+ refType: ctx.entityName,
4391
+ data: ctx.result,
4392
+ changes: ctx.locals.get('changes'),
4393
+ });
4394
+ }
4395
+ else if (ctx.op === 'delete') {
4396
+ // For delete, prefer previous entity if available
4397
+ await dispatcher.dispatchDeleted(ctx.entityName, { refType: ctx.entityName, data: ctx.result ?? ctx.previous });
4398
+ }
4399
+ },
4400
+ };
4401
+
4332
4402
  /**
4333
4403
  * Default widths for common text columns
4334
4404
  */
@@ -4380,6 +4450,200 @@ const createColumnWidthMiddlewareProvider = (widths, entityName = '*') => ({
4380
4450
  const columnWidthMiddlewareProvider = createColumnWidthMiddlewareProvider(DEFAULT_COLUMN_WIDTHS);
4381
4451
  //#endregion
4382
4452
 
4453
+ /**
4454
+ * Default order for common sections
4455
+ */
4456
+ const DEFAULT_SECTION_ORDER = {
4457
+ 'basic-info': 0,
4458
+ 'classification': 20,
4459
+ 'appearance': 30,
4460
+ 'settings': 100,
4461
+ 'advanced': 110,
4462
+ 'metadata': 120,
4463
+ };
4464
+ /**
4465
+ * Default order for common properties
4466
+ * Format: 'sectionId.propertyName' for section-specific or 'propertyName' for any section
4467
+ */
4468
+ const DEFAULT_PROPERTY_ORDER = {
4469
+ // Basic Info section
4470
+ 'basic-info.code': 1,
4471
+ 'basic-info.title': 2,
4472
+ 'basic-info.name': 3,
4473
+ 'basic-info.description': 10,
4474
+ 'basic-info.note': 11,
4475
+ 'basic-info.notes': 12,
4476
+ // Classification section
4477
+ 'classification.categoryIds': 1,
4478
+ 'classification.tags': 2,
4479
+ 'classification.type': 3,
4480
+ // Appearance section
4481
+ 'appearance.icon': 1,
4482
+ 'appearance.color': 2,
4483
+ 'appearance.avatar': 3,
4484
+ // Settings section
4485
+ 'settings.isDefault': 90,
4486
+ 'settings.isPrimary': 91,
4487
+ 'settings.isDisabled': 95,
4488
+ 'settings.isArchived': 96,
4489
+ // Generic fallbacks (apply to any section if not specified above)
4490
+ 'code': 1,
4491
+ 'title': 2,
4492
+ 'name': 3,
4493
+ 'icon': 5,
4494
+ 'color': 6,
4495
+ 'avatar': 7,
4496
+ 'description': 10,
4497
+ 'categoryIds': 15,
4498
+ 'tags': 16,
4499
+ 'isDefault': 90,
4500
+ 'isPrimary': 91,
4501
+ 'isDisabled': 95,
4502
+ 'isArchived': 96,
4503
+ };
4504
+ /**
4505
+ * Get the property order for a given section and property name
4506
+ */
4507
+ const getPropertyOrder = (sectionId, propertyName, orderConfig) => {
4508
+ // Try section-specific order first
4509
+ if (sectionId) {
4510
+ const sectionSpecific = orderConfig[`${sectionId}.${propertyName}`];
4511
+ if (sectionSpecific !== undefined) {
4512
+ return sectionSpecific;
4513
+ }
4514
+ }
4515
+ // Fall back to generic property order
4516
+ return orderConfig[propertyName];
4517
+ };
4518
+ /**
4519
+ * Factory to create a layout ordering middleware
4520
+ */
4521
+ const layoutOrderingMiddlewareFactory = (config) => {
4522
+ console.log('[Layout Ordering Middleware] Factory called - creating middleware function');
4523
+ return (context) => {
4524
+ console.log('[Layout Ordering Middleware] ========================================');
4525
+ console.log('[Layout Ordering Middleware] MIDDLEWARE CALLED FOR ENTITY:', context.entity.name);
4526
+ console.log('[Layout Ordering Middleware] Entity module:', context.entity.module);
4527
+ console.log('[Layout Ordering Middleware] ========================================');
4528
+ const { sections: sectionOrder, properties: propertyOrder } = config;
4529
+ console.log('[Layout Ordering Middleware] Section order config:', sectionOrder);
4530
+ //#region ---- Order Sections ----
4531
+ const orderSections = (layout) => {
4532
+ if (!layout || !layout.sections) {
4533
+ console.log('[Layout Ordering Middleware] No sections found in layout');
4534
+ return;
4535
+ }
4536
+ console.log('[Layout Ordering Middleware] Before ordering sections:', layout.sections.map((s) => ({ id: s.id, order: s.order })));
4537
+ layout.sections.forEach((section) => {
4538
+ const defaultOrder = sectionOrder[section.id];
4539
+ if (defaultOrder !== undefined) {
4540
+ console.log(`[Layout Ordering Middleware] Setting section "${section.id}" order from ${section.order} to ${defaultOrder}`);
4541
+ // Always apply the default order if configured (force override)
4542
+ section.order = defaultOrder;
4543
+ }
4544
+ else {
4545
+ console.log(`[Layout Ordering Middleware] No default order for section "${section.id}"`);
4546
+ }
4547
+ });
4548
+ // Sort sections by order
4549
+ layout.sections.sort((a, b) => {
4550
+ const orderA = a.order ?? 999;
4551
+ const orderB = b.order ?? 999;
4552
+ return orderA - orderB;
4553
+ });
4554
+ console.log('[Layout Ordering Middleware] After ordering sections:', layout.sections.map((s) => ({ id: s.id, order: s.order })));
4555
+ };
4556
+ //#endregion
4557
+ //#region ---- Order Properties Within Sections ----
4558
+ const orderProperties = (layout) => {
4559
+ if (!layout || !layout.properties) {
4560
+ return;
4561
+ }
4562
+ layout.properties.forEach((prop) => {
4563
+ const groupId = context.properties.find(prop.name).get()?.groupId;
4564
+ const defaultOrder = getPropertyOrder(groupId, prop.name, propertyOrder);
4565
+ if (defaultOrder !== undefined) {
4566
+ // Ensure layout.positions exists
4567
+ if (!prop.layout) {
4568
+ prop.layout = {};
4569
+ }
4570
+ if (!prop.layout.positions) {
4571
+ prop.layout.positions = {};
4572
+ }
4573
+ if (!prop.layout.positions.lg) {
4574
+ prop.layout.positions.lg = {};
4575
+ }
4576
+ // Set order if not already defined
4577
+ if (prop.layout.positions.lg.order === undefined) {
4578
+ prop.layout.positions.lg.order = defaultOrder;
4579
+ }
4580
+ }
4581
+ });
4582
+ // Sort properties by order
4583
+ layout.properties.sort((a, b) => {
4584
+ const orderA = a.layout?.positions?.lg?.order ?? 999;
4585
+ const orderB = b.layout?.positions?.lg?.order ?? 999;
4586
+ return orderA - orderB;
4587
+ });
4588
+ };
4589
+ //#endregion
4590
+ //#region ---- Apply to All Layouts ----
4591
+ // Apply to create layout
4592
+ context.interfaces.master.create.update((create) => {
4593
+ console.log('[Layout Ordering Middleware] Processing CREATE layout');
4594
+ if (create) {
4595
+ orderSections(create);
4596
+ orderProperties(create);
4597
+ }
4598
+ return create ?? { sections: [], properties: [] };
4599
+ });
4600
+ // Apply to modify layout
4601
+ context.interfaces.master.modify.update((modify) => {
4602
+ console.log('[Layout Ordering Middleware] Processing MODIFY layout');
4603
+ if (modify) {
4604
+ orderSections(modify);
4605
+ orderProperties(modify);
4606
+ }
4607
+ return modify ?? { sections: [], properties: [] };
4608
+ });
4609
+ // Apply to single layout
4610
+ context.interfaces.master.single.update((single) => {
4611
+ console.log('[Layout Ordering Middleware] Processing SINGLE layout');
4612
+ if (single) {
4613
+ orderSections(single);
4614
+ orderProperties(single);
4615
+ }
4616
+ return single ?? { title: context.entity.title, sections: [], properties: [] };
4617
+ });
4618
+ //#endregion
4619
+ };
4620
+ };
4621
+ //#endregion
4622
+ //#region ---- Provider Registration ----
4623
+ /**
4624
+ * Helper to create a provider for the layout ordering middleware
4625
+ * By default it applies to all entities using the '*' pattern
4626
+ */
4627
+ const createLayoutOrderingMiddlewareProvider = (config = {}, entityName = '*') => {
4628
+ console.log('[Layout Ordering Middleware] Creating provider for entityName pattern:', entityName);
4629
+ return {
4630
+ entityName,
4631
+ modifier: layoutOrderingMiddlewareFactory({
4632
+ sections: { ...DEFAULT_SECTION_ORDER, ...config.sections },
4633
+ properties: { ...DEFAULT_PROPERTY_ORDER, ...config.properties },
4634
+ }),
4635
+ };
4636
+ };
4637
+ /**
4638
+ * Default provider registered with the default configuration
4639
+ */
4640
+ const layoutOrderingMiddlewareProvider = createLayoutOrderingMiddlewareProvider();
4641
+ console.log('[Layout Ordering Middleware] Provider initialized with config:', {
4642
+ sections: DEFAULT_SECTION_ORDER,
4643
+ propertyCount: Object.keys(DEFAULT_PROPERTY_ORDER).length
4644
+ });
4645
+ //#endregion
4646
+
4383
4647
  class AXPEntityCommandSearchDefinitionProvider {
4384
4648
  async provide(context) {
4385
4649
  context.addDefinition('command', 'Commands', 'command', 'fa-solid fa-command', 1, {
@@ -5800,6 +6064,10 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
5800
6064
  this.valueField = computed(() => this.options()['valueField'] ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
5801
6065
  this.textField = computed(() => this.options()['textField'] ?? 'title', ...(ngDevMode ? [{ debugName: "textField" }] : []));
5802
6066
  this.badgeClass = computed(() => this.options()['badgeClass'] ?? 'ax-accent1', ...(ngDevMode ? [{ debugName: "badgeClass" }] : []));
6067
+ this.displayFormat = computed(() => {
6068
+ const template = this.options()['displayFormat'];
6069
+ return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
6070
+ }, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
5803
6071
  this.displayField = computed(() => {
5804
6072
  return this.textField() ?? this.entityDef()?.formats.lookup ?? this.entityDef()?.properties.find((c) => c.name != 'id')?.name ?? 'title';
5805
6073
  }, ...(ngDevMode ? [{ debugName: "displayField" }] : []));
@@ -5825,26 +6093,34 @@ class AXPLookupWidgetViewComponent extends AXPValueWidgetComponent {
5825
6093
  if (typeof item == 'object') {
5826
6094
  return {
5827
6095
  id: item[this.valueField()],
5828
- text: this.formatService.format(this.displayField(), 'string', item),
6096
+ text: this.getDisplayText(item),
5829
6097
  };
5830
6098
  }
5831
- else {
5832
- const def = this.entityDef();
5833
- const byKey = def?.queries.byKey?.execute;
5834
- if (byKey) {
5835
- this.loading.set(true);
5836
- const fetchedItem = await byKey(item);
5837
- this.loading.set(false);
5838
- return {
5839
- id: fetchedItem[this.valueField()],
5840
- text: this.formatService.format(this.displayField(), 'string', fetchedItem),
5841
- };
5842
- }
6099
+ const def = this.entityDef();
6100
+ const byKey = def?.queries.byKey?.execute;
6101
+ if (byKey) {
6102
+ this.loading.set(true);
6103
+ const fetchedItem = await byKey(item);
6104
+ this.loading.set(false);
5843
6105
  return {
5844
- id: item,
5845
- text: item
6106
+ id: fetchedItem[this.valueField()],
6107
+ text: this.getDisplayText(fetchedItem),
5846
6108
  };
5847
6109
  }
6110
+ return {
6111
+ id: item,
6112
+ text: item,
6113
+ };
6114
+ }
6115
+ getDisplayText(item) {
6116
+ const template = this.displayFormat();
6117
+ if (template) {
6118
+ const formatted = this.formatService.format(template, 'string', item);
6119
+ if (formatted) {
6120
+ return formatted;
6121
+ }
6122
+ }
6123
+ return this.formatService.format(this.displayField(), 'string', item);
5848
6124
  }
5849
6125
  get __class() {
5850
6126
  const cls = {};
@@ -5958,6 +6234,7 @@ class AXPEntityDataSelectorService {
5958
6234
  columns,
5959
6235
  selectionMode: options.allowMultiple ? 'multiple' : 'single',
5960
6236
  searchFields,
6237
+ initialSearchTerm: options.initialSearchTerm,
5961
6238
  parentField: options.entity.parentKey,
5962
6239
  filters: options.filters || undefined,
5963
6240
  allowCreate: options.allowCreate ?? this.canCreate(options.entity),
@@ -6039,13 +6316,19 @@ class AXPEntityDataSelectorService {
6039
6316
  */
6040
6317
  getSearchFields(options) {
6041
6318
  const { entity, searchFields } = options;
6319
+ const searchableFields = entity.properties
6320
+ .filter(p => p.options?.filter?.inline?.enabled)
6321
+ .map(p => {
6322
+ return {
6323
+ name: p.name,
6324
+ title: p.title,
6325
+ };
6326
+ }) ?? [];
6042
6327
  if (searchFields && searchFields.length > 0) {
6043
- return searchFields;
6328
+ return searchableFields.filter(f => searchFields.includes(f.name));
6044
6329
  }
6045
6330
  // Auto-detect searchable fields from entity properties
6046
- return entity.properties
6047
- .filter(p => p.options?.filter?.inline?.enabled)
6048
- .map(p => p.name);
6331
+ return searchableFields;
6049
6332
  }
6050
6333
  /**
6051
6334
  * Check if entity supports create operation
@@ -6109,7 +6392,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6109
6392
  this.entityDataSelectorService = inject(AXPEntityDataSelectorService);
6110
6393
  this.translateService = inject(AXTranslationService);
6111
6394
  this.selectBox = viewChild('selectBox', ...(ngDevMode ? [{ debugName: "selectBox" }] : []));
6112
- this.tagBox = viewChild('tagBox', ...(ngDevMode ? [{ debugName: "tagBox" }] : []));
6395
+ this.tagBox = viewChild('tagBoxComponent', ...(ngDevMode ? [{ debugName: "tagBox" }] : []));
6113
6396
  this.shouldFocus = signal(false, ...(ngDevMode ? [{ debugName: "shouldFocus" }] : []));
6114
6397
  this.expose = computed(() => this.options()['expose'], ...(ngDevMode ? [{ debugName: "expose" }] : []));
6115
6398
  this.entity = computed(() => this.options()['entity'], ...(ngDevMode ? [{ debugName: "entity" }] : []));
@@ -6136,6 +6419,10 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6136
6419
  .join(', ');
6137
6420
  }, ...(ngDevMode ? [{ debugName: "selectedItemsText" }] : []));
6138
6421
  this.valueField = computed(() => this.entityDef()?.properties.find((c) => c.name == 'id')?.name ?? 'id', ...(ngDevMode ? [{ debugName: "valueField" }] : []));
6422
+ this.displayFormat = computed(() => {
6423
+ const template = this.options()['displayFormat'];
6424
+ return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
6425
+ }, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
6139
6426
  this.entityDef = signal(null, ...(ngDevMode ? [{ debugName: "entityDef" }] : []));
6140
6427
  this.dataSource = computed(() => {
6141
6428
  const entity = this.entityDef();
@@ -6156,13 +6443,12 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6156
6443
  });
6157
6444
  }, ...(ngDevMode ? [{ debugName: "dataSource" }] : []));
6158
6445
  this.searchTerm = signal(null, ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
6446
+ this.searchPlaceholderText = signal('', ...(ngDevMode ? [{ debugName: "searchPlaceholderText" }] : []));
6159
6447
  this.selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
6160
6448
  this.textbox = viewChild(AXTagBoxComponent, ...(ngDevMode ? [{ debugName: "textbox" }] : []));
6161
6449
  this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
6162
6450
  this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
6163
- this.placeholder = computed(() => {
6164
- return this.selectedItems().length ? '' : this.translateService.translateSync('@general:widgets.lookup.search');
6165
- }, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
6451
+ this.placeholderUpdateToken = 0;
6166
6452
  this.#efEntity = effect(async () => {
6167
6453
  const [module, entity] = this.entity().split('.');
6168
6454
  this.entityDef.set(await this.entityResolver.get(module, entity));
@@ -6175,6 +6461,32 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6175
6461
  this.clear();
6176
6462
  }
6177
6463
  }, ...(ngDevMode ? [{ debugName: "#efValue" }] : []));
6464
+ this.#efSearchPlaceholder = effect(() => {
6465
+ const entity = this.entityDef();
6466
+ if (!entity) {
6467
+ this.searchPlaceholderText.set('');
6468
+ return;
6469
+ }
6470
+ let inlineFields = entity.properties
6471
+ .filter((property) => property.options?.filter?.inline?.enabled)
6472
+ .map((property) => ({
6473
+ title: property.title,
6474
+ name: property.name,
6475
+ })) ?? [];
6476
+ if (!inlineFields.length) {
6477
+ const displayFieldName = this.displayField();
6478
+ const displayProperty = entity.properties.find((property) => property.name === displayFieldName);
6479
+ if (displayProperty) {
6480
+ inlineFields = [
6481
+ {
6482
+ title: displayProperty.title,
6483
+ name: displayProperty.name,
6484
+ },
6485
+ ];
6486
+ }
6487
+ }
6488
+ void this.updateSearchPlaceholder(inlineFields);
6489
+ }, ...(ngDevMode ? [{ debugName: "#efSearchPlaceholder" }] : []));
6178
6490
  //#region ---- Focus Management ----
6179
6491
  /**
6180
6492
  * Reactive effect to auto-focus when viewChild is ready
@@ -6218,6 +6530,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6218
6530
  }
6219
6531
  #efEntity;
6220
6532
  #efValue;
6533
+ #efSearchPlaceholder;
6221
6534
  async findByValue() {
6222
6535
  this.isLoading.set(true);
6223
6536
  const rawValue = this.getValue();
@@ -6244,6 +6557,8 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6244
6557
  }
6245
6558
  async showSelector() {
6246
6559
  this.isOpen.set(true);
6560
+ const inlineSearchValue = (this.searchTerm() ?? '').trim();
6561
+ const initialSearchTerm = inlineSearchValue.length > 0 ? inlineSearchValue : undefined;
6247
6562
  try {
6248
6563
  const result = await this.entityDataSelectorService.open({
6249
6564
  entity: this.entityDef(),
@@ -6253,6 +6568,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6253
6568
  parentFilters: this.filter,
6254
6569
  columns: this.columns(),
6255
6570
  allowCreate: true,
6571
+ initialSearchTerm,
6256
6572
  });
6257
6573
  if (result && 'items' in result) {
6258
6574
  this.setItems(result.items);
@@ -6280,6 +6596,11 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6280
6596
  }
6281
6597
  }
6282
6598
  }
6599
+ handleSearchInputChange(e) {
6600
+ if (e.isUserInteraction) {
6601
+ this.searchTerm.set(e.value ?? '');
6602
+ }
6603
+ }
6283
6604
  handleOnBlur(e) {
6284
6605
  setTimeout(() => {
6285
6606
  if (!this.isOpen()) {
@@ -6361,6 +6682,52 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6361
6682
  this.textbox()?.inputValue.set('');
6362
6683
  this.searchTerm.set('');
6363
6684
  }
6685
+ getTagLabel(item) {
6686
+ if (!item) {
6687
+ return '';
6688
+ }
6689
+ const template = this.displayFormat();
6690
+ if (template) {
6691
+ const formatted = this.formatService.format(template, 'string', item);
6692
+ if (formatted) {
6693
+ return formatted;
6694
+ }
6695
+ }
6696
+ return get(item, this.displayField()) ?? '';
6697
+ }
6698
+ async updateSearchPlaceholder(fields) {
6699
+ const updateToken = ++this.placeholderUpdateToken;
6700
+ if (!fields || fields.length === 0) {
6701
+ const fallback = await this.translateService.translateAsync('@general:actions.search.title');
6702
+ if (updateToken !== this.placeholderUpdateToken) {
6703
+ return;
6704
+ }
6705
+ this.searchPlaceholderText.set(fallback ? `${fallback}...` : '');
6706
+ return;
6707
+ }
6708
+ const translatedFields = await Promise.all(fields.map(async (field) => {
6709
+ const translated = await this.translateService.translateAsync(field.title || field.name);
6710
+ return translated ?? field.title ?? field.name;
6711
+ }));
6712
+ const translatedText = translatedFields
6713
+ .filter((value) => Boolean(value && value.trim().length > 0))
6714
+ .join(', ');
6715
+ const fallbackText = fields
6716
+ .map((field) => field.title || field.name)
6717
+ .filter((value) => Boolean(value && value.trim().length > 0))
6718
+ .join(', ');
6719
+ let fieldsText = translatedText || fallbackText;
6720
+ if (!fieldsText) {
6721
+ fieldsText = (await this.translateService.translateAsync('@general:terms.items')) ?? 'items';
6722
+ }
6723
+ const placeholder = await this.translateService.translateAsync('@general:widgets.lookup.search-placeholder', {
6724
+ params: { fields: fieldsText },
6725
+ });
6726
+ if (updateToken !== this.placeholderUpdateToken) {
6727
+ return;
6728
+ }
6729
+ this.searchPlaceholderText.set(placeholder ?? `Search in ${fieldsText}...`);
6730
+ }
6364
6731
  async searchByValue(value) {
6365
6732
  if (!this.entityDef())
6366
6733
  return null;
@@ -6415,7 +6782,7 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6415
6782
  this.shouldFocus.set(true);
6416
6783
  }
6417
6784
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6418
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPLookupWidgetEditComponent, isStandalone: true, selector: "axp-lookup-widget-edit", viewQueries: [{ propertyName: "selectBox", first: true, predicate: ["selectBox"], descendants: true, isSignal: true }, { propertyName: "tagBox", first: true, predicate: ["tagBox"], descendants: true, isSignal: true }, { propertyName: "textbox", first: true, predicate: AXTagBoxComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
6785
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPLookupWidgetEditComponent, isStandalone: true, selector: "axp-lookup-widget-edit", viewQueries: [{ propertyName: "selectBox", first: true, predicate: ["selectBox"], descendants: true, isSignal: true }, { propertyName: "tagBox", first: true, predicate: ["tagBoxComponent"], descendants: true, isSignal: true }, { propertyName: "textbox", first: true, predicate: AXTagBoxComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
6419
6786
  @if (dataSource()) {
6420
6787
  @if (look() == 'select') {
6421
6788
  <ax-select-box
@@ -6428,7 +6795,10 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6428
6795
  [multiple]="multiple()"
6429
6796
  (onValueChanged)="selectBoxValueChange($event)"
6430
6797
  >
6431
- <ax-search-box>
6798
+ <ax-search-box
6799
+ [placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
6800
+ (onValueChanged)="handleSearchInputChange($event)"
6801
+ >
6432
6802
  <ax-clear-button></ax-clear-button>
6433
6803
  </ax-search-box>
6434
6804
  @for (validation of validationRules(); track $index) {
@@ -6444,12 +6814,13 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6444
6814
  </ax-select-box>
6445
6815
  } @else {
6446
6816
  <ax-tag-box
6447
- #tagBox
6817
+ #tagBoxComponent
6818
+ [tagTemplate]="tagTemplate"
6448
6819
  [ngModel]="selectedItems()"
6449
6820
  [textField]="displayField()"
6450
6821
  [valueField]="valueField()"
6451
6822
  (onValueChanged)="handleValueChange($event)"
6452
- [placeholder]="placeholder() | translate | async"
6823
+ [placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
6453
6824
  [addOnEnter]="false"
6454
6825
  [addOnComma]="false"
6455
6826
  [disabled]="disabled()"
@@ -6482,11 +6853,19 @@ class AXPLookupWidgetEditComponent extends AXPValueWidgetComponent {
6482
6853
  </ax-button>
6483
6854
  </ax-suffix>
6484
6855
  </ax-tag-box>
6856
+ <ng-template #tagTemplate let-item let-index="index">
6857
+ <div class="ax-inline-flex ax-items-center ax-gap-1.5 ax-rounded-md ax-px-3 ax-py-1 ax-text-sm ax-surface">
6858
+ <span>{{ getTagLabel(item) }}</span>
6859
+ <button type="button" (click)="tagBoxComponent.removeItem(index)">
6860
+ <ax-icon class="ax-icon ax-icon-close"></ax-icon>
6861
+ </button>
6862
+ </div>
6863
+ </ng-template>
6485
6864
  }
6486
6865
  }
6487
6866
  `, 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:
6488
6867
  //
6489
- 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$1.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 }); }
6868
+ 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$1.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 }); }
6490
6869
  }
6491
6870
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetEditComponent, decorators: [{
6492
6871
  type: Component,
@@ -6505,7 +6884,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
6505
6884
  [multiple]="multiple()"
6506
6885
  (onValueChanged)="selectBoxValueChange($event)"
6507
6886
  >
6508
- <ax-search-box>
6887
+ <ax-search-box
6888
+ [placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
6889
+ (onValueChanged)="handleSearchInputChange($event)"
6890
+ >
6509
6891
  <ax-clear-button></ax-clear-button>
6510
6892
  </ax-search-box>
6511
6893
  @for (validation of validationRules(); track $index) {
@@ -6521,12 +6903,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
6521
6903
  </ax-select-box>
6522
6904
  } @else {
6523
6905
  <ax-tag-box
6524
- #tagBox
6906
+ #tagBoxComponent
6907
+ [tagTemplate]="tagTemplate"
6525
6908
  [ngModel]="selectedItems()"
6526
6909
  [textField]="displayField()"
6527
6910
  [valueField]="valueField()"
6528
6911
  (onValueChanged)="handleValueChange($event)"
6529
- [placeholder]="placeholder() | translate | async"
6912
+ [placeholder]="selectedItems().length ? '' : searchPlaceholderText()"
6530
6913
  [addOnEnter]="false"
6531
6914
  [addOnComma]="false"
6532
6915
  [disabled]="disabled()"
@@ -6559,6 +6942,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
6559
6942
  </ax-button>
6560
6943
  </ax-suffix>
6561
6944
  </ax-tag-box>
6945
+ <ng-template #tagTemplate let-item let-index="index">
6946
+ <div class="ax-inline-flex ax-items-center ax-gap-1.5 ax-rounded-md ax-px-3 ax-py-1 ax-text-sm ax-surface">
6947
+ <span>{{ getTagLabel(item) }}</span>
6948
+ <button type="button" (click)="tagBoxComponent.removeItem(index)">
6949
+ <ax-icon class="ax-icon ax-icon-close"></ax-icon>
6950
+ </button>
6951
+ </div>
6952
+ </ng-template>
6562
6953
  }
6563
6954
  }
6564
6955
  `,
@@ -6578,7 +6969,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
6578
6969
  AXSearchBoxComponent,
6579
6970
  ],
6580
6971
  }]
6581
- }], propDecorators: { selectBox: [{ type: i0.ViewChild, args: ['selectBox', { isSignal: true }] }], tagBox: [{ type: i0.ViewChild, args: ['tagBox', { isSignal: true }] }], textbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXTagBoxComponent), { isSignal: true }] }] } });
6972
+ }], propDecorators: { selectBox: [{ type: i0.ViewChild, args: ['selectBox', { isSignal: true }] }], tagBox: [{ type: i0.ViewChild, args: ['tagBoxComponent', { isSignal: true }] }], textbox: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXTagBoxComponent), { isSignal: true }] }] } });
6582
6973
 
6583
6974
  var lookupWidgetEdit_component = /*#__PURE__*/Object.freeze({
6584
6975
  __proto__: null,
@@ -6590,6 +6981,7 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
6590
6981
  super(...arguments);
6591
6982
  //#region ---- Dependencies ----
6592
6983
  this.entityDetailPopoverService = inject(AXPEntityDetailPopoverService);
6984
+ this.formatService = inject(AXFormatService);
6593
6985
  //#endregion
6594
6986
  //#region ---- View Children ----
6595
6987
  this.moreButton = viewChild('moreButton', ...(ngDevMode ? [{ debugName: "moreButton" }] : []));
@@ -6602,6 +6994,10 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
6602
6994
  this.entity = this.options['entity'] ?? 'title';
6603
6995
  this.columnName = this.options['columnName'] ?? 'title';
6604
6996
  this.maxVisible = this.options['maxVisible'] ?? 2;
6997
+ this.displayFormat = computed(() => {
6998
+ const template = this.options['displayFormat'];
6999
+ return template ? template.replace(/\{/g, '{{').replace(/\}/g, '}}') : undefined;
7000
+ }, ...(ngDevMode ? [{ debugName: "displayFormat" }] : []));
6605
7001
  //#endregion
6606
7002
  //#region ---- Signals ----
6607
7003
  this.isMorePopoverOpen = signal(false, ...(ngDevMode ? [{ debugName: "isMorePopoverOpen" }] : []));
@@ -6672,22 +7068,33 @@ class AXPLookupWidgetColumnComponent extends AXPColumnWidgetComponent {
6672
7068
  if (isNil(item)) {
6673
7069
  return null;
6674
7070
  }
6675
- return typeof item == 'object'
6676
- ? {
6677
- [this.valueField]: item?.[this.valueField],
6678
- [this.textField]: item?.[this.textField],
7071
+ if (typeof item === 'object') {
7072
+ return item;
7073
+ }
7074
+ return {
7075
+ [this.valueField]: item,
7076
+ [this.textField]: item,
7077
+ };
7078
+ }
7079
+ getDisplayText(item) {
7080
+ if (!item) {
7081
+ return '';
7082
+ }
7083
+ const template = this.displayFormat();
7084
+ if (template) {
7085
+ const formatted = this.formatService.format(template, 'string', item);
7086
+ if (formatted) {
7087
+ return formatted;
6679
7088
  }
6680
- : {
6681
- [this.valueField]: item,
6682
- [this.textField]: item,
6683
- };
7089
+ }
7090
+ return item?.[this.textField] ?? '';
6684
7091
  }
6685
7092
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
6686
- 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 {{ item[this.textField] }}\n </span>\n @if ($index < visibleItems().length - 1) {\n <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()\"\n #moreButton\n >\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 {{ item[this.textField] }}\n </span>\n }\n </div>\n </div>\n</ax-popover>\n", 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 }); }
7093
+ 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 }); }
6687
7094
  }
6688
7095
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLookupWidgetColumnComponent, decorators: [{
6689
7096
  type: Component,
6690
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXBadgeModule, AXButtonModule, AXPopoverModule], inputs: ['rawValue', 'rowData'], 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 {{ item[this.textField] }}\n </span>\n @if ($index < visibleItems().length - 1) {\n <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()\"\n #moreButton\n >\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 {{ item[this.textField] }}\n </span>\n }\n </div>\n </div>\n</ax-popover>\n" }]
7097
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXBadgeModule, AXButtonModule, AXPopoverModule], inputs: ['rawValue', 'rowData'], 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>" }]
6691
7098
  }], propDecorators: { moreButton: [{ type: i0.ViewChild, args: ['moreButton', { isSignal: true }] }], morePopover: [{ type: i0.ViewChild, args: ['morePopover', { isSignal: true }] }] } });
6692
7099
 
6693
7100
  var lookupWidgetColumn_component = /*#__PURE__*/Object.freeze({
@@ -6736,6 +7143,20 @@ const AXPLookupWidget = {
6736
7143
  visible: true,
6737
7144
  },
6738
7145
  AXP_ALLOW_MULTIPLE_PROPERTY,
7146
+ {
7147
+ name: 'displayFormat',
7148
+ title: 'Display Format',
7149
+ group: AXP_DATA_PROPERTY_GROUP,
7150
+ schema: {
7151
+ dataType: 'string',
7152
+ interface: {
7153
+ name: 'displayFormat',
7154
+ path: 'options.displayFormat',
7155
+ type: AXPWidgetsCatalog.template,
7156
+ },
7157
+ },
7158
+ visible: true,
7159
+ },
6739
7160
  ],
6740
7161
  components: {
6741
7162
  view: {
@@ -7075,8 +7496,8 @@ const AXPQuickModifyEntityWorkflow = {
7075
7496
  action: 'AXPToastAction',
7076
7497
  input: {
7077
7498
  color: 'success',
7078
- title: 'workflow.entity-modified-title',
7079
- content: 'workflow.entity-modified-body',
7499
+ title: '@general:workflow.entity-modified-title',
7500
+ content: '@general:workflow.entity-modified-body',
7080
7501
  },
7081
7502
  nextSteps: [
7082
7503
  {
@@ -7213,8 +7634,8 @@ const AXPShowFileUploaderPopupWorkflow = {
7213
7634
  action: 'AXPToastAction',
7214
7635
  input: {
7215
7636
  color: 'success',
7216
- title: 'workflow.entity-modified-title',
7217
- content: 'workflow.entity-modified-body',
7637
+ title: '@general:workflow.entity-modified-title',
7638
+ content: '@general:workflow.entity-modified-body',
7218
7639
  },
7219
7640
  nextSteps: [
7220
7641
  {
@@ -7361,6 +7782,11 @@ class AXPEntityModule {
7361
7782
  useValue: columnWidthMiddlewareProvider,
7362
7783
  multi: true,
7363
7784
  },
7785
+ {
7786
+ provide: AXP_ENTITY_MODIFIER,
7787
+ useValue: layoutOrderingMiddlewareProvider,
7788
+ multi: true,
7789
+ },
7364
7790
  provideCommandSetups([
7365
7791
  {
7366
7792
  key: 'Entity:OpenDetails',
@@ -7368,7 +7794,7 @@ class AXPEntityModule {
7368
7794
  },
7369
7795
  {
7370
7796
  key: 'Entity:Create',
7371
- command: () => import('./acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs').then((c) => c.AXPCreateEntityCommand),
7797
+ command: () => import('./acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs').then((c) => c.AXPCreateEntityCommand),
7372
7798
  },
7373
7799
  ]),
7374
7800
  provideQuerySetups([
@@ -7482,6 +7908,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
7482
7908
  useValue: columnWidthMiddlewareProvider,
7483
7909
  multi: true,
7484
7910
  },
7911
+ {
7912
+ provide: AXP_ENTITY_MODIFIER,
7913
+ useValue: layoutOrderingMiddlewareProvider,
7914
+ multi: true,
7915
+ },
7485
7916
  provideCommandSetups([
7486
7917
  {
7487
7918
  key: 'Entity:OpenDetails',
@@ -7489,7 +7920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
7489
7920
  },
7490
7921
  {
7491
7922
  key: 'Entity:Create',
7492
- command: () => import('./acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs').then((c) => c.AXPCreateEntityCommand),
7923
+ command: () => import('./acorex-platform-layout-entity-create-entity.command-Bui87lV1.mjs').then((c) => c.AXPCreateEntityCommand),
7493
7924
  },
7494
7925
  ]),
7495
7926
  provideQuerySetups([
@@ -7502,29 +7933,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
7502
7933
  }]
7503
7934
  }], ctorParameters: () => [{ type: i1$1.AXPAppStartUpService }, { type: i0.Injector }] });
7504
7935
 
7505
- const eventDispatchMiddleware = {
7506
- target: { ops: ['create', 'update', 'delete'], order: 90 },
7507
- execute: async (ctx, next) => {
7508
- const dispatcher = inject(AXPEntityEventDispatcherService);
7509
- await next();
7510
- if (ctx.op === 'create') {
7511
- const createdData = ctx.result ? { ...ctx.data, id: ctx.result } : ctx.data;
7512
- await dispatcher.dispatchInserted(ctx.entityName, { refType: ctx.entityName, data: createdData });
7513
- }
7514
- else if (ctx.op === 'update') {
7515
- await dispatcher.dispatchUpdated(ctx.entityName, {
7516
- refType: ctx.entityName,
7517
- data: ctx.result,
7518
- changes: ctx.locals.get('changes'),
7519
- });
7520
- }
7521
- else if (ctx.op === 'delete') {
7522
- // For delete, prefer previous entity if available
7523
- await dispatcher.dispatchDeleted(ctx.entityName, { refType: ctx.entityName, data: ctx.result ?? ctx.previous });
7524
- }
7525
- },
7526
- };
7527
-
7528
7936
  //#endregion
7529
7937
  //#region ---- Get Entity Details Query ----
7530
7938
  /**
@@ -7899,6 +8307,7 @@ function entityMasterBulkDeleteAction() {
7899
8307
  priority: 'primary',
7900
8308
  type: AXPSystemActionType.Delete,
7901
8309
  scope: AXPEntityCommandScope.Selected,
8310
+ order: 100,
7902
8311
  };
7903
8312
  }
7904
8313
  function entityMasterViewAction() {
@@ -7918,6 +8327,7 @@ function entityMasterDeleteAction() {
7918
8327
  priority: 'secondary',
7919
8328
  type: AXPSystemActionType.Delete,
7920
8329
  scope: AXPEntityCommandScope.Individual,
8330
+ order: 100,
7921
8331
  };
7922
8332
  }
7923
8333
  function entityMasterCrudActions(options) {
@@ -8078,5 +8488,5 @@ function detectEntityChanges(oldObj, newObj) {
8078
8488
  * Generated bundle index. Do not edit.
8079
8489
  */
8080
8490
 
8081
- export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityDynamicDialogService, AXPEntityEventDispatcherService, 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, 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, actionExists, columnWidthMiddlewareFactory, columnWidthMiddlewareProvider, createColumnWidthMiddlewareProvider, createModifierContext, detectEntityChanges, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware, isAXPMiddlewareAbortError };
8491
+ export { AXMEntityCrudService, AXMEntityCrudServiceImpl, AXPCreateEntityWorkflow, AXPDataSeederService, AXPDeleteEntityWorkflow, AXPEntityApplyUpdatesAction, AXPEntityCommandTriggerViewModel, AXPEntityCreateEvent, AXPEntityCreatePopupAction, AXPEntityCreateSubmittedAction, AXPEntityCreateViewElementViewModel, AXPEntityCreateViewModelFactory, AXPEntityCreateViewSectionViewModel, AXPEntityDataProvider, AXPEntityDataProviderImpl, AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService, AXPEntityDeletedEvent, AXPEntityDetailListViewModel, AXPEntityDetailPopoverComponent, AXPEntityDetailPopoverService, AXPEntityDetailViewModelFactory, AXPEntityDetailViewModelResolver, AXPEntityDynamicDialogService, AXPEntityEventDispatcherService, 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, 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, columnWidthMiddlewareFactory, columnWidthMiddlewareProvider, createColumnWidthMiddlewareProvider, createLayoutOrderingMiddlewareProvider, createModifierContext, detectEntityChanges, ensureListActions, entityDetailsCreateActions, entityDetailsCrudActions, entityDetailsEditAction, entityDetailsReferenceCondition, entityDetailsReferenceCreateActions, entityDetailsSimpleCondition, entityMasterBulkDeleteAction, entityMasterCreateAction, entityMasterCrudActions, entityMasterDeleteAction, entityMasterRecordActions, entityMasterViewAction, entityOverrideDetailsViewAction, eventDispatchMiddleware, isAXPMiddlewareAbortError, layoutOrderingMiddlewareFactory, layoutOrderingMiddlewareProvider };
8082
8492
  //# sourceMappingURL=acorex-platform-layout-entity.mjs.map