@acorex-platform/framework-client 0.0.38 → 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.
- package/fesm2022/acorex-platform-framework-client-auth.mjs +212 -44
- package/fesm2022/acorex-platform-framework-client-auth.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-common-common-settings.provider-CzBr0cRi.mjs → acorex-platform-framework-client-common-common-settings.provider-ChU2tvyt.mjs} +31 -1
- package/fesm2022/acorex-platform-framework-client-common-common-settings.provider-ChU2tvyt.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-common.mjs +824 -72
- package/fesm2022/acorex-platform-framework-client-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-core.mjs +212 -94
- package/fesm2022/acorex-platform-framework-client-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-builder.mjs +292 -11
- package/fesm2022/acorex-platform-framework-client-layout-builder.mjs.map +1 -1
- 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
- package/fesm2022/acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-BqPaHKPM.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-components-property-viewer-inline-code-editor.component-CcpUTEVQ.mjs +66 -0
- package/fesm2022/acorex-platform-framework-client-layout-components-property-viewer-inline-code-editor.component-CcpUTEVQ.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-components-resource-appointment-board.component-DCkpgsFH.mjs +195 -0
- package/fesm2022/acorex-platform-framework-client-layout-components-resource-appointment-board.component-DCkpgsFH.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-components.mjs +3987 -1020
- package/fesm2022/acorex-platform-framework-client-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-designer.mjs +1179 -304
- package/fesm2022/acorex-platform-framework-client-layout-designer.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-CvaOWbJx.mjs → acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-Dc_NpBx6.mjs} +1619 -246
- package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-Dc_NpBx6.mjs.map +1 -0
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-Ds63Rt2n.mjs → acorex-platform-framework-client-layout-entity-attachments-page.component-Cx-n7ZuA.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-Ds63Rt2n.mjs.map → acorex-platform-framework-client-layout-entity-attachments-page.component-Cx-n7ZuA.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-C0pohwdo.mjs → acorex-platform-framework-client-layout-entity-bulk-entity.command-BONV249y.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-C0pohwdo.mjs.map → acorex-platform-framework-client-layout-entity-bulk-entity.command-BONV249y.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-o2HuZrDN.mjs → acorex-platform-framework-client-layout-entity-gallery-page.component-uTG2nFly.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-o2HuZrDN.mjs.map → acorex-platform-framework-client-layout-entity-gallery-page.component-uTG2nFly.mjs.map} +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity.mjs +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs +3 -3
- package/fesm2022/acorex-platform-framework-client-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs +3854 -3278
- package/fesm2022/acorex-platform-framework-client-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-CDpzvn6z.mjs +33191 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-acorex-platform-framework-client-layout-widgets-CDpzvn6z.mjs.map +1 -0
- 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
- package/fesm2022/acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BkrPu1wO.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs +45 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-value.util-Cb7R1qLO.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-column.component-BL621E1r.mjs +68 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-column.component-BL621E1r.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-edit.component-CVsPKhNl.mjs +88 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-edit.component-CVsPKhNl.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-view.component-BEq4O4al.mjs +71 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-code-editor-widget-view.component-BEq4O4al.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-condition-builder-edit-popup.component-WpiEHusZ.mjs +81 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-condition-builder-edit-popup.component-WpiEHusZ.mjs.map +1 -0
- 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
- package/fesm2022/acorex-platform-framework-client-layout-widgets-page-widget-designer.component-Cadl6guA.mjs.map +1 -0
- 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
- 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
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-column.component-Clb27Loe.mjs +71 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-column.component-Clb27Loe.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-edit.component-l7q8A-D3.mjs +111 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-edit.component-l7q8A-D3.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-view.component-Cc1AH09b.mjs +77 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-scheduler-picker-widget-view.component-Cc1AH09b.mjs.map +1 -0
- 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
- 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
- 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
- package/fesm2022/acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-BEa-vD6O.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-trigger-expression-editor-popup.component-C2PGoC7r.mjs +124 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-trigger-expression-editor-popup.component-C2PGoC7r.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-triggers-widget-editor.component-DDDoPoQa.mjs +345 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets-triggers-widget-editor.component-DDDoPoQa.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs +1 -31985
- package/fesm2022/acorex-platform-framework-client-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-realtime.mjs +2 -1
- package/fesm2022/acorex-platform-framework-client-realtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-runtime.mjs +2 -2
- package/fesm2022/acorex-platform-framework-client-runtime.mjs.map +1 -1
- 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
- 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
- package/fesm2022/acorex-platform-framework-client-themes-default.mjs +373 -70
- package/fesm2022/acorex-platform-framework-client-themes-default.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-themes-shared-settings.provider-CpsAIsxj.mjs → acorex-platform-framework-client-themes-shared-settings.provider-DIkjSTU7.mjs} +102 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared-settings.provider-DIkjSTU7.mjs.map +1 -0
- package/fesm2022/acorex-platform-framework-client-themes-shared.mjs +174 -22
- package/fesm2022/acorex-platform-framework-client-themes-shared.mjs.map +1 -1
- package/package.json +2 -2
- package/realtime/README.md +1 -1
- package/types/acorex-platform-framework-client-auth.d.ts +18 -1
- package/types/acorex-platform-framework-client-common.d.ts +204 -8
- package/types/acorex-platform-framework-client-core.d.ts +149 -114
- package/types/acorex-platform-framework-client-layout-builder.d.ts +29 -0
- package/types/acorex-platform-framework-client-layout-components.d.ts +699 -146
- package/types/acorex-platform-framework-client-layout-designer.d.ts +192 -14
- package/types/acorex-platform-framework-client-layout-entity.d.ts +155 -91
- package/types/acorex-platform-framework-client-layout-views.d.ts +16 -0
- package/types/acorex-platform-framework-client-layout-widget-core.d.ts +140 -37
- package/types/acorex-platform-framework-client-layout-widgets.d.ts +235 -117
- package/types/acorex-platform-framework-client-realtime.d.ts +16 -3
- package/types/acorex-platform-framework-client-themes-default.d.ts +62 -11
- package/types/acorex-platform-framework-client-themes-shared.d.ts +25 -2
- package/fesm2022/acorex-platform-framework-client-common-common-settings.provider-CzBr0cRi.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-components-binding-expression-editor-popup.component-Bp2cNCPO.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-components-file-provider-picker.popup.component-BtLEUWAA.mjs +0 -77
- package/fesm2022/acorex-platform-framework-client-layout-components-file-provider-picker.popup.component-BtLEUWAA.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-CvaOWbJx.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-button-widget-designer.component-BDOdcoyN.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-page-widget-designer.component-WzIiwnGC.mjs.map +0 -1
- package/fesm2022/acorex-platform-framework-client-layout-widgets-text-block-widget-designer.component-D6HFPmGC.mjs.map +0 -1
- 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';
|
|
@@ -2386,34 +2387,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
2386
2387
|
args: [{ providedIn: 'root' }]
|
|
2387
2388
|
}], ctorParameters: () => [] });
|
|
2388
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 -----
|
|
2389
2399
|
class AXPHookService {
|
|
2390
2400
|
constructor() {
|
|
2391
|
-
|
|
2401
|
+
//#region ----- Services & Dependencies -----
|
|
2402
|
+
this.hookProviders = inject(AXP_HOOK_PROVIDER, { optional: true }) || [];
|
|
2392
2403
|
this.injector = inject(Injector);
|
|
2393
2404
|
}
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
*/
|
|
2405
|
+
//#endregion
|
|
2406
|
+
//#region ----- Provider resolution -----
|
|
2397
2407
|
async resolveProviders() {
|
|
2398
|
-
return Promise.all(this.
|
|
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);
|
|
2399
2423
|
}
|
|
2424
|
+
//#endregion
|
|
2425
|
+
//#region ----- Public API -----
|
|
2400
2426
|
/**
|
|
2401
2427
|
* Fire sync hooks (fire-and-forget).
|
|
2402
2428
|
* All providers with the given key will be executed.
|
|
2403
2429
|
* Execution is not awaited.
|
|
2404
2430
|
*/
|
|
2405
2431
|
fire(key, data) {
|
|
2406
|
-
this.resolveProviders().then(providers => {
|
|
2407
|
-
providers
|
|
2408
|
-
.
|
|
2409
|
-
.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0))
|
|
2410
|
-
.forEach(p => {
|
|
2411
|
-
try {
|
|
2412
|
-
runInInjectionContext(this.injector, () => p.execute(data));
|
|
2413
|
-
}
|
|
2414
|
-
catch (err) {
|
|
2415
|
-
console.error(`[AXPHookService] Hook '${key}' failed`, err);
|
|
2416
|
-
}
|
|
2432
|
+
this.resolveProviders().then((providers) => {
|
|
2433
|
+
axpFireHooks(this.hooksForKey(providers, key), data, (_hook, err) => {
|
|
2434
|
+
console.error(`[AXPHookService] Hook '${key}' failed`, err);
|
|
2417
2435
|
});
|
|
2418
2436
|
});
|
|
2419
2437
|
}
|
|
@@ -2423,14 +2441,8 @@ class AXPHookService {
|
|
|
2423
2441
|
* Returns the final merged data after all hooks are executed.
|
|
2424
2442
|
*/
|
|
2425
2443
|
async runAsync(key, initialData) {
|
|
2426
|
-
const providers =
|
|
2427
|
-
|
|
2428
|
-
.sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0));
|
|
2429
|
-
let data = initialData;
|
|
2430
|
-
for (const p of providers) {
|
|
2431
|
-
data = await Promise.resolve(runInInjectionContext(this.injector, () => p.execute(data)));
|
|
2432
|
-
}
|
|
2433
|
-
return data;
|
|
2444
|
+
const providers = await this.resolveProviders();
|
|
2445
|
+
return axpRunHooksAsync(this.hooksForKey(providers, key), initialData);
|
|
2434
2446
|
}
|
|
2435
2447
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPHookService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2436
2448
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPHookService, providedIn: 'root' }); }
|
|
@@ -2951,6 +2963,13 @@ class AXPKeyboardShortcutRegistry {
|
|
|
2951
2963
|
...(ngDevMode ? [{ debugName: "helpEntries" }] : /* istanbul ignore next */ []));
|
|
2952
2964
|
this.onDocumentKeyDown = (event) => {
|
|
2953
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);
|
|
2954
2973
|
return;
|
|
2955
2974
|
}
|
|
2956
2975
|
if (event.key === 'F1') {
|
|
@@ -3049,6 +3068,18 @@ class AXPKeyboardShortcutRegistry {
|
|
|
3049
3068
|
this.document.addEventListener('keydown', this.onDocumentKeyDown, true);
|
|
3050
3069
|
this.listenerAttached = true;
|
|
3051
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
|
+
}
|
|
3052
3083
|
resolveActiveCandidates(event) {
|
|
3053
3084
|
const editable = isKeyboardTargetInsideEditableField(event.target);
|
|
3054
3085
|
const candidates = [];
|
|
@@ -3671,63 +3702,133 @@ const OVERLAY_DETAILS_VIEW_TRACE_NS = 'OVERLAY-DETAILS-VIEW';
|
|
|
3671
3702
|
/** Widget tree mount / settle polling ({@link AXPWidgetContainerComponent}). */
|
|
3672
3703
|
const OVERLAY_WIDGET_SETTLE_TRACE_NS = 'OVERLAY-WIDGET-SETTLE';
|
|
3673
3704
|
|
|
3674
|
-
//#region ----- Imports -----
|
|
3675
|
-
//#endregion
|
|
3676
|
-
|
|
3677
3705
|
//#region ----- Types -----
|
|
3678
|
-
/**
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
const AXP_MODULE_DOMAIN = {
|
|
3691
|
-
platform: 'platform',
|
|
3692
|
-
humanCapital: 'human-capital',
|
|
3693
|
-
projectManagement: 'project-management',
|
|
3694
|
-
assetMaintenance: 'asset-maintenance',
|
|
3695
|
-
workplaceSafety: 'workplace-safety',
|
|
3696
|
-
assessmentLearning: 'assessment-learning',
|
|
3697
|
-
financeCommerce: 'finance-commerce',
|
|
3698
|
-
customerSupplier: 'customer-supplier',
|
|
3699
|
-
communication: 'communication',
|
|
3700
|
-
ai: 'ai',
|
|
3701
|
-
contentDocuments: 'content-documents',
|
|
3702
|
-
data: 'data',
|
|
3703
|
-
operations: 'operations',
|
|
3704
|
-
weather: 'weather',
|
|
3705
|
-
sourceControl: 'source-control',
|
|
3706
|
-
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: [],
|
|
3707
3718
|
};
|
|
3708
3719
|
//#endregion
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
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;
|
|
3730
|
+
}
|
|
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
|
+
}
|
|
3716
3757
|
}
|
|
3717
|
-
|
|
3718
|
-
|
|
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)));
|
|
3719
3762
|
}
|
|
3720
|
-
|
|
3721
|
-
|
|
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
|
+
}
|
|
3722
3774
|
}
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
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' }); }
|
|
3730
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 -----
|
|
3731
3832
|
//#endregion
|
|
3732
3833
|
|
|
3733
3834
|
//#region ---- Provider Interfaces ----
|
|
@@ -3798,8 +3899,8 @@ class AXPModuleManifestRegistry {
|
|
|
3798
3899
|
//#region ---- Initialization ----
|
|
3799
3900
|
/**
|
|
3800
3901
|
* Initialize registry by loading all manifest providers.
|
|
3801
|
-
*
|
|
3802
|
-
*
|
|
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.
|
|
3803
3904
|
*/
|
|
3804
3905
|
async initialize() {
|
|
3805
3906
|
// If already initialized, return immediately
|
|
@@ -3818,24 +3919,9 @@ class AXPModuleManifestRegistry {
|
|
|
3818
3919
|
* Internal initialization logic.
|
|
3819
3920
|
*/
|
|
3820
3921
|
async _doInitialize() {
|
|
3821
|
-
|
|
3822
|
-
let manifests;
|
|
3823
|
-
try {
|
|
3824
|
-
const injectedManifests = this.injector.get(AXP_MODULE_MANIFEST_PROVIDER, []);
|
|
3825
|
-
manifests = Array.isArray(injectedManifests) ? injectedManifests : injectedManifests ? [injectedManifests] : [];
|
|
3826
|
-
}
|
|
3827
|
-
catch (error) {
|
|
3828
|
-
console.error('Failed to get manifest providers from injector:', error);
|
|
3829
|
-
manifests = [];
|
|
3830
|
-
}
|
|
3831
|
-
// Register all manifests directly
|
|
3922
|
+
const manifests = await this.resolveInjectedManifests();
|
|
3832
3923
|
const registerPromises = manifests.map(async (manifest) => {
|
|
3833
3924
|
try {
|
|
3834
|
-
// Validate manifest
|
|
3835
|
-
if (!manifest) {
|
|
3836
|
-
console.error('Invalid manifest:', manifest);
|
|
3837
|
-
return;
|
|
3838
|
-
}
|
|
3839
3925
|
await this.register(manifest);
|
|
3840
3926
|
}
|
|
3841
3927
|
catch (error) {
|
|
@@ -3843,10 +3929,34 @@ class AXPModuleManifestRegistry {
|
|
|
3843
3929
|
}
|
|
3844
3930
|
});
|
|
3845
3931
|
await Promise.all(registerPromises);
|
|
3932
|
+
if (this.manifests.size === 0) {
|
|
3933
|
+
this.initializationPromise = null;
|
|
3934
|
+
return;
|
|
3935
|
+
}
|
|
3846
3936
|
// Load and register features from all feature definition providers
|
|
3847
3937
|
await this.loadFeatureDefinitions();
|
|
3848
3938
|
this.isInitialized = true;
|
|
3849
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
|
+
}
|
|
3850
3960
|
//#endregion
|
|
3851
3961
|
//#region ---- Manifest Management ----
|
|
3852
3962
|
/**
|
|
@@ -4009,6 +4119,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
4009
4119
|
type: Injectable,
|
|
4010
4120
|
args: [{ providedIn: 'root' }]
|
|
4011
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
|
+
}
|
|
4012
4129
|
|
|
4013
4130
|
//#endregion
|
|
4014
4131
|
//#region ----- Tokens -----
|
|
@@ -4033,13 +4150,14 @@ const AXP_APP_STARTUP_PRIORITY = {
|
|
|
4033
4150
|
conversationSessionSync: 4,
|
|
4034
4151
|
regionalSettings: 5,
|
|
4035
4152
|
terms: 6,
|
|
4153
|
+
/** After settings: apply User → Tenant → Platform theme before first paint. */
|
|
4154
|
+
layoutTheme: 3.6,
|
|
4036
4155
|
/** Topic handlers / bridges that must exist before the socket connects. */
|
|
4037
4156
|
realtimeHandlers: 40,
|
|
4038
4157
|
/** Long-lived subscriptions that listen to connection/bus streams. */
|
|
4039
4158
|
realtimeSubscriptions: 45,
|
|
4040
4159
|
realtimeConnect: 50,
|
|
4041
4160
|
activityInsight: 80,
|
|
4042
|
-
layoutTheme: 100,
|
|
4043
4161
|
};
|
|
4044
4162
|
//#endregion
|
|
4045
4163
|
//#region ----- Helpers -----
|
|
@@ -5190,5 +5308,5 @@ function provideLazyProvider(token, loader, multi = true) {
|
|
|
5190
5308
|
* Generated bundle index. Do not edit.
|
|
5191
5309
|
*/
|
|
5192
5310
|
|
|
5193
|
-
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,
|
|
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 };
|
|
5194
5312
|
//# sourceMappingURL=acorex-platform-framework-client-core.mjs.map
|