@acorex/platform 19.2.8 → 19.2.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 (88) hide show
  1. package/common/lib/app/application.types.d.ts +7 -0
  2. package/common/lib/utils/index.d.ts +2 -0
  3. package/common/lib/utils/regional-util.service.d.ts +15 -0
  4. package/common/lib/utils/regional.types.d.ts +55 -0
  5. package/fesm2022/acorex-platform-common.mjs +4 -2
  6. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-core.mjs +35 -16
  8. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-layout-builder.mjs +74 -23
  10. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-layout-designer.mjs +27 -26
  12. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-entity.mjs +97 -51
  14. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  15. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-Bl9f4Rtk.mjs → acorex-platform-themes-default-entity-master-create-view.component-BK8BItxL.mjs} +2 -2
  16. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-BK8BItxL.mjs.map +1 -0
  17. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-B4aBmc5H.mjs → acorex-platform-themes-default-entity-master-single-view.component-BGUrwL2P.mjs} +3 -3
  18. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BGUrwL2P.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-themes-default-setting-page.component-CN2NCgUv.mjs +74 -0
  20. package/fesm2022/acorex-platform-themes-default-setting-page.component-CN2NCgUv.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-themes-default-setting-view.component-CsCug3Vu.mjs +71 -0
  22. package/fesm2022/acorex-platform-themes-default-setting-view.component-CsCug3Vu.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-themes-default.mjs +22 -12
  24. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  25. package/fesm2022/acorex-platform-themes-shared.mjs +10 -1
  26. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  27. package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-B90if8wb.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-BiCinIok.mjs} +13 -11
  28. package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-BiCinIok.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-widgets.mjs +356 -384
  30. package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
  31. package/layout/builder/lib/builder/datasource-provider.service.d.ts +3 -1
  32. package/layout/builder/lib/builder/widget.types.d.ts +2 -0
  33. package/layout/designer/lib/property-viewer/widget-property-viewer.component.d.ts +2 -0
  34. package/layout/entity/lib/entity-detail-list.viewmodel.d.ts +3 -0
  35. package/layout/entity/lib/entity-master-create.viewmodel.d.ts +3 -1
  36. package/layout/entity/lib/entity-master-single.viewmodel.d.ts +1 -1
  37. package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +0 -2
  38. package/layout/entity/lib/widgets/widget-selector/widget-selector-widget-edit.component.d.ts +0 -2
  39. package/layout/setting/lib/setting.viewmodel.d.ts +3 -0
  40. package/package.json +5 -5
  41. package/themes/default/lib/layouts/base/simple-page/simple-page.layout.d.ts +3 -0
  42. package/themes/default/lib/layouts/entity-layouts/entity-detail-list-view/entity-detail-list-view.component.d.ts +3 -0
  43. package/themes/default/lib/layouts/entity-layouts/entity-master-list-view/entity-master-list-view.component.d.ts +3 -0
  44. package/themes/default/lib/layouts/entity-layouts/entity-master-single-view/entity-master-single-view.component.d.ts +3 -0
  45. package/themes/default/lib/layouts/root-layout/components/header/header.component.d.ts +3 -0
  46. package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +6 -0
  47. package/themes/default/lib/layouts/root-layout/root-layout.module.d.ts +2 -1
  48. package/themes/default/lib/layouts/setting-layout/setting-view/setting-view.component.d.ts +3 -0
  49. package/themes/default/lib/pages/theme-palette-preview/theme-palette-preview.page.d.ts +3 -0
  50. package/themes/shared/lib/components/slots/theme-slot.component.d.ts +3 -0
  51. package/themes/shared/lib/setting.keys.d.ts +2 -1
  52. package/themes/shared/lib/theme.service.d.ts +3 -0
  53. package/widgets/lib/properties/data-source.props.d.ts +3 -0
  54. package/widgets/lib/properties/editors.props.d.ts +0 -1
  55. package/widgets/lib/properties/index.d.ts +1 -0
  56. package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget-edit.component.d.ts +0 -5
  57. package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +1 -1
  58. package/widgets/lib/widgets/editors/checkbox/checkbox-widget-edit.component.d.ts +0 -2
  59. package/widgets/lib/widgets/editors/color/color-box-widget-edit.component.d.ts +0 -2
  60. package/widgets/lib/widgets/editors/contact/contact-widget-edit.component.d.ts +0 -4
  61. package/widgets/lib/widgets/editors/date-time/date-time-box-widget-edit.component.d.ts +0 -2
  62. package/widgets/lib/widgets/editors/email/email-box-widget-edit.component.d.ts +0 -4
  63. package/widgets/lib/widgets/editors/large-text/large-text-widget-edit.component.d.ts +0 -2
  64. package/widgets/lib/widgets/editors/link/link-widget-edit.component.d.ts +0 -4
  65. package/widgets/lib/widgets/editors/number/number-box-widget-edit.component.d.ts +0 -2
  66. package/widgets/lib/widgets/editors/phone/phone-box-widget-edit.component.d.ts +0 -4
  67. package/widgets/lib/widgets/editors/rich-text/rich-text-widget-edit.component.d.ts +0 -2
  68. package/widgets/lib/widgets/editors/select/select-box-widget-edit.component.d.ts +0 -2
  69. package/widgets/lib/widgets/editors/selection-list/selection-list-widget-edit.component.d.ts +0 -2
  70. package/widgets/lib/widgets/editors/tabular-data/tabular-data-edit-popup.component.d.ts +0 -1
  71. package/widgets/lib/widgets/editors/text/text-box-widget-edit.component.d.ts +0 -2
  72. package/widgets/lib/widgets/validations/base-validation/base-validation.d.ts +3 -2
  73. package/widgets/lib/widgets/validations/between-validation/between-validation-widget-edit.component.d.ts +1 -7
  74. package/widgets/lib/widgets/validations/callback-validation/callback-validation-widget-edit.component.d.ts +1 -7
  75. package/widgets/lib/widgets/validations/equal-validation/equal-validation-widget-edit.component.d.ts +1 -7
  76. package/widgets/lib/widgets/validations/greater-than-validation/greater-than-validation-widget-edit.component.d.ts +1 -7
  77. package/widgets/lib/widgets/validations/less-than-validation/less-than-validation-widget-edit.component.d.ts +1 -7
  78. package/widgets/lib/widgets/validations/max-length-validation/max-length-validation-widget-edit.component.d.ts +1 -7
  79. package/widgets/lib/widgets/validations/min-length-validation/min-length-validation-widget-edit.component.d.ts +1 -7
  80. package/widgets/lib/widgets/validations/regular-expression-validation/regular-expression-validation-widget-edit.component.d.ts +1 -7
  81. package/widgets/lib/widgets/validations/required-validation/required-validation-widget-edit.component.d.ts +1 -7
  82. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-Bl9f4Rtk.mjs.map +0 -1
  83. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B4aBmc5H.mjs.map +0 -1
  84. package/fesm2022/acorex-platform-themes-default-setting-page.component-BERYnJnp.mjs +0 -74
  85. package/fesm2022/acorex-platform-themes-default-setting-page.component-BERYnJnp.mjs.map +0 -1
  86. package/fesm2022/acorex-platform-themes-default-setting-view.component-BagAWM4W.mjs +0 -71
  87. package/fesm2022/acorex-platform-themes-default-setting-view.component-BagAWM4W.mjs.map +0 -1
  88. package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-B90if8wb.mjs.map +0 -1
@@ -2,13 +2,13 @@ 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
4
  import * as i1$3 from '@acorex/platform/common';
5
- import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPEntityCommandScope, getEntityInfo, AXPSettingScope, AXPSettingService, AXPExpressionEvaluatorService, AXPRefreshEvent, AXPWorkflowNavigateAction, AXP_SEARCH_DEFINITION_PROVIDER, AXPToastAction } from '@acorex/platform/common';
5
+ import { resolveActionLook, AXPFilterOperatorMiddlewareService, AXPExpressionEvaluatorService, AXPEntityCommandScope, getEntityInfo, AXPSettingScope, AXPSettingService, AXPRefreshEvent, AXPWorkflowNavigateAction, AXP_SEARCH_DEFINITION_PROVIDER, AXPToastAction } from '@acorex/platform/common';
6
6
  import * as i2$3 from '@acorex/platform/workflow';
7
7
  import { AXPWorkflowService, ofType, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowModule } from '@acorex/platform/workflow';
8
8
  import * as i0 from '@angular/core';
9
9
  import { InjectionToken, inject, Injectable, computed, signal, Injector, effect, Component, ChangeDetectionStrategy, HostBinding, DestroyRef, ViewChild, NgModule } from '@angular/core';
10
+ import { get, cloneDeep, set, merge, isNil, sortBy } from 'lodash-es';
10
11
  import { AXPLayoutThemeService } from '@acorex/platform/themes/shared';
11
- import { cloneDeep, set, merge, get, isNil, sortBy } from 'lodash-es';
12
12
  import { AXPSessionService, AXPAuthGuard } from '@acorex/platform/auth';
13
13
  import * as i7 from '@acorex/platform/layout/builder';
14
14
  import { AXPWidgetRegistryService, AXPWidgetComponent, AXPLayoutBuilderModule, AXPColumnWidgetComponent, AXP_WIDGETS_EDITOR_GROUP, AXPWidgetsCatalog } from '@acorex/platform/layout/builder';
@@ -119,6 +119,7 @@ class AXPEntityDetailListViewModel {
119
119
  this.formatService = this.injector.get(AXFormatService);
120
120
  this.workflow = this.injector.get(AXPWorkflowService);
121
121
  this.filterOperatorMiddleware = this.injector.get(AXPFilterOperatorMiddlewareService);
122
+ this.expressionEvaluator = this.injector.get(AXPExpressionEvaluatorService);
122
123
  this.dataSource = new AXDataSource({
123
124
  byKey: (key) => {
124
125
  const func = this.detailEntity()?.queries.byKey.execute;
@@ -144,6 +145,22 @@ class AXPEntityDetailListViewModel {
144
145
  this.detailEntity()?.interfaces?.detail?.list?.title ??
145
146
  this.detailEntity()?.formats.plural);
146
147
  });
148
+ //****************** Visibility ******************//
149
+ this.hidden = computed(async () => {
150
+ if (typeof this.detailEntityConfig.hidden == 'string') {
151
+ const scope = {
152
+ context: {
153
+ eval: (path) => {
154
+ return get(this.parent.data, path);
155
+ },
156
+ },
157
+ };
158
+ return await this.expressionEvaluator.evaluateExpression(this.parent.data, this.detailEntityConfig.hidden, scope);
159
+ }
160
+ else {
161
+ return this.detailEntityConfig.hidden ?? false;
162
+ }
163
+ });
147
164
  //****************** Inline filter ******************//
148
165
  this.inlineFiltersPlaceholders = computed(() => {
149
166
  //return this.entityDef.properties.filter(p => p.options?.filter?.inline?.enabled).map(c => c.title);
@@ -155,7 +172,16 @@ class AXPEntityDetailListViewModel {
155
172
  //****************** Actions ******************//
156
173
  this.allActions = computed(() => {
157
174
  const list = this.detailEntity()?.interfaces?.master?.list?.actions ?? [];
158
- return list.map((tr) => new AXPEntityCommandTriggerViewModel(this.detailEntity(), tr)) ?? [];
175
+ const detailEntityActionList = this.detailEntityConfig.actions ?? [];
176
+ const mergedActions = list.map((tr) => {
177
+ const commandName = typeof tr.command === 'string' ? tr.command : tr.command.name;
178
+ const overrideAction = detailEntityActionList.find((action) => {
179
+ const actionCommandName = typeof action.command === 'string' ? action.command : action.command.name;
180
+ return actionCommandName === commandName && action.name === tr.name;
181
+ });
182
+ return new AXPEntityCommandTriggerViewModel(this.detailEntity(), overrideAction ?? tr);
183
+ });
184
+ return mergedActions;
159
185
  });
160
186
  this.selectedScopeActionsCount = computed(() => {
161
187
  return this.allActions().filter((a) => a.scope == AXPEntityCommandScope.Selected).length;
@@ -192,6 +218,32 @@ class AXPEntityDetailListViewModel {
192
218
  }
193
219
  return [];
194
220
  });
221
+ this.evaluateExpressions = async (actionData) => {
222
+ const parentData = this.parent.data;
223
+ const scope = {
224
+ context: {
225
+ eval: (path) => {
226
+ return get(parentData, path);
227
+ },
228
+ },
229
+ };
230
+ const evaluateRecursive = async (data) => {
231
+ const evaluatedData = {};
232
+ for (const key in data) {
233
+ if (typeof data[key] === 'object' && data[key] !== null) {
234
+ evaluatedData[key] = await evaluateRecursive(data[key]);
235
+ }
236
+ else if (typeof data[key] === 'string' && data[key].includes('{{')) {
237
+ evaluatedData[key] = await this.expressionEvaluator.evaluateExpression(parentData, data[key], scope);
238
+ }
239
+ else {
240
+ evaluatedData[key] = data[key];
241
+ }
242
+ }
243
+ return evaluatedData;
244
+ };
245
+ return await evaluateRecursive(actionData);
246
+ };
195
247
  this.initialize();
196
248
  }
197
249
  async initialize() {
@@ -269,25 +321,29 @@ class AXPEntityDetailListViewModel {
269
321
  ? c.scope == AXPEntityCommandScope.Selected
270
322
  : c.scope == AXPEntityCommandScope.Individual) ||
271
323
  c.scope == AXPEntityCommandScope.TypeLevel));
272
- if (action?.scope == AXPEntityCommandScope.TypeLevel) {
273
- if (data == null) {
274
- data = {};
275
- }
276
- let relatedColumn = null;
277
- this.detailEntityConfig.conditions?.forEach((condition) => {
278
- if (condition.value == 'id') {
279
- relatedColumn = condition.name;
280
- }
281
- });
282
- if (relatedColumn != null) {
283
- data[relatedColumn] = this.parent.data['id'];
284
- }
324
+ // if (action?.scope == AXPEntityCommandScope.TypeLevel) {
325
+ // if (data == null) {
326
+ // data = {};
327
+ // }
328
+ // let relatedColumn: string | null = null;
329
+ // this.detailEntityConfig.conditions?.forEach((condition) => {
330
+ // if (condition.value == 'id') {
331
+ // relatedColumn = condition.name;
332
+ // }
333
+ // });
334
+ // if (relatedColumn != null) {
335
+ // data[relatedColumn] = this.parent.data['id'];
336
+ // }
337
+ // }
338
+ const actionData = action?.options?.process?.data;
339
+ let initialData = {};
340
+ if (actionData) {
341
+ initialData = await this.evaluateExpressions(actionData);
285
342
  }
286
- console.log({ action, detailEntity: this.detailEntity });
287
343
  const command = commandName.split('&')[0];
288
344
  await this.workflow.execute(command, {
289
345
  entity: getEntityInfo(this.detailEntity()).source,
290
- data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : data,
346
+ data: action?.scope == AXPEntityCommandScope.Selected ? this.selectedItems() : initialData,
291
347
  entityInfo: {
292
348
  name: this.detailEntity()?.name,
293
349
  module: this.detailEntity()?.module,
@@ -468,21 +524,23 @@ class AXPEntityCreateViewElementViewModel {
468
524
  formula: widget.formula,
469
525
  triggers: widget.triggers,
470
526
  valueTransforms: widget.valueTransforms,
471
- options: merge(schema.interface?.options,
472
- //this.property.options?.create?.widget,
473
- { validationRules: this.property.validations }),
527
+ options: merge(schema.interface?.options, {
528
+ validations: this.property.validations?.map((c) => ({ rule: c.rule, message: c.message, options: c.options })),
529
+ }),
474
530
  };
475
531
  });
476
532
  }
477
533
  }
478
534
  class AXPEntityMasterCreateViewModel {
479
- constructor(injector, config, initialData = {}, canCreateNewOne = true, redirect = false) {
535
+ constructor(injector, config, initialData = {}, commandOptions) {
480
536
  this.injector = injector;
481
537
  this.config = config;
482
538
  this.initialData = initialData;
539
+ this.commandOptions = commandOptions;
483
540
  this.entityDef = cloneDeep(this.config);
484
541
  this.workflow = this.injector.get(AXPWorkflowService);
485
542
  this.context = signal(this.initialData ?? {});
543
+ this.options = signal(this.commandOptions ?? {});
486
544
  this.isInProgress = signal(false);
487
545
  this.canCreateNewOne = signal(false);
488
546
  this.redirect = signal(false);
@@ -507,7 +565,9 @@ class AXPEntityMasterCreateViewModel {
507
565
  }
508
566
  });
509
567
  this.context.set(initialData);
568
+ this.options.set(commandOptions);
510
569
  //
570
+ const { redirect = false, canCreateNewOne = false } = commandOptions['process'];
511
571
  this.canCreateNewOne.set(canCreateNewOne);
512
572
  this.redirect.set(redirect);
513
573
  }
@@ -524,12 +584,9 @@ class AXPEntityMasterCreateViewModel {
524
584
  async createNewOne() {
525
585
  await this.workflow.execute('create-entity', {
526
586
  entity: getEntityInfo(this.entityDef).source,
527
- options: {
528
- process: {
529
- redirect: this.redirect(),
530
- canCreateNewOne: this.canCreateNewOne(),
531
- },
532
- },
587
+ options: this.options(),
588
+ data: this.initialData,
589
+ // entityInfo
533
590
  });
534
591
  }
535
592
  }
@@ -540,11 +597,10 @@ class AXPEntityCreateViewModelFactory {
540
597
  this.injector = inject(Injector);
541
598
  }
542
599
  async create(moduleName, entityName, initialData = null, options = { canCreateNewOne: false, redirect: true }) {
543
- console.log(options);
544
600
  this.layout.setNavigationLoading(true);
545
601
  const config = await this.entityService.resolve(moduleName, entityName);
546
602
  this.layout.setNavigationLoading(false);
547
- return new AXPEntityMasterCreateViewModel(this.injector, config, initialData, options.canCreateNewOne, options.redirect);
603
+ return new AXPEntityMasterCreateViewModel(this.injector, config, initialData, options);
548
604
  }
549
605
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateViewModelFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
550
606
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPEntityCreateViewModelFactory, providedIn: 'root' }); }
@@ -896,7 +952,7 @@ class AXPEntityMasterListViewModel {
896
952
  filters: cleanedNestedFilters.filter(Boolean),
897
953
  };
898
954
  }
899
- if (filter.value === null || filter.value === undefined || filter.value === 'unknown') {
955
+ if (!filter.value || filter.value === 'unknown') {
900
956
  return undefined;
901
957
  }
902
958
  return filter;
@@ -1177,9 +1233,7 @@ class AXPEntityMasterUpdateElementViewModel {
1177
1233
  formula: widget.formula,
1178
1234
  triggers: widget.triggers,
1179
1235
  valueTransforms: widget.valueTransforms,
1180
- options: merge(schema.interface?.options,
1181
- //this.property.options?.create?.widget,
1182
- { validationRules: this.property.validations })
1236
+ options: merge(schema.interface?.options, { validations: this.property.validations?.map(c => ({ rule: c.rule, message: c.message, options: c.options })) })
1183
1237
  };
1184
1238
  });
1185
1239
  }
@@ -1362,7 +1416,6 @@ class AXPEntityMasterSingleViewGroupViewModel {
1362
1416
  });
1363
1417
  this.props = computed(() => {
1364
1418
  const { properties, interfaces } = this.entity;
1365
- console.log({ properties });
1366
1419
  const groupProperties = properties
1367
1420
  .filter(({ groupId, schema }) => groupId === this.group.id && !schema.hidden)
1368
1421
  .map(({ name }) => name);
@@ -1406,10 +1459,7 @@ class AXPEntityMasterSingleElementViewModel {
1406
1459
  children: widget.children,
1407
1460
  formula: widget.formula,
1408
1461
  valueTransforms: widget.valueTransforms,
1409
- options: merge(schema.interface?.options
1410
- //this.property.options?.create?.widget,
1411
- //{ validationRules: this.property.validations },
1412
- ),
1462
+ options: merge(schema.interface?.options),
1413
1463
  };
1414
1464
  });
1415
1465
  }
@@ -1481,8 +1531,10 @@ class AXPEntityMasterSingleViewModel {
1481
1531
  },
1482
1532
  ];
1483
1533
  });
1484
- this.relatedEntities = computed(() => {
1485
- return (this.entityDef.relatedEntities?.map((re) => new AXPEntityDetailListViewModel(this.injector, re, { entity: this.entityDef, data: this.entityData })) ?? []);
1534
+ this.relatedEntities = computed(async () => {
1535
+ const relatedEntities = this.entityDef.relatedEntities?.map((re) => new AXPEntityDetailListViewModel(this.injector, re, { entity: this.entityDef, data: this.entityData })) ?? [];
1536
+ const filteredEntities = await Promise.all(relatedEntities.map(async (re) => ((await re.hidden()) ? null : re)));
1537
+ return filteredEntities.filter((re) => re !== null);
1486
1538
  });
1487
1539
  this.workflow.events$
1488
1540
  .pipe(ofType(AXPEntityDeletedEvent))
@@ -2026,7 +2078,6 @@ class AXPLookupWidgetEditComponent extends AXPWidgetComponent {
2026
2078
  this.translateService = inject(AXTranslationService);
2027
2079
  this.expose = computed(() => this.options()['expose']);
2028
2080
  this.entity = computed(() => this.options()['entity']);
2029
- this.validationRules = computed(() => this.options()['validationRules'] ?? []);
2030
2081
  this.textField = computed(() => {
2031
2082
  return (this.entityDef()?.formats.lookup ?? this.entityDef()?.properties.find((c) => c.name != 'id')?.name ?? 'title');
2032
2083
  });
@@ -2394,7 +2445,6 @@ class AXPWidgetSelectorWidgetEditComponent extends AXPWidgetComponent {
2394
2445
  this.selectedItem = signal(null);
2395
2446
  this.placeholder = computed(() => this.options()['placeholder'] ?? '');
2396
2447
  this.loading = computed(() => this.options()['loading'] ?? false);
2397
- this.validationRules = computed(() => this.options()['validationRules']);
2398
2448
  }
2399
2449
  ngAfterViewInit() {
2400
2450
  if (this.getValue()) {
@@ -2549,9 +2599,9 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
2549
2599
  console.log('data', data);
2550
2600
  const process = options?.['process'];
2551
2601
  const decoration = options?.['decoration'];
2602
+ const layout = options?.['layout'];
2552
2603
  const headerTitle = decoration?.header?.title;
2553
- const redirect = process?.redirect;
2554
- const canCreateNewOne = process?.canCreateNewOne;
2604
+ const size = layout?.size;
2555
2605
  const entityRef = await this.entityRegistery.resolve(module, entity);
2556
2606
  const com = await this.config.viewers.master.create();
2557
2607
  if (entityRef.parentKey) {
@@ -2561,18 +2611,14 @@ class AXPEntityCreatePopupAction extends AXPWorkflowAction {
2561
2611
  title: headerTitle
2562
2612
  ? headerTitle
2563
2613
  : `${await this.translateService.translateAsync('create-new')} ${await this.translateService.translateAsync(entityRef.formats.individual)}`,
2564
- size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : 'md',
2614
+ size: this.platform.is('Mobile') || this.platform.is('SM') ? 'full' : size ? size : 'md',
2565
2615
  data: {
2566
- vm: await this.factory.create(module, entity, data, {
2567
- canCreateNewOne,
2568
- redirect,
2569
- }),
2616
+ vm: await this.factory.create(module, entity, data, options),
2570
2617
  entity,
2571
2618
  },
2572
2619
  });
2573
2620
  context.setOutput('result', false);
2574
2621
  if (result.data?.save) {
2575
- console.log(result);
2576
2622
  context.setOutput('result', true);
2577
2623
  const prevData = context.getVariable('data');
2578
2624
  const prevMeta = context.getVariable('meta');