@acorex/modules 19.2.7 → 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 (107) hide show
  1. package/application-management/lib/layouts/module-entity-detail-view/module-entity-detail-view.component.d.ts +3 -0
  2. package/conversation/lib/entities/chat/chat.module.d.ts +2 -3
  3. package/fesm2022/acorex-modules-application-management.mjs +15 -2
  4. package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
  5. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-HwJJs-3A.mjs → acorex-modules-auth-acorex-modules-auth-D1qxdECo.mjs} +8 -8
  6. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-HwJJs-3A.mjs.map → acorex-modules-auth-acorex-modules-auth-D1qxdECo.mjs.map} +1 -1
  7. package/fesm2022/{acorex-modules-auth-app-chooser.component-BvxMkXPp.mjs → acorex-modules-auth-app-chooser.component-8GCTwtb2.mjs} +2 -2
  8. package/fesm2022/{acorex-modules-auth-app-chooser.component-BvxMkXPp.mjs.map → acorex-modules-auth-app-chooser.component-8GCTwtb2.mjs.map} +1 -1
  9. package/fesm2022/{acorex-modules-auth-login.module-CDvLUxls.mjs → acorex-modules-auth-login.module-DR3QLEM-.mjs} +4 -4
  10. package/fesm2022/{acorex-modules-auth-login.module-CDvLUxls.mjs.map → acorex-modules-auth-login.module-DR3QLEM-.mjs.map} +1 -1
  11. package/fesm2022/{acorex-modules-auth-master.layout-CnKBnl8W.mjs → acorex-modules-auth-master.layout-BMJ5mW63.mjs} +4 -4
  12. package/fesm2022/{acorex-modules-auth-master.layout-CnKBnl8W.mjs.map → acorex-modules-auth-master.layout-BMJ5mW63.mjs.map} +1 -1
  13. package/fesm2022/{acorex-modules-auth-password.component-C16jeHuJ.mjs → acorex-modules-auth-password.component-EXWlXGez.mjs} +2 -2
  14. package/fesm2022/{acorex-modules-auth-password.component-C16jeHuJ.mjs.map → acorex-modules-auth-password.component-EXWlXGez.mjs.map} +1 -1
  15. package/fesm2022/{acorex-modules-auth-password.component-1FnIjiZ8.mjs → acorex-modules-auth-password.component-avrMwyr8.mjs} +2 -2
  16. package/fesm2022/{acorex-modules-auth-password.component-1FnIjiZ8.mjs.map → acorex-modules-auth-password.component-avrMwyr8.mjs.map} +1 -1
  17. package/fesm2022/{acorex-modules-auth-routes-ZDDUhAWd.mjs → acorex-modules-auth-routes-BPYBFOxg.mjs} +2 -2
  18. package/fesm2022/{acorex-modules-auth-routes-ZDDUhAWd.mjs.map → acorex-modules-auth-routes-BPYBFOxg.mjs.map} +1 -1
  19. package/fesm2022/{acorex-modules-auth-two-factor.module-C32MVGby.mjs → acorex-modules-auth-two-factor.module-B_V_nQN_.mjs} +2 -2
  20. package/fesm2022/{acorex-modules-auth-two-factor.module-C32MVGby.mjs.map → acorex-modules-auth-two-factor.module-B_V_nQN_.mjs.map} +1 -1
  21. package/fesm2022/acorex-modules-auth.mjs +1 -1
  22. package/fesm2022/acorex-modules-conversation.mjs +3 -8
  23. package/fesm2022/acorex-modules-conversation.mjs.map +1 -1
  24. package/fesm2022/{acorex-modules-form-template-management-acorex-modules-form-template-management-DGGKoVbL.mjs → acorex-modules-form-template-management-acorex-modules-form-template-management-gE7jDpjq.mjs} +99 -7
  25. package/fesm2022/acorex-modules-form-template-management-acorex-modules-form-template-management-gE7jDpjq.mjs.map +1 -0
  26. package/fesm2022/{acorex-modules-form-template-management-category.entity-B1X2QyYV.mjs → acorex-modules-form-template-management-category.entity-BaX5yaK9.mjs} +2 -2
  27. package/fesm2022/{acorex-modules-form-template-management-category.entity-B1X2QyYV.mjs.map → acorex-modules-form-template-management-category.entity-BaX5yaK9.mjs.map} +1 -1
  28. package/fesm2022/{acorex-modules-form-template-management-setting.provider-D-HyCbH7.mjs → acorex-modules-form-template-management-setting.provider-h3v_4sR9.mjs} +2 -2
  29. package/fesm2022/{acorex-modules-form-template-management-setting.provider-D-HyCbH7.mjs.map → acorex-modules-form-template-management-setting.provider-h3v_4sR9.mjs.map} +1 -1
  30. package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-CyZLM6M9.mjs → acorex-modules-form-template-management-template-widget-edit.component-GxCDqH9d.mjs} +2 -2
  31. package/fesm2022/{acorex-modules-form-template-management-template-widget-edit.component-CyZLM6M9.mjs.map → acorex-modules-form-template-management-template-widget-edit.component-GxCDqH9d.mjs.map} +1 -1
  32. package/fesm2022/{acorex-modules-form-template-management-template.entity-DXIhxJeU.mjs → acorex-modules-form-template-management-template.entity-CzmbpLj_.mjs} +33 -2
  33. package/fesm2022/acorex-modules-form-template-management-template.entity-CzmbpLj_.mjs.map +1 -0
  34. package/fesm2022/acorex-modules-form-template-management-viewer-popup.component-CJKcMi8Q.mjs +93 -0
  35. package/fesm2022/acorex-modules-form-template-management-viewer-popup.component-CJKcMi8Q.mjs.map +1 -0
  36. package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
  37. package/fesm2022/{acorex-modules-organization-management-add-item.component-D0tN7Se4.mjs → acorex-modules-organization-management-add-item.component-PhQRBTtI.mjs} +22 -16
  38. package/fesm2022/acorex-modules-organization-management-add-item.component-PhQRBTtI.mjs.map +1 -0
  39. package/fesm2022/{acorex-modules-organization-management-branch.entity-CbmnpHl2.mjs → acorex-modules-organization-management-branch.entity-CxxFiBPd.mjs} +48 -4
  40. package/fesm2022/acorex-modules-organization-management-branch.entity-CxxFiBPd.mjs.map +1 -0
  41. package/fesm2022/{acorex-modules-organization-management-department.entity-Dl7y4Rva.mjs → acorex-modules-organization-management-department.entity-BxyeK3lU.mjs} +48 -4
  42. package/fesm2022/acorex-modules-organization-management-department.entity-BxyeK3lU.mjs.map +1 -0
  43. package/fesm2022/{acorex-modules-organization-management-division.entity-Ckmu2Tj9.mjs → acorex-modules-organization-management-division.entity-Dh54R4es.mjs} +48 -4
  44. package/fesm2022/acorex-modules-organization-management-division.entity-Dh54R4es.mjs.map +1 -0
  45. package/fesm2022/{acorex-modules-organization-management-employment-type.entity-9aOaYT_-.mjs → acorex-modules-organization-management-employment-type.entity-aNkt-l_e.mjs} +48 -4
  46. package/fesm2022/acorex-modules-organization-management-employment-type.entity-aNkt-l_e.mjs.map +1 -0
  47. package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.page-BzjTyYyS.mjs → acorex-modules-organization-management-org-chart-configuration.page-DjzqBdaS.mjs} +4 -4
  48. package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-DjzqBdaS.mjs.map +1 -0
  49. package/fesm2022/{acorex-modules-organization-management-org-chart-configuration.service-DObuNZKQ.mjs → acorex-modules-organization-management-org-chart-configuration.service-QLdDEdqL.mjs} +4 -3
  50. package/fesm2022/acorex-modules-organization-management-org-chart-configuration.service-QLdDEdqL.mjs.map +1 -0
  51. package/fesm2022/{acorex-modules-organization-management-org-chart.page-Cz4ENQRa.mjs → acorex-modules-organization-management-org-chart.page-BSh18amn.mjs} +181 -110
  52. package/fesm2022/acorex-modules-organization-management-org-chart.page-BSh18amn.mjs.map +1 -0
  53. package/fesm2022/{acorex-modules-organization-management-position.entity-DDkiBefn.mjs → acorex-modules-organization-management-position.entity-B7ceEEbu.mjs} +49 -5
  54. package/fesm2022/acorex-modules-organization-management-position.entity-B7ceEEbu.mjs.map +1 -0
  55. package/fesm2022/acorex-modules-organization-management.mjs +8 -15
  56. package/fesm2022/acorex-modules-organization-management.mjs.map +1 -1
  57. package/fesm2022/acorex-modules-platform-management.mjs +476 -245
  58. package/fesm2022/acorex-modules-platform-management.mjs.map +1 -1
  59. package/fesm2022/acorex-modules-security-management.mjs +3 -3
  60. package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
  61. package/form-template-management/lib/features/viewer/viewer-connector.service.d.ts +12 -0
  62. package/form-template-management/lib/features/viewer/viewer-popup.component.d.ts +23 -0
  63. package/form-template-management/lib/features/viewer/workflows/open-template.workflow.d.ts +9 -0
  64. package/organization-management/lib/entities/branch/branch.types.d.ts +1 -0
  65. package/organization-management/lib/entities/department/department.types.d.ts +1 -0
  66. package/organization-management/lib/entities/division/division.types.d.ts +1 -0
  67. package/organization-management/lib/entities/employment-type/employment-type.types.d.ts +1 -0
  68. package/organization-management/lib/entities/position/position.types.d.ts +1 -0
  69. package/organization-management/lib/features/organization-chart/add-item/add-item.component.d.ts +5 -3
  70. package/organization-management/lib/features/organization-chart/org-chart-configuration.page.d.ts +3 -0
  71. package/organization-management/lib/features/organization-chart/org-chart-configuration.service.d.ts +2 -6
  72. package/organization-management/lib/features/organization-chart/org-chart.page.d.ts +3 -0
  73. package/organization-management/lib/features/organization-chart/org-chart.service.d.ts +16 -13
  74. package/organization-management/lib/features/organization-chart/org-chart.type.d.ts +5 -5
  75. package/package.json +5 -5
  76. package/platform-management/lib/common/index.d.ts +1 -0
  77. package/platform-management/lib/common/regional/index.d.ts +1 -0
  78. package/platform-management/lib/common/regional/language-slot/language-slot.component.d.ts +1 -1
  79. package/platform-management/lib/entities/check-version.d.ts +1 -0
  80. package/platform-management/lib/entities/data-source/coulmn-def.widget.d.ts +11 -0
  81. package/platform-management/lib/entities/data-source/data-source.types.d.ts +2 -1
  82. package/platform-management/lib/entities/data-source/datasource-provider.dynamic.d.ts +2 -0
  83. package/fesm2022/acorex-modules-form-template-management-acorex-modules-form-template-management-DGGKoVbL.mjs.map +0 -1
  84. package/fesm2022/acorex-modules-form-template-management-template.entity-DXIhxJeU.mjs.map +0 -1
  85. package/fesm2022/acorex-modules-organization-management-add-item.component-D0tN7Se4.mjs.map +0 -1
  86. package/fesm2022/acorex-modules-organization-management-branch.entity-CbmnpHl2.mjs.map +0 -1
  87. package/fesm2022/acorex-modules-organization-management-department.entity-Dl7y4Rva.mjs.map +0 -1
  88. package/fesm2022/acorex-modules-organization-management-division.entity-Ckmu2Tj9.mjs.map +0 -1
  89. package/fesm2022/acorex-modules-organization-management-employment-type.entity-9aOaYT_-.mjs.map +0 -1
  90. package/fesm2022/acorex-modules-organization-management-org-chart-configuration.page-BzjTyYyS.mjs.map +0 -1
  91. package/fesm2022/acorex-modules-organization-management-org-chart-configuration.service-DObuNZKQ.mjs.map +0 -1
  92. package/fesm2022/acorex-modules-organization-management-org-chart.page-Cz4ENQRa.mjs.map +0 -1
  93. package/fesm2022/acorex-modules-organization-management-position.entity-DDkiBefn.mjs.map +0 -1
  94. package/fesm2022/acorex-modules-platform-management-countries-CuJVdPLt.mjs +0 -19
  95. package/fesm2022/acorex-modules-platform-management-countries-CuJVdPLt.mjs.map +0 -1
  96. package/fesm2022/acorex-modules-platform-management-currencies-vgPg4Hj3.mjs +0 -13
  97. package/fesm2022/acorex-modules-platform-management-currencies-vgPg4Hj3.mjs.map +0 -1
  98. package/fesm2022/acorex-modules-platform-management-regional-formats-BaHofjWg.mjs +0 -14
  99. package/fesm2022/acorex-modules-platform-management-regional-formats-BaHofjWg.mjs.map +0 -1
  100. package/fesm2022/acorex-modules-platform-management-timezones-BoScbn0h.mjs +0 -15
  101. package/fesm2022/acorex-modules-platform-management-timezones-BoScbn0h.mjs.map +0 -1
  102. package/platform-management/lib/common/regional/data/countries.d.ts +0 -2
  103. package/platform-management/lib/common/regional/data/currencies.d.ts +0 -2
  104. package/platform-management/lib/common/regional/data/regional-formats.d.ts +0 -2
  105. package/platform-management/lib/common/regional/data/timezones.d.ts +0 -2
  106. package/platform-management/lib/common/regional/regional-util.service.d.ts +0 -12
  107. package/platform-management/lib/common/regional/regional.types.d.ts +0 -37
@@ -1,14 +1,14 @@
1
1
  import * as i1$1 from '@acorex/platform/common';
2
- import { AXPSettingScope, AXPSettingService, AXP_SETTING_DEFINITION_PROVIDER, AXPComponentSlotModule, AXMEntityCrudServiceImpl, AXPEntityQueryType, AXPEntityCommandScope, AXP_APP_VERSION_PROVIDER, AXPAppStartUpService, AXPFileStorageService, AXP_MENU_PROVIDER } from '@acorex/platform/common';
3
- import { AXP_ENTITY_DEFINITION_LOADER, AXPEntityDefinitionRegistryService, AXPEntityService, AXP_ENTITY_CONFIG_TOKEN } from '@acorex/platform/layout/entity';
2
+ import { AXPRegionalService, AXPSettingScope, AXPSettingService, AXP_SETTING_DEFINITION_PROVIDER, AXPComponentSlotModule, AXMEntityCrudServiceImpl, AXPEntityQueryType, AXPEntityCommandScope, AXP_APP_VERSION_PROVIDER, AXPAppStartUpService, AXPFileStorageService, AXP_MENU_PROVIDER } from '@acorex/platform/common';
3
+ import { AXP_ENTITY_DEFINITION_LOADER, AXPEntityDefinitionRegistryService, AXPEntityService, AXPEntityResolver, AXP_ENTITY_CONFIG_TOKEN } from '@acorex/platform/layout/entity';
4
4
  import * as i2$4 from '@acorex/platform/workflow';
5
5
  import { AXPWorkflowAction, AXPWorkflowService, AXPWorkflowModule } from '@acorex/platform/workflow';
6
6
  import * as i0 from '@angular/core';
7
7
  import { inject, Injector, Injectable, signal, Component, NgModule, HostListener, ChangeDetectionStrategy, Input } from '@angular/core';
8
8
  import { ROUTES } from '@angular/router';
9
- import { objectKeyValueTransforms, AXPWidgetsCatalog, AXP_WIDGET_DATASOURCE_PROVIDER } from '@acorex/platform/layout/builder';
10
9
  import * as i6 from '@acorex/core/translation';
11
10
  import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
11
+ import { objectKeyValueTransforms, AXPWidgetsCatalog, AXP_WIDGET_DATASOURCE_PROVIDER } from '@acorex/platform/layout/builder';
12
12
  import { signalStore, withState, withMethods, patchState, withHooks } from '@ngrx/signals';
13
13
  import * as i3 from '@acorex/components/button';
14
14
  import { AXButtonModule } from '@acorex/components/button';
@@ -38,9 +38,10 @@ import { AXSafePipe } from '@acorex/core/pipes';
38
38
  import * as i2$3 from '@acorex/components/time-line';
39
39
  import { AXTimeLineModule } from '@acorex/components/time-line';
40
40
  import { AXDateTimeModule } from '@acorex/core/date-time';
41
- import { upperFirst, camelCase } from 'lodash-es';
42
- import { AXDataSource, convertArrayToDataSource } from '@acorex/components/common';
43
41
  import { AXPSessionService } from '@acorex/platform/auth';
42
+ import { AXDataSource, convertArrayToDataSource } from '@acorex/components/common';
43
+ import { upperFirst, camelCase } from 'lodash-es';
44
+ import get from 'lodash-es/get';
44
45
 
45
46
  class AXMCommonModuleEntityProvider {
46
47
  constructor() {
@@ -77,47 +78,6 @@ var AXPRegionalSetting;
77
78
  AXPRegionalSetting["LongTime"] = "regional:long-time";
78
79
  })(AXPRegionalSetting || (AXPRegionalSetting = {}));
79
80
 
80
- class AXPRegionalService {
81
- async getCountries() {
82
- const { countries } = await import('./acorex-modules-platform-management-countries-CuJVdPLt.mjs');
83
- return countries;
84
- }
85
- async getCurrencies() {
86
- const { currencies } = await import('./acorex-modules-platform-management-currencies-vgPg4Hj3.mjs');
87
- return currencies;
88
- }
89
- async getRegionalFormats() {
90
- const { regionalFormats } = await import('./acorex-modules-platform-management-regional-formats-BaHofjWg.mjs');
91
- return regionalFormats;
92
- }
93
- async getLanguages() {
94
- return (await this.getRegionalFormats())
95
- .map(c => ({ code: c.locale, title: c.title }));
96
- }
97
- async getAvailableLanguages() {
98
- return (await this.getLanguages()).filter(c => ['fa-IR', 'en-US'].some(e => e == c.code));
99
- }
100
- async getBrowserTimeZoneCode() {
101
- const { timeZones } = await import('./acorex-modules-platform-management-timezones-BoScbn0h.mjs');
102
- const now = new Date();
103
- // Calculate offset in hours and minutes
104
- const offsetMinutes = now.getTimezoneOffset();
105
- const offsetHours = Math.floor(-offsetMinutes / 60);
106
- const offsetRemainder = Math.abs(offsetMinutes % 60);
107
- // Format the offset properly
108
- const formattedOffset = `UTC${offsetHours >= 0 ? '+' : ''}${offsetHours}${offsetRemainder ? `:${offsetRemainder.toString().padStart(2, '0')}` : ''}`;
109
- // Find matching time zone
110
- const matchedZone = timeZones.find(zone => zone.code === formattedOffset);
111
- return matchedZone ? matchedZone.code : 'UTC';
112
- }
113
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPRegionalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
114
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPRegionalService, providedIn: 'root' }); }
115
- }
116
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPRegionalService, decorators: [{
117
- type: Injectable,
118
- args: [{ providedIn: 'root' }]
119
- }] });
120
-
121
81
  class AXMRegionalSettingProvider {
122
82
  constructor() {
123
83
  this.translationService = inject(AXTranslationService);
@@ -139,7 +99,7 @@ class AXMRegionalSettingProvider {
139
99
  type: AXPWidgetsCatalog.select,
140
100
  options: {
141
101
  valueField: 'code',
142
- dataSource: await import('./acorex-modules-platform-management-timezones-BoScbn0h.mjs'),
102
+ dataSource: this.regionalService.getTimeZones(),
143
103
  },
144
104
  },
145
105
  description: 'Set the default time zone for the application.',
@@ -324,7 +284,7 @@ withMethods((store, settingService = inject(AXPSettingService), translationServi
324
284
  patchState(store, { language: lang });
325
285
  }
326
286
  translationService.setActiveLang(lang);
327
- const reg = await (await regionalService.getRegionalFormats()).find(c => c.locale == lang);
287
+ const reg = await (await regionalService.getRegionalFormats()).find((c) => c.locale == lang);
328
288
  const html = document.getElementsByTagName('html')[0];
329
289
  reg?.layout == 'rtl' ? html.setAttribute('dir', 'rtl') : html.removeAttribute('dir');
330
290
  },
@@ -341,8 +301,7 @@ withMethods((store, settingService = inject(AXPSettingService), translationServi
341
301
  }
342
302
  });
343
303
  },
344
- onDestroy() {
345
- },
304
+ onDestroy() { },
346
305
  })));
347
306
 
348
307
  class AXMLanguageSlotComponent {
@@ -548,6 +507,11 @@ async function appTermEntityEntityFactory(injector) {
548
507
  dataType: 'string',
549
508
  interface: {
550
509
  type: AXPWidgetsCatalog.richText,
510
+ options: {
511
+ minLineCount: 5,
512
+ maxLineCount: 17,
513
+ isFitLine: true,
514
+ },
551
515
  },
552
516
  },
553
517
  validations: [
@@ -916,7 +880,7 @@ class AXMListTermsComponent extends AXBasePageComponent {
916
880
  setTimeout(() => this.checkScroll(), 50);
917
881
  }
918
882
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMListTermsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
919
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMListTermsComponent, isStandalone: true, selector: "acorex-platform-list-terms", host: { listeners: { "window:resize": "onResize($event)" } }, usesInheritance: true, ngImport: i0, template: "<axp-layout-simple-page>\n <axp-layout-header>\n <axp-layout-title> {{ pageTitle | translate : { scope: i18n } | async }} </axp-layout-title>\n\n <axp-layout-description>Please review the terms and conditions carefully. </axp-layout-description>\n </axp-layout-header>\n @if(loaded()){\n <axp-layout-content id=\"contentDiv\" axOutlineContainer target=\"h2\">\n <div class=\"ax-flex\">\n <div class=\"ax-flex ax-flex-col\">\n @for (term of terms; track term.id) {\n <div class=\"ax-flex ax-flex-col\">\n <h2 class=\"ax-px-4 ax-font-semibold ax-text-xl\">{{ term.title }}</h2>\n <p class=\"ax-px-4 ax-text-sm ax-leading-5 ax-text-neutral-700\">\n {{ term.effectiveDate | format : 'datetime' | async }}\n </p>\n <div class=\"ax-pt-3 ax-pb-6 ax-px-4 ax-text-base/6\" [innerHTML]=\"term.content\"></div>\n </div>\n }\n </div>\n @if(showScrollSide){\n <div class=\"ax-hidden lg:ax-block ax-min-w-60 ax-sticky ax-top-0\">\n <ax-side-menu axOutlineSideMenu look=\"with-line\" class=\"ax-w-full\"></ax-side-menu>\n </div>\n }\n </div>\n </axp-layout-content>\n }\n</axp-layout-simple-page>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "pipe", type: i2$1.AXFormatPipe, name: "format" }, { kind: "component", type: AXPSimplePageLayout, selector: "axp-layout-simple-page" }, { kind: "component", type: AXPThemeLayoutHeaderTemplateComponent, selector: "axp-layout-header" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-layout-content, axp-layout-header-container, axp-layout-side-container, axp-layout-sections, axp-layout-section-container, axp-layout-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title, axp-layout-nav-button, axp-layout-description, axp-layout-toolbar, axp-layout-title-bar, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }, { kind: "ngmodule", type: AXSideMenuModule }, { kind: "component", type: i4.AXSideMenuComponent, selector: "ax-side-menu", inputs: ["items", "look", "location"], outputs: ["itemsChange"] }, { kind: "directive", type: i4.AXOutlineSideMenuDirective, selector: "[axOutlineSideMenu]", exportAs: ["axOutlineSideMenu"] }, { kind: "ngmodule", type: AXOutlineModule }, { kind: "directive", type: i5.AXOutlineContainerDirective, selector: "[axOutlineContainer]", inputs: ["target", "smoothScroll", "activationOffset", "activateLastAtBottom"], exportAs: ["axOutlineContainer"] }] }); }
883
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMListTermsComponent, isStandalone: true, selector: "acorex-platform-list-terms", host: { listeners: { "window:resize": "onResize($event)" } }, usesInheritance: true, ngImport: i0, template: "<axp-layout-simple-page>\n <axp-layout-header>\n <axp-layout-title> {{ pageTitle | translate : { scope: i18n } | async }} </axp-layout-title>\n <axp-layout-description>Please review the terms and conditions carefully. </axp-layout-description>\n </axp-layout-header>\n @if(loaded()){\n <axp-layout-content id=\"contentDiv\" axOutlineContainer target=\"h2\" [scrollableElementId]=\"'simple-page-content'\"\n [activationOffset]=\"150\">\n <div class=\"ax-flex\">\n <div class=\"ax-flex ax-flex-col\">\n @for (term of terms; track term.id) {\n <div class=\"ax-flex ax-flex-col\">\n <h2 class=\"ax-px-4 ax-font-semibold ax-text-xl\">{{ term.title }}</h2>\n <p class=\"ax-px-4 ax-text-sm ax-leading-5 ax-text-neutral-700\">\n {{ term.effectiveDate | format : 'datetime' | async }}\n </p>\n <div class=\"ax-pt-3 ax-pb-6 ax-px-4 ax-text-base/6\" [innerHTML]=\"term.content\"></div>\n </div>\n }\n </div>\n @if(showScrollSide){\n <div class=\"ax-hidden lg:ax-block ax-min-w-60 ax-sticky ax-top-0\">\n <ax-side-menu axOutlineSideMenu look=\"with-line\" class=\"ax-w-full\"></ax-side-menu>\n </div>\n }\n </div>\n </axp-layout-content>\n }\n</axp-layout-simple-page>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "pipe", type: i2$1.AXFormatPipe, name: "format" }, { kind: "component", type: AXPSimplePageLayout, selector: "axp-layout-simple-page" }, { kind: "component", type: AXPThemeLayoutHeaderTemplateComponent, selector: "axp-layout-header" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-layout-content, axp-layout-header-container, axp-layout-side-container, axp-layout-sections, axp-layout-section-container, axp-layout-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title, axp-layout-nav-button, axp-layout-description, axp-layout-toolbar, axp-layout-title-bar, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }, { kind: "ngmodule", type: AXSideMenuModule }, { kind: "component", type: i4.AXSideMenuComponent, selector: "ax-side-menu", inputs: ["items", "look", "location"], outputs: ["itemsChange"] }, { kind: "directive", type: i4.AXOutlineSideMenuDirective, selector: "[axOutlineSideMenu]", exportAs: ["axOutlineSideMenu"] }, { kind: "ngmodule", type: AXOutlineModule }, { kind: "directive", type: i5.AXOutlineContainerDirective, selector: "[axOutlineContainer]", inputs: ["target", "smoothScroll", "activationOffset", "activateLastAtBottom", "scrollableElementId"], exportAs: ["axOutlineContainer"] }] }); }
920
884
  }
921
885
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMListTermsComponent, decorators: [{
922
886
  type: Component,
@@ -930,7 +894,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
930
894
  AXTranslationModule,
931
895
  AXSideMenuModule,
932
896
  AXOutlineModule,
933
- ], template: "<axp-layout-simple-page>\n <axp-layout-header>\n <axp-layout-title> {{ pageTitle | translate : { scope: i18n } | async }} </axp-layout-title>\n\n <axp-layout-description>Please review the terms and conditions carefully. </axp-layout-description>\n </axp-layout-header>\n @if(loaded()){\n <axp-layout-content id=\"contentDiv\" axOutlineContainer target=\"h2\">\n <div class=\"ax-flex\">\n <div class=\"ax-flex ax-flex-col\">\n @for (term of terms; track term.id) {\n <div class=\"ax-flex ax-flex-col\">\n <h2 class=\"ax-px-4 ax-font-semibold ax-text-xl\">{{ term.title }}</h2>\n <p class=\"ax-px-4 ax-text-sm ax-leading-5 ax-text-neutral-700\">\n {{ term.effectiveDate | format : 'datetime' | async }}\n </p>\n <div class=\"ax-pt-3 ax-pb-6 ax-px-4 ax-text-base/6\" [innerHTML]=\"term.content\"></div>\n </div>\n }\n </div>\n @if(showScrollSide){\n <div class=\"ax-hidden lg:ax-block ax-min-w-60 ax-sticky ax-top-0\">\n <ax-side-menu axOutlineSideMenu look=\"with-line\" class=\"ax-w-full\"></ax-side-menu>\n </div>\n }\n </div>\n </axp-layout-content>\n }\n</axp-layout-simple-page>\n" }]
897
+ ], template: "<axp-layout-simple-page>\n <axp-layout-header>\n <axp-layout-title> {{ pageTitle | translate : { scope: i18n } | async }} </axp-layout-title>\n <axp-layout-description>Please review the terms and conditions carefully. </axp-layout-description>\n </axp-layout-header>\n @if(loaded()){\n <axp-layout-content id=\"contentDiv\" axOutlineContainer target=\"h2\" [scrollableElementId]=\"'simple-page-content'\"\n [activationOffset]=\"150\">\n <div class=\"ax-flex\">\n <div class=\"ax-flex ax-flex-col\">\n @for (term of terms; track term.id) {\n <div class=\"ax-flex ax-flex-col\">\n <h2 class=\"ax-px-4 ax-font-semibold ax-text-xl\">{{ term.title }}</h2>\n <p class=\"ax-px-4 ax-text-sm ax-leading-5 ax-text-neutral-700\">\n {{ term.effectiveDate | format : 'datetime' | async }}\n </p>\n <div class=\"ax-pt-3 ax-pb-6 ax-px-4 ax-text-base/6\" [innerHTML]=\"term.content\"></div>\n </div>\n }\n </div>\n @if(showScrollSide){\n <div class=\"ax-hidden lg:ax-block ax-min-w-60 ax-sticky ax-top-0\">\n <ax-side-menu axOutlineSideMenu look=\"with-line\" class=\"ax-w-full\"></ax-side-menu>\n </div>\n }\n </div>\n </axp-layout-content>\n }\n</axp-layout-simple-page>" }]
934
898
  }], propDecorators: { onResize: [{
935
899
  type: HostListener,
936
900
  args: ['window:resize', ['$event']]
@@ -1059,6 +1023,11 @@ async function appVersionEntityEntityFactory(injector) {
1059
1023
  type: AXPWidgetsCatalog.text,
1060
1024
  },
1061
1025
  },
1026
+ options: {
1027
+ sort: {
1028
+ enabled: true,
1029
+ },
1030
+ },
1062
1031
  validations: [
1063
1032
  {
1064
1033
  rule: 'required',
@@ -1073,7 +1042,11 @@ async function appVersionEntityEntityFactory(injector) {
1073
1042
  dataType: 'string',
1074
1043
  interface: {
1075
1044
  type: AXPWidgetsCatalog.richText,
1076
- options: {},
1045
+ options: {
1046
+ minLineCount: 5,
1047
+ maxLineCount: 17,
1048
+ isFitLine: true,
1049
+ },
1077
1050
  },
1078
1051
  },
1079
1052
  validations: [
@@ -1153,7 +1126,8 @@ async function appVersionEntityEntityFactory(injector) {
1153
1126
  },
1154
1127
  list: {
1155
1128
  execute: async (e) => {
1156
- const x = await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
1129
+ console.log(e);
1130
+ const x = await dataService.query({ skip: e.skip, take: e.take, filter: e.filter, sort: e.sort });
1157
1131
  return x;
1158
1132
  },
1159
1133
  type: AXPEntityQueryType.List,
@@ -1352,11 +1326,11 @@ async function appVersionEntityEntityFactory(injector) {
1352
1326
  views: [
1353
1327
  {
1354
1328
  name: 'all',
1355
- title: 'All Items',
1329
+ title: 't("all", { scope: "common" })',
1356
1330
  fixed: true,
1357
1331
  columns: [],
1358
1332
  conditions: [],
1359
- sorts: [],
1333
+ sorts: [{ name: 'versionNumber', dir: 'desc' }],
1360
1334
  },
1361
1335
  ],
1362
1336
  },
@@ -1380,11 +1354,11 @@ class AXMNotifyAppComponent extends AXBasePageComponent {
1380
1354
  this.close({ data: this.data, isShowAgain: !this.isShowAgain });
1381
1355
  }
1382
1356
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMNotifyAppComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1383
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMNotifyAppComponent, isStandalone: true, selector: "axm-notify-app", usesInheritance: true, ngImport: i0, template: "<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n <ax-check-box [(value)]=\"isShowAgain\">\n <ax-label>Don't Show Again</ax-label>\n </ax-check-box>\n <ax-button (click)=\"send()\" [text]=\"'okay' | translate | async\"></ax-button>\n</ax-footer>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i2$2.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i3$1.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.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: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }] }); }
1357
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: AXMNotifyAppComponent, isStandalone: true, selector: "axm-notify-app", usesInheritance: true, ngImport: i0, template: "<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n <ax-check-box [(value)]=\"isShowAgain\">\n <ax-label>Don't Show Again</ax-label>\n </ax-check-box>\n <ax-button color=\"primary\" (click)=\"send()\" [text]=\"'okay' | translate | async\"></ax-button>\n</ax-footer>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i2$2.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i3$1.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "checked", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.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: AXButtonModule }, { kind: "component", type: i3.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i6.AXTranslatorPipe, name: "translate" }] }); }
1384
1358
  }
1385
1359
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMNotifyAppComponent, decorators: [{
1386
1360
  type: Component,
1387
- args: [{ selector: 'axm-notify-app', imports: [CommonModule, AXLabelModule, AXCheckBoxModule, AXDecoratorModule, AXButtonModule, AXTranslationModule], template: "<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n <ax-check-box [(value)]=\"isShowAgain\">\n <ax-label>Don't Show Again</ax-label>\n </ax-check-box>\n <ax-button (click)=\"send()\" [text]=\"'okay' | translate | async\"></ax-button>\n</ax-footer>\n" }]
1361
+ args: [{ selector: 'axm-notify-app', imports: [CommonModule, AXLabelModule, AXCheckBoxModule, AXDecoratorModule, AXButtonModule, AXTranslationModule], template: "<ax-content class=\"ax-block ax-px-4 ax-py-4 ax-text-base/6\" [innerHTML]=\"safeData\"></ax-content>\n<ax-footer class=\"ax-flex ax-items-center ax-justify-between ax-p-2\">\n <ax-check-box [(value)]=\"isShowAgain\">\n <ax-label>Don't Show Again</ax-label>\n </ax-check-box>\n <ax-button color=\"primary\" (click)=\"send()\" [text]=\"'okay' | translate | async\"></ax-button>\n</ax-footer>\n" }]
1388
1362
  }] });
1389
1363
 
1390
1364
  class AXMListVersionComponent extends AXBasePageComponent {
@@ -1521,23 +1495,28 @@ class AppTermAndVersionCheck {
1521
1495
  this.appVersionService = inject(AXMAppVersionService);
1522
1496
  this.appTermService = inject(AXMAppTermService);
1523
1497
  this.appInitService = inject(AXPAppStartUpService);
1498
+ this.sessionService = inject(AXPSessionService);
1524
1499
  //check new version
1525
1500
  this.appInitService.registerTask({
1526
1501
  name: 'Version',
1527
1502
  statusText: 'Check New Version...',
1528
1503
  run: async () => {
1529
- const versions = await this.appVersionService.query();
1530
- versions.items.forEach(async (v) => {
1531
- const current = (await this.versionProvider.provider()).version;
1532
- if (v.versionNumber == current) {
1533
- const isSee = await this.settingsService
1534
- .scope(AXPSettingScope.User)
1535
- .get(`is-see-check-version-${v.versionNumber}`);
1536
- if (!isSee) {
1537
- setTimeout(() => {
1538
- this.workflowService.execute('change-log-version', v);
1539
- }, 500);
1540
- }
1504
+ this.sessionService.isAuthorized$.subscribe(async (isAuthorized) => {
1505
+ if (isAuthorized) {
1506
+ const versions = await this.appVersionService.query();
1507
+ versions.items.forEach(async (v) => {
1508
+ const current = (await this.versionProvider.provider()).version;
1509
+ if (v.versionNumber == current) {
1510
+ const isSee = await this.settingsService
1511
+ .scope(AXPSettingScope.User)
1512
+ .get(`is-see-check-version-${v.versionNumber}`);
1513
+ if (!isSee) {
1514
+ setTimeout(() => {
1515
+ this.workflowService.execute('change-log-version', v);
1516
+ }, 500);
1517
+ }
1518
+ }
1519
+ });
1541
1520
  }
1542
1521
  });
1543
1522
  },
@@ -1547,19 +1526,25 @@ class AppTermAndVersionCheck {
1547
1526
  name: 'Terms',
1548
1527
  statusText: 'Check New Terms And Conditions...',
1549
1528
  run: async () => {
1550
- const filterTerms = [];
1551
- const terms = await this.appTermService.query();
1552
- for (const term of terms.items) {
1553
- const isConfirm = await this.settingsService.scope(AXPSettingScope.User).get(`is-confirm-term-${term.id}`);
1554
- if (!isConfirm) {
1555
- filterTerms.push(term);
1529
+ this.sessionService.isAuthorized$.subscribe(async (isAuthorized) => {
1530
+ if (isAuthorized) {
1531
+ const filterTerms = [];
1532
+ const terms = await this.appTermService.query();
1533
+ for (const term of terms.items) {
1534
+ const isConfirm = await this.settingsService
1535
+ .scope(AXPSettingScope.User)
1536
+ .get(`is-confirm-term-${term.id}`);
1537
+ if (!isConfirm) {
1538
+ filterTerms.push(term);
1539
+ }
1540
+ }
1541
+ if (filterTerms.length > 0) {
1542
+ setTimeout(() => {
1543
+ this.workflowService.execute('new-term', filterTerms);
1544
+ }, 500);
1545
+ }
1556
1546
  }
1557
- }
1558
- if (filterTerms.length > 0) {
1559
- setTimeout(() => {
1560
- this.workflowService.execute('new-term', filterTerms);
1561
- }, 500);
1562
- }
1547
+ });
1563
1548
  },
1564
1549
  });
1565
1550
  }
@@ -1578,7 +1563,7 @@ const AXM_COLUMN_DEF_WIDGET = [
1578
1563
  {
1579
1564
  type: 'grid-item-layout',
1580
1565
  mode: 'view',
1581
- options: { colSpan: 4 },
1566
+ options: { colSpan: 3 },
1582
1567
  children: [
1583
1568
  {
1584
1569
  type: 'text-editor',
@@ -1594,7 +1579,7 @@ const AXM_COLUMN_DEF_WIDGET = [
1594
1579
  {
1595
1580
  type: 'grid-item-layout',
1596
1581
  mode: 'view',
1597
- options: { colSpan: 4 },
1582
+ options: { colSpan: 3 },
1598
1583
  children: [
1599
1584
  {
1600
1585
  type: 'text-editor',
@@ -1608,7 +1593,7 @@ const AXM_COLUMN_DEF_WIDGET = [
1608
1593
  },
1609
1594
  {
1610
1595
  type: 'grid-item-layout',
1611
- options: { colSpan: 4 },
1596
+ options: { colSpan: 3 },
1612
1597
  mode: 'view',
1613
1598
  children: [
1614
1599
  {
@@ -1622,7 +1607,7 @@ const AXM_COLUMN_DEF_WIDGET = [
1622
1607
  dataSource: Object.entries(AXPWidgetsCatalog).map(([key, value]) => {
1623
1608
  return {
1624
1609
  title: upperFirst(camelCase(key)),
1625
- name: value
1610
+ name: value,
1626
1611
  };
1627
1612
  }),
1628
1613
  direction: 'horizontal',
@@ -1631,6 +1616,18 @@ const AXM_COLUMN_DEF_WIDGET = [
1631
1616
  },
1632
1617
  ],
1633
1618
  },
1619
+ {
1620
+ type: 'grid-item-layout',
1621
+ options: { colSpan: 2 },
1622
+ mode: 'view',
1623
+ children: [
1624
+ {
1625
+ type: 'checkbox-editor',
1626
+ mode: 'edit',
1627
+ path: 'isRequire',
1628
+ },
1629
+ ],
1630
+ },
1634
1631
  ],
1635
1632
  },
1636
1633
  ];
@@ -1734,14 +1731,14 @@ async function dataSourceEntityFactory(injector) {
1734
1731
  title: RootConfig.entities.dataSource.title,
1735
1732
  formats: {
1736
1733
  individual: RootConfig.entities.dataSource.title,
1737
- plural: RootConfig.entities.dataSource.titlePlural
1734
+ plural: RootConfig.entities.dataSource.titlePlural,
1738
1735
  },
1739
1736
  relatedEntities: [],
1740
1737
  groups: [
1741
1738
  {
1742
1739
  id: 'dataSource',
1743
- title: RootConfig.entities.dataSource.title
1744
- }
1740
+ title: RootConfig.entities.dataSource.title,
1741
+ },
1745
1742
  ],
1746
1743
  properties: [
1747
1744
  {
@@ -1751,14 +1748,14 @@ async function dataSourceEntityFactory(injector) {
1751
1748
  schema: {
1752
1749
  dataType: 'string',
1753
1750
  interface: {
1754
- type: AXPWidgetsCatalog.text
1755
- }
1751
+ type: AXPWidgetsCatalog.text,
1752
+ },
1756
1753
  },
1757
1754
  validations: [
1758
1755
  {
1759
- rule: 'required'
1760
- }
1761
- ]
1756
+ rule: 'required',
1757
+ },
1758
+ ],
1762
1759
  },
1763
1760
  {
1764
1761
  name: 'title',
@@ -1768,14 +1765,14 @@ async function dataSourceEntityFactory(injector) {
1768
1765
  dataType: 'string',
1769
1766
  interface: {
1770
1767
  type: AXPWidgetsCatalog.text,
1771
- options: {}
1772
- }
1768
+ options: {},
1769
+ },
1773
1770
  },
1774
1771
  validations: [
1775
1772
  {
1776
- rule: 'required'
1777
- }
1778
- ]
1773
+ rule: 'required',
1774
+ },
1775
+ ],
1779
1776
  },
1780
1777
  {
1781
1778
  name: 'columns',
@@ -1788,24 +1785,24 @@ async function dataSourceEntityFactory(injector) {
1788
1785
  title: 'Name',
1789
1786
  type: {
1790
1787
  title: 'Text',
1791
- name: 'text-editor'
1792
- }
1788
+ name: 'text-editor',
1789
+ },
1793
1790
  },
1794
1791
  {
1795
1792
  name: 'title',
1796
1793
  title: 'Title',
1797
1794
  type: {
1798
1795
  title: 'Text',
1799
- name: 'text-editor'
1800
- }
1801
- }
1796
+ name: 'text-editor',
1797
+ },
1798
+ },
1802
1799
  ],
1803
1800
  dataType: 'object',
1804
1801
  interface: {
1805
1802
  type: AXPWidgetsCatalog.repeaterLayout,
1806
- children: AXM_COLUMN_DEF_WIDGET
1807
- }
1808
- }
1803
+ children: AXM_COLUMN_DEF_WIDGET,
1804
+ },
1805
+ },
1809
1806
  },
1810
1807
  {
1811
1808
  name: 'samples',
@@ -1817,45 +1814,60 @@ async function dataSourceEntityFactory(injector) {
1817
1814
  type: AXPWidgetsCatalog.table,
1818
1815
  options: {
1819
1816
  columns: '{{context.eval("columns")}}',
1820
- }
1821
- }
1817
+ defaultRowCount: 2,
1818
+ },
1819
+ },
1822
1820
  },
1823
1821
  validations: [
1824
1822
  {
1825
- rule: 'required'
1826
- }
1827
- ]
1823
+ rule: 'required',
1824
+ },
1825
+ ],
1828
1826
  },
1829
1827
  {
1830
1828
  name: 'sourceType',
1831
1829
  title: `t("sourceType", { scope: "${i18n}" })`,
1832
1830
  groupId: 'dataSource',
1833
1831
  schema: {
1832
+ defaultValue: {
1833
+ name: 'static',
1834
+ title: 'Static',
1835
+ },
1834
1836
  dataType: 'string',
1835
1837
  interface: {
1836
1838
  type: AXPWidgetsCatalog.select,
1837
1839
  options: {
1838
1840
  valueField: 'name',
1839
1841
  textField: 'title',
1840
- dataSource: [{
1842
+ dataSource: [
1843
+ {
1841
1844
  name: 'external_api',
1842
- title: 'External Api'
1843
- }, {
1845
+ title: 'External Api',
1846
+ },
1847
+ {
1844
1848
  name: 'entity',
1845
- title: 'Entity'
1846
- }, {
1849
+ title: 'Entity',
1850
+ },
1851
+ {
1847
1852
  name: 'static',
1848
- title: 'Static'
1849
- }],
1850
- multiple: false
1851
- }
1852
- }
1853
+ title: 'Static',
1854
+ },
1855
+ ],
1856
+ multiple: false,
1857
+ },
1858
+ triggers: [
1859
+ {
1860
+ event: "{{ events.context('sourceType') }}",
1861
+ action: `{{context.set('sourceEntity' , null); if(context.eval('sourceType')?.name == 'static') { context.set('columns', [ { name: 'name',title: 'Name',type: { title: 'Text', name: 'text-editor', },},{name: 'title',title: 'Title',type: {title: 'Text',name: 'text-editor',},}, ] );} }}`,
1862
+ },
1863
+ ],
1864
+ },
1853
1865
  },
1854
1866
  validations: [
1855
1867
  {
1856
- rule: 'required'
1857
- }
1858
- ]
1868
+ rule: 'required',
1869
+ },
1870
+ ],
1859
1871
  },
1860
1872
  {
1861
1873
  name: 'sourceStatic',
@@ -1869,14 +1881,15 @@ async function dataSourceEntityFactory(injector) {
1869
1881
  //TODO problem selectBox!
1870
1882
  visibility: '{{context.eval("sourceType")?.name == "static" }}',
1871
1883
  columns: '{{context.eval("columns")}}',
1872
- }
1873
- }
1884
+ defaultRowCount: 2,
1885
+ },
1886
+ },
1874
1887
  },
1875
1888
  validations: [
1876
1889
  {
1877
- rule: 'required'
1878
- }
1879
- ]
1890
+ rule: 'required',
1891
+ },
1892
+ ],
1880
1893
  },
1881
1894
  {
1882
1895
  name: 'sourceEntity',
@@ -1903,68 +1916,125 @@ async function dataSourceEntityFactory(injector) {
1903
1916
  })));
1904
1917
  return {
1905
1918
  total: translatedEntities.length,
1906
- items: translatedEntities
1919
+ items: translatedEntities,
1907
1920
  };
1908
1921
  },
1909
- pageSize: 1000
1910
- })
1922
+ pageSize: 1000,
1923
+ }),
1911
1924
  },
1912
1925
  triggers: [
1913
1926
  {
1914
1927
  event: "{{ events.context('sourceEntity') }}",
1915
- action: `{{ context.set('columns', context.eval('sourceEntity').properties.map(function (item) { return { name: item.name, title: item.title, type: {title:item.schema.interface.type , name:item.schema.interface.type} , options : item.schema.interface.options }; })); }}`,
1928
+ action: `{{ (async () => { const columns = await Promise.all(context.eval('sourceEntity').properties.filter((x) => x.schema.interface != null && x.schema.interface.type != null).map(async (item) => { return { name: item.name, title: await methods.translate(item.title), type: { title: await methods.widgetInfo(item.schema.interface.type)?.title, name: item.schema.interface.type }, options: item.schema.interface.options }; })); context.set('columns', columns); })(); }}`,
1916
1929
  },
1917
- ]
1918
- }
1930
+ ],
1931
+ },
1919
1932
  },
1920
1933
  validations: [
1921
- // {
1922
- // rule: 'required'
1923
- // }
1924
- ]
1925
- }
1934
+ // {
1935
+ // rule: 'required',
1936
+ // disabled: true,
1937
+ // },
1938
+ ],
1939
+ },
1940
+ {
1941
+ name: 'textField',
1942
+ title: `t("textField", { scope: "${i18n}" })`,
1943
+ groupId: 'dataSource',
1944
+ schema: {
1945
+ dataType: 'string',
1946
+ interface: {
1947
+ type: AXPWidgetsCatalog.select,
1948
+ options: {
1949
+ valueField: 'name',
1950
+ textField: 'title',
1951
+ dataSource: `{{ context.eval('columns') }}`,
1952
+ },
1953
+ triggers: [
1954
+ {
1955
+ event: '{{ events.context("columns*") }}',
1956
+ action: "{{ widget.call('clear'); }}",
1957
+ },
1958
+ ],
1959
+ },
1960
+ },
1961
+ validations: [
1962
+ {
1963
+ rule: 'required',
1964
+ },
1965
+ ],
1966
+ },
1967
+ {
1968
+ name: 'valueField',
1969
+ title: `t("valueField", { scope: "${i18n}" })`,
1970
+ groupId: 'dataSource',
1971
+ schema: {
1972
+ dataType: 'string',
1973
+ interface: {
1974
+ type: AXPWidgetsCatalog.select,
1975
+ options: {
1976
+ valueField: 'name',
1977
+ textField: 'title',
1978
+ dataSource: `{{ context.eval('columns') }}`,
1979
+ },
1980
+ triggers: [
1981
+ {
1982
+ event: "{{ events.context('columns*') }}",
1983
+ action: "{{ widget.call('clear'); }}",
1984
+ },
1985
+ ],
1986
+ },
1987
+ },
1988
+ validations: [
1989
+ {
1990
+ rule: 'required',
1991
+ },
1992
+ ],
1993
+ },
1926
1994
  ],
1927
- columns: [{ name: 'name' }, { name: 'title' }, { name: 'columns' }],
1995
+ columns: [{ name: 'name' }, { name: 'title' }, { name: 'sourceType' }],
1928
1996
  commands: {
1929
1997
  create: {
1930
1998
  execute: async (data) => {
1931
- console.log(data);
1999
+ if (data.sourceType.name == 'entity') {
2000
+ data.sourceEntity = data.sourceEntity?.name;
2001
+ }
1932
2002
  const res = await dataService.insertOne(data);
1933
2003
  return { id: res };
1934
- }
2004
+ },
1935
2005
  },
1936
2006
  delete: {
1937
2007
  execute: async (id) => {
1938
2008
  return await dataService.deleteOne(id);
1939
- }
2009
+ },
1940
2010
  },
1941
2011
  update: {
1942
2012
  execute: async (data) => {
1943
2013
  return await dataService.updateOne(data.id, data);
1944
- }
1945
- }
2014
+ },
2015
+ },
1946
2016
  },
1947
2017
  queries: {
1948
2018
  byKey: {
1949
2019
  execute: async (id) => {
1950
2020
  return await dataService.getOne(id);
1951
2021
  },
1952
- type: AXPEntityQueryType.Single
2022
+ type: AXPEntityQueryType.Single,
1953
2023
  },
1954
2024
  list: {
1955
2025
  execute: async (e) => {
1956
2026
  return await dataService.query({ skip: e.skip, take: e.take, filter: e.filter });
1957
2027
  },
1958
- type: AXPEntityQueryType.List
1959
- }
2028
+ type: AXPEntityQueryType.List,
2029
+ },
1960
2030
  },
1961
2031
  interfaces: {
1962
2032
  master: {
1963
2033
  create: {
1964
2034
  sections: [
1965
2035
  {
1966
- id: 'dataSource'
1967
- }
2036
+ id: 'dataSource',
2037
+ },
1968
2038
  ],
1969
2039
  properties: [
1970
2040
  {
@@ -1973,10 +2043,10 @@ async function dataSourceEntityFactory(injector) {
1973
2043
  positions: {
1974
2044
  lg: {
1975
2045
  colSpan: 6,
1976
- order: 1
1977
- }
1978
- }
1979
- }
2046
+ order: 1,
2047
+ },
2048
+ },
2049
+ },
1980
2050
  },
1981
2051
  {
1982
2052
  name: 'title',
@@ -1984,10 +2054,10 @@ async function dataSourceEntityFactory(injector) {
1984
2054
  positions: {
1985
2055
  lg: {
1986
2056
  colSpan: 6,
1987
- order: 2
1988
- }
1989
- }
1990
- }
2057
+ order: 2,
2058
+ },
2059
+ },
2060
+ },
1991
2061
  },
1992
2062
  {
1993
2063
  name: 'columns',
@@ -1995,10 +2065,10 @@ async function dataSourceEntityFactory(injector) {
1995
2065
  positions: {
1996
2066
  lg: {
1997
2067
  colSpan: 12,
1998
- order: 5
1999
- }
2000
- }
2001
- }
2068
+ order: 5,
2069
+ },
2070
+ },
2071
+ },
2002
2072
  },
2003
2073
  {
2004
2074
  name: 'samples',
@@ -2006,10 +2076,32 @@ async function dataSourceEntityFactory(injector) {
2006
2076
  positions: {
2007
2077
  lg: {
2008
2078
  colSpan: 12,
2009
- order: 6
2010
- }
2011
- }
2012
- }
2079
+ order: 11,
2080
+ },
2081
+ },
2082
+ },
2083
+ },
2084
+ {
2085
+ name: 'textField',
2086
+ layout: {
2087
+ positions: {
2088
+ lg: {
2089
+ colSpan: 6,
2090
+ order: 6,
2091
+ },
2092
+ },
2093
+ },
2094
+ },
2095
+ {
2096
+ name: 'valueField',
2097
+ layout: {
2098
+ positions: {
2099
+ lg: {
2100
+ colSpan: 6,
2101
+ order: 7,
2102
+ },
2103
+ },
2104
+ },
2013
2105
  },
2014
2106
  {
2015
2107
  name: 'sourceType',
@@ -2017,10 +2109,10 @@ async function dataSourceEntityFactory(injector) {
2017
2109
  positions: {
2018
2110
  lg: {
2019
2111
  colSpan: 6,
2020
- order: 3
2021
- }
2022
- }
2023
- }
2112
+ order: 3,
2113
+ },
2114
+ },
2115
+ },
2024
2116
  },
2025
2117
  {
2026
2118
  name: 'sourceStatic',
@@ -2028,28 +2120,29 @@ async function dataSourceEntityFactory(injector) {
2028
2120
  positions: {
2029
2121
  lg: {
2030
2122
  colSpan: 6,
2031
- order: 4
2032
- }
2033
- }
2034
- }
2035
- }, {
2123
+ order: 4,
2124
+ },
2125
+ },
2126
+ },
2127
+ },
2128
+ {
2036
2129
  name: 'sourceEntity',
2037
2130
  layout: {
2038
2131
  positions: {
2039
2132
  lg: {
2040
2133
  colSpan: 6,
2041
- order: 4
2042
- }
2043
- }
2044
- }
2045
- }
2046
- ]
2134
+ order: 4,
2135
+ },
2136
+ },
2137
+ },
2138
+ },
2139
+ ],
2047
2140
  },
2048
2141
  update: {
2049
2142
  sections: [
2050
2143
  {
2051
- id: 'dataSource'
2052
- }
2144
+ id: 'dataSource',
2145
+ },
2053
2146
  ],
2054
2147
  properties: [
2055
2148
  {
@@ -2058,10 +2151,10 @@ async function dataSourceEntityFactory(injector) {
2058
2151
  positions: {
2059
2152
  lg: {
2060
2153
  colSpan: 6,
2061
- order: 1
2062
- }
2063
- }
2064
- }
2154
+ order: 1,
2155
+ },
2156
+ },
2157
+ },
2065
2158
  },
2066
2159
  {
2067
2160
  name: 'title',
@@ -2069,10 +2162,10 @@ async function dataSourceEntityFactory(injector) {
2069
2162
  positions: {
2070
2163
  lg: {
2071
2164
  colSpan: 6,
2072
- order: 2
2073
- }
2074
- }
2075
- }
2165
+ order: 2,
2166
+ },
2167
+ },
2168
+ },
2076
2169
  },
2077
2170
  {
2078
2171
  name: 'columns',
@@ -2080,10 +2173,32 @@ async function dataSourceEntityFactory(injector) {
2080
2173
  positions: {
2081
2174
  lg: {
2082
2175
  colSpan: 12,
2083
- order: 3
2084
- }
2085
- }
2086
- }
2176
+ order: 5,
2177
+ },
2178
+ },
2179
+ },
2180
+ },
2181
+ {
2182
+ name: 'textField',
2183
+ layout: {
2184
+ positions: {
2185
+ lg: {
2186
+ colSpan: 6,
2187
+ order: 6,
2188
+ },
2189
+ },
2190
+ },
2191
+ },
2192
+ {
2193
+ name: 'valueField',
2194
+ layout: {
2195
+ positions: {
2196
+ lg: {
2197
+ colSpan: 6,
2198
+ order: 7,
2199
+ },
2200
+ },
2201
+ },
2087
2202
  },
2088
2203
  {
2089
2204
  name: 'samples',
@@ -2091,19 +2206,41 @@ async function dataSourceEntityFactory(injector) {
2091
2206
  positions: {
2092
2207
  lg: {
2093
2208
  colSpan: 12,
2094
- order: 4
2095
- }
2096
- }
2097
- }
2098
- }
2099
- ]
2209
+ order: 10,
2210
+ },
2211
+ },
2212
+ },
2213
+ },
2214
+ {
2215
+ name: 'sourceEntity',
2216
+ layout: {
2217
+ positions: {
2218
+ lg: {
2219
+ colSpan: 12,
2220
+ order: 4,
2221
+ },
2222
+ },
2223
+ },
2224
+ },
2225
+ {
2226
+ name: 'sourceStatic',
2227
+ layout: {
2228
+ positions: {
2229
+ lg: {
2230
+ colSpan: 12,
2231
+ order: 4,
2232
+ },
2233
+ },
2234
+ },
2235
+ },
2236
+ ],
2100
2237
  },
2101
2238
  single: {
2102
2239
  title: '{{title}}',
2103
2240
  sections: [
2104
2241
  {
2105
- id: 'dataSource'
2106
- }
2242
+ id: 'dataSource',
2243
+ },
2107
2244
  ],
2108
2245
  properties: [
2109
2246
  {
@@ -2112,10 +2249,10 @@ async function dataSourceEntityFactory(injector) {
2112
2249
  positions: {
2113
2250
  lg: {
2114
2251
  colSpan: 6,
2115
- order: 1
2116
- }
2117
- }
2118
- }
2252
+ order: 1,
2253
+ },
2254
+ },
2255
+ },
2119
2256
  },
2120
2257
  {
2121
2258
  name: 'title',
@@ -2123,10 +2260,10 @@ async function dataSourceEntityFactory(injector) {
2123
2260
  positions: {
2124
2261
  lg: {
2125
2262
  colSpan: 6,
2126
- order: 2
2127
- }
2128
- }
2129
- }
2263
+ order: 2,
2264
+ },
2265
+ },
2266
+ },
2130
2267
  },
2131
2268
  {
2132
2269
  name: 'columns',
@@ -2134,10 +2271,43 @@ async function dataSourceEntityFactory(injector) {
2134
2271
  positions: {
2135
2272
  lg: {
2136
2273
  colSpan: 12,
2137
- order: 3
2138
- }
2139
- }
2140
- }
2274
+ order: 3,
2275
+ },
2276
+ },
2277
+ },
2278
+ },
2279
+ {
2280
+ name: 'sourceType',
2281
+ layout: {
2282
+ positions: {
2283
+ lg: {
2284
+ colSpan: 6,
2285
+ order: 4,
2286
+ },
2287
+ },
2288
+ },
2289
+ },
2290
+ {
2291
+ name: 'sourceEntity',
2292
+ layout: {
2293
+ positions: {
2294
+ lg: {
2295
+ colSpan: 6,
2296
+ order: 5,
2297
+ },
2298
+ },
2299
+ },
2300
+ },
2301
+ {
2302
+ name: 'sourceStatic',
2303
+ layout: {
2304
+ positions: {
2305
+ lg: {
2306
+ colSpan: 6,
2307
+ order: 5,
2308
+ },
2309
+ },
2310
+ },
2141
2311
  },
2142
2312
  {
2143
2313
  name: 'samples',
@@ -2145,44 +2315,80 @@ async function dataSourceEntityFactory(injector) {
2145
2315
  positions: {
2146
2316
  lg: {
2147
2317
  colSpan: 12,
2148
- order: 4
2149
- }
2150
- }
2151
- }
2152
- }
2318
+ order: 10,
2319
+ },
2320
+ },
2321
+ },
2322
+ },
2323
+ {
2324
+ name: 'textField',
2325
+ layout: {
2326
+ positions: {
2327
+ lg: {
2328
+ colSpan: 6,
2329
+ order: 7,
2330
+ },
2331
+ },
2332
+ },
2333
+ },
2334
+ {
2335
+ name: 'valueField',
2336
+ layout: {
2337
+ positions: {
2338
+ lg: {
2339
+ colSpan: 6,
2340
+ order: 8,
2341
+ },
2342
+ },
2343
+ },
2344
+ },
2153
2345
  ],
2154
- actions: []
2346
+ actions: [],
2155
2347
  },
2156
2348
  list: {
2157
2349
  actions: [
2158
2350
  {
2159
2351
  title: `t("create", { scope: "common" })`,
2160
- command: 'create-entity',
2352
+ command: {
2353
+ name: 'create-entity',
2354
+ options: {
2355
+ layout: {
2356
+ size: 'lg',
2357
+ },
2358
+ },
2359
+ },
2161
2360
  priority: 'primary',
2162
2361
  type: 'create',
2163
- scope: AXPEntityCommandScope.TypeLevel
2362
+ scope: AXPEntityCommandScope.TypeLevel,
2164
2363
  },
2165
2364
  {
2166
2365
  title: 't("deleteItems", { scope: "common" })',
2167
2366
  command: 'delete-entity',
2168
2367
  priority: 'primary',
2169
2368
  type: 'delete',
2170
- scope: AXPEntityCommandScope.Selected
2369
+ scope: AXPEntityCommandScope.Selected,
2171
2370
  },
2172
2371
  {
2173
2372
  title: 't("detail", { scope: "common" })',
2174
2373
  command: 'open-entity',
2175
2374
  priority: 'primary',
2176
2375
  type: 'view',
2177
- scope: AXPEntityCommandScope.Individual
2376
+ scope: AXPEntityCommandScope.Individual,
2178
2377
  },
2179
2378
  {
2180
2379
  title: 't("delete", { scope: "common" })',
2181
2380
  command: 'delete-entity',
2182
2381
  priority: 'primary',
2183
2382
  type: 'delete',
2184
- scope: AXPEntityCommandScope.Individual
2185
- }
2383
+ scope: AXPEntityCommandScope.Individual,
2384
+ },
2385
+ {
2386
+ title: 't("modify", { scope: "common" })',
2387
+ command: 'quick-modify-entity',
2388
+ priority: 'secondary',
2389
+ type: 'update',
2390
+ scope: AXPEntityCommandScope.Individual,
2391
+ },
2186
2392
  ],
2187
2393
  views: [
2188
2394
  {
@@ -2191,12 +2397,12 @@ async function dataSourceEntityFactory(injector) {
2191
2397
  fixed: true,
2192
2398
  columns: [],
2193
2399
  conditions: [],
2194
- sorts: []
2195
- }
2196
- ]
2197
- }
2198
- }
2199
- }
2400
+ sorts: [],
2401
+ },
2402
+ ],
2403
+ },
2404
+ },
2405
+ },
2200
2406
  };
2201
2407
  return entityDef;
2202
2408
  }
@@ -2602,11 +2808,11 @@ class AXMPromotionSlotComponent {
2602
2808
  this.listData.set(mappedItems);
2603
2809
  }
2604
2810
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMPromotionSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2605
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMPromotionSlotComponent, isStandalone: true, selector: "acorex-platform-promotion-slot", ngImport: i0, template: "@for (item of listData(); track item.id) { @if (item.contentType?.name == 'media') {\n<img\n [src]=\"item.image?.url ?? ''\"\n class=\"ax-h-24 ax-m-1 ax-w-full ax-border ax-bg-primary {{\n item.shape?.name == 'circle' ? 'ax-rounded-full' : 'ax-rounded-none'\n }}\"\n/>\n} @if(item.contentType?.name == 'text'){\n<div class=\"ax-m-1 ax-px-6 ax-p-4 ax-border ax-bg-primary ax-rounded-lg\">\n <h1 class=\"ax-text-base/6\" [innerHTML]=\"item.body | safe : 'html'\"></h1>\n</div>\n\n} }\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: AXSafePipe, name: "safe" }] }); }
2811
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: AXMPromotionSlotComponent, isStandalone: true, selector: "acorex-platform-promotion-slot", ngImport: i0, template: "@for (item of listData(); track item.id) { @if (item.contentType?.name == 'media') {\n<img [src]=\"item.image?.url ?? ''\" class=\"ax-w-full ax-p-3 ax-border {{\n item.shape?.name == 'circle' ? 'ax-rounded-full' : 'ax-rounded-none'\n }}\" />\n} @if(item.contentType?.name == 'text'){\n<div class=\"ax-m-1 ax-px-6 ax-p-4 ax-border ax-bg-primary ax-rounded-lg\">\n <h1 class=\"ax-text-base/6\" [innerHTML]=\"item.body | safe : 'html'\"></h1>\n</div>\n\n} }", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: AXSafePipe, name: "safe" }] }); }
2606
2812
  }
2607
2813
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXMPromotionSlotComponent, decorators: [{
2608
2814
  type: Component,
2609
- args: [{ selector: 'acorex-platform-promotion-slot', imports: [CommonModule, AXSafePipe], template: "@for (item of listData(); track item.id) { @if (item.contentType?.name == 'media') {\n<img\n [src]=\"item.image?.url ?? ''\"\n class=\"ax-h-24 ax-m-1 ax-w-full ax-border ax-bg-primary {{\n item.shape?.name == 'circle' ? 'ax-rounded-full' : 'ax-rounded-none'\n }}\"\n/>\n} @if(item.contentType?.name == 'text'){\n<div class=\"ax-m-1 ax-px-6 ax-p-4 ax-border ax-bg-primary ax-rounded-lg\">\n <h1 class=\"ax-text-base/6\" [innerHTML]=\"item.body | safe : 'html'\"></h1>\n</div>\n\n} }\n" }]
2815
+ args: [{ selector: 'acorex-platform-promotion-slot', imports: [CommonModule, AXSafePipe], template: "@for (item of listData(); track item.id) { @if (item.contentType?.name == 'media') {\n<img [src]=\"item.image?.url ?? ''\" class=\"ax-w-full ax-p-3 ax-border {{\n item.shape?.name == 'circle' ? 'ax-rounded-full' : 'ax-rounded-none'\n }}\" />\n} @if(item.contentType?.name == 'text'){\n<div class=\"ax-m-1 ax-px-6 ax-p-4 ax-border ax-bg-primary ax-rounded-lg\">\n <h1 class=\"ax-text-base/6\" [innerHTML]=\"item.body | safe : 'html'\"></h1>\n</div>\n\n} }" }]
2610
2816
  }] });
2611
2817
 
2612
2818
  async function promotionEntityFactory(injector) {
@@ -3252,25 +3458,50 @@ class AXMMenuProvider {
3252
3458
  class AXMDynamicDataSourceProvider {
3253
3459
  constructor() {
3254
3460
  this.dataSourceService = inject(AXMDataSourceService);
3461
+ this.entityResolverService = inject(AXPEntityResolver);
3255
3462
  }
3256
3463
  async items() {
3257
- return (await this.dataSourceService.query({
3464
+ const dataSources = await this.dataSourceService.query({
3258
3465
  skip: 0,
3259
3466
  take: 1000,
3260
- })).items.map((item) => {
3467
+ });
3468
+ const mapFn = (item) => {
3261
3469
  return {
3262
3470
  ...item,
3263
- source: () => {
3264
- console.log(item);
3471
+ valueField: get(item, 'valueField.name'),
3472
+ textField: get(item, 'textField.name'),
3473
+ source: async () => {
3265
3474
  if (item.sourceType.name == 'static') {
3266
3475
  return convertArrayToDataSource(item.sourceStatic);
3267
3476
  }
3268
- else {
3269
- return convertArrayToDataSource([]);
3477
+ // Entity
3478
+ else if (item.sourceType.name == 'entity') {
3479
+ const [module, entityName] = item.sourceEntity.split('.');
3480
+ const entity = await this.entityResolverService.get(module, entityName);
3481
+ const exFn = entity?.queries.list?.execute;
3482
+ if (exFn && typeof exFn == 'function') {
3483
+ return new AXDataSource({
3484
+ key: 'id',
3485
+ pageSize: 10,
3486
+ load: async (e) => {
3487
+ try {
3488
+ const result = await exFn(e);
3489
+ return result;
3490
+ }
3491
+ catch (error) {
3492
+ throw error;
3493
+ }
3494
+ }
3495
+ });
3496
+ }
3270
3497
  }
3498
+ //
3499
+ return convertArrayToDataSource([]);
3271
3500
  },
3272
3501
  };
3273
- });
3502
+ };
3503
+ const mapped = dataSources.items.map((item) => mapFn(item));
3504
+ return mapped;
3274
3505
  }
3275
3506
  }
3276
3507
 
@@ -3465,5 +3696,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
3465
3696
  * Generated bundle index. Do not edit.
3466
3697
  */
3467
3698
 
3468
- export { AXMAppPromotionService, AXMAppTermService, AXMAppTermServiceImpl, AXMAppVersionService, AXMAppVersionServiceImpl, AXMAppVersionSlotComponent, AXMChangeLogPopupAction, AXMChangeLogUpdateSettingAction, AXMChangeLogWorkflow, AXMCommonModuleEntityProvider, AXMDataSourceService, AXMDataSourceServiceImpl, AXMGlobalVariablesService, AXMGlobalVariablesServiceImpl, AXMListTermsComponent, AXMNewTermWorkflow, AXMNotifyAppComponent, AXMNotifyNewTermPopupAction, AXMPlatformManagementModule, AXMPromotionServiceImpl, AXMPromotionSlotComponent, AXMTermUpdateSettingAction, AppTermAndVersionCheck, RootConfig, appTermEntityEntityFactory, appVersionEntityEntityFactory, dataSourceEntityFactory, globalVariableEntityFactory, promotionEntityFactory };
3699
+ export { AXMAppPromotionService, AXMAppTermService, AXMAppTermServiceImpl, AXMAppVersionService, AXMAppVersionServiceImpl, AXMAppVersionSlotComponent, AXMChangeLogPopupAction, AXMChangeLogUpdateSettingAction, AXMChangeLogWorkflow, AXMCommonModuleEntityProvider, AXMDataSourceService, AXMDataSourceServiceImpl, AXMGlobalVariablesService, AXMGlobalVariablesServiceImpl, AXMListTermsComponent, AXMNewTermWorkflow, AXMNotifyAppComponent, AXMNotifyNewTermPopupAction, AXMPlatformManagementModule, AXMPromotionServiceImpl, AXMPromotionSlotComponent, AXMTermUpdateSettingAction, AXPRegionalStoreService, AppTermAndVersionCheck, RootConfig, appTermEntityEntityFactory, appVersionEntityEntityFactory, dataSourceEntityFactory, globalVariableEntityFactory, promotionEntityFactory };
3469
3700
  //# sourceMappingURL=acorex-modules-platform-management.mjs.map