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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/auth/index.d.ts +97 -238
  2. package/common/index.d.ts +783 -213
  3. package/core/index.d.ts +311 -442
  4. package/fesm2022/acorex-platform-auth.mjs +156 -200
  5. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  6. package/fesm2022/acorex-platform-common.mjs +1038 -127
  7. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  8. package/fesm2022/acorex-platform-core.mjs +602 -413
  9. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  10. package/fesm2022/acorex-platform-domain.mjs +54 -11
  11. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  12. package/fesm2022/acorex-platform-layout-builder.mjs +412 -270
  13. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  14. package/fesm2022/acorex-platform-layout-components.mjs +2100 -3141
  15. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  16. package/fesm2022/acorex-platform-layout-designer.mjs +7 -7
  17. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  18. package/fesm2022/acorex-platform-layout-entity.mjs +730 -652
  19. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  20. package/fesm2022/acorex-platform-layout-views.mjs +4 -4
  21. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  22. package/fesm2022/acorex-platform-layout-widget-core.mjs +249 -205
  23. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  24. package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs → acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs} +2 -2
  25. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-CxrsI6Hn.mjs.map +1 -0
  26. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs} +2 -2
  27. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-Ck7-wpT2.mjs.map +1 -0
  28. package/fesm2022/acorex-platform-layout-widgets.mjs +3066 -1040
  29. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  30. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs → acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs} +26 -5
  31. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-VIGuU5M4.mjs.map +1 -0
  32. package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs → acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs} +4 -5
  33. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-DyDa_hyd.mjs.map +1 -0
  34. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs +101 -0
  35. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-Ua3ZA5hk.mjs.map +1 -0
  36. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs → acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs} +3 -3
  37. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-eMBby9k4.mjs.map +1 -0
  38. package/fesm2022/acorex-platform-themes-default.mjs +166 -30
  39. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  40. package/fesm2022/acorex-platform-themes-shared.mjs +27 -27
  41. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  42. package/fesm2022/acorex-platform-workflow.mjs +474 -1527
  43. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  44. package/layout/builder/index.d.ts +4 -1
  45. package/layout/components/index.d.ts +405 -327
  46. package/layout/designer/index.d.ts +3 -3
  47. package/layout/entity/index.d.ts +154 -108
  48. package/layout/widget-core/index.d.ts +39 -52
  49. package/layout/widgets/index.d.ts +368 -54
  50. package/package.json +9 -9
  51. package/themes/default/index.d.ts +15 -2
  52. package/themes/shared/index.d.ts +10 -10
  53. package/workflow/index.d.ts +182 -817
  54. package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs +0 -50
  55. package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs.map +0 -1
  56. package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs +0 -42
  57. package/fesm2022/acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs.map +0 -1
  58. package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs +0 -55
  59. package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs.map +0 -1
  60. package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs +0 -50
  61. package/fesm2022/acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs.map +0 -1
  62. package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs +0 -48
  63. package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs.map +0 -1
  64. package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs +0 -42
  65. package/fesm2022/acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs.map +0 -1
  66. package/fesm2022/acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs.map +0 -1
  67. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs.map +0 -1
  68. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs.map +0 -1
  69. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs.map +0 -1
  70. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs +0 -101
  71. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs.map +0 -1
  72. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs.map +0 -1
@@ -4,23 +4,15 @@ import { kebabCase, merge, sortBy, cloneDeep, get, omit } from 'lodash-es';
4
4
  import { Router, ROUTES, RouterModule } from '@angular/router';
5
5
  import { AXPSessionService, AXPSessionStatus } from '@acorex/platform/auth';
6
6
  import { Subject, distinctUntilChanged, merge as merge$1 } from 'rxjs';
7
- import * as i1$1 from '@acorex/platform/core';
8
- import { AXPPlatformScope, AXPBroadcastEventService, objectKeyValueTransforms, AXPComponentLogoConfig, AXPImageUrlLogoConfig, AXPSystemActionType, AXPAppStartUpProvider, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER } from '@acorex/platform/core';
7
+ import { AXPPlatformScope, AXPBroadcastEventService, objectKeyValueTransforms, AXPSystemActionType, AXPModuleManifestModule, AXPAppStartUpProvider, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXPModuleManifestRegistry } from '@acorex/platform/core';
9
8
  import { AXTranslationService } from '@acorex/core/translation';
10
9
  import { AXPWidgetsCatalog } from '@acorex/platform/layout/widget-core';
11
10
  import { AXPopupModule, AXPopupService } from '@acorex/components/popup';
12
11
  import { AXToastService, AXToastModule } from '@acorex/components/toast';
13
12
  import { AXDateTimeModule } from '@acorex/core/date-time';
14
- import * as i3 from '@acorex/platform/workflow';
13
+ import * as i1 from '@acorex/platform/workflow';
15
14
  import { AXPWorkflowService, createWorkFlowEvent, AXPWorkflowAction, AXPWorkflowError, AXPWorkflowModule } from '@acorex/platform/workflow';
16
- import * as i4 from '@acorex/components/decorators';
17
- import { AXDecoratorModule } from '@acorex/components/decorators';
18
- import * as i2 from '@acorex/components/image';
19
- import { AXImageModule } from '@acorex/components/image';
20
- import { AXPlatform } from '@acorex/core/platform';
21
- import * as i1 from '@angular/common';
22
- import { CommonModule } from '@angular/common';
23
- import { AXPCommandExecutor } from '@acorex/platform/runtime';
15
+ import { AXPCommandExecutor, AXPCommandService } from '@acorex/platform/runtime';
24
16
  import { signalStore, withState, withMethods, patchState, withHooks } from '@ngrx/signals';
25
17
  import { AXFormatService } from '@acorex/core/format';
26
18
  import { AXDialogService } from '@acorex/components/dialog';
@@ -29,13 +21,15 @@ import { AXButtonModule } from '@acorex/components/button';
29
21
  import { AXCheckBoxModule } from '@acorex/components/check-box';
30
22
  import * as i6 from '@acorex/components/color-box';
31
23
  import { AXColorBoxModule } from '@acorex/components/color-box';
32
- import * as i3$1 from '@acorex/components/label';
24
+ import * as i4 from '@acorex/components/decorators';
25
+ import { AXDecoratorModule } from '@acorex/components/decorators';
26
+ import * as i3 from '@acorex/components/label';
33
27
  import { AXLabelModule } from '@acorex/components/label';
34
- import * as i2$1 from '@acorex/components/number-box';
28
+ import * as i2 from '@acorex/components/number-box';
35
29
  import { AXNumberBoxModule } from '@acorex/components/number-box';
36
30
  import { AXBasePageComponent } from '@acorex/components/page';
37
31
  import { AXTextBoxModule } from '@acorex/components/text-box';
38
- import * as i1$2 from '@angular/forms';
32
+ import * as i1$1 from '@angular/forms';
39
33
  import { FormsModule } from '@angular/forms';
40
34
 
41
35
  const AXP_APP_VERSION_PROVIDER = new InjectionToken('AXP_APP_VERSION_PROVIDER', {
@@ -133,24 +127,24 @@ function createAllQueryView(params = {
133
127
  });
134
128
  }
135
129
 
136
- const EQ_OPER = { name: 'equal', title: 'Equal', hasValue: true };
137
- const NOT_EQ_OPER = { name: 'notEqual', title: 'Not Equal', hasValue: true };
138
- const GT_OPER = { name: 'greaterThan', title: 'Greater Than', hasValue: true };
139
- const LT_OPER = { name: 'lessThan', title: 'Less Than', hasValue: true };
130
+ const EQ_OPER = { name: 'equal', title: '@general:terms.operators.equal', hasValue: true };
131
+ const NOT_EQ_OPER = { name: 'notEqual', title: '@general:terms.operators.not-equal', hasValue: true };
132
+ const GT_OPER = { name: 'greaterThan', title: '@general:terms.operators.greater-than', hasValue: true };
133
+ const LT_OPER = { name: 'lessThan', title: '@general:terms.operators.less-than', hasValue: true };
140
134
  const GTE_OPER = {
141
135
  name: 'greaterThanOrEqual',
142
- title: 'Greater Than or Equal',
136
+ title: '@general:terms.operators.greater-than-or-equal',
143
137
  hasValue: true,
144
138
  };
145
- const LTE_OPER = { name: 'lessThanOrEqual', title: 'Less Than or Equal', hasValue: true };
146
- const CONTAINS_OPER = { name: 'contains', title: 'Contains', hasValue: true };
147
- const NOT_CONTAINS_OPER = { name: 'notContains', title: 'Does Not Contain', hasValue: true };
148
- const IN_OPER = { name: 'in', title: 'In', hasValue: true };
149
- const STARTS_WITH_OPER = { name: 'startsWith', title: 'Starts With', hasValue: true };
150
- const ENDS_WITH_OPER = { name: 'endsWith', title: 'Ends With', hasValue: true };
151
- const IS_EMPTY_OPER = { name: 'isEmpty', title: 'Is Empty', hasValue: false };
152
- const IS_NOT_EMPTY_OPER = { name: 'isNotEmpty', title: 'Is Not Empty', hasValue: false };
153
- const BETWEEN_OPER = { name: 'between', title: 'Between', hasValue: true };
139
+ const LTE_OPER = { name: 'lessThanOrEqual', title: '@general:terms.operators.less-than-or-equal', hasValue: true };
140
+ const CONTAINS_OPER = { name: 'contains', title: '@general:terms.operators.contains', hasValue: true };
141
+ const NOT_CONTAINS_OPER = { name: 'notContains', title: '@general:terms.operators.not-contains', hasValue: true };
142
+ const IN_OPER = { name: 'in', title: '@general:terms.operators.in', hasValue: true };
143
+ const STARTS_WITH_OPER = { name: 'startsWith', title: '@general:terms.operators.starts-with', hasValue: true };
144
+ const ENDS_WITH_OPER = { name: 'endsWith', title: '@general:terms.operators.ends-with', hasValue: true };
145
+ const IS_EMPTY_OPER = { name: 'isEmpty', title: '@general:terms.operators.is-empty', hasValue: false };
146
+ const IS_NOT_EMPTY_OPER = { name: 'isNotEmpty', title: '@general:terms.operators.is-not-empty', hasValue: false };
147
+ const BETWEEN_OPER = { name: 'between', title: '@general:terms.operators.between', hasValue: true };
154
148
  const STRING_OPERATORS = [
155
149
  EQ_OPER,
156
150
  NOT_EQ_OPER,
@@ -334,6 +328,7 @@ class AXPSettingDefinitionProviderService {
334
328
  return;
335
329
  }
336
330
  const context = new AXPSettingDefinitionProviderContext();
331
+ // Load providers from DI tokens
337
332
  if (Array.isArray(this.providers)) {
338
333
  for (const provider of this.providers) {
339
334
  if (provider instanceof Promise) {
@@ -556,7 +551,7 @@ class AXPSettingValueProviderDefault {
556
551
  }
557
552
  }
558
553
 
559
- class AXPSettingService {
554
+ class AXPSettingsService {
560
555
  constructor() {
561
556
  this.providers = inject(AXP_SETTING_VALUE_PROVIDER);
562
557
  this.injector = inject(Injector);
@@ -676,10 +671,10 @@ class AXPSettingService {
676
671
  this.onChanged.next(event);
677
672
  this.eventService.publish('AXPSettingChangedEvent', event);
678
673
  }
679
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPSettingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
680
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPSettingService, providedIn: 'root' }); }
674
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPSettingsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
675
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPSettingsService, providedIn: 'root' }); }
681
676
  }
682
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPSettingService, decorators: [{
677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPSettingsService, decorators: [{
683
678
  type: Injectable,
684
679
  args: [{
685
680
  providedIn: 'root',
@@ -735,9 +730,38 @@ class ScopedSettingService {
735
730
  }
736
731
  }
737
732
 
733
+ /**
734
+ * Regional settings keys for date, time, and locale formatting.
735
+ * These keys are used by platform widgets and components to access regional settings.
736
+ * The actual setting definitions and providers are implemented in the locale-management module.
737
+ */
738
+ var AXPRegionalSetting;
739
+ (function (AXPRegionalSetting) {
740
+ AXPRegionalSetting["LocaleProfile"] = "LocaleManagement:Setting:Regional.LocaleProfile";
741
+ AXPRegionalSetting["TimeZone"] = "LocaleManagement:Setting:Regional.TimeZone";
742
+ AXPRegionalSetting["Language"] = "LocaleManagement:Setting:Regional.Language";
743
+ AXPRegionalSetting["Country"] = "LocaleManagement:Setting:Regional.Country";
744
+ AXPRegionalSetting["Calendar"] = "LocaleManagement:Setting:Regional.Calendar";
745
+ AXPRegionalSetting["FirstDayOfWeek"] = "LocaleManagement:Setting:Regional.FirstDayOfWeek";
746
+ AXPRegionalSetting["WeekendDays"] = "LocaleManagement:Setting:Regional.WeekendDays";
747
+ AXPRegionalSetting["ShortDate"] = "LocaleManagement:Setting:Regional.ShortDate";
748
+ AXPRegionalSetting["MediumDate"] = "LocaleManagement:Setting:Regional.MediumDate";
749
+ AXPRegionalSetting["LongDate"] = "LocaleManagement:Setting:Regional.LongDate";
750
+ AXPRegionalSetting["ShortTime"] = "LocaleManagement:Setting:Regional.ShortTime";
751
+ AXPRegionalSetting["MediumTime"] = "LocaleManagement:Setting:Regional.MediumTime";
752
+ AXPRegionalSetting["LongTime"] = "LocaleManagement:Setting:Regional.LongTime";
753
+ AXPRegionalSetting["MeasurementUnits"] = "LocaleManagement:Setting:Regional.MeasurementUnits";
754
+ AXPRegionalSetting["TemperatureUnits"] = "LocaleManagement:Setting:Regional.TemperatureUnits";
755
+ AXPRegionalSetting["DistanceUnits"] = "LocaleManagement:Setting:Regional.DistanceUnits";
756
+ AXPRegionalSetting["WeightUnits"] = "LocaleManagement:Setting:Regional.WeightUnits";
757
+ AXPRegionalSetting["VolumeUnits"] = "LocaleManagement:Setting:Regional.VolumeUnits";
758
+ AXPRegionalSetting["SpeedUnits"] = "LocaleManagement:Setting:Regional.SpeedUnits";
759
+ AXPRegionalSetting["AreaUnits"] = "LocaleManagement:Setting:Regional.AreaUnits";
760
+ })(AXPRegionalSetting || (AXPRegionalSetting = {}));
761
+
738
762
  var AXPHomePageSettings;
739
763
  (function (AXPHomePageSettings) {
740
- AXPHomePageSettings["UserHomePath"] = "general:startup:home-page";
764
+ AXPHomePageSettings["UserHomePath"] = "Common:Setting:Startup.HomePage";
741
765
  })(AXPHomePageSettings || (AXPHomePageSettings = {}));
742
766
 
743
767
  class AXPHomePageService {
@@ -748,7 +772,7 @@ class AXPHomePageService {
748
772
  this.defaultHomePageKey = inject(AXP_HOME_PAGE_DEFAULT_KEY, { optional: true }) ?? 'home';
749
773
  this.userHomePageKey = null;
750
774
  this.candidates = inject(AXP_HOME_PAGES, { optional: true }) ?? [];
751
- this.settingsService = inject(AXPSettingService);
775
+ this.settingsService = inject(AXPSettingsService);
752
776
  this.sessionService = inject(AXPSessionService);
753
777
  this.injector = inject(Injector);
754
778
  this.originalConfig = null;
@@ -1081,43 +1105,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1081
1105
  args: [{ providedIn: 'root' }]
1082
1106
  }], ctorParameters: () => [{ type: i0.Injector }, { type: AXPErrorHandlerRegistryService }] });
1083
1107
 
1084
- const AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER = new InjectionToken('AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER', {
1108
+ const AXP_TOKEN_DEFINITION_PROVIDER = new InjectionToken('AXP_TOKEN_DEFINITION_PROVIDER', {
1085
1109
  factory: () => [],
1086
1110
  });
1087
1111
 
1088
1112
  //#region ---- Imports ----
1089
1113
  //#endregion
1090
- class AXPGlobalVariableDefinitionService {
1114
+ class AXPTokenDefinitionService {
1091
1115
  constructor() {
1092
1116
  //#region ---- Providers & Caches ----
1093
- this.definitionProviders = inject(AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER, { optional: true }) || [];
1117
+ this.definitionProviders = inject(AXP_TOKEN_DEFINITION_PROVIDER, { optional: true }) || [];
1094
1118
  /** Cache for definitions by name. */
1095
1119
  this.definitionsByName = new Map();
1096
1120
  }
1097
1121
  //#endregion
1098
1122
  //#region ---- Public API ----
1099
1123
  /**
1100
- * Returns a report definition by its id.
1124
+ * Returns a token definition by its name.
1101
1125
  * First checks the cache, then queries all providers if not found.
1102
- * @param name The global variable name.
1103
- * @returns The global variable definition if found, undefined otherwise.
1126
+ * @param name The token name.
1127
+ * @returns The token definition if found, undefined otherwise.
1104
1128
  */
1105
- async getByName(name) {
1129
+ async getDefinition(name) {
1106
1130
  // Check cache first
1107
1131
  if (this.definitionsByName.has(name)) {
1108
1132
  return this.definitionsByName.get(name);
1109
1133
  }
1110
- // Not in cache, query providers (each provider is itself a global variable definition)
1134
+ // Not in cache, query providers
1135
+ // Resolve all providers (some may be promises, some may be arrays)
1111
1136
  const resolvedProviders = await Promise.all(this.definitionProviders);
1112
- const match = resolvedProviders.find(def => def?.name === name);
1137
+ // Flatten the array - some providers may be arrays of providers (e.g., dynamic token providers)
1138
+ const flattenedProviders = [];
1139
+ for (const provider of resolvedProviders) {
1140
+ if (Array.isArray(provider)) {
1141
+ // If provider is an array, add all items
1142
+ flattenedProviders.push(...provider);
1143
+ }
1144
+ else if (provider) {
1145
+ // If provider is a single provider, add it
1146
+ flattenedProviders.push(provider);
1147
+ }
1148
+ }
1149
+ const match = flattenedProviders.find(def => def?.name === name);
1113
1150
  if (match) {
1114
1151
  this.definitionsByName.set(name, match);
1115
1152
  return match;
1116
1153
  }
1117
1154
  return undefined;
1118
1155
  }
1119
- async execute(name) {
1120
- const definition = await this.getByName(name);
1156
+ /**
1157
+ * Gets the resolved value of a token by its name.
1158
+ * @param name The token name.
1159
+ * @returns The resolved token value, or undefined if the token is not found.
1160
+ */
1161
+ async getValue(name) {
1162
+ const definition = await this.getDefinition(name);
1121
1163
  if (definition) {
1122
1164
  return await definition.execute();
1123
1165
  }
@@ -1129,24 +1171,24 @@ class AXPGlobalVariableDefinitionService {
1129
1171
  clearDefinitionsCache() {
1130
1172
  this.definitionsByName.clear();
1131
1173
  }
1132
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGlobalVariableDefinitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1133
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGlobalVariableDefinitionService, providedIn: 'root' }); }
1174
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTokenDefinitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1175
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTokenDefinitionService, providedIn: 'root' }); }
1134
1176
  }
1135
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPGlobalVariableDefinitionService, decorators: [{
1177
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPTokenDefinitionService, decorators: [{
1136
1178
  type: Injectable,
1137
1179
  args: [{
1138
1180
  providedIn: 'root',
1139
1181
  }]
1140
1182
  }] });
1141
1183
 
1142
- class AXPGlobalVariableEvaluatorScopeProvider {
1184
+ class AXPTokenEvaluatorScopeProvider {
1143
1185
  constructor() {
1144
- this.globalVariableService = inject(AXPGlobalVariableDefinitionService);
1186
+ this.tokenService = inject(AXPTokenDefinitionService);
1145
1187
  }
1146
1188
  async provide(context) {
1147
- context.addScope('variables', {
1148
- execute: async (name) => {
1149
- return await this.globalVariableService.execute(name);
1189
+ context.addScope('tokens', {
1190
+ get: async (name) => {
1191
+ return await this.tokenService.getValue(name);
1150
1192
  }
1151
1193
  });
1152
1194
  }
@@ -1256,46 +1298,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1256
1298
  type: Input
1257
1299
  }] } });
1258
1300
 
1259
- class AXPLogoComponent {
1260
- constructor() {
1261
- this.platform = inject(AXPlatform);
1262
- }
1263
- ngOnInit() {
1264
- this.setLogoType();
1265
- this.platform.themeMode$.subscribe(() => {
1266
- this.setLogoTheme();
1267
- });
1268
- }
1269
- ngOnChanges() {
1270
- this.setLogoTheme();
1271
- }
1272
- setLogoType() {
1273
- switch (true) {
1274
- case this.source instanceof AXPImageUrlLogoConfig:
1275
- this.logoType = 'url';
1276
- break;
1277
- case this.source instanceof AXPComponentLogoConfig:
1278
- this.logoType = 'component';
1279
- break;
1280
- default:
1281
- break;
1282
- }
1283
- }
1284
- setLogoTheme() {
1285
- if (this.source && this.source.dark && this.source.light) {
1286
- this.source = this.platform.isDark() ? this.source.dark : this.source.light;
1287
- }
1288
- }
1289
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLogoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1290
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: AXPLogoComponent, isStandalone: true, selector: "axp-logo", inputs: { source: "source" }, host: { classAttribute: "ax-flex ax-justify-center" }, usesOnChanges: true, ngImport: i0, template: "@switch (logoType) { @case ('url') {\n<ax-image [width]=\"source.width\" [height]=\"source.height\" [src]=\"source.url\"></ax-image>\n} @case ('component') {\n<ng-container *ngComponentOutlet=\"source.component\"></ng-container>\n} }\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: AXImageModule }, { kind: "component", type: i2.AXImageComponent, selector: "ax-image", inputs: ["width", "height", "overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "ngmodule", type: AXDecoratorModule }] }); }
1291
- }
1292
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPLogoComponent, decorators: [{
1293
- type: Component,
1294
- args: [{ selector: 'axp-logo', imports: [CommonModule, AXImageModule, AXDecoratorModule], host: { class: 'ax-flex ax-justify-center' }, template: "@switch (logoType) { @case ('url') {\n<ax-image [width]=\"source.width\" [height]=\"source.height\" [src]=\"source.url\"></ax-image>\n} @case ('component') {\n<ng-container *ngComponentOutlet=\"source.component\"></ng-container>\n} }\n" }]
1295
- }], propDecorators: { source: [{
1296
- type: Input
1297
- }] } });
1298
-
1299
1301
  //#region ---- Menu Context Builder ----
1300
1302
  /**
1301
1303
  * Creates a rich context for menu manipulation
@@ -1627,6 +1629,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
1627
1629
  }] });
1628
1630
 
1629
1631
  const AXP_MENU_PROVIDER = new InjectionToken('AXP_MENU_PROVIDER');
1632
+ //TODO: check performance of this service
1630
1633
  class AXPMenuProviderService {
1631
1634
  constructor() {
1632
1635
  //#region ---- Dependencies ----
@@ -1658,9 +1661,18 @@ class AXPMenuProviderService {
1658
1661
  }
1659
1662
  const items = [];
1660
1663
  const context = this.createMenuProviderContext(items);
1664
+ // Load providers from DI tokens
1661
1665
  if (Array.isArray(this.providers)) {
1662
1666
  for (const provider of this.providers) {
1663
- await provider.provide(context);
1667
+ if (provider instanceof Promise) {
1668
+ // If provider is a promise, resolve it
1669
+ const resolvedProvider = await provider;
1670
+ await resolvedProvider.provide(context);
1671
+ }
1672
+ else {
1673
+ // If provider is a direct instance, use it directly
1674
+ await provider.provide(context);
1675
+ }
1664
1676
  }
1665
1677
  }
1666
1678
  // Apply pending operations
@@ -1682,9 +1694,18 @@ class AXPMenuProviderService {
1682
1694
  async rawItems() {
1683
1695
  const items = [];
1684
1696
  const context = this.createMenuProviderContext(items);
1697
+ // Load providers from DI tokens
1685
1698
  if (Array.isArray(this.providers)) {
1686
1699
  for (const provider of this.providers) {
1687
- await provider.provide(context);
1700
+ if (provider instanceof Promise) {
1701
+ // If provider is a promise, resolve it
1702
+ const resolvedProvider = await provider;
1703
+ await resolvedProvider.provide(context);
1704
+ }
1705
+ else {
1706
+ // If provider is a direct instance, use it directly
1707
+ await provider.provide(context);
1708
+ }
1688
1709
  }
1689
1710
  }
1690
1711
  // Apply pending operations
@@ -1732,10 +1753,29 @@ class AXPMenuProviderService {
1732
1753
  createMenuProviderContext(items) {
1733
1754
  return {
1734
1755
  addItems: (newItems) => {
1735
- items.push(...newItems);
1756
+ for (const newItem of newItems) {
1757
+ if (newItem.name) {
1758
+ const existingItem = this.findItemByName(items, newItem.name);
1759
+ if (existingItem) {
1760
+ // Update existing item, merging properties
1761
+ this.mergeMenuItem(existingItem, newItem);
1762
+ }
1763
+ else {
1764
+ // Add new item if it doesn't exist
1765
+ items.push(newItem);
1766
+ }
1767
+ }
1768
+ else {
1769
+ // Add item without name (no way to check for duplicates)
1770
+ items.push(newItem);
1771
+ }
1772
+ }
1736
1773
  },
1737
1774
  find: (target) => {
1775
+ const foundItemInfo = this.findItemWithParent(items, target);
1776
+ const exists = foundItemInfo.foundItem !== null;
1738
1777
  return {
1778
+ exists,
1739
1779
  insert: (newItems, position) => {
1740
1780
  this.pendingInserts.push({ target, newItems, position });
1741
1781
  },
@@ -1761,13 +1801,48 @@ class AXPMenuProviderService {
1761
1801
  items.push(...newItems);
1762
1802
  }
1763
1803
  else {
1764
- if (position == 'inside') {
1765
- foundItem.children?.push(...newItems);
1804
+ if (position === 'inside') {
1805
+ if (!foundItem.children) {
1806
+ foundItem.children = [];
1807
+ }
1808
+ // Check for duplicates by name and merge or add
1809
+ for (const newItem of newItems) {
1810
+ if (newItem.name) {
1811
+ const existingChild = this.findItemByName(foundItem.children, newItem.name);
1812
+ if (existingChild) {
1813
+ this.mergeMenuItem(existingChild, newItem);
1814
+ }
1815
+ else {
1816
+ foundItem.children.push(newItem);
1817
+ }
1818
+ }
1819
+ else {
1820
+ foundItem.children.push(newItem);
1821
+ }
1822
+ }
1766
1823
  }
1767
1824
  else {
1768
- const index = parentItems.indexOf(foundItem);
1769
- const insertPosition = position === 'before' ? index : index + 1;
1770
- parentItems.splice(insertPosition, 0, ...newItems);
1825
+ // For 'before' and 'after', check for duplicates in parent items
1826
+ const itemsToInsert = [];
1827
+ for (const newItem of newItems) {
1828
+ if (newItem.name) {
1829
+ const existingItem = this.findItemByName(parentItems, newItem.name);
1830
+ if (existingItem) {
1831
+ this.mergeMenuItem(existingItem, newItem);
1832
+ }
1833
+ else {
1834
+ itemsToInsert.push(newItem);
1835
+ }
1836
+ }
1837
+ else {
1838
+ itemsToInsert.push(newItem);
1839
+ }
1840
+ }
1841
+ if (itemsToInsert.length > 0) {
1842
+ const index = parentItems.indexOf(foundItem);
1843
+ const insertPosition = position === 'before' ? index : index + 1;
1844
+ parentItems.splice(insertPosition, 0, ...itemsToInsert);
1845
+ }
1771
1846
  }
1772
1847
  }
1773
1848
  }
@@ -1802,7 +1877,21 @@ class AXPMenuProviderService {
1802
1877
  if (!foundItem.children) {
1803
1878
  foundItem.children = [];
1804
1879
  }
1805
- foundItem.children.push(...newItems);
1880
+ // Check for duplicates by name and merge or add
1881
+ for (const newItem of newItems) {
1882
+ if (newItem.name) {
1883
+ const existingChild = this.findItemByName(foundItem.children, newItem.name);
1884
+ if (existingChild) {
1885
+ this.mergeMenuItem(existingChild, newItem);
1886
+ }
1887
+ else {
1888
+ foundItem.children.push(newItem);
1889
+ }
1890
+ }
1891
+ else {
1892
+ foundItem.children.push(newItem);
1893
+ }
1894
+ }
1806
1895
  }
1807
1896
  }
1808
1897
  // Clear pending operations after applying them
@@ -1825,6 +1914,70 @@ class AXPMenuProviderService {
1825
1914
  }
1826
1915
  return { foundItem: null, parentItems: items };
1827
1916
  }
1917
+ /**
1918
+ * Find menu item by name in the items tree (recursive search)
1919
+ */
1920
+ findItemByName(items, name) {
1921
+ for (const item of items) {
1922
+ if (item.name === name) {
1923
+ return item;
1924
+ }
1925
+ if (item.children) {
1926
+ const found = this.findItemByName(item.children, name);
1927
+ if (found) {
1928
+ return found;
1929
+ }
1930
+ }
1931
+ }
1932
+ return null;
1933
+ }
1934
+ /**
1935
+ * Merge new item properties into existing item, handling children merge
1936
+ */
1937
+ mergeMenuItem(existingItem, newItem) {
1938
+ // Merge top-level properties (newItem properties override existing only if defined)
1939
+ if (newItem.text !== undefined)
1940
+ existingItem.text = newItem.text;
1941
+ if (newItem.description !== undefined)
1942
+ existingItem.description = newItem.description;
1943
+ if (newItem.icon !== undefined)
1944
+ existingItem.icon = newItem.icon;
1945
+ if (newItem.path !== undefined)
1946
+ existingItem.path = newItem.path;
1947
+ if (newItem.priority !== undefined)
1948
+ existingItem.priority = newItem.priority;
1949
+ if (newItem.type !== undefined)
1950
+ existingItem.type = newItem.type;
1951
+ if (newItem.command !== undefined)
1952
+ existingItem.command = newItem.command;
1953
+ if (newItem.badgeKey !== undefined)
1954
+ existingItem.badgeKey = newItem.badgeKey;
1955
+ if (newItem.data !== undefined)
1956
+ existingItem.data = newItem.data;
1957
+ if (newItem.policy !== undefined)
1958
+ existingItem.policy = newItem.policy;
1959
+ // Merge children if both have children
1960
+ if (newItem.children && newItem.children.length > 0) {
1961
+ if (!existingItem.children) {
1962
+ existingItem.children = [];
1963
+ }
1964
+ // For each child in newItem, check if it exists by name and merge or add
1965
+ for (const newChild of newItem.children) {
1966
+ if (newChild.name) {
1967
+ const existingChild = this.findItemByName(existingItem.children, newChild.name);
1968
+ if (existingChild) {
1969
+ this.mergeMenuItem(existingChild, newChild);
1970
+ }
1971
+ else {
1972
+ existingItem.children.push(newChild);
1973
+ }
1974
+ }
1975
+ else {
1976
+ existingItem.children.push(newChild);
1977
+ }
1978
+ }
1979
+ }
1980
+ }
1828
1981
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMenuProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1829
1982
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMenuProviderService, providedIn: 'root' }); }
1830
1983
  }
@@ -2051,6 +2204,105 @@ withMethods((store, router = inject(Router), workflow = inject(AXPWorkflowServic
2051
2204
  };
2052
2205
  }));
2053
2206
 
2207
+ /**
2208
+ * Service for checking menu item visibility based on permissions, features, and children.
2209
+ * This service helps filter out empty menu items that have no visible children.
2210
+ */
2211
+ class AXPMenuVisibilityService {
2212
+ constructor() {
2213
+ this.sessionService = inject(AXPSessionService);
2214
+ }
2215
+ /**
2216
+ * Checks if a menu item should be visible based on permissions and features.
2217
+ */
2218
+ isItemVisible(item) {
2219
+ const policy = item.policy;
2220
+ if (!policy) {
2221
+ return true; // No policy means visible
2222
+ }
2223
+ // Check features
2224
+ if (policy.features && policy.features.length > 0) {
2225
+ const featureKeys = Array.isArray(policy.features) ? policy.features : [policy.features];
2226
+ if (!this.sessionService.isFeatureEnabled(...featureKeys)) {
2227
+ return false;
2228
+ }
2229
+ }
2230
+ // Check permissions
2231
+ if (policy.permissions && policy.permissions.length > 0) {
2232
+ const permissionKeys = Array.isArray(policy.permissions) ? policy.permissions : [policy.permissions];
2233
+ if (!this.sessionService.authorize(...permissionKeys)) {
2234
+ return false;
2235
+ }
2236
+ }
2237
+ return true;
2238
+ }
2239
+ /**
2240
+ * Recursively checks if a menu item has any visible children.
2241
+ * @param item The menu item to check
2242
+ * @param getRouterLink Optional function to check if an item has a router link
2243
+ */
2244
+ hasVisibleChildren(item, getRouterLink) {
2245
+ if (!item.children || item.children.length === 0) {
2246
+ return false;
2247
+ }
2248
+ return item.children.some((child) => {
2249
+ // Check if child itself is visible
2250
+ if (!this.isItemVisible(child)) {
2251
+ return false;
2252
+ }
2253
+ // If child has a routerLink, it's visible
2254
+ if (getRouterLink && getRouterLink(child)) {
2255
+ return true;
2256
+ }
2257
+ // If child has visible children, it's visible
2258
+ if (this.hasVisibleChildren(child, getRouterLink)) {
2259
+ return true;
2260
+ }
2261
+ // For items without routerLink, check if they have a command (non-empty menu items)
2262
+ if (child.command) {
2263
+ return true;
2264
+ }
2265
+ return false;
2266
+ });
2267
+ }
2268
+ /**
2269
+ * Determines if a menu item should be rendered.
2270
+ * A menu item should be rendered if:
2271
+ * 1. It has a routerLink, OR
2272
+ * 2. It has visible children, OR
2273
+ * 3. It has a command (for non-router navigation)
2274
+ *
2275
+ * @param item The menu item to check
2276
+ * @param getRouterLink Optional function to check if an item has a router link
2277
+ */
2278
+ shouldRenderMenuItem(item, getRouterLink) {
2279
+ // Check if item itself is visible (permissions/features)
2280
+ if (!this.isItemVisible(item)) {
2281
+ return false;
2282
+ }
2283
+ // If it has a routerLink, render it
2284
+ if (getRouterLink && getRouterLink(item)) {
2285
+ return true;
2286
+ }
2287
+ // If it has visible children, render it
2288
+ if (this.hasVisibleChildren(item, getRouterLink)) {
2289
+ return true;
2290
+ }
2291
+ // If it has a command (for non-router navigation), render it
2292
+ if (item.command) {
2293
+ return true;
2294
+ }
2295
+ // Otherwise, don't render empty menu items
2296
+ return false;
2297
+ }
2298
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMenuVisibilityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2299
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMenuVisibilityService, providedIn: 'root' }); }
2300
+ }
2301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPMenuVisibilityService, decorators: [{
2302
+ type: Injectable,
2303
+ args: [{ providedIn: 'root' }]
2304
+ }] });
2305
+
2054
2306
  class AXPMenuSearchDefinitionProvider {
2055
2307
  async provide(context) {
2056
2308
  context.addDefinition('menu', 'Menu', 'menu', 'fa-thin fa-bars', 2, {
@@ -2252,11 +2504,14 @@ class AXPSearchDefinitionProviderService {
2252
2504
  return;
2253
2505
  }
2254
2506
  const context = new AXPSearchDefinitionProviderContext();
2507
+ // Load providers from DI tokens (backward compatibility)
2255
2508
  if (Array.isArray(this.providers)) {
2256
2509
  for (const provider of this.providers) {
2257
2510
  await provider.provide(context);
2258
2511
  }
2259
2512
  }
2513
+ // Note: Search definition providers are different from search command providers
2514
+ // Search command providers are handled separately in search.service.ts
2260
2515
  this.cache = context.getDefinitions();
2261
2516
  }
2262
2517
  async getListAsync() {
@@ -2312,11 +2567,20 @@ class AXPSearchService {
2312
2567
  if (this.definitionService.getList().length == 0) {
2313
2568
  await this.definitionService.getListAsync();
2314
2569
  }
2315
- if (!this.providers || (this.providers?.length || 0) === 0) {
2316
- throw new Error('No search providers available'); // No providers available
2570
+ // Collect providers from DI tokens
2571
+ const allProviders = [];
2572
+ // Load from DI tokens
2573
+ if (Array.isArray(this.providers)) {
2574
+ allProviders.push(...this.providers);
2575
+ }
2576
+ else if (this.providers) {
2577
+ allProviders.push(this.providers);
2578
+ }
2579
+ if (allProviders.length === 0) {
2580
+ throw new Error('No search providers available');
2317
2581
  }
2318
2582
  const mergeData = [];
2319
- const promises = this.providers.map((provider) => provider.search(text));
2583
+ const promises = allProviders.map((provider) => provider.search(text));
2320
2584
  const results = await Promise.all(promises);
2321
2585
  for (const resultArray of results) {
2322
2586
  for (const result of resultArray) {
@@ -2382,8 +2646,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2382
2646
 
2383
2647
  var AXPCommonSettings;
2384
2648
  (function (AXPCommonSettings) {
2385
- AXPCommonSettings["EnableOperationToasts"] = "general:notifications:enable-operation-toasts";
2386
- AXPCommonSettings["EntityFilterApplyMode"] = "general:entity:filter-apply-mode";
2649
+ AXPCommonSettings["EnableOperationToasts"] = "Common:Setting:Notifications.EnableOperationToasts";
2650
+ AXPCommonSettings["EntityFilterApplyMode"] = "Common:Setting:Entity.FilterApplyMode";
2387
2651
  })(AXPCommonSettings || (AXPCommonSettings = {}));
2388
2652
 
2389
2653
  //TODO Loading, Redirect, Drawer, Show toast
@@ -2438,10 +2702,10 @@ class AXPToastAction extends AXPWorkflowAction {
2438
2702
  super(...arguments);
2439
2703
  this.toastService = inject(AXToastService);
2440
2704
  this.translationService = inject(AXTranslationService);
2441
- this.settingService = inject(AXPSettingService);
2705
+ this.settingsService = inject(AXPSettingsService);
2442
2706
  }
2443
2707
  async execute(context) {
2444
- const showResult = await this.settingService.get(AXPCommonSettings.EnableOperationToasts);
2708
+ const showResult = await this.settingsService.get(AXPCommonSettings.EnableOperationToasts);
2445
2709
  if (showResult) {
2446
2710
  this.toastService.show({
2447
2711
  color: this.color,
@@ -2577,23 +2841,16 @@ class AXPCommonModule {
2577
2841
  /**
2578
2842
  * @ignore
2579
2843
  */
2580
- constructor(instances, appInitService, settingsService) {
2844
+ constructor(instances) {
2581
2845
  instances.forEach((f) => {
2582
2846
  f();
2583
2847
  });
2584
- appInitService.registerTask({
2585
- name: 'Settings',
2586
- statusText: 'Loading Settings ...',
2587
- priority: 2,
2588
- run: async () => {
2589
- await settingsService.load();
2590
- },
2591
- });
2592
2848
  }
2593
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPCommonModule, deps: [{ token: 'AXPCommonModuleFactory' }, { token: i1$1.AXPAppStartUpService }, { token: AXPSettingService }], target: i0.ɵɵFactoryTarget.NgModule }); }
2594
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPCommonModule, imports: [i3.AXPWorkflowModule, AXPopupModule,
2849
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPCommonModule, deps: [{ token: 'AXPCommonModuleFactory' }], target: i0.ɵɵFactoryTarget.NgModule }); }
2850
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: AXPCommonModule, imports: [i1.AXPWorkflowModule, AXPopupModule,
2595
2851
  AXDateTimeModule,
2596
- AXToastModule], exports: [RouterModule] }); }
2852
+ AXToastModule,
2853
+ AXPModuleManifestModule], exports: [RouterModule] }); }
2597
2854
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPCommonModule, providers: [
2598
2855
  AXPAppStartUpProvider,
2599
2856
  {
@@ -2620,7 +2877,7 @@ class AXPCommonModule {
2620
2877
  },
2621
2878
  {
2622
2879
  provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
2623
- useClass: AXPGlobalVariableEvaluatorScopeProvider,
2880
+ useClass: AXPTokenEvaluatorScopeProvider,
2624
2881
  multi: true,
2625
2882
  },
2626
2883
  {
@@ -2645,7 +2902,8 @@ class AXPCommonModule {
2645
2902
  }),
2646
2903
  AXPopupModule,
2647
2904
  AXDateTimeModule,
2648
- AXToastModule, RouterModule] }); }
2905
+ AXToastModule,
2906
+ AXPModuleManifestModule, RouterModule] }); }
2649
2907
  }
2650
2908
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPCommonModule, decorators: [{
2651
2909
  type: NgModule,
@@ -2665,6 +2923,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2665
2923
  AXPopupModule,
2666
2924
  AXDateTimeModule,
2667
2925
  AXToastModule,
2926
+ AXPModuleManifestModule,
2668
2927
  ],
2669
2928
  exports: [RouterModule],
2670
2929
  providers: [
@@ -2693,7 +2952,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2693
2952
  },
2694
2953
  {
2695
2954
  provide: AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER,
2696
- useClass: AXPGlobalVariableEvaluatorScopeProvider,
2955
+ useClass: AXPTokenEvaluatorScopeProvider,
2697
2956
  multi: true,
2698
2957
  },
2699
2958
  {
@@ -2710,7 +2969,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2710
2969
  }], ctorParameters: () => [{ type: undefined, decorators: [{
2711
2970
  type: Inject,
2712
2971
  args: ['AXPCommonModuleFactory']
2713
- }] }, { type: i1$1.AXPAppStartUpService }, { type: AXPSettingService }] });
2972
+ }] }] });
2714
2973
 
2715
2974
  const ENVIRONMENT = new InjectionToken('ENVIRONMENT');
2716
2975
  const AXP_PLATFORM_CONFIG_TOKEN = new InjectionToken('AXP_PLATFORM_CONFIG_TOKEN', {
@@ -2782,6 +3041,541 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2782
3041
  type: Injectable
2783
3042
  }] });
2784
3043
 
3044
+ /**
3045
+ * Status Definition Types
3046
+ * Defines the structure for status definitions and their transitions
3047
+ */
3048
+ /**
3049
+ * Abstract class for status providers
3050
+ * Similar to AXPTaskBadgeProvider pattern
3051
+ */
3052
+ class AXPStatusProvider {
3053
+ }
3054
+ //#endregion
3055
+
3056
+ //#region ---- Injection Token ----
3057
+ /**
3058
+ * Injection token for status providers
3059
+ * Use with multi: true to register multiple providers
3060
+ */
3061
+ const AXP_STATUS_PROVIDERS = new InjectionToken('AXP_STATUS_PROVIDERS');
3062
+ //#endregion
3063
+ //#region ---- Provider Service ----
3064
+ /**
3065
+ * Service for managing status definitions from multiple providers
3066
+ * Similar to AXPTaskBadgeService pattern - no cache, direct access
3067
+ *
3068
+ * @example
3069
+ * ```typescript
3070
+ * // In a module providers array:
3071
+ * {
3072
+ * provide: AXP_STATUS_PROVIDERS,
3073
+ * useClass: TaskStatusProvider,
3074
+ * multi: true,
3075
+ * }
3076
+ *
3077
+ * // Example provider implementation:
3078
+ * export class TaskStatusProvider extends AXPStatusProvider {
3079
+ * readonly key = 'task-management.status';
3080
+ * readonly statuses = [
3081
+ * { name: 'todo', title: 'To Do', color: '#6b7280', icon: 'fa-light fa-circle', isInitial: true },
3082
+ * { name: 'in-progress', title: 'In Progress', color: '#3b82f6', icon: 'fa-light fa-play' },
3083
+ * { name: 'done', title: 'Done', color: '#10b981', icon: 'fa-light fa-check-circle', isFinal: true },
3084
+ * ];
3085
+ * readonly transitions = [
3086
+ * { from: 'todo', to: 'in-progress', title: 'Start', condition: '{{user.canEdit}}' },
3087
+ * { from: 'in-progress', to: 'done', title: 'Complete' },
3088
+ * ];
3089
+ * readonly defaultStatus = 'todo';
3090
+ * }
3091
+ *
3092
+ * // Later, get the status:
3093
+ * const status = statusService.getStatus('task-management.status');
3094
+ * if (status) {
3095
+ * console.log('Statuses:', status.statuses);
3096
+ * console.log('Transitions:', status.transitions);
3097
+ * }
3098
+ * ```
3099
+ */
3100
+ class AXPStatusDefinitionProviderService {
3101
+ //#endregion
3102
+ //#region ---- Initialization ----
3103
+ constructor() {
3104
+ //#region ---- Dependencies ----
3105
+ this.providers = inject(AXP_STATUS_PROVIDERS, { optional: true }) ?? [];
3106
+ this.commandService = inject(AXPCommandService);
3107
+ //#endregion
3108
+ //#region ---- State ----
3109
+ this.statusMap = new Map();
3110
+ this.initializationPromise = null;
3111
+ this.isInitialized = false;
3112
+ this.initialize();
3113
+ }
3114
+ /**
3115
+ * Initialize providers (resolve promises if needed)
3116
+ * Called lazily on first access
3117
+ */
3118
+ async initialize() {
3119
+ if (this.isInitialized) {
3120
+ return;
3121
+ }
3122
+ if (this.initializationPromise) {
3123
+ return this.initializationPromise;
3124
+ }
3125
+ this.initializationPromise = this._doInitialize();
3126
+ await this.initializationPromise;
3127
+ }
3128
+ async _doInitialize() {
3129
+ // Register all providers, resolving promises if needed
3130
+ for (const provider of this.providers) {
3131
+ let resolvedProvider;
3132
+ if (provider instanceof Promise) {
3133
+ // If provider is a promise, resolve it
3134
+ resolvedProvider = await provider;
3135
+ }
3136
+ else {
3137
+ // If provider is a direct instance, use it directly
3138
+ resolvedProvider = provider;
3139
+ }
3140
+ if (this.statusMap.has(resolvedProvider.key)) {
3141
+ console.warn(`Status with key "${resolvedProvider.key}" already exists. Overwriting with new status.`);
3142
+ }
3143
+ this.statusMap.set(resolvedProvider.key, resolvedProvider);
3144
+ }
3145
+ this.isInitialized = true;
3146
+ }
3147
+ //#endregion
3148
+ //#region ---- Public API ----
3149
+ /**
3150
+ * Get a status provider by key
3151
+ * Direct synchronous access from Map. Providers are initialized in the constructor,
3152
+ * including lazy-loaded providers (promises) which are resolved during initialization.
3153
+ *
3154
+ * @param key - Status key (e.g., 'task-management.status')
3155
+ * @returns Status provider with all statuses and transitions, or undefined if not found
3156
+ *
3157
+ * @example
3158
+ * ```typescript
3159
+ * const status = statusService.getStatus('task-management.status');
3160
+ * if (status) {
3161
+ * console.log('Statuses:', status.statuses);
3162
+ * console.log('Transitions:', status.transitions);
3163
+ * }
3164
+ * ```
3165
+ */
3166
+ getStatus(key) {
3167
+ return this.statusMap.get(key);
3168
+ }
3169
+ /**
3170
+ * Execute a status transition workflow action
3171
+ * Uses transition.command if provided, otherwise defaults to Entity:UpdateStatus
3172
+ * Validates the transition is allowed before executing
3173
+ *
3174
+ * @param definitionKey - Status definition key
3175
+ * @param transition - The transition to execute
3176
+ * @param context - Context data for the command (must include entity name and id/ids)
3177
+ * @returns Promise that resolves when the command execution completes
3178
+ *
3179
+ * @example
3180
+ * ```typescript
3181
+ * await statusService.executeTransition(
3182
+ * 'task-management.status',
3183
+ * { from: 'todo', to: 'in-progress' },
3184
+ * { entity: 'TaskManagement.Task', id: '123', ...entityData }
3185
+ * );
3186
+ * ```
3187
+ */
3188
+ async executeTransition(definitionKey, transition, context) {
3189
+ await this.initialize();
3190
+ const provider = this.statusMap.get(definitionKey);
3191
+ if (!provider) {
3192
+ throw new Error(`Status provider with key "${definitionKey}" not found.`);
3193
+ }
3194
+ // Validate transition is allowed
3195
+ if (!this.isValidTransition(provider, transition.from, transition.to)) {
3196
+ throw new Error(`Invalid transition from "${transition.from}" to "${transition.to}"`);
3197
+ }
3198
+ // Determine which command to use
3199
+ let commandName;
3200
+ let commandOptions;
3201
+ if (transition.command) {
3202
+ // Use transition's explicit command
3203
+ commandName = transition.command.name;
3204
+ commandOptions = {
3205
+ ...(transition.command.options ?? {}),
3206
+ ...context,
3207
+ };
3208
+ }
3209
+ else {
3210
+ // Use default Entity:UpdateStatus command
3211
+ const entity = context['entityName'] ?? context['__meta__']?.config?.name;
3212
+ if (!entity) {
3213
+ throw new Error('Entity name is required in context when using default status update command');
3214
+ }
3215
+ const id = context['id'];
3216
+ const ids = context['ids'];
3217
+ if (!id && !ids) {
3218
+ throw new Error('Either id or ids must be provided in context');
3219
+ }
3220
+ commandName = 'Entity:UpdateStatus';
3221
+ commandOptions = {
3222
+ entity,
3223
+ status: transition.to,
3224
+ statusField: context['statusField'] ?? 'statusId',
3225
+ ...(id ? { id } : {}),
3226
+ ...(ids ? { ids } : {}),
3227
+ };
3228
+ }
3229
+ // Execute the command
3230
+ const result = await this.commandService.execute(commandName, commandOptions);
3231
+ if (!result?.success) {
3232
+ throw new Error(result?.message?.text || 'Failed to execute status transition command');
3233
+ }
3234
+ }
3235
+ /**
3236
+ * Validate if a transition is allowed
3237
+ * Checks if the transition exists in the provider's transitions list
3238
+ */
3239
+ isValidTransition(provider, from, to) {
3240
+ return provider.transitions.some((transition) => transition.from === from && transition.to === to);
3241
+ }
3242
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPStatusDefinitionProviderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3243
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPStatusDefinitionProviderService, providedIn: 'root' }); }
3244
+ }
3245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPStatusDefinitionProviderService, decorators: [{
3246
+ type: Injectable,
3247
+ args: [{ providedIn: 'root' }]
3248
+ }], ctorParameters: () => [] });
3249
+
3250
+ /**
3251
+ * Standard system status types
3252
+ * These are the predefined status values used across the platform
3253
+ */
3254
+ var AXPSystemStatusType;
3255
+ (function (AXPSystemStatusType) {
3256
+ AXPSystemStatusType["Todo"] = "todo";
3257
+ AXPSystemStatusType["InProgress"] = "in-progress";
3258
+ AXPSystemStatusType["InReview"] = "in-review";
3259
+ AXPSystemStatusType["Open"] = "open";
3260
+ AXPSystemStatusType["Closed"] = "closed";
3261
+ AXPSystemStatusType["Blocked"] = "blocked";
3262
+ AXPSystemStatusType["Done"] = "done";
3263
+ AXPSystemStatusType["Cancelled"] = "cancelled";
3264
+ AXPSystemStatusType["Draft"] = "draft";
3265
+ AXPSystemStatusType["PendingReview"] = "pending-review";
3266
+ AXPSystemStatusType["Approved"] = "approved";
3267
+ AXPSystemStatusType["Published"] = "published";
3268
+ AXPSystemStatusType["Archived"] = "archived";
3269
+ AXPSystemStatusType["Rejected"] = "rejected";
3270
+ AXPSystemStatusType["Active"] = "active";
3271
+ AXPSystemStatusType["Inactive"] = "inactive";
3272
+ AXPSystemStatusType["Pending"] = "pending";
3273
+ AXPSystemStatusType["Completed"] = "completed";
3274
+ AXPSystemStatusType["Suspended"] = "suspended";
3275
+ AXPSystemStatusType["Failed"] = "failed";
3276
+ AXPSystemStatusType["Review"] = "review";
3277
+ AXPSystemStatusType["Expired"] = "expired";
3278
+ })(AXPSystemStatusType || (AXPSystemStatusType = {}));
3279
+ const i18n = (key) => `@general:statuses.${key}`;
3280
+ /**
3281
+ * Standard system status definitions
3282
+ * Provides consistent status definitions across the platform
3283
+ * Uses AXPStatusDefinition interface from status-definition.types.ts
3284
+ */
3285
+ const AXPSystemStatuses = Object.freeze({
3286
+ Open: {
3287
+ name: AXPSystemStatusType.Open,
3288
+ title: i18n('open.title'),
3289
+ icon: 'fa-light fa-circle',
3290
+ color: 'secondary',
3291
+ description: i18n('open.description'),
3292
+ order: 1,
3293
+ isInitial: true,
3294
+ isFinal: false,
3295
+ },
3296
+ Closed: {
3297
+ name: AXPSystemStatusType.Closed,
3298
+ title: i18n('closed.title'),
3299
+ icon: 'fa-light fa-circle',
3300
+ color: 'danger',
3301
+ description: i18n('closed.description'),
3302
+ order: 2,
3303
+ isInitial: false,
3304
+ isFinal: true,
3305
+ },
3306
+ Todo: {
3307
+ name: AXPSystemStatusType.Todo,
3308
+ title: i18n('todo.title'),
3309
+ icon: 'fa-light fa-circle',
3310
+ color: 'secondary',
3311
+ description: i18n('todo.description'),
3312
+ order: 1,
3313
+ isInitial: true,
3314
+ isFinal: false,
3315
+ },
3316
+ InProgress: {
3317
+ name: AXPSystemStatusType.InProgress,
3318
+ title: i18n('in-progress.title'),
3319
+ icon: 'fa-light fa-play',
3320
+ color: 'info',
3321
+ description: i18n('in-progress.description'),
3322
+ order: 2,
3323
+ isInitial: false,
3324
+ isFinal: false,
3325
+ },
3326
+ InReview: {
3327
+ name: AXPSystemStatusType.InReview,
3328
+ title: i18n('in-review.title'),
3329
+ icon: 'fa-light fa-eye',
3330
+ color: 'info',
3331
+ description: i18n('in-review.description'),
3332
+ order: 3,
3333
+ isInitial: false,
3334
+ isFinal: false,
3335
+ },
3336
+ Blocked: {
3337
+ name: AXPSystemStatusType.Blocked,
3338
+ title: i18n('blocked.title'),
3339
+ icon: 'fa-light fa-ban',
3340
+ color: 'danger',
3341
+ description: i18n('blocked.description'),
3342
+ order: 4,
3343
+ isInitial: false,
3344
+ isFinal: false,
3345
+ },
3346
+ Done: {
3347
+ name: AXPSystemStatusType.Done,
3348
+ title: i18n('done.title'),
3349
+ icon: 'fa-light fa-check-circle',
3350
+ color: 'success',
3351
+ description: i18n('done.description'),
3352
+ order: 5,
3353
+ isInitial: false,
3354
+ isFinal: true,
3355
+ },
3356
+ Cancelled: {
3357
+ name: AXPSystemStatusType.Cancelled,
3358
+ title: i18n('cancelled.title'),
3359
+ icon: 'fa-light fa-times-circle',
3360
+ color: 'neutral',
3361
+ description: i18n('cancelled.description'),
3362
+ order: 6,
3363
+ isInitial: false,
3364
+ isFinal: true,
3365
+ },
3366
+ Draft: {
3367
+ name: AXPSystemStatusType.Draft,
3368
+ title: i18n('draft.title'),
3369
+ icon: 'fa-light fa-file-pen',
3370
+ color: 'neutral',
3371
+ description: i18n('draft.description'),
3372
+ order: 1,
3373
+ isInitial: true,
3374
+ isFinal: false,
3375
+ },
3376
+ PendingReview: {
3377
+ name: AXPSystemStatusType.PendingReview,
3378
+ title: i18n('pending-review.title'),
3379
+ icon: 'fa-light fa-clock',
3380
+ color: 'warning',
3381
+ description: i18n('pending-review.description'),
3382
+ order: 2,
3383
+ isInitial: false,
3384
+ isFinal: false,
3385
+ },
3386
+ Approved: {
3387
+ name: AXPSystemStatusType.Approved,
3388
+ title: i18n('approved.title'),
3389
+ icon: 'fa-light fa-check-circle',
3390
+ color: 'success',
3391
+ description: i18n('approved.description'),
3392
+ order: 3,
3393
+ isInitial: false,
3394
+ isFinal: false,
3395
+ },
3396
+ Published: {
3397
+ name: AXPSystemStatusType.Published,
3398
+ title: i18n('published.title'),
3399
+ icon: 'fa-light fa-globe',
3400
+ color: 'primary',
3401
+ description: i18n('published.description'),
3402
+ order: 4,
3403
+ isInitial: false,
3404
+ isFinal: false,
3405
+ },
3406
+ Archived: {
3407
+ name: AXPSystemStatusType.Archived,
3408
+ title: i18n('archived.title'),
3409
+ icon: 'fa-light fa-archive',
3410
+ color: 'danger',
3411
+ description: i18n('archived.description'),
3412
+ order: 5,
3413
+ isInitial: false,
3414
+ isFinal: true,
3415
+ },
3416
+ Rejected: {
3417
+ name: AXPSystemStatusType.Rejected,
3418
+ title: i18n('rejected.title'),
3419
+ icon: 'fa-light fa-times-circle',
3420
+ color: 'danger',
3421
+ description: i18n('rejected.description'),
3422
+ order: 6,
3423
+ isInitial: false,
3424
+ isFinal: true,
3425
+ },
3426
+ Active: {
3427
+ name: AXPSystemStatusType.Active,
3428
+ title: i18n('active.title'),
3429
+ icon: 'fa-light fa-check-circle',
3430
+ color: 'success',
3431
+ description: i18n('active.description'),
3432
+ order: 1,
3433
+ isInitial: false,
3434
+ isFinal: false,
3435
+ },
3436
+ Inactive: {
3437
+ name: AXPSystemStatusType.Inactive,
3438
+ title: i18n('inactive.title'),
3439
+ icon: 'fa-light fa-circle',
3440
+ color: 'secondary',
3441
+ description: i18n('inactive.description'),
3442
+ order: 2,
3443
+ isInitial: false,
3444
+ isFinal: false,
3445
+ },
3446
+ Pending: {
3447
+ name: AXPSystemStatusType.Pending,
3448
+ title: i18n('pending.title'),
3449
+ icon: 'fa-light fa-clock',
3450
+ color: 'warning',
3451
+ description: i18n('pending.description'),
3452
+ order: 1,
3453
+ isInitial: true,
3454
+ isFinal: false,
3455
+ },
3456
+ Completed: {
3457
+ name: AXPSystemStatusType.Completed,
3458
+ title: i18n('completed.title'),
3459
+ icon: 'fa-light fa-check-circle',
3460
+ color: 'success',
3461
+ description: i18n('completed.description'),
3462
+ order: 10,
3463
+ isInitial: false,
3464
+ isFinal: true,
3465
+ },
3466
+ Suspended: {
3467
+ name: AXPSystemStatusType.Suspended,
3468
+ title: i18n('suspended.title'),
3469
+ icon: 'fa-light fa-pause-circle',
3470
+ color: 'neutral',
3471
+ description: i18n('suspended.description'),
3472
+ order: 5,
3473
+ isInitial: false,
3474
+ isFinal: false,
3475
+ },
3476
+ Failed: {
3477
+ name: AXPSystemStatusType.Failed,
3478
+ title: i18n('failed.title'),
3479
+ icon: 'fa-light fa-xmark-circle',
3480
+ color: 'danger',
3481
+ description: i18n('failed.description'),
3482
+ order: 10,
3483
+ isInitial: false,
3484
+ isFinal: true,
3485
+ },
3486
+ Review: {
3487
+ name: AXPSystemStatusType.Review,
3488
+ title: i18n('review.title'),
3489
+ icon: 'fa-light fa-eye',
3490
+ color: 'info',
3491
+ description: i18n('review.description'),
3492
+ order: 3,
3493
+ },
3494
+ Expired: {
3495
+ name: AXPSystemStatusType.Expired,
3496
+ title: i18n('expired.title'),
3497
+ icon: 'fa-light fa-clock',
3498
+ color: 'danger',
3499
+ description: i18n('expired.description'),
3500
+ order: 10,
3501
+ isInitial: false,
3502
+ isFinal: true,
3503
+ },
3504
+ });
3505
+ /**
3506
+ * Get system status definition by type
3507
+ * @param type - Status type
3508
+ * @returns System status definition or undefined
3509
+ */
3510
+ function getSystemStatus(type) {
3511
+ return Object.values(AXPSystemStatuses).find(status => status.name === type);
3512
+ }
3513
+ /**
3514
+ * Resolves the visual appearance (color and icon) for status
3515
+ * using the system statuses from the core module.
3516
+ * @param statusType - Status type string
3517
+ * @returns Color and icon for the status
3518
+ */
3519
+ function resolveStatusLook(statusType) {
3520
+ // Try to get system status first
3521
+ const systemStatusType = statusType;
3522
+ if (systemStatusType) {
3523
+ const systemStatus = getSystemStatus(systemStatusType);
3524
+ if (systemStatus) {
3525
+ // Convert hex color to semantic color type if needed
3526
+ // For now, return as-is and let the UI handle it
3527
+ return {
3528
+ color: systemStatus.color,
3529
+ icon: systemStatus.icon || ''
3530
+ };
3531
+ }
3532
+ }
3533
+ // Fallback for unknown statuses
3534
+ return {
3535
+ color: 'secondary',
3536
+ icon: ''
3537
+ };
3538
+ }
3539
+ /**
3540
+ * Resolves the complete status information (title, description, icon, color) for a status
3541
+ * using the system statuses from the core module.
3542
+ * @param statusType - Status type string
3543
+ * @returns Complete status information as AXPStatusDefinition
3544
+ */
3545
+ function getStatusInfo(statusType) {
3546
+ const systemStatusType = statusType;
3547
+ if (systemStatusType) {
3548
+ const systemStatus = getSystemStatus(systemStatusType);
3549
+ if (systemStatus) {
3550
+ return systemStatus;
3551
+ }
3552
+ }
3553
+ // Fallback for unknown statuses
3554
+ return {
3555
+ name: statusType,
3556
+ title: statusType,
3557
+ description: `Status: ${statusType}`,
3558
+ icon: '',
3559
+ color: 'secondary'
3560
+ };
3561
+ }
3562
+ /**
3563
+ * Get system status definition directly (no conversion needed since it's already AXPStatusDefinition)
3564
+ * @param statusType - Status type
3565
+ * @param overrides - Optional overrides for the status definition
3566
+ * @returns AXPStatusDefinition
3567
+ */
3568
+ function systemStatusToDefinition(statusType, overrides) {
3569
+ const systemStatus = getSystemStatus(statusType);
3570
+ if (!systemStatus) {
3571
+ throw new Error(`System status ${statusType} not found`);
3572
+ }
3573
+ return {
3574
+ ...systemStatus,
3575
+ ...overrides,
3576
+ };
3577
+ }
3578
+
2785
3579
  class AXPClipBoardService {
2786
3580
  constructor() {
2787
3581
  this.toast = inject(AXToastService);
@@ -2805,6 +3599,123 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
2805
3599
  }]
2806
3600
  }] });
2807
3601
 
3602
+ //#region ---- Imports ----
3603
+ //#endregion
3604
+ //#region ---- Debug Service ----
3605
+ /**
3606
+ * Service for debugging user access information.
3607
+ * Displays loaded modules, features, and permissions for the current user.
3608
+ */
3609
+ class AXPDebugService {
3610
+ constructor() {
3611
+ //#region ---- Services & Dependencies ----
3612
+ this.sessionService = inject(AXPSessionService);
3613
+ this.manifestRegistry = inject(AXPModuleManifestRegistry);
3614
+ }
3615
+ //#endregion
3616
+ //#region ---- Public Methods ----
3617
+ /**
3618
+ * Display all loaded modules, features, and permissions for the current user.
3619
+ */
3620
+ async displayUserAccessInfo() {
3621
+ try {
3622
+ // Ensure registry is initialized
3623
+ await this.manifestRegistry.initialize();
3624
+ // Get all registered modules
3625
+ const allManifests = this.manifestRegistry.getAll();
3626
+ // Get all feature definitions
3627
+ const allFeatures = this.manifestRegistry.getAllFeatureDefinitions();
3628
+ // Get current user permissions
3629
+ const userPermissions = this.sessionService.permissions;
3630
+ const user = this.sessionService.user;
3631
+ console.group('🔐 User Access Information');
3632
+ console.log(`User: ${user?.name || user?.title || 'Unknown'} (${user?.id || 'N/A'})`);
3633
+ console.log('');
3634
+ if (allManifests.length === 0) {
3635
+ console.log('No modules loaded');
3636
+ console.groupEnd();
3637
+ return;
3638
+ }
3639
+ // Group features by module
3640
+ const featuresByModule = new Map();
3641
+ allFeatures.forEach((feature) => {
3642
+ const moduleName = feature.module;
3643
+ if (!featuresByModule.has(moduleName)) {
3644
+ featuresByModule.set(moduleName, []);
3645
+ }
3646
+ featuresByModule.get(moduleName).push(feature);
3647
+ });
3648
+ // Group permissions by module (if they follow ModuleName:PermissionKey pattern)
3649
+ const permissionsByModule = new Map();
3650
+ const ungroupedPermissions = [];
3651
+ userPermissions.forEach((permission) => {
3652
+ const parts = permission.split(':');
3653
+ if (parts.length >= 2) {
3654
+ const moduleName = parts[0];
3655
+ if (!permissionsByModule.has(moduleName)) {
3656
+ permissionsByModule.set(moduleName, []);
3657
+ }
3658
+ permissionsByModule.get(moduleName).push(permission);
3659
+ }
3660
+ else {
3661
+ ungroupedPermissions.push(permission);
3662
+ }
3663
+ });
3664
+ // Display modules in tree format
3665
+ allManifests.forEach((manifest) => {
3666
+ const moduleName = manifest.name;
3667
+ const moduleFeatures = featuresByModule.get(moduleName) || [];
3668
+ const modulePermissions = permissionsByModule.get(moduleName) || [];
3669
+ console.group(`📦 ${moduleName}`);
3670
+ // Display Features
3671
+ if (moduleFeatures.length > 0) {
3672
+ console.log(' --- Features:');
3673
+ moduleFeatures.forEach((feature) => {
3674
+ console.log(` • ${feature.name}`);
3675
+ });
3676
+ }
3677
+ else {
3678
+ console.log(' --- Features: (none)');
3679
+ }
3680
+ // Display Permissions
3681
+ if (modulePermissions.length > 0) {
3682
+ console.log(' --- Permissions:');
3683
+ modulePermissions.forEach((permission) => {
3684
+ console.log(` • ${permission}`);
3685
+ });
3686
+ }
3687
+ else {
3688
+ console.log(' --- Permissions: (none)');
3689
+ }
3690
+ console.groupEnd();
3691
+ });
3692
+ // Display ungrouped permissions if any
3693
+ if (ungroupedPermissions.length > 0) {
3694
+ console.group('📁 Other Permissions');
3695
+ ungroupedPermissions.forEach((permission) => {
3696
+ console.log(` • ${permission}`);
3697
+ });
3698
+ console.groupEnd();
3699
+ }
3700
+ // Summary
3701
+ console.log('');
3702
+ console.log(`Summary: ${allManifests.length} modules, ${allFeatures.length} features, ${userPermissions.length} permissions`);
3703
+ console.groupEnd();
3704
+ }
3705
+ catch (error) {
3706
+ console.error('[AXPDebugService] Failed to display user access info:', error);
3707
+ }
3708
+ }
3709
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDebugService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3710
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDebugService, providedIn: 'root' }); }
3711
+ }
3712
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDebugService, decorators: [{
3713
+ type: Injectable,
3714
+ args: [{
3715
+ providedIn: 'root',
3716
+ }]
3717
+ }] });
3718
+
2808
3719
  class AXMOrgChartPrintPage extends AXBasePageComponent {
2809
3720
  constructor() {
2810
3721
  super(...arguments);
@@ -2903,7 +3814,7 @@ class AXMOrgChartPrintPage extends AXBasePageComponent {
2903
3814
  <ax-icon class="fa-solid fa-print"> </ax-icon>
2904
3815
  </ax-button>
2905
3816
  </ax-suffix>
2906
- </ax-footer>`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXNumberBoxModule }, { kind: "component", type: i2$1.AXNumberBoxComponent, selector: "ax-number-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "minValue", "maxValue", "showSpinButtons", "thousandsSeparator", "decimals", "changeOnScroll", "step"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "thousandsSeparatorChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3$1.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.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: i5.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXColorBoxModule }, { kind: "component", type: i6.AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }] }); }
3817
+ </ax-footer>`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type: AXNumberBoxModule }, { kind: "component", type: i2.AXNumberBoxComponent, selector: "ax-number-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "minValue", "maxValue", "showSpinButtons", "thousandsSeparator", "decimals", "changeOnScroll", "step"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "thousandsSeparatorChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i3.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i4.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i4.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: i5.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXColorBoxModule }, { kind: "component", type: i6.AXColorBoxComponent, selector: "ax-color-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "value", "state", "name", "id", "look", "showBadge", "showValue", "showClearButton", "showIcon"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed"] }] }); }
2907
3818
  }
2908
3819
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXMOrgChartPrintPage, decorators: [{
2909
3820
  type: Component,
@@ -3069,5 +3980,5 @@ class AXPVersioningService {
3069
3980
  * Generated bundle index. Do not edit.
3070
3981
  */
3071
3982
 
3072
- export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPAppVersionService, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCommonSettings, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPGlobalVariableDefinitionService, AXPGlobalVariableEvaluatorScopeProvider, AXPHomePageModule, AXPHomePageService, AXPLockService, AXPLogoComponent, AXPMenuMiddlewareRegistry, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRelationshipCardinality, AXPRelationshipKind, AXPReloadAction, AXPReloadEvent, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValuesAggregatorService, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingService, AXPStickyDirective, AXPToastAction, AXPVersioningService, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_GLOBAL_VARIABLE_DEFINITION_PROVIDER, AXP_HOME_PAGES, AXP_HOME_PAGE_DEFAULT_KEY, AXP_MENU_MIDDLEWARE, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFAULT_VALUES_PROVIDERS, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, AXVChangeType, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IN_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, createAllQueryView, createMenuContext, createMenuMiddleware, createQueryView, getEntityInfo, provideDynamicHomePage, provideMenuMiddleware };
3983
+ export { ALL_DEFAULT_OPERATORS, AXMWorkflowErrorHandler, AXPAppVersionService, AXPCleanNestedFilters, AXPClipBoardService, AXPCommonModule, AXPCommonSettings, AXPCustomOperatorService, AXPCustomOperatorServiceImpl, AXPDataProvider, AXPDebugService, AXPDialogConfirmAction, AXPEntityCommandScope, AXPEntityQueryType, AXPErrorHandlerRegistryService, AXPExportService, AXPFileStorageService, AXPFileStorageStatus, AXPFileTypeProviderService, AXPFilterOperatorMiddlewareService, AXPFilterOperatorMiddlewareServiceImpl, AXPFooterTextSlotComponent, AXPGlobalErrorHandler, AXPHomePageModule, AXPHomePageService, AXPLockService, AXPMenuMiddlewareRegistry, AXPMenuProviderService, AXPMenuSearchDefinitionProvider, AXPMenuSearchProvider, AXPMenuService, AXPMenuVisibilityService, AXPNavBarSlotComponent, AXPNavigateWorkflow, AXPPlatformDefaultConfigs, AXPRedirectEvent, AXPRefreshEvent, AXPRegionalSetting, AXPRelationshipCardinality, AXPRelationshipKind, AXPReloadAction, AXPReloadEvent, AXPSearchCommandProvider, AXPSearchDefinitionActionBuilder, AXPSearchDefinitionBuilder, AXPSearchDefinitionProviderContext, AXPSearchDefinitionProviderService, AXPSearchService, AXPSettingDefaultValuesAggregatorService, AXPSettingDefinitionGroupBuilder, AXPSettingDefinitionProviderContext, AXPSettingDefinitionProviderService, AXPSettingDefinitionSectionBuilder, AXPSettingsService, AXPStatusDefinitionProviderService, AXPStatusProvider, AXPStickyDirective, AXPSystemStatusType, AXPSystemStatuses, AXPToastAction, AXPTokenDefinitionService, AXPTokenEvaluatorScopeProvider, AXPVersioningService, AXPWorkflowNavigateAction, AXPWorkflowRouterNavigateAction, AXP_APP_VERSION_PROVIDER, AXP_FILE_TYPE_INFO_PROVIDER, AXP_HOME_PAGES, AXP_HOME_PAGE_DEFAULT_KEY, AXP_MENU_MIDDLEWARE, AXP_MENU_PROVIDER, AXP_PLATFORM_CONFIG_TOKEN, AXP_ROOT_CONFIG_TOKEN, AXP_SEARCH_DEFINITION_PROVIDER, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFAULT_VALUES_PROVIDERS, AXP_SETTING_DEFINITION_PROVIDER, AXP_SETTING_VALUE_PROVIDER, AXP_STATUS_PROVIDERS, AXP_TOKEN_DEFINITION_PROVIDER, AXVChangeType, BETWEEN_OPER, BOOLEAN_OPERATORS, CONTAINS_OPER, DATE_OPERATORS, ENDS_WITH_OPER, ENVIRONMENT, EQ_OPER, GTE_OPER, GT_OPER, IN_OPER, IS_EMPTY_OPER, IS_NOT_EMPTY_OPER, LTE_OPER, LT_OPER, NOT_CONTAINS_OPER, NOT_EQ_OPER, NUMBER_OPERATORS, STARTS_WITH_OPER, STRING_OPERATORS, configPlatform, createAllQueryView, createMenuContext, createMenuMiddleware, createQueryView, getEntityInfo, getStatusInfo, getSystemStatus, provideDynamicHomePage, provideMenuMiddleware, resolveStatusLook, systemStatusToDefinition };
3073
3984
  //# sourceMappingURL=acorex-platform-common.mjs.map