@acorex-platform/framework-client 0.0.25 → 0.0.30
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-common.mjs +5 -2
- package/fesm2022/acorex-platform-framework-client-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-core.mjs +9 -2
- package/fesm2022/acorex-platform-framework-client-core.mjs.map +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-BXOMs6oD.mjs → acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-CJemNxCu.mjs} +8 -11
- package/fesm2022/{acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-BXOMs6oD.mjs.map → acorex-platform-framework-client-layout-entity-acorex-platform-framework-client-layout-entity-CJemNxCu.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-DCK-qb-F.mjs → acorex-platform-framework-client-layout-entity-attachments-page.component-DQXGk8nF.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-attachments-page.component-DCK-qb-F.mjs.map → acorex-platform-framework-client-layout-entity-attachments-page.component-DQXGk8nF.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-Cs3agnpF.mjs → acorex-platform-framework-client-layout-entity-bulk-entity.command-DSLUUXfQ.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-bulk-entity.command-Cs3agnpF.mjs.map → acorex-platform-framework-client-layout-entity-bulk-entity.command-DSLUUXfQ.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-DYV9YPyw.mjs → acorex-platform-framework-client-layout-entity-gallery-page.component-uf51NO5m.mjs} +2 -2
- package/fesm2022/{acorex-platform-framework-client-layout-entity-gallery-page.component-DYV9YPyw.mjs.map → acorex-platform-framework-client-layout-entity-gallery-page.component-uf51NO5m.mjs.map} +1 -1
- package/fesm2022/acorex-platform-framework-client-layout-entity.mjs +1 -1
- package/fesm2022/acorex-platform-framework-client-runtime.mjs +105 -2
- package/fesm2022/acorex-platform-framework-client-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-framework-client-themes-shared.mjs +11 -3
- package/fesm2022/acorex-platform-framework-client-themes-shared.mjs.map +1 -1
- package/package.json +3 -3
- package/runtime/README.md +15 -3
- package/types/acorex-platform-framework-client-common.d.ts +1 -1
- package/types/acorex-platform-framework-client-layout-entity.d.ts +3 -4
- package/types/acorex-platform-framework-client-runtime.d.ts +90 -3
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex-platform/framework-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.30",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@acorex-platform/framework-shared": "0.0.
|
|
5
|
+
"@acorex-platform/framework-shared": "0.0.30",
|
|
6
6
|
"@acorex/cdk": "^19.0.0 || ^20.0.0 || ^22.0.0-next.0 || ^22.1.0-next.0 || ^22.1.0-next.0",
|
|
7
7
|
"@acorex/charts": "^19.0.0 || ^20.0.0 || ^22.0.0-next.0 || ^22.1.0-next.0 || ^22.1.0-next.0",
|
|
8
8
|
"@acorex/components": "^19.0.0 || ^20.0.0 || ^22.0.0-next.0 || ^22.1.0-next.0 || ^22.1.0-next.0",
|
|
9
9
|
"@acorex/core": "^19.0.0 || ^20.0.0 || ^22.0.0-next.0 || ^22.1.0-next.0 || ^22.1.0-next.0",
|
|
10
10
|
"@acorex/styles": "^19.0.0 || ^20.0.0 || ^22.0.0-next.0 || ^22.1.0-next.0 || ^22.1.0-next.0",
|
|
11
|
-
"@angular/animations": "^21.0.0",
|
|
11
|
+
"@angular/animations": "^21.0.0 || ^22.0.0",
|
|
12
12
|
"@ngrx/signals": "^21.0.0",
|
|
13
13
|
"dexie": "^3.2.7",
|
|
14
14
|
"dom-to-image": "^2.6.0",
|
package/runtime/README.md
CHANGED
|
@@ -2,16 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Secondary entry point of `@acorex-platform/framework-client/platform`. It can be used by importing from `@acorex-platform/framework-client/runtime`.
|
|
4
4
|
|
|
5
|
-
## External
|
|
5
|
+
## External runtime transport (other API stacks)
|
|
6
6
|
|
|
7
|
-
When the host app uses only this client library and implements the API elsewhere, override
|
|
7
|
+
When the host app uses only this client library and implements the API elsewhere, override remote CQRS with:
|
|
8
8
|
|
|
9
9
|
```typescript
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
provideExternalRuntimeQueryTransport,
|
|
12
|
+
provideExternalRuntimeCommandTransport,
|
|
13
|
+
provideExternalRuntimeBulkTransport,
|
|
14
|
+
} from '@acorex-platform/framework-client/runtime';
|
|
11
15
|
|
|
12
16
|
providers: [
|
|
17
|
+
...provideExternalRuntimeQueryTransport((name, input, options) => myApi.query(name, input, options)),
|
|
18
|
+
...provideExternalRuntimeCommandTransport((name, input, options) => myApi.command(name, input, options)),
|
|
13
19
|
...provideExternalRuntimeBulkTransport((request) => myApi.bulk(request)),
|
|
14
20
|
]
|
|
15
21
|
```
|
|
16
22
|
|
|
23
|
+
Nest / demo-api hosts should import `AXCRuntimeRemoteApiModule` from `@acorex-platform/client-connectivity-api` instead (also registered by `AXMSettingsManagementModule`). Endpoints:
|
|
24
|
+
|
|
25
|
+
- `POST /v1/runtime/queries` and `/v1/runtime/queries/invoke`
|
|
26
|
+
- `POST /v1/runtime/commands` and `/v1/runtime/commands/invoke`
|
|
27
|
+
- `POST /v1/runtime/commands/bulk`
|
|
28
|
+
|
|
17
29
|
See [`src/lib/RUNTIME_REMOTE_BULK_TRANSPORT.md`](./src/lib/RUNTIME_REMOTE_BULK_TRANSPORT.md).
|
|
@@ -732,7 +732,7 @@ declare class AXPCommonModule {
|
|
|
732
732
|
*/
|
|
733
733
|
constructor(instances: any[], _keyboardShortcutsHelp: AXPKeyboardShortcutsHelpService, formatterRegistry: AXFormatterRegistryService);
|
|
734
734
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPCommonModule, never>;
|
|
735
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AXPCommonModule, never, [typeof i1.AXPComponentSlotModule, typeof i2.AXPopupModule, typeof i3.AXDateTimeModule, typeof i4.AXToastModule, typeof i1.AXPModuleManifestModule], [typeof _angular_router.RouterModule]>;
|
|
735
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXPCommonModule, never, [typeof i1.AXPComponentSlotModule, typeof i2.AXPopupModule, typeof i3.AXDateTimeModule, typeof i4.AXToastModule, typeof i1.AXPModuleManifestModule, typeof _angular_router.RouterModule], [typeof _angular_router.RouterModule]>;
|
|
736
736
|
static ɵinj: i0.ɵɵInjectorDeclaration<AXPCommonModule>;
|
|
737
737
|
}
|
|
738
738
|
|
|
@@ -14,13 +14,12 @@ import { AXPPageLayoutBaseComponent } from '@acorex-platform/framework-client/la
|
|
|
14
14
|
export { AXPEntityDefinitionCrudService, AXP_ENTITY_DEFINITION_CRUD_SERVICE } from '@acorex-platform/framework-client/domain';
|
|
15
15
|
import { AXClickEvent, AXStyleColorType, AXDataSource, AXDataSourceFilterOption, AXDataSourceSortOption, AXValueChangedEvent, AXFocusEvent, AXHtmlEvent } from '@acorex/cdk/common';
|
|
16
16
|
import { AXPHookService, AXHighlightService, AXPEntityBroadcastService, AXPDeviceService, AXPExpressionEvaluatorService, AXPContextEvalFactory, AXPContextStore } from '@acorex-platform/framework-client/core';
|
|
17
|
-
import * as
|
|
17
|
+
import * as i4 from '@acorex-platform/framework-client/layout/widget-core';
|
|
18
18
|
import { AXPColumnWidgetComponent, AXPValueWidgetComponent, AXPWidgetCoreElementAPI, AXPWidgetCoreService, AXPWidgetRendererDirective } from '@acorex-platform/framework-client/layout/widget-core';
|
|
19
|
-
import * as i1 from '@angular/router';
|
|
20
19
|
import { ParamMap, ResolveFn, RedirectCommand } from '@angular/router';
|
|
21
20
|
import * as rxjs from 'rxjs';
|
|
22
21
|
import { Subject } from 'rxjs';
|
|
23
|
-
import * as
|
|
22
|
+
import * as i5 from '@acorex-platform/framework-client/layout/builder';
|
|
24
23
|
import { IActionBuilder, AXPDialogRef, IFormFieldBuilder } from '@acorex-platform/framework-client/layout/builder';
|
|
25
24
|
import { AXPSessionService } from '@acorex-platform/framework-client/auth';
|
|
26
25
|
import { AXPQueryExecutor, AXPCommandService, AXPCommandMiddleware, AXPQueryMiddleware } from '@acorex-platform/framework-client/runtime';
|
|
@@ -2449,7 +2448,7 @@ declare class AXPGalleryPluginModule {
|
|
|
2449
2448
|
declare class AXPEntityModule {
|
|
2450
2449
|
constructor();
|
|
2451
2450
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXPEntityModule, never>;
|
|
2452
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXPEntityModule, never, [typeof
|
|
2451
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXPEntityModule, never, [typeof AXPAttachmentsPluginModule, typeof AXPClientLocalPluginModule, typeof AXPGalleryPluginModule, typeof i4.AXPWidgetCoreModule, typeof i5.LayoutBuilderModule], never>;
|
|
2453
2452
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXPEntityModule>;
|
|
2454
2453
|
}
|
|
2455
2454
|
|
|
@@ -359,8 +359,13 @@ declare class AXPRuntimeModule {
|
|
|
359
359
|
* Distributed hook keys for remote (non-local) command/query execution.
|
|
360
360
|
* Connectivity (or another transport) implements these via {@link AXPHookService.runAsync}.
|
|
361
361
|
*
|
|
362
|
+
* Official Nest / demo-api hosts import `AXCRuntimeRemoteApiModule` from
|
|
363
|
+
* `@acorex-platform/client-connectivity-api` (also wired by `AXMSettingsManagementModule`).
|
|
364
|
+
*
|
|
362
365
|
* Host apps that only consume the client lib and call a different API stack should
|
|
363
|
-
* register {@link
|
|
366
|
+
* register {@link provideExternalRuntimeQueryTransport},
|
|
367
|
+
* {@link provideExternalRuntimeCommandTransport}, and
|
|
368
|
+
* {@link provideExternalRuntimeBulkTransport}
|
|
364
369
|
* (see `RUNTIME_REMOTE_BULK_TRANSPORT.md`).
|
|
365
370
|
*/
|
|
366
371
|
declare const AXPRuntimeRemoteHookKeys: {
|
|
@@ -461,5 +466,87 @@ interface AXPExternalRuntimeBulkTransportOptions {
|
|
|
461
466
|
*/
|
|
462
467
|
declare function provideExternalRuntimeBulkTransport(transport: AXPExternalRuntimeBulkTransport, options?: AXPExternalRuntimeBulkTransportOptions): Provider[];
|
|
463
468
|
|
|
464
|
-
|
|
465
|
-
|
|
469
|
+
/**
|
|
470
|
+
* Host-app transport for a single remote command. Must POST to the host API and
|
|
471
|
+
* return the full runtime command envelope.
|
|
472
|
+
*
|
|
473
|
+
* Nest reference: `POST {baseUrl}/v1/runtime/commands` with body
|
|
474
|
+
* `{ name, input, options? }`, or `POST {baseUrl}/v1/runtime/commands/invoke?name=…`
|
|
475
|
+
* with body `input` when `options` is omitted.
|
|
476
|
+
*/
|
|
477
|
+
type AXPExternalRuntimeCommandTransport = (name: string, input: unknown, options?: AXPCommandExecuteOptions) => Promise<AXPRuntimeCommandResult>;
|
|
478
|
+
interface AXPExternalRuntimeCommandTransportOptions {
|
|
479
|
+
/**
|
|
480
|
+
* Hook waterfall order (ascending). Default `-100` so this runs before the
|
|
481
|
+
* connectivity default (`priority` unset / `0`) and can mark `handled: true`.
|
|
482
|
+
*/
|
|
483
|
+
priority?: number;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Registers an external-stack implementation of `runtime.command.execute`.
|
|
487
|
+
*
|
|
488
|
+
* Use this when the host app consumes only the ACoreX **client** libraries and
|
|
489
|
+
* implements the API in another stack. Official Nest / demo-api hosts should
|
|
490
|
+
* import `AXCRuntimeRemoteApiModule` from `@acorex-platform/client-connectivity-api`
|
|
491
|
+
* instead.
|
|
492
|
+
*
|
|
493
|
+
* @example
|
|
494
|
+
* ```typescript
|
|
495
|
+
* providers: [
|
|
496
|
+
* ...provideExternalRuntimeCommandTransport(async (name, input, options) => {
|
|
497
|
+
* const response = await fetch(`${apiBase}/v1/runtime/commands`, {
|
|
498
|
+
* method: 'POST',
|
|
499
|
+
* credentials: 'include',
|
|
500
|
+
* headers: { 'Content-Type': 'application/json' },
|
|
501
|
+
* body: JSON.stringify({ name, input: input ?? {}, options }),
|
|
502
|
+
* });
|
|
503
|
+
* return response.json();
|
|
504
|
+
* }),
|
|
505
|
+
* ]
|
|
506
|
+
* ```
|
|
507
|
+
*/
|
|
508
|
+
declare function provideExternalRuntimeCommandTransport(transport: AXPExternalRuntimeCommandTransport, options?: AXPExternalRuntimeCommandTransportOptions): Provider[];
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Host-app transport for a single remote query. Must POST to the host API and
|
|
512
|
+
* return the full runtime query envelope (not unwrapped `data`).
|
|
513
|
+
*
|
|
514
|
+
* Nest reference: `POST {baseUrl}/v1/runtime/queries` with body
|
|
515
|
+
* `{ name, input, options? }`, or `POST {baseUrl}/v1/runtime/queries/invoke?name=…`
|
|
516
|
+
* with body `input` when `options` is omitted.
|
|
517
|
+
*/
|
|
518
|
+
type AXPExternalRuntimeQueryTransport = (name: string, input: unknown, options?: AXPQueryExecuteOptions) => Promise<AXPRuntimeQueryResult>;
|
|
519
|
+
interface AXPExternalRuntimeQueryTransportOptions {
|
|
520
|
+
/**
|
|
521
|
+
* Hook waterfall order (ascending). Default `-100` so this runs before the
|
|
522
|
+
* connectivity default (`priority` unset / `0`) and can mark `handled: true`.
|
|
523
|
+
*/
|
|
524
|
+
priority?: number;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Registers an external-stack implementation of `runtime.query.execute`.
|
|
528
|
+
*
|
|
529
|
+
* Use this when the host app consumes only the ACoreX **client** libraries and
|
|
530
|
+
* implements the API in another stack. Official Nest / demo-api hosts should
|
|
531
|
+
* import `AXCRuntimeRemoteApiModule` from `@acorex-platform/client-connectivity-api`
|
|
532
|
+
* instead (also pulled in by `AXMSettingsManagementModule`).
|
|
533
|
+
*
|
|
534
|
+
* @example
|
|
535
|
+
* ```typescript
|
|
536
|
+
* providers: [
|
|
537
|
+
* ...provideExternalRuntimeQueryTransport(async (name, input, options) => {
|
|
538
|
+
* const response = await fetch(`${apiBase}/v1/runtime/queries`, {
|
|
539
|
+
* method: 'POST',
|
|
540
|
+
* credentials: 'include',
|
|
541
|
+
* headers: { 'Content-Type': 'application/json' },
|
|
542
|
+
* body: JSON.stringify({ name, input: input ?? {}, options }),
|
|
543
|
+
* });
|
|
544
|
+
* return response.json();
|
|
545
|
+
* }),
|
|
546
|
+
* ]
|
|
547
|
+
* ```
|
|
548
|
+
*/
|
|
549
|
+
declare function provideExternalRuntimeQueryTransport(transport: AXPExternalRuntimeQueryTransport, options?: AXPExternalRuntimeQueryTransportOptions): Provider[];
|
|
550
|
+
|
|
551
|
+
export { AXPBulkCommandService, AXPCommandEventsService, AXPCommandExecutor, AXPCommandRegistry, AXPCommandService, AXPPolicyEngineContext, AXPPolicyEngineDirective, AXPPolicyEngineRegistry, AXPPolicyEngineService, AXPQueryEventsService, AXPQueryExecutor, AXPQueryRegistry, AXPQueryService, AXPRuntimeModule, AXPRuntimeRemoteHookKeys, AXPRuntimeTransportHookKeys, AXPRuntimeTransportService, AXPViewExecutor, AXPViewRegistry, AXPViewService, AXP_COMMAND_EXTENSION, AXP_COMMAND_MIDDLEWARE_SETUP, AXP_COMMAND_SETUP, AXP_POLICY_ENGINE_MIDDLEWARE_SETUP, AXP_POLICY_EXTENSION, AXP_QUERY_EXTENSION, AXP_QUERY_MIDDLEWARE_SETUP, AXP_QUERY_SETUP, AXP_VIEW_EXTENSION, AXP_VIEW_SETUP, composePolicyEngineMiddlewares, composeViewMiddlewares, provideCommand, provideCommandMiddleware, provideCommandSetups, provideExternalRuntimeBulkTransport, provideExternalRuntimeCommandTransport, provideExternalRuntimeQueryTransport, providePolicySetups, provideQueryMiddleware, provideQuerySetups, provideViewSetup, provideViewSetups };
|
|
552
|
+
export type { AXPCommandExecutionEvent, AXPCommandExecutionStage, AXPCommandExtension, AXPExternalRuntimeBulkTransport, AXPExternalRuntimeBulkTransportOptions, AXPExternalRuntimeCommandTransport, AXPExternalRuntimeCommandTransportOptions, AXPExternalRuntimeQueryTransport, AXPExternalRuntimeQueryTransportOptions, AXPPolicy, AXPPolicyEngineMiddleware, AXPPolicyExtension, AXPQueryExecutionEvent, AXPQueryExecutionStage, AXPQueryExtension, AXPRuntimeCommandExecuteBulkHookPayload, AXPRuntimeCommandExecuteHookPayload, AXPRuntimeQueryExecuteHookPayload, AXPRuntimeTransportExecuteHookPayload, AXPViewExtension, AXPViewMiddleware };
|