@acorex/platform 19.1.7 → 19.1.9

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 (79) hide show
  1. package/common/lib/app/application.types.d.ts +4 -0
  2. package/common/lib/common.module.d.ts +8 -9
  3. package/common/lib/layout/menu/menu.types.d.ts +3 -2
  4. package/common/lib/layout/menu/search.provider.d.ts +2 -2
  5. package/common/lib/search/search-definition.builder.d.ts +5 -2
  6. package/common/lib/search/search.provider.d.ts +4 -0
  7. package/common/lib/search/search.service.d.ts +1 -0
  8. package/common/lib/search/search.types.d.ts +21 -5
  9. package/common/lib/settings/settings.service.d.ts +11 -5
  10. package/common/lib/store/common.actions.d.ts +0 -12
  11. package/common/lib/store/index.d.ts +0 -1
  12. package/common/lib/workflows/index.d.ts +1 -0
  13. package/common/lib/workflows/navigate.workflow.d.ts +13 -0
  14. package/core/lib/types.d.ts +19 -0
  15. package/fesm2022/acorex-platform-common.mjs +696 -705
  16. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  18. package/fesm2022/acorex-platform-layout-builder.mjs +2 -0
  19. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  20. package/fesm2022/acorex-platform-layout-designer.mjs +3 -3
  21. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  22. package/fesm2022/acorex-platform-layout-entity.mjs +172 -40
  23. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  24. package/fesm2022/acorex-platform-layout-search.mjs +87 -15
  25. package/fesm2022/acorex-platform-layout-search.mjs.map +1 -1
  26. package/fesm2022/acorex-platform-layout-setting.mjs +111 -5
  27. package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
  28. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-BUL6ti4U.mjs → acorex-platform-themes-default-entity-master-list-view.component-BDjcOo6R.mjs} +3 -3
  29. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BDjcOo6R.mjs.map +1 -0
  30. package/fesm2022/acorex-platform-themes-default-search-popup.component-gkiSZXm-.mjs +122 -0
  31. package/fesm2022/acorex-platform-themes-default-search-popup.component-gkiSZXm-.mjs.map +1 -0
  32. package/fesm2022/acorex-platform-themes-default.mjs +11 -11
  33. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  34. package/fesm2022/acorex-platform-themes-shared.mjs +9 -9
  35. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  36. package/fesm2022/acorex-platform-widgets.mjs +1188 -509
  37. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  38. package/fesm2022/acorex-platform-workflow.mjs +10 -3
  39. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  40. package/layout/builder/lib/builder/widget-map.d.ts +2 -0
  41. package/layout/designer/lib/preview/preview.component.d.ts +2 -2
  42. package/layout/entity/lib/entity-master-single.viewmodel.d.ts +6 -6
  43. package/layout/entity/lib/entity-registery.service.d.ts +16 -0
  44. package/layout/entity/lib/entity.config.d.ts +2 -2
  45. package/layout/entity/lib/entity.module.d.ts +3 -0
  46. package/layout/entity/lib/search-definition-command.provider.d.ts +4 -0
  47. package/layout/entity/lib/search-definition.provider.d.ts +6 -0
  48. package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +1 -1
  49. package/layout/search/lib/search.viewmodel.d.ts +21 -1
  50. package/layout/search/lib/workflows/search.workflow.d.ts +2 -1
  51. package/layout/setting/index.d.ts +1 -0
  52. package/{common/lib/settings → layout/setting/lib}/search-definition.provider.d.ts +1 -1
  53. package/layout/setting/lib/search.provider.d.ts +9 -0
  54. package/layout/setting/lib/settings.module.d.ts +9 -0
  55. package/package.json +5 -5
  56. package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/list-view-option-columns/list-view-option-columns.component.d.ts +2 -2
  57. package/themes/default/lib/layouts/search-layout/search-popup.component.d.ts +10 -1
  58. package/themes/shared/lib/components/layout-elements/layout-list.component.d.ts +3 -3
  59. package/widgets/lib/properties/layout.props.d.ts +1 -0
  60. package/widgets/lib/widgets/index.d.ts +2 -0
  61. package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-designer.component.d.ts +29 -0
  62. package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget-view.component.d.ts +9 -0
  63. package/widgets/lib/widgets/layout/advanced-grid/advanced-grid-widget.config.d.ts +7 -0
  64. package/widgets/lib/widgets/layout/advanced-grid/index.d.ts +3 -0
  65. package/widgets/lib/widgets/layout/grid/grid-widget-designer.component.d.ts +7 -2
  66. package/widgets/lib/widgets/property-editors/flex-options/flex-options-widget-editor.component.d.ts +6 -6
  67. package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget-editor.component.d.ts +50 -0
  68. package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget.config.d.ts +7 -0
  69. package/widgets/lib/widgets/property-editors/grid-options/grid-options-widget.type.d.ts +21 -0
  70. package/widgets/lib/widgets/property-editors/grid-options/index.d.ts +3 -0
  71. package/widgets/lib/widgets/property-editors/property-editor-helper.d.ts +17 -2
  72. package/widgets/lib/widgets/property-editors/property-editor.type.d.ts +5 -0
  73. package/workflow/lib/workflow.service.d.ts +1 -0
  74. package/workflow/lib/workflow.types.d.ts +1 -1
  75. package/common/lib/settings/search.provider.d.ts +0 -10
  76. package/common/lib/store/common.effects.d.ts +0 -13
  77. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BUL6ti4U.mjs.map +0 -1
  78. package/fesm2022/acorex-platform-themes-default-search-popup.component-Blpan821.mjs +0 -62
  79. package/fesm2022/acorex-platform-themes-default-search-popup.component-Blpan821.mjs.map +0 -1
@@ -1,8 +1,9 @@
1
1
  import * as i2$1 from '@acorex/components/common';
2
2
  import { AXDataSource, AXCommonModule } from '@acorex/components/common';
3
3
  import { AXFormatService } from '@acorex/core/format';
4
- import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingScope, AXPSettingValueProviderService, AXPRefreshEvent, AXPWorkflowNavigateAction, AXPToastAction } from '@acorex/platform/common';
5
- import * as i1$3 from '@acorex/platform/workflow';
4
+ import * as i1$3 from '@acorex/platform/common';
5
+ import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingScope, AXPSettingService, AXPRefreshEvent, AXPWorkflowNavigateAction, AXP_SEARCH_DEFINITION_PROVIDER, AXPToastAction } from '@acorex/platform/common';
6
+ import * as i2$3 from '@acorex/platform/workflow';
6
7
  import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
7
8
  import * as i0 from '@angular/core';
8
9
  import { InjectionToken, inject, Injectable, computed, signal, Injector, effect, Component, ChangeDetectionStrategy, HostBinding, DestroyRef, ViewChild, NgModule } from '@angular/core';
@@ -12,10 +13,10 @@ import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
12
13
  import * as i7 from '@acorex/platform/layout/builder';
13
14
  import { AXPWidgetRegistryService, AXPWidgetComponent, AXPLayoutBuilderModule, AXPColumnWidgetComponent, AXP_WIDGETS_EDITOR_GROUP, AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
14
15
  import { Subject, takeUntil } from 'rxjs';
15
- import { AXDialogService } from '@acorex/components/dialog';
16
- import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
17
16
  import * as i8 from '@acorex/core/translation';
18
17
  import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
18
+ import { AXDialogService } from '@acorex/components/dialog';
19
+ import { AXLoadingDialogService } from '@acorex/components/loading-dialog';
19
20
  import { AXPopupService } from '@acorex/components/popup';
20
21
  import { AXPlatform } from '@acorex/core/platform';
21
22
  import { RouterModule, ROUTES } from '@angular/router';
@@ -277,20 +278,45 @@ class AXPEntityDetailListViewModel {
277
278
  data[relatedColumn] = this.parent.data['id'];
278
279
  }
279
280
  }
281
+ console.log({ action, detailEntity: this.detailEntity });
280
282
  await this.workflow.execute(commandName, {
281
283
  entity: getEntityInfo(this.detailEntity()).source,
282
284
  data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
285
+ entityInfo: {
286
+ name: this.detailEntity()?.name,
287
+ module: this.detailEntity()?.module,
288
+ title: this.detailEntity()?.title,
289
+ parentKey: this.detailEntity()?.parentKey,
290
+ source: this.detailEntity()?.source,
291
+ },
292
+ options: action?.options,
283
293
  });
284
294
  }
285
295
  }
286
296
 
287
297
  class AXPEntityDefinitionRegistryService {
288
298
  constructor() {
299
+ this.providers = inject(AXP_ENTITY_DEFINITION_LOADER);
300
+ this.resolver = inject(AXPEntityResolver);
289
301
  // Stores AXPEntityConfig objects, keyed by a combination of module and entity name.
290
302
  this.entities = new Map();
291
303
  // Entity resolver service for dynamically loading entity configurations.
292
304
  this.entityResolver = inject(AXPEntityResolver); // Assuming AXPEntityLoader is the correct type
293
305
  }
306
+ async preload() {
307
+ const providers = Array.isArray(this.providers)
308
+ ? this.providers
309
+ : [this.providers];
310
+ const promises = [];
311
+ providers.forEach((provider) => {
312
+ const items = typeof provider.preload == 'function' ? provider.preload() : [];
313
+ items.forEach((item) => {
314
+ promises.push(this.resolver.get(item.module, item.entity));
315
+ });
316
+ });
317
+ const entities = await Promise.all(promises);
318
+ entities.forEach((entity) => this.register(entity));
319
+ }
294
320
  /**
295
321
  * Registers a new entity configuration. Entities are identified uniquely by a combination
296
322
  * of their module and name.
@@ -301,6 +327,14 @@ class AXPEntityDefinitionRegistryService {
301
327
  const key = this.createEntityKey(config.module, config.name);
302
328
  this.entities.set(key, config);
303
329
  }
330
+ /**
331
+ * Returns an array of all registered entity configurations.
332
+ *
333
+ * @returns An array of AXPEntity objects.
334
+ */
335
+ getAll() {
336
+ return Array.from(this.entities.values());
337
+ }
304
338
  /**
305
339
  * Resolves an entity configuration based on module and entity name. If the configuration
306
340
  * is not already registered, attempts to load it dynamically. Throws an error if the
@@ -436,7 +470,6 @@ class AXPEntityMasterCreateViewModel {
436
470
  });
437
471
  if (!initialData)
438
472
  initialData = {};
439
- debugger;
440
473
  this.config.properties
441
474
  .filter((c) => c.schema.defaultValue != null)
442
475
  .forEach((p) => {
@@ -531,7 +564,7 @@ class AXPEntityMasterListViewModel {
531
564
  this.formatService = this.injector.get(AXFormatService);
532
565
  this.session = this.injector.get(AXPSessionService);
533
566
  this.workflow = this.injector.get(AXPWorkflowService);
534
- this.settings = this.injector.get(AXPSettingValueProviderService);
567
+ this.settings = this.injector.get(AXPSettingService);
535
568
  this.widgetResolver = this.injector.get(AXPWidgetRegistryService);
536
569
  this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
537
570
  this.settingListViewKey = '';
@@ -1183,7 +1216,7 @@ class AXPEntityMasterSingleViewGroupViewModel {
1183
1216
  constructor(entity, section) {
1184
1217
  this.entity = entity;
1185
1218
  this.section = section;
1186
- this.group = this.entity.groups?.find(c => c.id == this.section.id);
1219
+ this.group = this.entity.groups?.find((c) => c.id == this.section.id);
1187
1220
  this.name = signal(this.group.id);
1188
1221
  this.isLoading = signal(false);
1189
1222
  this.title = computed(() => {
@@ -1194,7 +1227,7 @@ class AXPEntityMasterSingleViewGroupViewModel {
1194
1227
  });
1195
1228
  this.layout = computed(() => {
1196
1229
  const source = cloneDeep(this.section.layout ?? {});
1197
- set(source, "positions.default.colSpan", 12);
1230
+ set(source, 'positions.default.colSpan', 12);
1198
1231
  return source;
1199
1232
  });
1200
1233
  this.props = computed(() => {
@@ -1204,13 +1237,13 @@ class AXPEntityMasterSingleViewGroupViewModel {
1204
1237
  .filter(({ groupId, schema }) => groupId === this.group.id && !schema.hidden)
1205
1238
  .map(({ name }) => name);
1206
1239
  const viewProperties = interfaces?.master?.single?.properties?.filter(({ name }) => groupProperties.includes(name)) ?? [];
1207
- return viewProperties.map(prop => new AXPEntityMasterSingleElementViewModel(this.entity, this, prop));
1240
+ return viewProperties.map((prop) => new AXPEntityMasterSingleElementViewModel(this.entity, this, prop));
1208
1241
  });
1209
1242
  this.editableProps = computed(() => {
1210
1243
  const { properties, interfaces } = this.entity;
1211
1244
  const editablePropertyNames = interfaces?.master?.update?.properties?.map(({ name }) => name) ?? [];
1212
1245
  const filteredProperties = properties.filter(({ groupId, schema, name }) => groupId === this.group.id && !schema.hidden && editablePropertyNames.includes(name));
1213
- return filteredProperties.map(prop => new AXPEntityMasterSingleElementViewModel(this.entity, this, prop));
1246
+ return filteredProperties.map((prop) => new AXPEntityMasterSingleElementViewModel(this.entity, this, prop));
1214
1247
  });
1215
1248
  this.editable = computed(() => {
1216
1249
  return this.editableProps().length > 0;
@@ -1222,15 +1255,15 @@ class AXPEntityMasterSingleElementViewModel {
1222
1255
  this.entity = entity;
1223
1256
  this.section = section;
1224
1257
  this.propertyView = propertyView;
1225
- this.property = this.entity.properties.find(c => c.name == this.propertyView.name);
1258
+ this.property = this.entity.properties.find((c) => c.name == this.propertyView.name);
1226
1259
  this.name = signal(this.property.name);
1227
1260
  this.title = signal(this.property.title);
1228
1261
  this.showLabel = signal(this.propertyView.layout?.label?.visible != false);
1229
1262
  this.description = signal(this.property.description);
1230
1263
  this.layout = computed(() => {
1231
- const viewProp = this.entity.interfaces?.master?.single?.properties?.find(c => c.name == this.property.name);
1264
+ const viewProp = this.entity.interfaces?.master?.single?.properties?.find((c) => c.name == this.property.name);
1232
1265
  const source = cloneDeep(viewProp?.layout ?? {});
1233
- set(source, "positions.default.colSpan", 12);
1266
+ set(source, 'positions.default.colSpan', 12);
1234
1267
  return source;
1235
1268
  });
1236
1269
  this.node = computed(() => {
@@ -1242,7 +1275,10 @@ class AXPEntityMasterSingleElementViewModel {
1242
1275
  path: this.name(),
1243
1276
  children: widget.children,
1244
1277
  formula: widget.formula,
1245
- options: merge(schema.interface?.options)
1278
+ options: merge(schema.interface?.options
1279
+ //this.property.options?.create?.widget,
1280
+ //{ validationRules: this.property.validations },
1281
+ ),
1246
1282
  };
1247
1283
  });
1248
1284
  }
@@ -1261,20 +1297,20 @@ class AXPEntityMasterSingleViewModel {
1261
1297
  this.translateService = this.injector.get(AXTranslationService);
1262
1298
  this.context = signal(cloneDeep(this.entityData));
1263
1299
  this.actions = computed(() => {
1264
- return this.entityDef.interfaces?.master?.single?.actions?.map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? [];
1300
+ return (this.entityDef.interfaces?.master?.single?.actions?.map((tr) => new AXPEntityCommandTriggerViewModel(this.entityDef, tr)) ?? []);
1265
1301
  });
1266
1302
  this.primaryActions = computed(() => {
1267
- return this.actions().filter(c => c.priority == 'primary');
1303
+ return this.actions().filter((c) => c.priority == 'primary');
1268
1304
  });
1269
1305
  this.secondaryActions = computed(() => {
1270
- return this.actions().filter(c => c.priority == 'secondary');
1306
+ return this.actions().filter((c) => c.priority == 'secondary');
1271
1307
  });
1272
1308
  this.sections = computed(() => {
1273
1309
  const { interfaces, properties } = this.entityDef;
1274
1310
  const viewProps = interfaces?.master?.single?.properties?.map(({ name }) => name) ?? [];
1275
1311
  const filteredProperties = properties.filter(({ groupId, schema, name }) => groupId && !schema.hidden && viewProps.includes(name));
1276
1312
  const groups = interfaces?.master?.single?.sections?.filter(({ id }) => filteredProperties.some(({ groupId }) => groupId === id)) ?? [];
1277
- return groups.map(section => new AXPEntityMasterSingleViewGroupViewModel(this.entityDef, section));
1313
+ return groups.map((section) => new AXPEntityMasterSingleViewGroupViewModel(this.entityDef, section));
1278
1314
  });
1279
1315
  //****************** Title ******************//
1280
1316
  this.title = computed(() => {
@@ -1286,27 +1322,36 @@ class AXPEntityMasterSingleViewModel {
1286
1322
  });
1287
1323
  //****************** Description ******************//
1288
1324
  this.description = computed(() => {
1289
- return this._viewDef.description ? this.formatService.format(this._viewDef.description, 'string', this.context()) : null;
1325
+ return this._viewDef.description
1326
+ ? this.formatService.format(this._viewDef.description, 'string', this.context())
1327
+ : null;
1290
1328
  });
1291
1329
  //****************** Beardcrumbs ******************//
1292
1330
  this.beardcrumbs = computed(() => {
1293
1331
  return [
1294
1332
  {
1295
1333
  title: this.translateService.translateSync('entity.home'),
1296
- icon: "fa-solid fa-home ax-text-xs ax-me-2",
1297
- url: [`/${this.session.application?.name}`]
1334
+ icon: 'fa-solid fa-home ax-text-xs ax-me-2',
1335
+ url: [`/${this.session.application?.name}`],
1298
1336
  },
1299
1337
  {
1300
1338
  title: this.entityDef.formats.plural ?? this.entityDef.formats.individual,
1301
- url: [`/${this.session.application?.name}`, 'm', `${this.entityDef.module}`, 'e', `${this.entityDef.name}`, 'list']
1339
+ url: [
1340
+ `/${this.session.application?.name}`,
1341
+ 'm',
1342
+ `${this.entityDef.module}`,
1343
+ 'e',
1344
+ `${this.entityDef.name}`,
1345
+ 'list',
1346
+ ],
1302
1347
  },
1303
1348
  {
1304
1349
  title: this.title(),
1305
- }
1350
+ },
1306
1351
  ];
1307
1352
  });
1308
1353
  this.relatedEntities = computed(() => {
1309
- return this.entityDef.relatedEntities?.map(re => new AXPEntityDetailListViewModel(this.injector, re, { entity: this.entityDef, data: this.entityData })) ?? [];
1354
+ return (this.entityDef.relatedEntities?.map((re) => new AXPEntityDetailListViewModel(this.injector, re, { entity: this.entityDef, data: this.entityData })) ?? []);
1310
1355
  });
1311
1356
  this.workflow.events$
1312
1357
  .pipe(ofType(AXPEntityDeletedEvent))
@@ -1315,7 +1360,7 @@ class AXPEntityMasterSingleViewModel {
1315
1360
  if (event.payload.entity == getEntityInfo(this.entityDef).source &&
1316
1361
  event.payload.ids.includes(this.context().id)) {
1317
1362
  this.workflow.execute('show-list-view', {
1318
- entity: getEntityInfo(this.entityDef).source
1363
+ entity: getEntityInfo(this.entityDef).source,
1319
1364
  });
1320
1365
  }
1321
1366
  });
@@ -1337,19 +1382,18 @@ class AXPEntityMasterSingleViewModel {
1337
1382
  entity: getEntityInfo(this.entityDef).source,
1338
1383
  data: {
1339
1384
  id: this.context().id,
1340
- properties: data.editableProps().map(m => m.name()),
1385
+ properties: data.editableProps().map((m) => m.name()),
1341
1386
  },
1342
1387
  });
1343
1388
  break;
1344
1389
  }
1345
- default:
1346
- {
1347
- const action = this.actions().find(c => c.name == commandName);
1348
- this.workflow.execute(commandName, {
1349
- entity: getEntityInfo(this.entityDef).source,
1350
- data: action?.scope == AXPEntityCommandScope.Individual ? this.context() : null
1351
- });
1352
- }
1390
+ default: {
1391
+ const action = this.actions().find((c) => c.name == commandName);
1392
+ this.workflow.execute(commandName, {
1393
+ entity: getEntityInfo(this.entityDef).source,
1394
+ data: action?.scope == AXPEntityCommandScope.Individual ? this.context() : null,
1395
+ });
1396
+ }
1353
1397
  }
1354
1398
  }
1355
1399
  //
@@ -1392,6 +1436,60 @@ const AXPEntityDetailViewModelResolver = (route, state, service = inject(AXPEnti
1392
1436
  return service.create(moduleName, entityName, id);
1393
1437
  };
1394
1438
 
1439
+ class AXPEntityCommandSearchDefinitionProvider {
1440
+ async provide(context) {
1441
+ context.addDefinition('command', 'Commands', 'fa-solid fa-command', 1, {
1442
+ format: {
1443
+ id: '{{id}}',
1444
+ },
1445
+ actions: [
1446
+ {
1447
+ name: 'open-entity',
1448
+ type: 'view',
1449
+ priority: 'primary',
1450
+ },
1451
+ ],
1452
+ });
1453
+ }
1454
+ }
1455
+
1456
+ class AXPEntitySearchDefinitionProvider {
1457
+ constructor() {
1458
+ this.entityRegister = inject(AXPEntityDefinitionRegistryService);
1459
+ }
1460
+ async provide(context) {
1461
+ const moduleDefinitions = new Map();
1462
+ this.entityRegister.getAll().forEach((entity) => {
1463
+ if (!moduleDefinitions.has(entity.module)) {
1464
+ moduleDefinitions.set(`Module.${entity.module}`, {
1465
+ name: `Module.${entity.module}`,
1466
+ title: entity.formats.searchResult?.description ?? entity.module,
1467
+ icon: 'fa-solid fa-objects-column',
1468
+ order: 4,
1469
+ actions: [
1470
+ {
1471
+ name: 'open-entity',
1472
+ type: 'view',
1473
+ priority: 'primary',
1474
+ },
1475
+ ],
1476
+ format: {
1477
+ title: entity.formats.searchResult?.title,
1478
+ description: (entity.formats.searchResult?.description ?? entity.module) + ' / ' + entity.title,
1479
+ id: '{{data.id}}',
1480
+ },
1481
+ });
1482
+ }
1483
+ });
1484
+ moduleDefinitions.forEach((definition) => {
1485
+ context.addDefinition(definition.name, definition.title, definition.icon, definition.order, {
1486
+ format: definition.format,
1487
+ actions: definition.actions,
1488
+ });
1489
+ });
1490
+ }
1491
+ }
1492
+
1395
1493
  class AXPLookupWidgetViewComponent extends AXPWidgetComponent {
1396
1494
  constructor() {
1397
1495
  super(...arguments);
@@ -1809,9 +1907,9 @@ class AXPLookupWidgetEditComponent extends AXPWidgetComponent {
1809
1907
  this.translateService = inject(AXTranslationService);
1810
1908
  this.expose = computed(() => this.options()['expose']);
1811
1909
  this.entity = computed(() => this.options()['entity']);
1812
- this.validationRules = computed(() => this.options()["validationRules"] ?? []);
1910
+ this.validationRules = computed(() => this.options()['validationRules'] ?? []);
1813
1911
  this.textField = computed(() => {
1814
- return this.entityDef()?.formats.lookup ?? this.entityDef()?.properties.find((c) => c.name != 'id')?.name ?? 'title';
1912
+ return (this.entityDef()?.formats.lookup ?? this.entityDef()?.properties.find((c) => c.name != 'id')?.name ?? 'title');
1815
1913
  });
1816
1914
  this.entityDef = signal(null);
1817
1915
  this.searchTerm = signal(null);
@@ -2030,7 +2128,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2030
2128
  AXLoadingModule,
2031
2129
  AXValidationModule,
2032
2130
  AXFormModule,
2033
- ]
2131
+ ],
2034
2132
  }]
2035
2133
  }], propDecorators: { textbox: [{
2036
2134
  type: ViewChild,
@@ -2329,6 +2427,7 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
2329
2427
  const [module, entity] = context.getVariable('entity').split('.');
2330
2428
  const data = context.getVariable('data');
2331
2429
  const options = context.getVariable('options');
2430
+ console.log('options', options);
2332
2431
  const process = options?.['process'];
2333
2432
  const decoration = options?.['decoration'];
2334
2433
  const headerTitle = decoration?.header?.title;
@@ -2598,14 +2697,35 @@ function routesFacory() {
2598
2697
  return routes;
2599
2698
  }
2600
2699
  class AXPEntityModule {
2601
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2602
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i1$3.AXPWorkflowModule, i7.AXPLayoutBuilderModule] }); }
2700
+ constructor(appInitService, injector) {
2701
+ const service = injector.get(AXPEntityDefinitionRegistryService);
2702
+ // appInitService.registerTask({
2703
+ // name: 'layout-theme',
2704
+ // statusText: 'Preload entities ...',
2705
+ // run: async () => {
2706
+ // // load in background
2707
+ // service.preload();
2708
+ // },
2709
+ // });
2710
+ }
2711
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, deps: [{ token: i1$3.AXPAppStartUpService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule }); }
2712
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, imports: [RouterModule, i2$3.AXPWorkflowModule, i7.AXPLayoutBuilderModule] }); }
2603
2713
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityModule, providers: [
2604
2714
  {
2605
2715
  provide: ROUTES,
2606
2716
  multi: true,
2607
2717
  useFactory: routesFacory,
2608
2718
  },
2719
+ {
2720
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2721
+ useClass: AXPEntitySearchDefinitionProvider,
2722
+ multi: true,
2723
+ },
2724
+ {
2725
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2726
+ useClass: AXPEntityCommandSearchDefinitionProvider,
2727
+ multi: true,
2728
+ },
2609
2729
  ], imports: [RouterModule,
2610
2730
  AXPWorkflowModule.forChild({
2611
2731
  actions: {
@@ -2629,6 +2749,7 @@ class AXPEntityModule {
2629
2749
  'open-entity': AXPShowDetailsViewWorkflow,
2630
2750
  'show-list-view': AXPShowListViewWorkflow,
2631
2751
  },
2752
+ functions: {},
2632
2753
  }),
2633
2754
  AXPLayoutBuilderModule.forChild({
2634
2755
  widgets: [AXPLookupWidget, AXPWidgetSelectorWidget],
@@ -2661,6 +2782,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2661
2782
  'open-entity': AXPShowDetailsViewWorkflow,
2662
2783
  'show-list-view': AXPShowListViewWorkflow,
2663
2784
  },
2785
+ functions: {},
2664
2786
  }),
2665
2787
  AXPLayoutBuilderModule.forChild({
2666
2788
  widgets: [AXPLookupWidget, AXPWidgetSelectorWidget],
@@ -2674,9 +2796,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
2674
2796
  multi: true,
2675
2797
  useFactory: routesFacory,
2676
2798
  },
2799
+ {
2800
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2801
+ useClass: AXPEntitySearchDefinitionProvider,
2802
+ multi: true,
2803
+ },
2804
+ {
2805
+ provide: AXP_SEARCH_DEFINITION_PROVIDER,
2806
+ useClass: AXPEntityCommandSearchDefinitionProvider,
2807
+ multi: true,
2808
+ },
2677
2809
  ],
2678
2810
  }]
2679
- }] });
2811
+ }], ctorParameters: () => [{ type: i1$3.AXPAppStartUpService }, { type: i0.Injector }] });
2680
2812
 
2681
2813
  class AXPEntityService {
2682
2814
  constructor() {