bways-report 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/core/config/bways-report-config.mjs +3 -1
- package/esm2022/lib/core/models/index.mjs +1 -1
- package/esm2022/lib/core/models/report-api-endpoint.model.mjs +8 -0
- package/esm2022/lib/core/models/report-component.model.mjs +1 -1
- package/esm2022/lib/core/models/report-datasource.model.mjs +1 -1
- package/esm2022/lib/core/services/index.mjs +2 -1
- package/esm2022/lib/core/services/report-api-execution.service.mjs +188 -0
- package/esm2022/lib/core/services/report-data-discovery.service.mjs +76 -4
- package/esm2022/lib/data-access/adapters/endpoint-datasource.adapter.mjs +24 -1
- package/esm2022/lib/data-access/adapters/endpoint-lookup.adapter.mjs +24 -2
- package/esm2022/lib/data-access/adapters/endpoint-tokens.mjs +1 -1
- package/esm2022/lib/data-access/adapters/http-lookup.adapter.mjs +26 -3
- package/esm2022/lib/data-access/contracts/lookup.contract.mjs +1 -1
- package/esm2022/lib/features/designer/components/component-palette/component-palette.component.mjs +536 -6
- package/esm2022/lib/features/designer/components/design-canvas/design-canvas.component.mjs +31 -3
- package/esm2022/lib/features/designer/components/dialogs/report-saved-dialog.component.mjs +2 -2
- package/esm2022/lib/features/designer/components/property-editor/parameter-binding-editor.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor-action.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor-datasource.component.mjs +131 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor-general.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor-grid.component.mjs +128 -28
- package/esm2022/lib/features/designer/components/property-editor/property-editor-layout.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor-report.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor-validation.component.mjs +3 -3
- package/esm2022/lib/features/designer/components/property-editor/property-editor.component.mjs +19 -10
- package/esm2022/lib/features/designer/designer.component.mjs +248 -33
- package/esm2022/lib/features/designer/utilities/canvas-layout.util.mjs +2 -1
- package/esm2022/lib/features/routing/components/routed-report-runtime.component.mjs +2 -2
- package/esm2022/lib/features/runtime/dynamic-renderer.component.mjs +23 -4
- package/esm2022/lib/features/runtime/report-execution.service.mjs +21 -4
- package/esm2022/lib/features/runtime/report-grid-bridge.component.mjs +51 -10
- package/esm2022/lib/features/runtime/report-runtime.component.mjs +16 -2
- package/esm2022/lib/features/runtime/rpt-report.component.mjs +2 -2
- package/esm2022/lib/primitives/components/dropdown/rpt-dropdown.component.mjs +16 -7
- package/esm2022/lib/primitives/components/icon/rpt-icon.component.mjs +41 -1
- package/esm2022/lib/primitives/components/index.mjs +2 -1
- package/esm2022/lib/primitives/components/radio/rpt-radio.component.mjs +428 -0
- package/esm2022/lib/primitives/register-builtins.mjs +51 -2
- package/esm2022/lib/provide-reporting.mjs +3 -1
- package/fesm2022/bways-report.mjs +2171 -241
- package/fesm2022/bways-report.mjs.map +1 -1
- package/lib/core/config/bways-report-config.d.ts +13 -0
- package/lib/core/models/index.d.ts +2 -1
- package/lib/core/models/report-api-endpoint.model.d.ts +30 -0
- package/lib/core/models/report-component.model.d.ts +16 -4
- package/lib/core/models/report-datasource.model.d.ts +16 -2
- package/lib/core/services/index.d.ts +1 -0
- package/lib/core/services/report-api-execution.service.d.ts +41 -0
- package/lib/core/services/report-data-discovery.service.d.ts +23 -1
- package/lib/data-access/adapters/endpoint-datasource.adapter.d.ts +2 -0
- package/lib/data-access/adapters/endpoint-lookup.adapter.d.ts +1 -0
- package/lib/data-access/adapters/endpoint-tokens.d.ts +3 -0
- package/lib/data-access/adapters/http-lookup.adapter.d.ts +2 -1
- package/lib/data-access/contracts/lookup.contract.d.ts +3 -0
- package/lib/features/designer/components/component-palette/component-palette.component.d.ts +16 -0
- package/lib/features/designer/components/property-editor/property-editor-datasource.component.d.ts +17 -0
- package/lib/features/designer/components/property-editor/property-editor-grid.component.d.ts +19 -7
- package/lib/features/designer/components/property-editor/property-editor.component.d.ts +1 -1
- package/lib/features/designer/designer.component.d.ts +12 -0
- package/lib/features/runtime/report-execution.service.d.ts +1 -0
- package/lib/features/runtime/report-grid-bridge.component.d.ts +3 -1
- package/lib/features/runtime/report-runtime.component.d.ts +13 -1
- package/lib/primitives/components/index.d.ts +2 -0
- package/lib/primitives/components/radio/rpt-radio.component.d.ts +77 -0
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { Type } from '@angular/core';
|
|
10
10
|
import { SessionContextProvider, SessionContextSource } from '../tokens/session-context.token';
|
|
11
|
+
import { ReportApiEndpointDefinition } from '../models/report-api-endpoint.model';
|
|
11
12
|
/**
|
|
12
13
|
* Palette component category names the developer can use
|
|
13
14
|
* when restricting the designer component palette.
|
|
@@ -72,6 +73,16 @@ export interface BwaysReportConfig {
|
|
|
72
73
|
* - DELETE /:id → delete a report
|
|
73
74
|
*/
|
|
74
75
|
reportsEndpoint?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Optional GET endpoint returning the catalog of registered REST APIs.
|
|
78
|
+
* Response: ReportApiEndpointDefinition[]
|
|
79
|
+
*/
|
|
80
|
+
apisEndpoint?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Optional static/in-memory API endpoints registered directly in the host application.
|
|
83
|
+
* Merged with backend-discovered APIs in the Visual Designer.
|
|
84
|
+
*/
|
|
85
|
+
apiEndpoints?: ReportApiEndpointDefinition[];
|
|
75
86
|
/**
|
|
76
87
|
* Component palette groups to show in the designer.
|
|
77
88
|
* Defaults to all groups when not specified.
|
|
@@ -136,6 +147,8 @@ export interface NormalizedBwaysConfig {
|
|
|
136
147
|
executeEndpoint: string;
|
|
137
148
|
lookupEndpoint: string | null;
|
|
138
149
|
reportsEndpoint: string | null;
|
|
150
|
+
apisEndpoint: string | null;
|
|
151
|
+
apiEndpoints: ReportApiEndpointDefinition[];
|
|
139
152
|
/** Resolved internal category IDs (e.g. ['input', 'action', 'display']) */
|
|
140
153
|
allowedCategories: string[] | null;
|
|
141
154
|
/** Whether auto-parameter binding is enabled */
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Barrel export for all core domain models.
|
|
3
3
|
*/
|
|
4
4
|
export type { ReportDefinition, ReportSummary, ReportPermissionDefinition, } from './report-definition.model';
|
|
5
|
-
export type { ReportComponentDefinition, ComponentBindingDefinition, ComponentDataSourceDefinition, VisibilityDefinition, } from './report-component.model';
|
|
5
|
+
export type { ReportComponentDefinition, ComponentBindingDefinition, ComponentDataSourceDefinition, DropdownSourceType, VisibilityDefinition, } from './report-component.model';
|
|
6
|
+
export type { ReportApiEndpointDefinition, ReportApiParameterDefinition, } from './report-api-endpoint.model';
|
|
6
7
|
export type { ReportParameterDefinition, } from './report-parameter.model';
|
|
7
8
|
export type { ReportDataSourceDefinition, DataSourceCacheDefinition, } from './report-datasource.model';
|
|
8
9
|
export type { ReportGridDefinition, GridColumnDefinition, GridOptionsDefinition, } from './report-grid.model';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Definitions for API-based data retrieval endpoints.
|
|
3
|
+
*
|
|
4
|
+
* Enables reports and form components to consume REST / HTTP APIs
|
|
5
|
+
* with parameter interpolation, custom headers, and data path resolution.
|
|
6
|
+
*/
|
|
7
|
+
export interface ReportApiParameterDefinition {
|
|
8
|
+
name: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
type: 'string' | 'number' | 'boolean' | 'date' | 'array';
|
|
11
|
+
in: 'query' | 'path' | 'body' | 'header';
|
|
12
|
+
required?: boolean;
|
|
13
|
+
defaultValue?: unknown;
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ReportApiEndpointDefinition {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
endpoint?: string;
|
|
21
|
+
method?: 'GET' | 'POST' | 'PUT';
|
|
22
|
+
description?: string;
|
|
23
|
+
category?: string;
|
|
24
|
+
dataPath?: string;
|
|
25
|
+
totalPath?: string;
|
|
26
|
+
parameters?: ReportApiParameterDefinition[];
|
|
27
|
+
headers?: Record<string, string>;
|
|
28
|
+
responseSample?: Record<string, unknown>[];
|
|
29
|
+
useProxy?: boolean;
|
|
30
|
+
}
|
|
@@ -20,13 +20,13 @@ export interface ComponentBindingDefinition {
|
|
|
20
20
|
/** The parameter key this component writes to (for input components). */
|
|
21
21
|
parameterKey?: string;
|
|
22
22
|
}
|
|
23
|
-
export type DropdownSourceType = 'static' | 'table' | 'procedure' | 'master';
|
|
23
|
+
export type DropdownSourceType = 'static' | 'table' | 'procedure' | 'master' | 'api';
|
|
24
24
|
/**
|
|
25
25
|
* Data source configuration for components that load their own data
|
|
26
|
-
* (e.g., dropdowns loading options from database tables, stored procedures, or
|
|
26
|
+
* (e.g., dropdowns loading options from database tables, stored procedures, master data, or REST APIs).
|
|
27
27
|
*/
|
|
28
28
|
export interface ComponentDataSourceDefinition {
|
|
29
|
-
/** Source type: 'static' | 'table' | 'procedure' | 'master' */
|
|
29
|
+
/** Source type: 'static' | 'table' | 'procedure' | 'master' | 'api' */
|
|
30
30
|
sourceType?: DropdownSourceType;
|
|
31
31
|
/** Database schema, e.g. 'dbo' (defaults to 'dbo'). */
|
|
32
32
|
schema?: string;
|
|
@@ -40,12 +40,24 @@ export interface ComponentDataSourceDefinition {
|
|
|
40
40
|
valueField?: string;
|
|
41
41
|
/** Optional static filter parameters (e.g. { isActive: 1 }). */
|
|
42
42
|
filter?: Record<string, unknown>;
|
|
43
|
-
/**
|
|
43
|
+
/** Parameter mappings (e.g. { '@BranchId': '{{branchSelect}}', '@ActiveOnly': true }). */
|
|
44
44
|
parameterMappings?: Record<string, string | number | boolean>;
|
|
45
45
|
/** Keys of other form components whose values this data source depends on (for Cascading Dropdowns). */
|
|
46
46
|
dependsOn?: string[];
|
|
47
47
|
/** Cache time-to-live in seconds (default 300s). */
|
|
48
48
|
cacheTtl?: number;
|
|
49
|
+
/** Registered API endpoint ID or raw URL path (e.g. 'api-customers' or '/api/v1/customers') */
|
|
50
|
+
apiEndpoint?: string;
|
|
51
|
+
/** HTTP method to use (defaults to 'GET') */
|
|
52
|
+
apiMethod?: 'GET' | 'POST';
|
|
53
|
+
/** Dot-notation path to the array of items in the response JSON (e.g. 'data.items' or 'rows') */
|
|
54
|
+
dataPath?: string;
|
|
55
|
+
/** Custom query parameters or payload mappings for the API request */
|
|
56
|
+
apiParams?: Record<string, unknown>;
|
|
57
|
+
/** Optional custom headers (e.g. { 'X-Custom-Tenant': '{{session.tenantId}}' }) */
|
|
58
|
+
apiHeaders?: Record<string, string>;
|
|
59
|
+
/** Whether request should be proxied via backend reporting gateway */
|
|
60
|
+
useProxy?: boolean;
|
|
49
61
|
}
|
|
50
62
|
/**
|
|
51
63
|
* Controls when a component is visible based on other component values.
|
|
@@ -20,9 +20,9 @@ export interface ReportDataSourceDefinition {
|
|
|
20
20
|
/** Database schema (defaults to 'dbo'). */
|
|
21
21
|
schema?: string;
|
|
22
22
|
/** Backend execution type. */
|
|
23
|
-
type?: 'stored_procedure' | 'table' | 'view' | 'sql' | string;
|
|
23
|
+
type?: 'stored_procedure' | 'table' | 'view' | 'sql' | 'api' | string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Parameter mappings. Values may be fixed, or tokens:
|
|
26
26
|
* `{{session.branchId}}`, `{{context.today}}`, `{{fieldKey}}` (canvas field).
|
|
27
27
|
*/
|
|
28
28
|
parameterMappings?: Record<string, string | number | boolean>;
|
|
@@ -36,6 +36,20 @@ export interface ReportDataSourceDefinition {
|
|
|
36
36
|
autoExecute?: boolean;
|
|
37
37
|
/** Caching strategy. */
|
|
38
38
|
cache?: DataSourceCacheDefinition;
|
|
39
|
+
/** Base URL override (if calling an external service outside apiBaseUrl) */
|
|
40
|
+
baseUrl?: string;
|
|
41
|
+
/** Dot-notation path to the array of records in the response (e.g. 'data.items' or 'rows') */
|
|
42
|
+
dataPath?: string;
|
|
43
|
+
/** Dot-notation path to total count for server-side pagination (e.g. 'result.total') */
|
|
44
|
+
totalPath?: string;
|
|
45
|
+
/** Parameter placement: 'query' | 'body' | 'auto' */
|
|
46
|
+
paramPlacement?: 'query' | 'body' | 'auto';
|
|
47
|
+
/** Request body template for POST requests */
|
|
48
|
+
bodyTemplate?: Record<string, unknown>;
|
|
49
|
+
/** Custom HTTP headers to include with the API request */
|
|
50
|
+
headers?: Record<string, string>;
|
|
51
|
+
/** Whether to route through the backend proxy gateway */
|
|
52
|
+
useProxy?: boolean;
|
|
39
53
|
}
|
|
40
54
|
/**
|
|
41
55
|
* Caching configuration for a data source.
|
|
@@ -3,3 +3,4 @@ export { ReportSessionContextService } from './report-session-context.service';
|
|
|
3
3
|
export type { SessionParamMatch, DerivedParametersResult, } from './report-session-context.service';
|
|
4
4
|
export { ReportStorageService } from './report-storage.service';
|
|
5
5
|
export { ReportDataDiscoveryService } from './report-data-discovery.service';
|
|
6
|
+
export { ReportApiExecutionService } from './report-api-execution.service';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ReportApiEndpointDefinition } from '../models/report-api-endpoint.model';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface ApiExecutionOptions {
|
|
5
|
+
url?: string;
|
|
6
|
+
endpoint?: string;
|
|
7
|
+
method?: string;
|
|
8
|
+
dataPath?: string;
|
|
9
|
+
totalPath?: string;
|
|
10
|
+
headers?: Record<string, string>;
|
|
11
|
+
useProxy?: boolean;
|
|
12
|
+
bodyTemplate?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Service responsible for executing API-based data retrieval requests.
|
|
16
|
+
*
|
|
17
|
+
* Supports URL path parameter interpolation (:id, {{id}}), query string parameter
|
|
18
|
+
* placement, JSON payload mapping, session header substitution, proxy routing,
|
|
19
|
+
* and dot-path response data extraction.
|
|
20
|
+
*/
|
|
21
|
+
export declare class ReportApiExecutionService {
|
|
22
|
+
private readonly http;
|
|
23
|
+
private readonly session;
|
|
24
|
+
private readonly reportingConfig;
|
|
25
|
+
private readonly endpoints;
|
|
26
|
+
getRegisteredEndpoints(): ReportApiEndpointDefinition[];
|
|
27
|
+
/**
|
|
28
|
+
* Executes a parameterized REST API request and extracts the result array.
|
|
29
|
+
*
|
|
30
|
+
* @param options Target endpoint configuration, URL, method, and data path.
|
|
31
|
+
* @param formValues Active parameter and filter values from the form/context.
|
|
32
|
+
* @param customMappings Additional fixed or mapped parameter values.
|
|
33
|
+
*/
|
|
34
|
+
executeApi(options: ApiExecutionOptions | Partial<ReportApiEndpointDefinition>, formValues?: Record<string, unknown>, customMappings?: Record<string, unknown>): Observable<unknown[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Dot-notation extractor: 'data.items' -> response.data.items
|
|
37
|
+
*/
|
|
38
|
+
extractDataArray(response: any, dataPath?: string): unknown[];
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReportApiExecutionService, never>;
|
|
40
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ReportApiExecutionService>;
|
|
41
|
+
}
|
|
@@ -16,6 +16,7 @@ export declare class ReportDataDiscoveryService {
|
|
|
16
16
|
private readonly discoveryAdapter;
|
|
17
17
|
private readonly lookupAdapter;
|
|
18
18
|
private readonly sessionService;
|
|
19
|
+
private readonly apiExecutionService;
|
|
19
20
|
/**
|
|
20
21
|
* Retrieves all database tables, views, and stored procedures.
|
|
21
22
|
*/
|
|
@@ -29,8 +30,29 @@ export declare class ReportDataDiscoveryService {
|
|
|
29
30
|
* 1. Attempts static schema discovery via ReportSchemaDiscoveryAdapter.
|
|
30
31
|
* 2. If static discovery returns 0 columns or throws an error (e.g. SQL Error 11526 with #temp tables),
|
|
31
32
|
* automatically runs dynamic sample query via ReportLookupAdapter using resolved parameters.
|
|
33
|
+
* 3. For REST APIs, executes a dynamic test sample and extracts columns from the result array.
|
|
32
34
|
*/
|
|
33
|
-
autoDetectColumns(entityName: string, entityType?: 'table' | 'stored_procedure', mappings?: Record<string, unknown>, schema?: string
|
|
35
|
+
autoDetectColumns(entityName: string, entityType?: 'table' | 'stored_procedure' | 'api', mappings?: Record<string, unknown>, schema?: string, apiOptions?: {
|
|
36
|
+
dataPath?: string;
|
|
37
|
+
method?: string;
|
|
38
|
+
headers?: Record<string, string>;
|
|
39
|
+
useProxy?: boolean;
|
|
40
|
+
}): Observable<GridColumnDefinition[]>;
|
|
41
|
+
/**
|
|
42
|
+
* Executes a sample API call and infers grid column definitions from the response records.
|
|
43
|
+
*/
|
|
44
|
+
autoDetectApiColumns(urlOrOptions: string | {
|
|
45
|
+
endpoint?: string;
|
|
46
|
+
url?: string;
|
|
47
|
+
method?: string;
|
|
48
|
+
dataPath?: string;
|
|
49
|
+
headers?: Record<string, string>;
|
|
50
|
+
useProxy?: boolean;
|
|
51
|
+
}, dataPathOrParams?: string | Record<string, unknown>, params?: Record<string, unknown>, options?: {
|
|
52
|
+
method?: string;
|
|
53
|
+
headers?: Record<string, string>;
|
|
54
|
+
useProxy?: boolean;
|
|
55
|
+
}): Observable<GridColumnDefinition[]>;
|
|
34
56
|
private mapStaticColumnsToGrid;
|
|
35
57
|
private fallbackDynamicDetection;
|
|
36
58
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportDataDiscoveryService, never>;
|
|
@@ -6,8 +6,10 @@ export declare class EndpointDataSourceAdapter extends ReportDataSourceAdapter {
|
|
|
6
6
|
private readonly http;
|
|
7
7
|
private readonly endpoints;
|
|
8
8
|
private readonly sessionService;
|
|
9
|
+
private readonly apiExecutionService;
|
|
9
10
|
execute(dataSource: ReportDataSourceDefinition, parameters: Record<string, unknown>): Observable<unknown[]>;
|
|
10
11
|
private resolveKind;
|
|
12
|
+
private isApiSource;
|
|
11
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<EndpointDataSourceAdapter, never>;
|
|
12
14
|
static ɵprov: i0.ɵɵInjectableDeclaration<EndpointDataSourceAdapter>;
|
|
13
15
|
}
|
|
@@ -5,6 +5,7 @@ export declare class EndpointLookupAdapter extends ReportLookupAdapter {
|
|
|
5
5
|
private readonly http;
|
|
6
6
|
private readonly endpoints;
|
|
7
7
|
private readonly sessionService;
|
|
8
|
+
private readonly apiExecutionService;
|
|
8
9
|
private readonly cache;
|
|
9
10
|
private readonly inFlight;
|
|
10
11
|
fetchOptions(request: LookupQueryRequest): Observable<LookupOptionItem[]>;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* are populated with the endpoint URLs so adapters can inject them.
|
|
6
6
|
*/
|
|
7
7
|
import { InjectionToken } from '@angular/core';
|
|
8
|
+
import { ReportApiEndpointDefinition } from '../../core/models/report-api-endpoint.model';
|
|
8
9
|
/**
|
|
9
10
|
* Endpoint URLs used by the endpoint-based adapters.
|
|
10
11
|
*/
|
|
@@ -14,6 +15,8 @@ export interface BwaysReportEndpoints {
|
|
|
14
15
|
executeEndpoint: string;
|
|
15
16
|
lookupEndpoint?: string | null;
|
|
16
17
|
reportsEndpoint: string | null;
|
|
18
|
+
apisEndpoint?: string | null;
|
|
19
|
+
apiEndpoints?: ReportApiEndpointDefinition[];
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
22
|
* Injection token for the endpoint URLs.
|
|
@@ -2,13 +2,14 @@ import { Observable } from 'rxjs';
|
|
|
2
2
|
import { LookupOptionItem, LookupQueryRequest, ReportLookupAdapter } from '../contracts/lookup.contract';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
|
-
* Built-in HTTP adapter for fetching dropdown options from backend database tables and
|
|
5
|
+
* Built-in HTTP adapter for fetching dropdown options from backend database tables, SPs, and REST APIs.
|
|
6
6
|
* Includes in-memory caching with TTL, in-flight request deduplication, and fallback mock data.
|
|
7
7
|
*/
|
|
8
8
|
export declare class HttpReportLookupAdapter extends ReportLookupAdapter {
|
|
9
9
|
private readonly http;
|
|
10
10
|
private readonly config;
|
|
11
11
|
private readonly sessionService;
|
|
12
|
+
private readonly apiExecutionService;
|
|
12
13
|
private readonly cache;
|
|
13
14
|
private readonly inFlight;
|
|
14
15
|
private readonly mockDataStore;
|
|
@@ -12,6 +12,9 @@ export interface LookupQueryRequest {
|
|
|
12
12
|
filter?: Record<string, unknown>;
|
|
13
13
|
parameters?: Record<string, unknown>;
|
|
14
14
|
limit?: number;
|
|
15
|
+
apiEndpoint?: string;
|
|
16
|
+
dataPath?: string;
|
|
17
|
+
useProxy?: boolean;
|
|
15
18
|
}
|
|
16
19
|
/**
|
|
17
20
|
* Normalized option item for dropdowns and selectors
|
|
@@ -6,6 +6,8 @@ export declare class ComponentPaletteComponent {
|
|
|
6
6
|
private readonly reportingConfig;
|
|
7
7
|
readonly collapseRequested: import("@angular/core").OutputEmitterRef<void>;
|
|
8
8
|
readonly searchQuery: import("@angular/core").WritableSignal<string>;
|
|
9
|
+
/** Selected category filter tab: 'all' or specific category name */
|
|
10
|
+
readonly selectedCategory: import("@angular/core").WritableSignal<string>;
|
|
9
11
|
/** Layout view mode: 'grid' (2-column side-by-side grid) or 'list' (compact row list). Defaults to 'grid'. */
|
|
10
12
|
readonly layoutMode: import("@angular/core").WritableSignal<"grid" | "list">;
|
|
11
13
|
/** Set of expanded category IDs */
|
|
@@ -15,6 +17,12 @@ export declare class ComponentPaletteComponent {
|
|
|
15
17
|
label: string;
|
|
16
18
|
icon: string;
|
|
17
19
|
}>;
|
|
20
|
+
/** Computed list of category tabs for quick one-click filtering */
|
|
21
|
+
readonly availableCategories: import("@angular/core").Signal<{
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
count: number;
|
|
25
|
+
}[]>;
|
|
18
26
|
readonly filteredCategories: import("@angular/core").Signal<{
|
|
19
27
|
name: string;
|
|
20
28
|
label: string;
|
|
@@ -22,15 +30,23 @@ export declare class ComponentPaletteComponent {
|
|
|
22
30
|
items: ReportingComponentMeta[];
|
|
23
31
|
}[]>;
|
|
24
32
|
readonly allExpanded: import("@angular/core").Signal<boolean>;
|
|
33
|
+
selectCategory(category: string): void;
|
|
25
34
|
isCategoryExpanded(categoryName: string): boolean;
|
|
26
35
|
toggleCategory(categoryName: string): void;
|
|
27
36
|
toggleAllCategories(): void;
|
|
28
37
|
getIconName(item: ReportingComponentMeta): string;
|
|
38
|
+
getComponentDescription(item: ReportingComponentMeta): string;
|
|
39
|
+
getGridLabel(item: ReportingComponentMeta): string;
|
|
40
|
+
getCategoryTheme(item: ReportingComponentMeta): string;
|
|
29
41
|
onItemDoubleClick(type: string): void;
|
|
30
42
|
onAddClick(event: MouseEvent, type: string): void;
|
|
31
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentPaletteComponent, never>;
|
|
32
44
|
static ɵcmp: i0.ɵɵComponentDeclaration<ComponentPaletteComponent, "rpt-component-palette", never, {}, { "collapseRequested": "collapseRequested"; }, never, never, true, never>;
|
|
33
45
|
}
|
|
46
|
+
/** Concise labels optimized for 2-column compact grid tiles (zero truncation) */
|
|
47
|
+
export declare const COMPONENT_SHORT_LABELS: Record<string, string>;
|
|
48
|
+
/** Dictionary of user-friendly micro-copy descriptions explaining each component's purpose */
|
|
49
|
+
export declare const COMPONENT_DESCRIPTIONS: Record<string, string>;
|
|
34
50
|
/** Dictionary of synonyms for component types and UI concepts */
|
|
35
51
|
export declare const COMPONENT_SYNONYMS: Record<string, string[]>;
|
|
36
52
|
/** Compute Levenshtein distance between two strings for typo tolerance */
|
package/lib/features/designer/components/property-editor/property-editor-datasource.component.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export declare class PropertyEditorDatasourceComponent implements OnInit, OnDest
|
|
|
11
11
|
private readonly discoveryAdapter;
|
|
12
12
|
private readonly sessionService;
|
|
13
13
|
private readonly designerState;
|
|
14
|
+
private readonly dataDiscovery;
|
|
15
|
+
private readonly endpoints;
|
|
14
16
|
private lastLoadedKey;
|
|
15
17
|
private columnsSub?;
|
|
16
18
|
private paramsSub?;
|
|
@@ -23,11 +25,21 @@ export declare class PropertyEditorDatasourceComponent implements OnInit, OnDest
|
|
|
23
25
|
}>;
|
|
24
26
|
readonly isAdvancedMode: import("@angular/core").WritableSignal<boolean>;
|
|
25
27
|
readonly isLoadingEntities: import("@angular/core").WritableSignal<boolean>;
|
|
28
|
+
readonly isTestingApi: import("@angular/core").WritableSignal<boolean>;
|
|
29
|
+
readonly apiTestStatus: import("@angular/core").WritableSignal<{
|
|
30
|
+
message: string;
|
|
31
|
+
kind: "success" | "error";
|
|
32
|
+
} | null>;
|
|
26
33
|
readonly allEntities: import("@angular/core").WritableSignal<DatabaseEntityMetadata[]>;
|
|
27
34
|
readonly entityColumns: import("@angular/core").WritableSignal<EntityColumnMetadata[]>;
|
|
28
35
|
readonly procedureParameters: import("@angular/core").WritableSignal<ProcedureParameterMetadata[]>;
|
|
29
36
|
readonly currentSourceType: import("@angular/core").Signal<DropdownSourceType>;
|
|
30
37
|
readonly selectedEntity: import("@angular/core").Signal<string>;
|
|
38
|
+
readonly selectedApiEndpoint: import("@angular/core").Signal<string>;
|
|
39
|
+
readonly selectedApiMethod: import("@angular/core").Signal<"GET" | "POST">;
|
|
40
|
+
readonly selectedDataPath: import("@angular/core").Signal<string>;
|
|
41
|
+
readonly selectedUseProxy: import("@angular/core").Signal<boolean>;
|
|
42
|
+
readonly registeredApis: import("@angular/core").Signal<SearchableSelectOption<any>[]>;
|
|
31
43
|
readonly selectedValueField: import("@angular/core").Signal<string>;
|
|
32
44
|
readonly selectedDisplayField: import("@angular/core").Signal<string>;
|
|
33
45
|
readonly selectedDependsOn: import("@angular/core").Signal<string>;
|
|
@@ -72,6 +84,11 @@ export declare class PropertyEditorDatasourceComponent implements OnInit, OnDest
|
|
|
72
84
|
*/
|
|
73
85
|
autoWireAllParameters(paramsList?: ProcedureParameterMetadata[]): void;
|
|
74
86
|
setSourceType(type: DropdownSourceType): void;
|
|
87
|
+
onApiEndpointSelected(endpoint: string): void;
|
|
88
|
+
onApiMethodChanged(method: 'GET' | 'POST'): void;
|
|
89
|
+
onDataPathChanged(dataPath: string): void;
|
|
90
|
+
onUseProxyChanged(useProxy: boolean): void;
|
|
91
|
+
testAndDetectApiColumns(): void;
|
|
75
92
|
onEntitySelected(entityName: string): void;
|
|
76
93
|
onValueFieldChanged(valueField: string): void;
|
|
77
94
|
onDisplayFieldChanged(displayField: string): void;
|
package/lib/features/designer/components/property-editor/property-editor-grid.component.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { SearchableSelectOption } from '../../../../primitives/components';
|
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
7
|
export declare class PropertyEditorGridComponent {
|
|
8
8
|
private readonly dataDiscovery;
|
|
9
|
+
private readonly endpoints;
|
|
9
10
|
readonly grid: import("@angular/core").InputSignal<ReportGridDefinition | undefined>;
|
|
10
11
|
readonly dataSource: import("@angular/core").InputSignal<ReportDataSourceDefinition | undefined>;
|
|
11
12
|
readonly availableEntities: import("@angular/core").InputSignal<DatabaseEntityMetadata[]>;
|
|
@@ -33,11 +34,22 @@ export declare class PropertyEditorGridComponent {
|
|
|
33
34
|
readonly updateDataSourceParameters: import("@angular/core").OutputEmitterRef<Record<string, unknown>>;
|
|
34
35
|
readonly entityChanged: import("@angular/core").OutputEmitterRef<{
|
|
35
36
|
name: string;
|
|
36
|
-
type: "stored_procedure" | "table";
|
|
37
|
+
type: "stored_procedure" | "table" | "api";
|
|
37
38
|
}>;
|
|
38
39
|
readonly internalParameters: import("@angular/core").WritableSignal<ProcedureParameterMetadata[]>;
|
|
39
40
|
readonly effectiveParameters: import("@angular/core").Signal<ProcedureParameterMetadata[]>;
|
|
40
|
-
readonly
|
|
41
|
+
readonly internalEntities: import("@angular/core").WritableSignal<DatabaseEntityMetadata[]>;
|
|
42
|
+
readonly allEntities: import("@angular/core").Signal<DatabaseEntityMetadata[]>;
|
|
43
|
+
readonly activeSourceType: import("@angular/core").WritableSignal<"table" | "api" | "stored_procedure">;
|
|
44
|
+
readonly currentSourceType: import("@angular/core").Signal<"table" | "api" | "stored_procedure">;
|
|
45
|
+
readonly activeEntityName: import("@angular/core").Signal<string>;
|
|
46
|
+
readonly apiEndpoint: import("@angular/core").Signal<string>;
|
|
47
|
+
readonly apiMethod: import("@angular/core").Signal<"GET" | "POST">;
|
|
48
|
+
readonly apiDataPath: import("@angular/core").Signal<string>;
|
|
49
|
+
readonly apiUseProxy: import("@angular/core").Signal<boolean>;
|
|
50
|
+
readonly registeredApis: import("@angular/core").Signal<SearchableSelectOption<any>[]>;
|
|
51
|
+
readonly availableTables: import("@angular/core").Signal<DatabaseEntityMetadata[]>;
|
|
52
|
+
readonly availableProcedures: import("@angular/core").Signal<DatabaseEntityMetadata[]>;
|
|
41
53
|
readonly isExecSnippetOpen: import("@angular/core").WritableSignal<boolean>;
|
|
42
54
|
readonly execSnippetText: import("@angular/core").WritableSignal<string>;
|
|
43
55
|
readonly execParseStatus: import("@angular/core").WritableSignal<{
|
|
@@ -47,10 +59,6 @@ export declare class PropertyEditorGridComponent {
|
|
|
47
59
|
toggleExecSnippet(): void;
|
|
48
60
|
applyExecSnippet(): void;
|
|
49
61
|
constructor();
|
|
50
|
-
readonly currentSourceType: import("@angular/core").Signal<"table" | "stored_procedure">;
|
|
51
|
-
readonly activeEntityName: import("@angular/core").Signal<string>;
|
|
52
|
-
readonly availableTables: import("@angular/core").Signal<DatabaseEntityMetadata[]>;
|
|
53
|
-
readonly availableProcedures: import("@angular/core").Signal<DatabaseEntityMetadata[]>;
|
|
54
62
|
readonly activeEntityList: import("@angular/core").Signal<DatabaseEntityMetadata[]>;
|
|
55
63
|
readonly gridEntitySelectOptions: import("@angular/core").Signal<SearchableSelectOption<any>[]>;
|
|
56
64
|
readonly columns: import("@angular/core").Signal<GridColumnDefinition[]>;
|
|
@@ -60,7 +68,11 @@ export declare class PropertyEditorGridComponent {
|
|
|
60
68
|
key: string;
|
|
61
69
|
value: string;
|
|
62
70
|
}[]>;
|
|
63
|
-
onSourceTypeChange(type: 'stored_procedure' | 'table'): void;
|
|
71
|
+
onSourceTypeChange(type: 'stored_procedure' | 'table' | 'api'): void;
|
|
72
|
+
onApiEndpointChange(endpoint: string): void;
|
|
73
|
+
onApiMethodChange(method: 'GET' | 'POST'): void;
|
|
74
|
+
onApiDataPathChange(dataPath: string): void;
|
|
75
|
+
onApiUseProxyChange(useProxy: boolean): void;
|
|
64
76
|
onSelectEntity(entityName: string): void;
|
|
65
77
|
getParameterValue(paramName: string): string | number | boolean;
|
|
66
78
|
onParameterChange(paramName: string, value: string | number | boolean): void;
|
|
@@ -57,7 +57,7 @@ export declare class PropertyEditorComponent {
|
|
|
57
57
|
updateGridRowClickAction(action: GridRowClickAction | undefined): void;
|
|
58
58
|
onGridEntityChanged(event: {
|
|
59
59
|
name: string;
|
|
60
|
-
type: 'stored_procedure' | 'table';
|
|
60
|
+
type: 'stored_procedure' | 'table' | 'api';
|
|
61
61
|
}): void;
|
|
62
62
|
onGridDataSourceParametersChanged(mappings: Record<string, unknown>): void;
|
|
63
63
|
autoDetectGridColumns(): void;
|
|
@@ -7,6 +7,7 @@ export declare class DesignerComponent implements OnInit {
|
|
|
7
7
|
private readonly persistenceAdapter;
|
|
8
8
|
private readonly dataSourceAdapter;
|
|
9
9
|
private readonly sessionService;
|
|
10
|
+
private readonly executionService;
|
|
10
11
|
private readonly dialog;
|
|
11
12
|
private readonly router;
|
|
12
13
|
private readonly reportingConfig;
|
|
@@ -33,6 +34,13 @@ export declare class DesignerComponent implements OnInit {
|
|
|
33
34
|
onResize(): void;
|
|
34
35
|
onKeyDown(event: KeyboardEvent): void;
|
|
35
36
|
readonly formattedJson: import("@angular/core").Signal<string>;
|
|
37
|
+
readonly editorTheme: import("@angular/core").WritableSignal<"light" | "dark">;
|
|
38
|
+
readonly wrapLines: import("@angular/core").WritableSignal<boolean>;
|
|
39
|
+
readonly jsonStats: import("@angular/core").Signal<{
|
|
40
|
+
lines: number;
|
|
41
|
+
sizeKb: string;
|
|
42
|
+
}>;
|
|
43
|
+
readonly highlightedLines: import("@angular/core").Signal<string[]>;
|
|
36
44
|
private loadedReportId;
|
|
37
45
|
private loadedReportDef;
|
|
38
46
|
private lastEmittedDef;
|
|
@@ -45,6 +53,10 @@ export declare class DesignerComponent implements OnInit {
|
|
|
45
53
|
parameters: Record<string, unknown>;
|
|
46
54
|
}): void;
|
|
47
55
|
copyJson(): void;
|
|
56
|
+
downloadJson(): void;
|
|
57
|
+
toggleEditorTheme(): void;
|
|
58
|
+
toggleWrapLines(): void;
|
|
59
|
+
private syntaxHighlightJson;
|
|
48
60
|
private showToast;
|
|
49
61
|
static ɵfac: i0.ɵɵFactoryDeclaration<DesignerComponent, never>;
|
|
50
62
|
static ɵcmp: i0.ɵɵComponentDeclaration<DesignerComponent, "rpt-designer", never, { "reportId": { "alias": "reportId"; "required": false; "isSignal": true; }; "definition": { "alias": "initialReport"; "required": false; "isSignal": true; }; }, { "reportSaved": "save"; "definitionChanged": "definitionChange"; }, never, never, true, never>;
|
|
@@ -8,6 +8,7 @@ import * as i0 from "@angular/core";
|
|
|
8
8
|
export declare class ReportExecutionService {
|
|
9
9
|
private readonly adapter;
|
|
10
10
|
private readonly session;
|
|
11
|
+
private readonly apiExecutionService;
|
|
11
12
|
/** Canvas field keys the user still has to fill before the report can run. */
|
|
12
13
|
getMissingFields(def: ReportDefinition, formValues: Record<string, unknown>): string[];
|
|
13
14
|
execute(def: ReportDefinition, formValues: Record<string, unknown>): Observable<unknown[]>;
|
|
@@ -9,6 +9,7 @@ export declare class RptGridOutletDirective implements OnDestroy {
|
|
|
9
9
|
private lastEmittedColumnDefs;
|
|
10
10
|
private readonly appliedInputs;
|
|
11
11
|
readonly componentType: import("@angular/core").InputSignal<Type<any> | null>;
|
|
12
|
+
readonly instanceKey: import("@angular/core").InputSignal<string | null>;
|
|
12
13
|
readonly inputs: import("@angular/core").InputSignal<Record<string, unknown>>;
|
|
13
14
|
readonly gridStateChange: import("@angular/core").OutputEmitterRef<any>;
|
|
14
15
|
readonly columnDefsChange: import("@angular/core").OutputEmitterRef<any>;
|
|
@@ -26,7 +27,7 @@ export declare class RptGridOutletDirective implements OnDestroy {
|
|
|
26
27
|
private clear;
|
|
27
28
|
ngOnDestroy(): void;
|
|
28
29
|
static ɵfac: i0.ɵɵFactoryDeclaration<RptGridOutletDirective, never>;
|
|
29
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<RptGridOutletDirective, "[rptGridOutlet]", never, { "componentType": { "alias": "rptGridOutlet"; "required": false; "isSignal": true; }; "inputs": { "alias": "inputs"; "required": false; "isSignal": true; }; }, { "gridStateChange": "gridStateChange"; "columnDefsChange": "columnDefsChange"; "rowClick": "rowClick"; "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<RptGridOutletDirective, "[rptGridOutlet]", never, { "componentType": { "alias": "rptGridOutlet"; "required": false; "isSignal": true; }; "instanceKey": { "alias": "instanceKey"; "required": false; "isSignal": true; }; "inputs": { "alias": "inputs"; "required": false; "isSignal": true; }; }, { "gridStateChange": "gridStateChange"; "columnDefsChange": "columnDefsChange"; "rowClick": "rowClick"; "selectionChange": "selectionChange"; }, never, never, true, never>;
|
|
30
31
|
}
|
|
31
32
|
export declare class ReportGridBridgeComponent {
|
|
32
33
|
private readonly injectedGrid;
|
|
@@ -104,6 +105,7 @@ export declare class ReportGridBridgeComponent {
|
|
|
104
105
|
statusBar: boolean;
|
|
105
106
|
rowClickAction?: import("../../core/models/report-grid.model").GridRowClickAction;
|
|
106
107
|
}>;
|
|
108
|
+
private reconcileColumnGroupDefs;
|
|
107
109
|
readonly gridReportState: import("@angular/core").Signal<any>;
|
|
108
110
|
readonly gridInputs: import("@angular/core").Signal<{
|
|
109
111
|
columns: {
|
|
@@ -12,9 +12,21 @@ export declare class ReportRuntimeComponent {
|
|
|
12
12
|
readonly reportId: import("@angular/core").InputSignal<string | undefined>;
|
|
13
13
|
/** Directly passed report definition (skips persistence adapter) */
|
|
14
14
|
readonly definition: import("@angular/core").InputSignal<ReportDefinition | null>;
|
|
15
|
+
/** Optional pre-loaded or canvas-shared result data */
|
|
16
|
+
readonly initialData: import("@angular/core").InputSignal<unknown[] | null>;
|
|
15
17
|
readonly resetRequested: import("@angular/core").OutputEmitterRef<{
|
|
16
18
|
definition: ReportDefinition;
|
|
17
19
|
}>;
|
|
20
|
+
readonly execute: import("@angular/core").OutputEmitterRef<{
|
|
21
|
+
definition: ReportDefinition;
|
|
22
|
+
parameters: Record<string, unknown>;
|
|
23
|
+
data: unknown[] | null;
|
|
24
|
+
}>;
|
|
25
|
+
readonly executed: import("@angular/core").OutputEmitterRef<{
|
|
26
|
+
definition: ReportDefinition;
|
|
27
|
+
parameters: Record<string, unknown>;
|
|
28
|
+
data: unknown[] | null;
|
|
29
|
+
}>;
|
|
18
30
|
readonly exportRequested: import("@angular/core").OutputEmitterRef<{
|
|
19
31
|
format: string;
|
|
20
32
|
fileName?: string;
|
|
@@ -107,5 +119,5 @@ export declare class ReportRuntimeComponent {
|
|
|
107
119
|
retryDrawer(): void;
|
|
108
120
|
retry(): void;
|
|
109
121
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportRuntimeComponent, never>;
|
|
110
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ReportRuntimeComponent, "rpt-report-runtime, rpt-runtime", never, { "reportId": { "alias": "reportId"; "required": false; "isSignal": true; }; "definition": { "alias": "report"; "required": false; "isSignal": true; }; }, { "resetRequested": "resetRequested"; "exportRequested": "exportRequested"; "printRequested": "printRequested"; "customActionTriggered": "customActionTriggered"; "gridStateChange": "gridStateChange"; "columnDefsChange": "columnDefsChange"; "selectionChange": "selectionChange"; "selectionChanged": "selectionChanged"; "rowActionTriggered": "rowActionTriggered"; "drilldownRequested": "drilldownRequested"; }, never, never, true, never>;
|
|
122
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReportRuntimeComponent, "rpt-report-runtime, rpt-runtime", never, { "reportId": { "alias": "reportId"; "required": false; "isSignal": true; }; "definition": { "alias": "report"; "required": false; "isSignal": true; }; "initialData": { "alias": "resultData"; "required": false; "isSignal": true; }; }, { "resetRequested": "resetRequested"; "execute": "execute"; "executed": "executed"; "exportRequested": "exportRequested"; "printRequested": "printRequested"; "customActionTriggered": "customActionTriggered"; "gridStateChange": "gridStateChange"; "columnDefsChange": "columnDefsChange"; "selectionChange": "selectionChange"; "selectionChanged": "selectionChanged"; "rowActionTriggered": "rowActionTriggered"; "drilldownRequested": "drilldownRequested"; }, never, never, true, never>;
|
|
111
123
|
}
|
|
@@ -14,3 +14,5 @@ export type { ChartDataItem, ChartType } from './chart-bridge/report-chart-bridg
|
|
|
14
14
|
export { RptIconComponent } from './icon/rpt-icon.component';
|
|
15
15
|
export { RptSearchableSelectComponent } from './searchable-select/rpt-searchable-select.component';
|
|
16
16
|
export type { SearchableSelectOption } from './searchable-select/rpt-searchable-select.component';
|
|
17
|
+
export { RptRadioComponent } from './radio/rpt-radio.component';
|
|
18
|
+
export type { RadioOption } from './radio/rpt-radio.component';
|