@acorex-platform/framework-client 0.0.37 → 0.0.46

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 (104) hide show
  1. package/fesm2022/acorex-platform-framework-client-auth.mjs +212 -44
  2. package/fesm2022/acorex-platform-framework-client-auth.mjs.map +1 -1
  3. package/fesm2022/{acorex-platform-framework-client-common-common-settings.provider-CzBr0cRi.mjs → acorex-platform-framework-client-common-common-settings.provider-ChU2tvyt.mjs} +31 -1
  4. package/fesm2022/acorex-platform-framework-client-common-common-settings.provider-ChU2tvyt.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-framework-client-common.mjs +848 -76
  6. package/fesm2022/acorex-platform-framework-client-common.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-framework-client-core.mjs +273 -96
  8. package/fesm2022/acorex-platform-framework-client-core.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-framework-client-layout-builder.mjs +292 -11
  10. package/fesm2022/acorex-platform-framework-client-layout-builder.mjs.map +1 -1
  11. package/fesm2022/{acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-Bp2cNCPO.mjs → acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-BqPaHKPM.mjs} +10 -6
  12. package/fesm2022/acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-BqPaHKPM.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-framework-client-layout-components-property-viewer-inline-code-editor.component-CcpUTEVQ.mjs +66 -0
  14. package/fesm2022/acorex-platform-framework-client-layout-components-property-viewer-inline-code-editor.component-CcpUTEVQ.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-framework-client-layout-components-resource-appointment-board.component-DCkpgsFH.mjs +195 -0
  16. package/fesm2022/acorex-platform-framework-client-layout-components-resource-appointment-board.component-DCkpgsFH.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-framework-client-layout-components.mjs +3987 -1020
  18. package/fesm2022/acorex-platform-framework-client-layout-components.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-framework-client-layout-designer.mjs +1179 -304
  20. package/fesm2022/acorex-platform-framework-client-layout-designer.mjs.map +1 -1
  21. package/fesm2022/{acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-C74cBc-K.mjs → acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-Dc_NpBx6.mjs} +1697 -323
  22. package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-Dc_NpBx6.mjs.map +1 -0
  23. package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-B6nG9dIS.mjs → acorex-platform-framework-client-layout-entity-attachments-page.component-Cx-n7ZuA.mjs} +2 -2
  24. package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-B6nG9dIS.mjs.map → acorex-platform-framework-client-layout-entity-attachments-page.component-Cx-n7ZuA.mjs.map} +1 -1
  25. package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-DLQA_Q2Y.mjs → acorex-platform-framework-client-layout-entity-bulk-entity.command-BONV249y.mjs} +2 -2
  26. package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-DLQA_Q2Y.mjs.map → acorex-platform-framework-client-layout-entity-bulk-entity.command-BONV249y.mjs.map} +1 -1
  27. package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-B4wC1iqZ.mjs → acorex-platform-framework-client-layout-entity-gallery-page.component-uTG2nFly.mjs} +2 -2
  28. package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-B4wC1iqZ.mjs.map → acorex-platform-framework-client-layout-entity-gallery-page.component-uTG2nFly.mjs.map} +1 -1
  29. package/fesm2022/acorex-platform-framework-client-layout-entity.mjs +1 -1
  30. package/fesm2022/acorex-platform-framework-client-layout-views.mjs +3 -3
  31. package/fesm2022/acorex-platform-framework-client-layout-views.mjs.map +1 -1
  32. package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs +3854 -3278
  33. package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs.map +1 -1
  34. package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-CDpzvn6z.mjs +33191 -0
  35. package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-CDpzvn6z.mjs.map +1 -0
  36. package/fesm2022/{acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BDOdcoyN.mjs → acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BkrPu1wO.mjs} +8 -5
  37. package/fesm2022/acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BkrPu1wO.mjs.map +1 -0
  38. package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs +45 -0
  39. package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs.map +1 -0
  40. package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-column.component-BL621E1r.mjs +68 -0
  41. package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-column.component-BL621E1r.mjs.map +1 -0
  42. package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-edit.component-CVsPKhNl.mjs +88 -0
  43. package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-edit.component-CVsPKhNl.mjs.map +1 -0
  44. package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-view.component-BEq4O4al.mjs +71 -0
  45. package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-view.component-BEq4O4al.mjs.map +1 -0
  46. package/fesm2022/acorex-platform-framework-client-layout-widgets-condition-builder-edit-popup.component-WpiEHusZ.mjs +81 -0
  47. package/fesm2022/acorex-platform-framework-client-layout-widgets-condition-builder-edit-popup.component-WpiEHusZ.mjs.map +1 -0
  48. package/fesm2022/{acorex-platform-framework-client-layout-widgets-page-widget-designer.component-WzIiwnGC.mjs → acorex-platform-framework-client-layout-widgets-page-widget-designer.component-Cadl6guA.mjs} +41 -23
  49. package/fesm2022/acorex-platform-framework-client-layout-widgets-page-widget-designer.component-Cadl6guA.mjs.map +1 -0
  50. package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-4mX8aYzA.mjs → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-Cw3NhWL8.mjs} +3 -3
  51. package/fesm2022/{acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-4mX8aYzA.mjs.map → acorex-platform-framework-client-layout-widgets-repeater-widget-column.component-Cw3NhWL8.mjs.map} +1 -1
  52. package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-column.component-Clb27Loe.mjs +71 -0
  53. package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-column.component-Clb27Loe.mjs.map +1 -0
  54. package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-edit.component-l7q8A-D3.mjs +111 -0
  55. package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-edit.component-l7q8A-D3.mjs.map +1 -0
  56. package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-view.component-Cc1AH09b.mjs +77 -0
  57. package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-view.component-Cc1AH09b.mjs.map +1 -0
  58. package/fesm2022/{acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-TWxthl21.mjs → acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-BCLxS3rS.mjs} +3 -3
  59. package/fesm2022/{acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-TWxthl21.mjs.map → acorex-platform-framework-client-layout-widgets-tabular-data-edit-popup.component-BCLxS3rS.mjs.map} +1 -1
  60. package/fesm2022/{acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-D6HFPmGC.mjs → acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-BEa-vD6O.mjs} +21 -8
  61. package/fesm2022/acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-BEa-vD6O.mjs.map +1 -0
  62. package/fesm2022/acorex-platform-framework-client-layout-widgets-trigger-expression-editor-popup.component-C2PGoC7r.mjs +124 -0
  63. package/fesm2022/acorex-platform-framework-client-layout-widgets-trigger-expression-editor-popup.component-C2PGoC7r.mjs.map +1 -0
  64. package/fesm2022/acorex-platform-framework-client-layout-widgets-triggers-widget-editor.component-DDDoPoQa.mjs +345 -0
  65. package/fesm2022/acorex-platform-framework-client-layout-widgets-triggers-widget-editor.component-DDDoPoQa.mjs.map +1 -0
  66. package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs +1 -31985
  67. package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs.map +1 -1
  68. package/fesm2022/acorex-platform-framework-client-realtime.mjs +2 -1
  69. package/fesm2022/acorex-platform-framework-client-realtime.mjs.map +1 -1
  70. package/fesm2022/acorex-platform-framework-client-runtime.mjs +47 -3
  71. package/fesm2022/acorex-platform-framework-client-runtime.mjs.map +1 -1
  72. package/fesm2022/{acorex-platform-framework-client-themes-default-entity-master-single-view.component-DBUwSzvg.mjs → acorex-platform-framework-client-themes-default-entity-master-single-view.component-CHLsBvBE.mjs} +2 -2
  73. package/fesm2022/{acorex-platform-framework-client-themes-default-entity-master-single-view.component-DBUwSzvg.mjs.map → acorex-platform-framework-client-themes-default-entity-master-single-view.component-CHLsBvBE.mjs.map} +1 -1
  74. package/fesm2022/acorex-platform-framework-client-themes-default.mjs +373 -70
  75. package/fesm2022/acorex-platform-framework-client-themes-default.mjs.map +1 -1
  76. package/fesm2022/{acorex-platform-framework-client-themes-shared-settings.provider-CpsAIsxj.mjs → acorex-platform-framework-client-themes-shared-settings.provider-DIkjSTU7.mjs} +102 -1
  77. package/fesm2022/acorex-platform-framework-client-themes-shared-settings.provider-DIkjSTU7.mjs.map +1 -0
  78. package/fesm2022/acorex-platform-framework-client-themes-shared.mjs +174 -22
  79. package/fesm2022/acorex-platform-framework-client-themes-shared.mjs.map +1 -1
  80. package/package.json +2 -2
  81. package/realtime/README.md +1 -1
  82. package/types/acorex-platform-framework-client-auth.d.ts +18 -1
  83. package/types/acorex-platform-framework-client-common.d.ts +209 -8
  84. package/types/acorex-platform-framework-client-core.d.ts +166 -121
  85. package/types/acorex-platform-framework-client-layout-builder.d.ts +29 -0
  86. package/types/acorex-platform-framework-client-layout-components.d.ts +699 -146
  87. package/types/acorex-platform-framework-client-layout-designer.d.ts +192 -14
  88. package/types/acorex-platform-framework-client-layout-entity.d.ts +159 -91
  89. package/types/acorex-platform-framework-client-layout-views.d.ts +16 -0
  90. package/types/acorex-platform-framework-client-layout-widget-core.d.ts +140 -37
  91. package/types/acorex-platform-framework-client-layout-widgets.d.ts +235 -117
  92. package/types/acorex-platform-framework-client-realtime.d.ts +16 -3
  93. package/types/acorex-platform-framework-client-runtime.d.ts +8 -0
  94. package/types/acorex-platform-framework-client-themes-default.d.ts +62 -11
  95. package/types/acorex-platform-framework-client-themes-shared.d.ts +25 -2
  96. package/fesm2022/acorex-platform-framework-client-common-common-settings.provider-CzBr0cRi.mjs.map +0 -1
  97. package/fesm2022/acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-Bp2cNCPO.mjs.map +0 -1
  98. package/fesm2022/acorex-platform-framework-client-layout-components-file-provider-picker.popup.component-BtLEUWAA.mjs +0 -77
  99. package/fesm2022/acorex-platform-framework-client-layout-components-file-provider-picker.popup.component-BtLEUWAA.mjs.map +0 -1
  100. package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-C74cBc-K.mjs.map +0 -1
  101. package/fesm2022/acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BDOdcoyN.mjs.map +0 -1
  102. package/fesm2022/acorex-platform-framework-client-layout-widgets-page-widget-designer.component-WzIiwnGC.mjs.map +0 -1
  103. package/fesm2022/acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-D6HFPmGC.mjs.map +0 -1
  104. package/fesm2022/acorex-platform-framework-client-themes-shared-settings.provider-CpsAIsxj.mjs.map +0 -1
@@ -10,6 +10,7 @@ import * as i1 from '@acorex/components/skeleton';
10
10
  import { AXSkeletonModule } from '@acorex/components/skeleton';
11
11
  import { Subject, interval, fromEvent } from 'rxjs';
12
12
  import { AXPEntityEventsKeys } from '@acorex-platform/framework-shared/entity';
13
+ import { axpCompareHookEntries, axpFireHooks, axpRunHooksAsync } from '@acorex-platform/framework-shared/hook';
13
14
  import { toSignal } from '@angular/core/rxjs-interop';
14
15
  import * as i1$1 from '@angular/common';
15
16
  import { DOCUMENT, CommonModule } from '@angular/common';
@@ -1058,6 +1059,52 @@ const AXPContextStore = signalStore(withState(() => ({
1058
1059
  }));
1059
1060
  //#endregion
1060
1061
 
1062
+ function toExpressionRecord(value) {
1063
+ if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
1064
+ return value;
1065
+ }
1066
+ return {};
1067
+ }
1068
+ function resolveCommandExpressionData(input) {
1069
+ const record = toExpressionRecord(input);
1070
+ const data = record['data'];
1071
+ if (typeof data === 'object' && data !== null && !Array.isArray(data)) {
1072
+ return data;
1073
+ }
1074
+ if (Array.isArray(data)) {
1075
+ return toExpressionRecord(data[0]);
1076
+ }
1077
+ return {};
1078
+ }
1079
+ /**
1080
+ * Scope for command/action `{{ }}` expressions.
1081
+ * Supports both `context.eval("packageNumber")` and `context.getVariable("data").packageNumber`.
1082
+ */
1083
+ function createCommandExpressionScope(contextEvalFactory, data, extra) {
1084
+ const created = contextEvalFactory.createScope(data);
1085
+ const getVariable = (name) => {
1086
+ if (!name || name === 'data') {
1087
+ return data;
1088
+ }
1089
+ if (name === 'options' && extra && 'options' in extra) {
1090
+ return extra['options'];
1091
+ }
1092
+ if (typeof created.getVariable === 'function') {
1093
+ return created.getVariable(name);
1094
+ }
1095
+ return data[name];
1096
+ };
1097
+ return {
1098
+ ...data,
1099
+ ...extra,
1100
+ data,
1101
+ context: {
1102
+ ...created,
1103
+ getVariable,
1104
+ },
1105
+ };
1106
+ }
1107
+
1061
1108
  //#region ---- Imports ----
1062
1109
  //#endregion
1063
1110
  //#region ---- Pipe normalization ----
@@ -1137,9 +1184,12 @@ class AXPContextEvalFactory {
1137
1184
  return applyContextEvalPipes(raw, options?.pipes, this.formatService);
1138
1185
  };
1139
1186
  }
1140
- /** Creates `{ eval }` scope object for expression evaluator scopes. */
1187
+ /** Creates `{ eval, getVariable }` scope object for expression evaluator scopes. */
1141
1188
  createScope(data) {
1142
- return { eval: this.create(data) };
1189
+ return {
1190
+ eval: this.create(data),
1191
+ getVariable: this.createGetVariable(() => data),
1192
+ };
1143
1193
  }
1144
1194
  /**
1145
1195
  * Display-tier scope that re-reads data on each eval (for live stores / changing row context).
@@ -1147,6 +1197,16 @@ class AXPContextEvalFactory {
1147
1197
  createLiveScope(getData) {
1148
1198
  return {
1149
1199
  eval: (path, options) => this.create(getData())(path, options),
1200
+ getVariable: this.createGetVariable(getData),
1201
+ };
1202
+ }
1203
+ createGetVariable(getData) {
1204
+ return (name) => {
1205
+ const data = getData();
1206
+ if (!name || name === 'data') {
1207
+ return data;
1208
+ }
1209
+ return get(data, name);
1150
1210
  };
1151
1211
  }
1152
1212
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPContextEvalFactory, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -2327,34 +2387,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2327
2387
  args: [{ providedIn: 'root' }]
2328
2388
  }], ctorParameters: () => [] });
2329
2389
 
2390
+ //#region ----- Imports -----
2391
+ //#endregion
2392
+ //#region ----- Token -----
2393
+ const AXP_HOOK_PROVIDER = new InjectionToken('AXP_HOOK_PROVIDER');
2394
+ //#endregion
2395
+
2396
+ //#region ----- Imports -----
2397
+ //#endregion
2398
+ //#region ----- Service -----
2330
2399
  class AXPHookService {
2331
2400
  constructor() {
2332
- this.listenerProviders = inject(AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, { optional: true }) || [];
2401
+ //#region ----- Services & Dependencies -----
2402
+ this.hookProviders = inject(AXP_HOOK_PROVIDER, { optional: true }) || [];
2333
2403
  this.injector = inject(Injector);
2334
2404
  }
2335
- /**
2336
- * Resolve all providers (handle both direct providers and Promise<provider>)
2337
- */
2405
+ //#endregion
2406
+ //#region ----- Provider resolution -----
2338
2407
  async resolveProviders() {
2339
- return Promise.all(this.listenerProviders.map(p => p instanceof Promise ? p : Promise.resolve(p)));
2408
+ return Promise.all(this.hookProviders.map((provider) => provider instanceof Promise ? provider : Promise.resolve(provider)));
2409
+ }
2410
+ toHookEntries(providers) {
2411
+ return providers.map((provider, sequence) => ({
2412
+ id: provider.id?.trim() || `${provider.key}#${sequence}`,
2413
+ key: provider.key,
2414
+ priority: provider.priority,
2415
+ sequence,
2416
+ execute: (input) => runInInjectionContext(this.injector, () => provider.execute(input)),
2417
+ }));
2418
+ }
2419
+ hooksForKey(providers, key) {
2420
+ return this.toHookEntries(providers)
2421
+ .filter((entry) => entry.key === key)
2422
+ .sort(axpCompareHookEntries);
2340
2423
  }
2424
+ //#endregion
2425
+ //#region ----- Public API -----
2341
2426
  /**
2342
2427
  * Fire sync hooks (fire-and-forget).
2343
2428
  * All providers with the given key will be executed.
2344
2429
  * Execution is not awaited.
2345
2430
  */
2346
2431
  fire(key, data) {
2347
- this.resolveProviders().then(providers => {
2348
- providers
2349
- .filter(p => p.key === key)
2350
- .sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0))
2351
- .forEach(p => {
2352
- try {
2353
- runInInjectionContext(this.injector, () => p.execute(data));
2354
- }
2355
- catch (err) {
2356
- console.error(`[AXPHookService] Hook '${key}' failed`, err);
2357
- }
2432
+ this.resolveProviders().then((providers) => {
2433
+ axpFireHooks(this.hooksForKey(providers, key), data, (_hook, err) => {
2434
+ console.error(`[AXPHookService] Hook '${key}' failed`, err);
2358
2435
  });
2359
2436
  });
2360
2437
  }
@@ -2364,14 +2441,8 @@ class AXPHookService {
2364
2441
  * Returns the final merged data after all hooks are executed.
2365
2442
  */
2366
2443
  async runAsync(key, initialData) {
2367
- const providers = (await this.resolveProviders())
2368
- .filter(p => p.key === key)
2369
- .sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
2370
- let data = initialData;
2371
- for (const p of providers) {
2372
- data = await Promise.resolve(runInInjectionContext(this.injector, () => p.execute(data)));
2373
- }
2374
- return data;
2444
+ const providers = await this.resolveProviders();
2445
+ return axpRunHooksAsync(this.hooksForKey(providers, key), initialData);
2375
2446
  }
2376
2447
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPHookService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2377
2448
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPHookService, providedIn: 'root' }); }
@@ -2892,6 +2963,13 @@ class AXPKeyboardShortcutRegistry {
2892
2963
  ...(ngDevMode ? [{ debugName: "helpEntries" }] : /* istanbul ignore next */ []));
2893
2964
  this.onDocumentKeyDown = (event) => {
2894
2965
  if (event.key === 'Escape' && shouldDeferEscapeToOpenOverlay(this.document)) {
2966
+ const inner = this.resolveInnerOverlayEscapeCandidate(event);
2967
+ if (!inner) {
2968
+ return;
2969
+ }
2970
+ event.preventDefault();
2971
+ event.stopImmediatePropagation();
2972
+ void inner.binding.handler(event);
2895
2973
  return;
2896
2974
  }
2897
2975
  if (event.key === 'F1') {
@@ -2990,6 +3068,18 @@ class AXPKeyboardShortcutRegistry {
2990
3068
  this.document.addEventListener('keydown', this.onDocumentKeyDown, true);
2991
3069
  this.listenerAttached = true;
2992
3070
  }
3071
+ /**
3072
+ * Nested widget panes (select, date picker) still own Esc.
3073
+ * In-dialog editors registered above Modal (e.g. spreadsheet cell edit) may consume it
3074
+ * so the parent popup does not close.
3075
+ */
3076
+ resolveInnerOverlayEscapeCandidate(event) {
3077
+ if (getVisibleAnchoredOverlayPanes(this.document).length > 0) {
3078
+ return null;
3079
+ }
3080
+ const candidates = this.resolveActiveCandidates(event).filter((candidate) => candidate.priority > AXPKeyboardShortcutPriority.Modal);
3081
+ return candidates[0] ?? null;
3082
+ }
2993
3083
  resolveActiveCandidates(event) {
2994
3084
  const editable = isKeyboardTargetInsideEditableField(event.target);
2995
3085
  const candidates = [];
@@ -3612,63 +3702,133 @@ const OVERLAY_DETAILS_VIEW_TRACE_NS = 'OVERLAY-DETAILS-VIEW';
3612
3702
  /** Widget tree mount / settle polling ({@link AXPWidgetContainerComponent}). */
3613
3703
  const OVERLAY_WIDGET_SETTLE_TRACE_NS = 'OVERLAY-WIDGET-SETTLE';
3614
3704
 
3615
- //#region ----- Imports -----
3616
- //#endregion
3617
-
3618
3705
  //#region ----- Types -----
3619
- /**
3620
- * Packaging kind for edition modules checklist (view mode: By Type).
3621
- */
3622
- const AXP_MODULE_TYPE = {
3623
- platform: 'platform',
3624
- domain: 'domain',
3625
- integration: 'integration',
3626
- };
3627
- /**
3628
- * Business-area domain for edition modules checklist (view mode: By Domain).
3629
- * Aligns with integration domain ids where applicable.
3630
- */
3631
- const AXP_MODULE_DOMAIN = {
3632
- platform: 'platform',
3633
- humanCapital: 'human-capital',
3634
- projectManagement: 'project-management',
3635
- assetMaintenance: 'asset-maintenance',
3636
- workplaceSafety: 'workplace-safety',
3637
- assessmentLearning: 'assessment-learning',
3638
- financeCommerce: 'finance-commerce',
3639
- customerSupplier: 'customer-supplier',
3640
- communication: 'communication',
3641
- ai: 'ai',
3642
- contentDocuments: 'content-documents',
3643
- data: 'data',
3644
- operations: 'operations',
3645
- weather: 'weather',
3646
- sourceControl: 'source-control',
3647
- general: 'general',
3706
+ /** Who owns the live page snapshot. Higher wins when several pages are registered. */
3707
+ var AXPPageContextPriority;
3708
+ (function (AXPPageContextPriority) {
3709
+ AXPPageContextPriority[AXPPageContextPriority["Page"] = 10] = "Page";
3710
+ AXPPageContextPriority[AXPPageContextPriority["Overlay"] = 100] = "Overlay";
3711
+ })(AXPPageContextPriority || (AXPPageContextPriority = {}));
3712
+ /** Empty snapshot when no page has registered. */
3713
+ const AXP_PAGE_CONTEXT_EMPTY_SNAPSHOT = {
3714
+ kind: 'none',
3715
+ title: '',
3716
+ status: 'empty',
3717
+ actions: [],
3648
3718
  };
3649
3719
  //#endregion
3650
- //#region ----- Resolvers -----
3651
- /**
3652
- * Resolves module packaging type with fallbacks when unset on the manifest.
3653
- */
3654
- function resolveModuleType(manifest) {
3655
- if (manifest.type) {
3656
- return manifest.type;
3720
+
3721
+ //#region ----- Imports -----
3722
+ //#endregion
3723
+ //#region ----- Registry -----
3724
+ class AXPPageContextRegistry {
3725
+ constructor() {
3726
+ //#region ----- State Signals -----
3727
+ this.registrations = signal([], /* @ts-ignore */
3728
+ ...(ngDevMode ? [{ debugName: "registrations" }] : /* istanbul ignore next */ []));
3729
+ this.registrationSeq = 0;
3657
3730
  }
3658
- if (manifest.required) {
3659
- return AXP_MODULE_TYPE.platform;
3731
+ //#endregion
3732
+ //#region ----- Public Methods -----
3733
+ /**
3734
+ * Registers a live page snapshot. Unregisters automatically when `owner` is destroyed.
3735
+ * Same `id` replaces the previous entry (same instance re-init). Distinct ids stack for app tabs.
3736
+ */
3737
+ register(options) {
3738
+ const { owner } = options;
3739
+ const registrationId = `${options.id}:${++this.registrationSeq}`;
3740
+ const entry = {
3741
+ registrationId,
3742
+ id: options.id,
3743
+ priority: options.priority ?? AXPPageContextPriority.Page,
3744
+ lastActivatedAt: Date.now(),
3745
+ getSnapshot: options.getSnapshot,
3746
+ run: options.run,
3747
+ };
3748
+ this.registrations.update((items) => [...items.filter((item) => item.id !== options.id), entry]);
3749
+ try {
3750
+ owner.onDestroy(() => {
3751
+ this.unregister(registrationId);
3752
+ });
3753
+ }
3754
+ catch {
3755
+ this.unregister(registrationId);
3756
+ }
3660
3757
  }
3661
- if (manifest.name.endsWith('Extension')) {
3662
- return AXP_MODULE_TYPE.integration;
3758
+ /** Marks a registration as the current page among the same priority (app-tab focus). */
3759
+ activate(id) {
3760
+ const now = Date.now();
3761
+ this.registrations.update((items) => items.map((item) => (item.id === id ? { ...item, lastActivatedAt: now } : item)));
3663
3762
  }
3664
- return AXP_MODULE_TYPE.domain;
3665
- }
3666
- /**
3667
- * Resolves module business domain with fallback when unset on the manifest.
3668
- */
3669
- function resolveModuleDomain(manifest) {
3670
- return manifest.domain || AXP_MODULE_DOMAIN.general;
3763
+ getSnapshot() {
3764
+ const top = this.peekRegistration();
3765
+ if (!top) {
3766
+ return AXP_PAGE_CONTEXT_EMPTY_SNAPSHOT;
3767
+ }
3768
+ try {
3769
+ return top.getSnapshot();
3770
+ }
3771
+ catch {
3772
+ return AXP_PAGE_CONTEXT_EMPTY_SNAPSHOT;
3773
+ }
3774
+ }
3775
+ async runAction(actionId, args = {}) {
3776
+ const top = this.peekRegistration();
3777
+ if (!top) {
3778
+ return {
3779
+ success: false,
3780
+ message: 'No page context is registered.',
3781
+ snapshot: AXP_PAGE_CONTEXT_EMPTY_SNAPSHOT,
3782
+ };
3783
+ }
3784
+ try {
3785
+ return await top.run(actionId, args);
3786
+ }
3787
+ catch (error) {
3788
+ return {
3789
+ success: false,
3790
+ message: error instanceof Error ? error.message : 'Page action failed.',
3791
+ snapshot: this.safeSnapshot(top),
3792
+ };
3793
+ }
3794
+ }
3795
+ //#endregion
3796
+ //#region ----- Private Methods -----
3797
+ unregister(registrationId) {
3798
+ this.registrations.update((items) => items.filter((item) => item.registrationId !== registrationId));
3799
+ }
3800
+ peekRegistration() {
3801
+ const items = this.registrations();
3802
+ if (items.length === 0) {
3803
+ return undefined;
3804
+ }
3805
+ return [...items].sort((a, b) => {
3806
+ const byPriority = b.priority - a.priority;
3807
+ if (byPriority !== 0) {
3808
+ return byPriority;
3809
+ }
3810
+ return b.lastActivatedAt - a.lastActivatedAt;
3811
+ })[0];
3812
+ }
3813
+ safeSnapshot(entry) {
3814
+ try {
3815
+ return entry.getSnapshot();
3816
+ }
3817
+ catch {
3818
+ return AXP_PAGE_CONTEXT_EMPTY_SNAPSHOT;
3819
+ }
3820
+ }
3821
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPPageContextRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3822
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPPageContextRegistry, providedIn: 'root' }); }
3671
3823
  }
3824
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPPageContextRegistry, decorators: [{
3825
+ type: Injectable,
3826
+ args: [{
3827
+ providedIn: 'root',
3828
+ }]
3829
+ }] });
3830
+
3831
+ //#region ----- Feature Definition Types -----
3672
3832
  //#endregion
3673
3833
 
3674
3834
  //#region ---- Provider Interfaces ----
@@ -3739,8 +3899,8 @@ class AXPModuleManifestRegistry {
3739
3899
  //#region ---- Initialization ----
3740
3900
  /**
3741
3901
  * Initialize registry by loading all manifest providers.
3742
- * Should be called during app startup.
3743
- * Safe to call multiple times - will only initialize once.
3902
+ * An empty result is not kept: startup runs before login, and the ModuleDefinition
3903
+ * catalog is empty until a session exists. The next call (feature load after login) retries.
3744
3904
  */
3745
3905
  async initialize() {
3746
3906
  // If already initialized, return immediately
@@ -3759,24 +3919,9 @@ class AXPModuleManifestRegistry {
3759
3919
  * Internal initialization logic.
3760
3920
  */
3761
3921
  async _doInitialize() {
3762
- // Get manifests from injector (using useValue, they are provided directly)
3763
- let manifests;
3764
- try {
3765
- const injectedManifests = this.injector.get(AXP_MODULE_MANIFEST_PROVIDER, []);
3766
- manifests = Array.isArray(injectedManifests) ? injectedManifests : injectedManifests ? [injectedManifests] : [];
3767
- }
3768
- catch (error) {
3769
- console.error('Failed to get manifest providers from injector:', error);
3770
- manifests = [];
3771
- }
3772
- // Register all manifests directly
3922
+ const manifests = await this.resolveInjectedManifests();
3773
3923
  const registerPromises = manifests.map(async (manifest) => {
3774
3924
  try {
3775
- // Validate manifest
3776
- if (!manifest) {
3777
- console.error('Invalid manifest:', manifest);
3778
- return;
3779
- }
3780
3925
  await this.register(manifest);
3781
3926
  }
3782
3927
  catch (error) {
@@ -3784,10 +3929,34 @@ class AXPModuleManifestRegistry {
3784
3929
  }
3785
3930
  });
3786
3931
  await Promise.all(registerPromises);
3932
+ if (this.manifests.size === 0) {
3933
+ this.initializationPromise = null;
3934
+ return;
3935
+ }
3787
3936
  // Load and register features from all feature definition providers
3788
3937
  await this.loadFeatureDefinitions();
3789
3938
  this.isInitialized = true;
3790
3939
  }
3940
+ /**
3941
+ * Resolves `useValue` manifests and async catalog factories (Promise / array of rows).
3942
+ */
3943
+ async resolveInjectedManifests() {
3944
+ let injected;
3945
+ try {
3946
+ injected = this.injector.get(AXP_MODULE_MANIFEST_PROVIDER, []);
3947
+ }
3948
+ catch (error) {
3949
+ console.error('Failed to get manifest providers from injector:', error);
3950
+ return [];
3951
+ }
3952
+ const entries = Array.isArray(injected) ? injected : injected ? [injected] : [];
3953
+ const resolved = await Promise.all(entries.map(async (entry) => {
3954
+ const value = typeof entry === 'function' ? await entry() : await Promise.resolve(entry);
3955
+ return value;
3956
+ }));
3957
+ const flattened = resolved.flatMap((entry) => (Array.isArray(entry) ? entry : [entry]));
3958
+ return flattened.filter((item) => isModuleManifest(item));
3959
+ }
3791
3960
  //#endregion
3792
3961
  //#region ---- Manifest Management ----
3793
3962
  /**
@@ -3950,6 +4119,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
3950
4119
  type: Injectable,
3951
4120
  args: [{ providedIn: 'root' }]
3952
4121
  }] });
4122
+ function isModuleManifest(value) {
4123
+ if (value == null || typeof value !== 'object') {
4124
+ return false;
4125
+ }
4126
+ const candidate = value;
4127
+ return typeof candidate.name === 'string' && candidate.name.length > 0;
4128
+ }
3953
4129
 
3954
4130
  //#endregion
3955
4131
  //#region ----- Tokens -----
@@ -3974,13 +4150,14 @@ const AXP_APP_STARTUP_PRIORITY = {
3974
4150
  conversationSessionSync: 4,
3975
4151
  regionalSettings: 5,
3976
4152
  terms: 6,
4153
+ /** After settings: apply User → Tenant → Platform theme before first paint. */
4154
+ layoutTheme: 3.6,
3977
4155
  /** Topic handlers / bridges that must exist before the socket connects. */
3978
4156
  realtimeHandlers: 40,
3979
4157
  /** Long-lived subscriptions that listen to connection/bus streams. */
3980
4158
  realtimeSubscriptions: 45,
3981
4159
  realtimeConnect: 50,
3982
4160
  activityInsight: 80,
3983
- layoutTheme: 100,
3984
4161
  };
3985
4162
  //#endregion
3986
4163
  //#region ----- Helpers -----
@@ -5131,5 +5308,5 @@ function provideLazyProvider(token, loader, multi = true) {
5131
5308
  * Generated bundle index. Do not edit.
5132
5309
  */
5133
5310
 
5134
- export { AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPCatalogScopeDefinitionProviderService, AXPColorPaletteProvider, AXPColorPaletteService, AXPColumnWidthService, AXPComponentLogoConfig, AXPComponentSlot, AXPComponentSlotDirective, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPContentCheckerDirective, AXPContextDefinitionProviderService, AXPContextEvalFactory, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDblClickDirective, AXPDebugService, AXPDefaultColorPalettesProvider, AXPDeviceService, AXPDeviceType, AXPDistributedEventListenerService, AXPElementDataDirective, AXPEntityBroadcastService, AXPEntityLogoRegistrationService, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPFeatureDefinitionProviderContext, AXPGridLayoutDirective, AXPHookService, AXPIconLogoConfig, AXPIdleSchedulerService, AXPImageUrlLogoConfig, AXPKeyboardShortcutRegistry, AXPLogoComponent, AXPLogoRegistryService, AXPModuleManifestModule, AXPModuleManifestRegistry, AXPScreenSize, AXPTagProvider, AXPTagService, AXP_ACTIVITY_LOG_PROVIDER, AXP_APP_STARTUP_PRIORITY, AXP_APP_STARTUP_TASK, AXP_CATALOG_SCOPE_DEFINITION_PROVIDER, AXP_COLOR_PALETTE_PROVIDER, AXP_COLUMN_WIDTH_PROVIDER, AXP_CONTEXT_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXP_ENTITY_LOGO_FALLBACK_RESOLVER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_LOGO_IMAGE_SRC_RESOLVER, AXP_LOGO_PROVIDER, AXP_LOGO_THEME_RESOLVER, AXP_MODULE_DOMAIN, AXP_MODULE_MANIFEST_PROVIDER, AXP_MODULE_TYPE, AXP_PLATFORM_LOGO_KEY, AXP_SESSION_SERVICE, AXP_SETTINGS_DEFINITION_DIALOG_OPENER, AXP_TAG_PROVIDER, AX_OVERLAY_CONTAINER_SELECTOR, AX_OVERLAY_PANE_SELECTOR, DEFAULT_CANCEL_DIALOG_ACTION_SHORTCUTS, DEFAULT_SUBMIT_DIALOG_ACTION_SHORTCUTS, FORM_DIRTY_TRACE_NS, OVERLAY_DETAILS_VIEW_TRACE_NS, OVERLAY_LAYOUT_TRACE_NS, OVERLAY_ROOT_LAYOUT_TRACE_NS, OVERLAY_WIDGET_SETTLE_TRACE_NS, applyContextEvalPipes, applyFilterArray, applyPagination, applyQueryArray, applySortArray, applySystemActionDefault, axpApplicationLogoKey, axpExtractLogoUrl, axpSsoLogoKey, axpTenantLogoKey, chordToKbdItemKeys, contextEvalWithPipes, createProviderWithInjectionContext, defaultColumnWidthProvider, ensureRuntimeSurfaceClass, ensureRuntimeSurfaceClasses, findOverlayContainerAncestor, formatKeyboardShortcutChord, formatKeyboardShortcutChords, getNestedVisibleOverlayPanes, getPrimaryKeyboardShortcutChord, getTopVisibleOverlayContainer, getVisibleAnchoredOverlayPanes, getVisibleOverlayContainers, hasForegroundOverlayLayer, instantiateWithInjectionContext, isDialogShortcutAllowedInEditableField, isHorizontalDirectionalShortcutKey, isKeyboardTargetInsideEditableField, isMacPlatform, isVisibleOverlayElement, matchesDialogActionShortcut, matchesKeyboardShortcutChord, mirrorHorizontalDirectionalKey, normalizeContextEvalPipes, normalizeDialogActionShortcutChord, normalizeExpressionTemplate, normalizeKeyboardShortcut, normalizeKeyboardShortcuts, objectKeyValueTransforms, parseDialogActionShortcut, parseKeyboardShortcutChord, provideAppStartUpTask, provideLazyProvider, registerPopupFooterKeyboardShortcuts, resolveConfiguredFooterActionShortcuts, resolveDialogActionShortcuts, resolveDisplayShortcutChord, resolveEffectiveDirectionBehavior, resolveModuleDomain, resolveModuleType, resolveSemanticDirectionalKey, setupPopupFooterKeyboardShortcuts, shouldDeferEscapeToOpenOverlay, shouldTriggerDialogActionShortcut };
5311
+ export { AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPCatalogScopeDefinitionProviderService, AXPColorPaletteProvider, AXPColorPaletteService, AXPColumnWidthService, AXPComponentLogoConfig, AXPComponentSlot, AXPComponentSlotDirective, AXPComponentSlotModule, AXPComponentSlotRegistryService, AXPContentCheckerDirective, AXPContextDefinitionProviderService, AXPContextEvalFactory, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDblClickDirective, AXPDebugService, AXPDefaultColorPalettesProvider, AXPDeviceService, AXPDeviceType, AXPDistributedEventListenerService, AXPElementDataDirective, AXPEntityBroadcastService, AXPEntityLogoRegistrationService, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPFeatureDefinitionProviderContext, AXPGridLayoutDirective, AXPHookService, AXPIconLogoConfig, AXPIdleSchedulerService, AXPImageUrlLogoConfig, AXPKeyboardShortcutRegistry, AXPLogoComponent, AXPLogoRegistryService, AXPModuleManifestModule, AXPModuleManifestRegistry, AXPPageContextPriority, AXPPageContextRegistry, AXPScreenSize, AXPTagProvider, AXPTagService, AXP_ACTIVITY_LOG_PROVIDER, AXP_APP_STARTUP_PRIORITY, AXP_APP_STARTUP_TASK, AXP_CATALOG_SCOPE_DEFINITION_PROVIDER, AXP_COLOR_PALETTE_PROVIDER, AXP_COLUMN_WIDTH_PROVIDER, AXP_CONTEXT_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXP_ENTITY_LOGO_FALLBACK_RESOLVER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_FEATURE_DEFINITION_PROVIDER, AXP_HOOK_PROVIDER, AXP_LOGO_IMAGE_SRC_RESOLVER, AXP_LOGO_PROVIDER, AXP_LOGO_THEME_RESOLVER, AXP_MODULE_MANIFEST_PROVIDER, AXP_PAGE_CONTEXT_EMPTY_SNAPSHOT, AXP_PLATFORM_LOGO_KEY, AXP_SESSION_SERVICE, AXP_SETTINGS_DEFINITION_DIALOG_OPENER, AXP_TAG_PROVIDER, AX_OVERLAY_CONTAINER_SELECTOR, AX_OVERLAY_PANE_SELECTOR, DEFAULT_CANCEL_DIALOG_ACTION_SHORTCUTS, DEFAULT_SUBMIT_DIALOG_ACTION_SHORTCUTS, FORM_DIRTY_TRACE_NS, OVERLAY_DETAILS_VIEW_TRACE_NS, OVERLAY_LAYOUT_TRACE_NS, OVERLAY_ROOT_LAYOUT_TRACE_NS, OVERLAY_WIDGET_SETTLE_TRACE_NS, applyContextEvalPipes, applyFilterArray, applyPagination, applyQueryArray, applySortArray, applySystemActionDefault, axpApplicationLogoKey, axpExtractLogoUrl, axpSsoLogoKey, axpTenantLogoKey, chordToKbdItemKeys, contextEvalWithPipes, createCommandExpressionScope, createProviderWithInjectionContext, defaultColumnWidthProvider, ensureRuntimeSurfaceClass, ensureRuntimeSurfaceClasses, findOverlayContainerAncestor, formatKeyboardShortcutChord, formatKeyboardShortcutChords, getNestedVisibleOverlayPanes, getPrimaryKeyboardShortcutChord, getTopVisibleOverlayContainer, getVisibleAnchoredOverlayPanes, getVisibleOverlayContainers, hasForegroundOverlayLayer, instantiateWithInjectionContext, isDialogShortcutAllowedInEditableField, isHorizontalDirectionalShortcutKey, isKeyboardTargetInsideEditableField, isMacPlatform, isVisibleOverlayElement, matchesDialogActionShortcut, matchesKeyboardShortcutChord, mirrorHorizontalDirectionalKey, normalizeContextEvalPipes, normalizeDialogActionShortcutChord, normalizeExpressionTemplate, normalizeKeyboardShortcut, normalizeKeyboardShortcuts, objectKeyValueTransforms, parseDialogActionShortcut, parseKeyboardShortcutChord, provideAppStartUpTask, provideLazyProvider, registerPopupFooterKeyboardShortcuts, resolveCommandExpressionData, resolveConfiguredFooterActionShortcuts, resolveDialogActionShortcuts, resolveDisplayShortcutChord, resolveEffectiveDirectionBehavior, resolveSemanticDirectionalKey, setupPopupFooterKeyboardShortcuts, shouldDeferEscapeToOpenOverlay, shouldTriggerDialogActionShortcut, toExpressionRecord };
5135
5312
  //# sourceMappingURL=acorex-platform-framework-client-core.mjs.map