bways-report 0.1.9 → 0.2.1
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/README.md +506 -313
- package/esm2022/lib/core/config/bways-report-config.mjs +29 -32
- package/esm2022/lib/core/models/report-datasource.model.mjs +1 -1
- package/esm2022/lib/core/models/report-grid.model.mjs +1 -1
- package/esm2022/lib/core/services/report-api-execution.service.mjs +33 -11
- package/esm2022/lib/core/services/report-overlay.service.mjs +79 -0
- package/esm2022/lib/core/services/report-session-context.service.mjs +72 -3
- package/esm2022/lib/core/tokens/designer-config.token.mjs +4 -0
- package/esm2022/lib/core/tokens/reporting-config.token.mjs +1 -1
- package/esm2022/lib/core/utils/report-endpoint.util.mjs +22 -0
- package/esm2022/lib/core/utils/report-parameter.util.mjs +68 -15
- package/esm2022/lib/core/utils/report-request-scope.mjs +48 -0
- package/esm2022/lib/data-access/adapters/endpoint-datasource.adapter.mjs +16 -1
- package/esm2022/lib/data-access/adapters/endpoint-lookup.adapter.mjs +14 -2
- package/esm2022/lib/data-access/adapters/endpoint-masterdata.adapter.mjs +5 -2
- package/esm2022/lib/data-access/adapters/endpoint-persistence.adapter.mjs +30 -14
- package/esm2022/lib/data-access/adapters/endpoint-schema-discovery.adapter.mjs +32 -28
- package/esm2022/lib/data-access/adapters/endpoint-tokens.mjs +1 -1
- package/esm2022/lib/data-access/adapters/http-datasource.adapter.mjs +13 -37
- package/esm2022/lib/data-access/adapters/http-lookup.adapter.mjs +13 -50
- package/esm2022/lib/data-access/adapters/http-persistence.adapter.mjs +43 -194
- package/esm2022/lib/data-access/adapters/http-schema-discovery.adapter.mjs +17 -65
- package/esm2022/lib/data-access/adapters/index.mjs +1 -1
- package/esm2022/lib/data-access/adapters/local-storage-persistence.adapter.mjs +13 -4
- package/esm2022/lib/data-access/adapters/report-id-availability.mjs +20 -0
- package/esm2022/lib/data-access/adapters/session-headers.mjs +11 -0
- package/esm2022/lib/data-access/contracts/index.mjs +1 -1
- package/esm2022/lib/data-access/contracts/report-persistence.contract.mjs +13 -1
- package/esm2022/lib/features/designer/components/design-canvas/design-canvas.component.mjs +53 -41
- package/esm2022/lib/features/designer/components/dialogs/report-saved-dialog.component.mjs +551 -123
- package/esm2022/lib/features/designer/components/property-editor/parameter-binding-editor.component.mjs +39 -6
- package/esm2022/lib/features/designer/components/property-editor/property-editor-datasource.component.mjs +12 -6
- package/esm2022/lib/features/designer/components/property-editor/property-editor-grid.component.mjs +11 -10
- package/esm2022/lib/features/designer/components/property-editor/property-editor.component.mjs +13 -6
- package/esm2022/lib/features/designer/components/toolbar/designer-toolbar.component.mjs +54 -32
- package/esm2022/lib/features/designer/designer.component.mjs +107 -69
- package/esm2022/lib/features/designer/rpt-report-designer.component.mjs +10 -4
- package/esm2022/lib/features/designer/services/designer-config.service.mjs +56 -0
- package/esm2022/lib/features/designer/services/designer-endpoints.service.mjs +155 -0
- package/esm2022/lib/features/designer/services/designer-state.service.mjs +3 -2
- package/esm2022/lib/features/embed/bways-report-builder.component.mjs +3 -3
- package/esm2022/lib/features/export/services/report-export.service.mjs +11 -6
- package/esm2022/lib/features/persistence/services/report-store.service.mjs +78 -23
- package/esm2022/lib/features/persistence/services/schema-validator.service.mjs +59 -3
- package/esm2022/lib/features/routing/components/routed-report-designer.component.mjs +12 -17
- package/esm2022/lib/features/routing/components/routed-report-runtime.component.mjs +5 -3
- package/esm2022/lib/features/routing/report-routes.mjs +6 -6
- package/esm2022/lib/features/routing/resolvers/report-route-identifier.mjs +5 -0
- package/esm2022/lib/features/routing/resolvers/report.resolver.mjs +3 -2
- package/esm2022/lib/features/runtime/dynamic-renderer.component.mjs +2 -2
- package/esm2022/lib/features/runtime/report-execution.service.mjs +52 -8
- package/esm2022/lib/features/runtime/report-grid-bridge.component.mjs +18 -21
- package/esm2022/lib/features/runtime/report-runtime.component.mjs +94 -71
- package/esm2022/lib/features/runtime/rpt-report.component.mjs +49 -41
- package/esm2022/lib/primitives/components/chart-bridge/report-chart-bridge.component.mjs +7 -2
- package/esm2022/lib/primitives/components/dropdown/rpt-dropdown.component.mjs +21 -10
- package/esm2022/lib/primitives/components/icon/rpt-icon.component.mjs +13 -1
- package/esm2022/lib/primitives/components/radio/rpt-radio.component.mjs +15 -5
- package/esm2022/lib/primitives/components/searchable-select/rpt-searchable-select.component.mjs +6 -6
- package/esm2022/lib/provide-reporting.mjs +9 -29
- package/fesm2022/bways-report.mjs +2072 -1088
- package/fesm2022/bways-report.mjs.map +1 -1
- package/lib/core/config/bways-report-config.d.ts +14 -5
- package/lib/core/models/report-datasource.model.d.ts +5 -0
- package/lib/core/models/report-grid.model.d.ts +1 -1
- package/lib/core/services/report-overlay.service.d.ts +14 -0
- package/lib/core/services/report-session-context.service.d.ts +9 -0
- package/lib/core/tokens/designer-config.token.d.ts +4 -0
- package/lib/core/tokens/reporting-config.token.d.ts +4 -0
- package/lib/core/utils/report-endpoint.util.d.ts +12 -0
- package/lib/core/utils/report-parameter.util.d.ts +13 -1
- package/lib/core/utils/report-request-scope.d.ts +14 -0
- package/lib/data-access/adapters/endpoint-persistence.adapter.d.ts +6 -2
- package/lib/data-access/adapters/endpoint-schema-discovery.adapter.d.ts +4 -2
- package/lib/data-access/adapters/endpoint-tokens.d.ts +4 -0
- package/lib/data-access/adapters/http-datasource.adapter.d.ts +1 -3
- package/lib/data-access/adapters/http-lookup.adapter.d.ts +1 -3
- package/lib/data-access/adapters/http-persistence.adapter.d.ts +11 -16
- package/lib/data-access/adapters/http-schema-discovery.adapter.d.ts +3 -5
- package/lib/data-access/adapters/index.d.ts +1 -1
- package/lib/data-access/adapters/local-storage-persistence.adapter.d.ts +2 -2
- package/lib/data-access/adapters/report-id-availability.d.ts +6 -0
- package/lib/data-access/adapters/session-headers.d.ts +3 -0
- package/lib/data-access/contracts/index.d.ts +1 -0
- package/lib/data-access/contracts/report-persistence.contract.d.ts +16 -1
- package/lib/features/designer/components/design-canvas/design-canvas.component.d.ts +2 -0
- package/lib/features/designer/components/dialogs/report-saved-dialog.component.d.ts +37 -5
- package/lib/features/designer/components/property-editor/parameter-binding-editor.component.d.ts +5 -0
- package/lib/features/designer/components/property-editor/property-editor-datasource.component.d.ts +4 -3
- package/lib/features/designer/components/property-editor/property-editor-grid.component.d.ts +1 -0
- package/lib/features/designer/components/property-editor/property-editor.component.d.ts +1 -0
- package/lib/features/designer/components/toolbar/designer-toolbar.component.d.ts +7 -1
- package/lib/features/designer/designer.component.d.ts +16 -2
- package/lib/features/designer/rpt-report-designer.component.d.ts +5 -1
- package/lib/features/designer/services/designer-config.service.d.ts +13 -0
- package/lib/features/designer/services/designer-endpoints.service.d.ts +25 -0
- package/lib/features/persistence/services/report-store.service.d.ts +15 -1
- package/lib/features/persistence/services/schema-validator.service.d.ts +2 -0
- package/lib/features/routing/resolvers/report-route-identifier.d.ts +2 -0
- package/lib/features/runtime/report-execution.service.d.ts +3 -0
- package/lib/features/runtime/report-grid-bridge.component.d.ts +3 -2
- package/lib/features/runtime/report-runtime.component.d.ts +1 -0
- package/lib/features/runtime/rpt-report.component.d.ts +5 -0
- package/lib/primitives/components/chart-bridge/report-chart-bridge.component.d.ts +3 -1
- package/lib/primitives/components/dropdown/rpt-dropdown.component.d.ts +1 -2
- package/lib/primitives/components/searchable-select/rpt-searchable-select.component.d.ts +0 -1
- package/package.json +9 -5
- package/styles/theme.css +184 -0
- package/third-party-notices/angular-cdk-LICENSE.txt +21 -0
|
@@ -1,14 +1,28 @@
|
|
|
1
|
+
import { BwaysReportConfig } from '../../core/config/bways-report-config';
|
|
1
2
|
import { OnInit } from '@angular/core';
|
|
2
3
|
import { ReportDefinition } from '../../core/models/report-definition.model';
|
|
3
4
|
import { DesignerStateService } from './services/designer-state.service';
|
|
5
|
+
import { BwaysReportApiUrls } from '../../data-access/adapters/endpoint-tokens';
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
export declare class DesignerComponent implements OnInit {
|
|
8
|
+
private readonly requests;
|
|
9
|
+
readonly loadError: import("@angular/core").WritableSignal<string | null>;
|
|
10
|
+
private readonly injector;
|
|
11
|
+
private readonly destroyRef;
|
|
12
|
+
private saveDialogOpen;
|
|
13
|
+
private readonly endpointScope;
|
|
14
|
+
private readonly configuration;
|
|
15
|
+
/** Page-local settings; omitted values inherit optional application defaults. */
|
|
16
|
+
set config(value: BwaysReportConfig | null | undefined);
|
|
17
|
+
/** Override any subset of configured URLs for this designer and its preview. */
|
|
18
|
+
set apiUrl(value: BwaysReportApiUrls | null | undefined);
|
|
6
19
|
readonly designerState: DesignerStateService;
|
|
7
20
|
private readonly persistenceAdapter;
|
|
8
21
|
private readonly dataSourceAdapter;
|
|
9
22
|
private readonly sessionService;
|
|
10
23
|
private readonly executionService;
|
|
11
24
|
private readonly dialog;
|
|
25
|
+
private readonly overlaySupport;
|
|
12
26
|
private readonly router;
|
|
13
27
|
private readonly reportingConfig;
|
|
14
28
|
/** Optional reportId to load from persistence adapter */
|
|
@@ -46,8 +60,8 @@ export declare class DesignerComponent implements OnInit {
|
|
|
46
60
|
private lastEmittedDef;
|
|
47
61
|
constructor();
|
|
48
62
|
ngOnInit(): void;
|
|
63
|
+
retryLoad(): void;
|
|
49
64
|
onSave(): void;
|
|
50
|
-
private openSavedDialog;
|
|
51
65
|
onPreviewExecute(event: {
|
|
52
66
|
definition: ReportDefinition;
|
|
53
67
|
parameters: Record<string, unknown>;
|
|
@@ -59,5 +73,5 @@ export declare class DesignerComponent implements OnInit {
|
|
|
59
73
|
private syntaxHighlightJson;
|
|
60
74
|
private showToast;
|
|
61
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<DesignerComponent, never>;
|
|
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>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DesignerComponent, "rpt-designer", never, { "config": { "alias": "config"; "required": false; }; "apiUrl": { "alias": "apiUrl"; "required": false; }; "reportId": { "alias": "reportId"; "required": false; "isSignal": true; }; "definition": { "alias": "initialReport"; "required": false; "isSignal": true; }; }, { "reportSaved": "save"; "definitionChanged": "definitionChange"; }, never, never, true, never>;
|
|
63
77
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { BwaysReportConfig } from '../../core/config/bways-report-config';
|
|
2
|
+
import { BwaysReportApiUrls } from '../../data-access/adapters/endpoint-tokens';
|
|
1
3
|
import { ReportDefinition } from '../../core/models/report-definition.model';
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
3
5
|
/**
|
|
@@ -16,6 +18,8 @@ import * as i0 from "@angular/core";
|
|
|
16
18
|
* ```
|
|
17
19
|
*/
|
|
18
20
|
export declare class RptReportDesignerComponent {
|
|
21
|
+
readonly config: import("@angular/core").InputSignal<BwaysReportConfig | null>;
|
|
22
|
+
readonly apiUrl: import("@angular/core").InputSignal<BwaysReportApiUrls | null>;
|
|
19
23
|
/** Report ID to automatically load via configured ReportPersistenceAdapter */
|
|
20
24
|
readonly id: import("@angular/core").InputSignal<string | undefined>;
|
|
21
25
|
/** Report definition to load directly in memory */
|
|
@@ -34,5 +38,5 @@ export declare class RptReportDesignerComponent {
|
|
|
34
38
|
onDefinitionChange(definition: ReportDefinition): void;
|
|
35
39
|
onClose(): void;
|
|
36
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<RptReportDesignerComponent, never>;
|
|
37
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RptReportDesignerComponent, "rpt-report-designer, rpt-designer-view", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "report": { "alias": "report"; "required": false; "isSignal": true; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; }, { "saved": "saved"; "closed": "closed"; "definitionChange": "definitionChange"; }, never, never, true, never>;
|
|
41
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RptReportDesignerComponent, "rpt-report-designer, rpt-designer-view", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "apiUrl": { "alias": "apiUrl"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "report": { "alias": "report"; "required": false; "isSignal": true; }; "showCloseButton": { "alias": "showCloseButton"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; }, { "saved": "saved"; "closed": "closed"; "definitionChange": "definitionChange"; }, never, never, true, never>;
|
|
38
42
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BwaysReportConfig } from '../../../core/config/bways-report-config';
|
|
2
|
+
import { ReportingConfig } from '../../../core/tokens/reporting-config.token';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DesignerConfigService {
|
|
5
|
+
private readonly inherited;
|
|
6
|
+
readonly local: import("@angular/core").WritableSignal<BwaysReportConfig | null>;
|
|
7
|
+
private readonly effective;
|
|
8
|
+
readonly reporting: ReportingConfig;
|
|
9
|
+
constructor();
|
|
10
|
+
set(value: BwaysReportConfig | null | undefined): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DesignerConfigService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DesignerConfigService>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Provider, Type } from '@angular/core';
|
|
2
|
+
import { BwaysReportApiUrls, BwaysReportEndpoints } from '../../../data-access/adapters/endpoint-tokens';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Private state owned by one designer; never mutates application providers. */
|
|
5
|
+
export declare class DesignerEndpointsService {
|
|
6
|
+
private readonly defaults;
|
|
7
|
+
private readonly config;
|
|
8
|
+
private readonly injector;
|
|
9
|
+
private readonly pageConfig;
|
|
10
|
+
private readonly adapters;
|
|
11
|
+
private overrides;
|
|
12
|
+
readonly revision: import("@angular/core").WritableSignal<number>;
|
|
13
|
+
private readonly resolved;
|
|
14
|
+
readonly endpoints: BwaysReportEndpoints;
|
|
15
|
+
setOverrides(value: BwaysReportApiUrls | null | undefined): void;
|
|
16
|
+
hasOverride(keys: (keyof BwaysReportApiUrls)[]): boolean;
|
|
17
|
+
adapter<T>(type: Type<T>): T;
|
|
18
|
+
isConfigured(): boolean;
|
|
19
|
+
refresh(): void;
|
|
20
|
+
usesDefaultStorageBase(): boolean;
|
|
21
|
+
private merged;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DesignerEndpointsService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DesignerEndpointsService>;
|
|
24
|
+
}
|
|
25
|
+
export declare const DESIGNER_ENDPOINT_PROVIDERS: Provider[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { ReportDefinition, ReportSummary } from '../../../core/models/report-definition.model';
|
|
3
|
+
import { ReportSaveOptions, ReportIdStatus } from '../../../data-access/contracts/report-persistence.contract';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
5
6
|
* ReportStoreService manages application-wide cached report states,
|
|
@@ -8,6 +9,12 @@ import * as i0 from "@angular/core";
|
|
|
8
9
|
export declare class ReportStoreService {
|
|
9
10
|
private readonly adapter;
|
|
10
11
|
private readonly validator;
|
|
12
|
+
private readonly session;
|
|
13
|
+
private readonly endpoints;
|
|
14
|
+
private cacheContext;
|
|
15
|
+
private currentCacheContext;
|
|
16
|
+
private guardCacheContext;
|
|
17
|
+
private ensureCacheContext;
|
|
11
18
|
/** List of all known report summaries */
|
|
12
19
|
readonly summaries: import("@angular/core").WritableSignal<ReportSummary[]>;
|
|
13
20
|
/** In-memory cache of loaded full report definitions by ID */
|
|
@@ -39,7 +46,14 @@ export declare class ReportStoreService {
|
|
|
39
46
|
/**
|
|
40
47
|
* Saves a report definition, validates it, and updates local cache.
|
|
41
48
|
*/
|
|
42
|
-
|
|
49
|
+
/** Opaque endpoint/session identity for pending user confirmations. */
|
|
50
|
+
getStorageContextKey(): string;
|
|
51
|
+
inspectReportId(id: string): Observable<ReportIdStatus>;
|
|
52
|
+
checkReportId(id: string): Observable<boolean>;
|
|
53
|
+
/** Saves a validated report definition and updates the local cache. */
|
|
54
|
+
saveReport(report: ReportDefinition, options?: ReportSaveOptions): Observable<ReportDefinition>;
|
|
55
|
+
/** Accepts an already persisted report without issuing another database write. */
|
|
56
|
+
cacheSavedReport(report: ReportDefinition): void;
|
|
43
57
|
/**
|
|
44
58
|
* Deletes a report definition by ID.
|
|
45
59
|
*/
|
|
@@ -16,6 +16,8 @@ export interface SchemaValidationResult {
|
|
|
16
16
|
* - Column span boundary violations
|
|
17
17
|
*/
|
|
18
18
|
export declare function validateReportSchema(definition: ReportDefinition): SchemaValidationResult;
|
|
19
|
+
/** Normalize legacy optional collections only after verifying unknown input is safe. */
|
|
20
|
+
export declare function normalizeReportDefinition(value: unknown): ReportDefinition;
|
|
19
21
|
/**
|
|
20
22
|
* SchemaValidatorService provides schema verification methods.
|
|
21
23
|
*/
|
|
@@ -6,6 +6,9 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
* Live Preview and the designer canvas so all three behave identically.
|
|
7
7
|
*/
|
|
8
8
|
export declare class ReportExecutionService {
|
|
9
|
+
private readonly config;
|
|
10
|
+
private readonly endpoints;
|
|
11
|
+
private guard;
|
|
9
12
|
private readonly adapter;
|
|
10
13
|
private readonly session;
|
|
11
14
|
private readonly apiExecutionService;
|
|
@@ -30,6 +30,7 @@ export declare class RptGridOutletDirective implements OnDestroy {
|
|
|
30
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>;
|
|
31
31
|
}
|
|
32
32
|
export declare class ReportGridBridgeComponent {
|
|
33
|
+
private readonly designerConfig;
|
|
33
34
|
private readonly injectedGrid;
|
|
34
35
|
private readonly storage;
|
|
35
36
|
constructor();
|
|
@@ -79,6 +80,7 @@ export declare class ReportGridBridgeComponent {
|
|
|
79
80
|
readonly gridInstanceKey: import("@angular/core").Signal<string>;
|
|
80
81
|
readonly gridStateKey: import("@angular/core").Signal<string>;
|
|
81
82
|
readonly gridConfig: import("@angular/core").Signal<{
|
|
83
|
+
selectable: boolean;
|
|
82
84
|
rowSelection: "single" | "multiple";
|
|
83
85
|
selectionMode: "single" | "multiple";
|
|
84
86
|
checkboxSelection: boolean;
|
|
@@ -86,7 +88,6 @@ export declare class ReportGridBridgeComponent {
|
|
|
86
88
|
stateKey: string;
|
|
87
89
|
pageSize?: number;
|
|
88
90
|
pagination?: boolean;
|
|
89
|
-
selectable?: boolean;
|
|
90
91
|
showRowNumbers?: boolean;
|
|
91
92
|
allowColumnReorder?: boolean;
|
|
92
93
|
allowExport?: boolean;
|
|
@@ -154,6 +155,7 @@ export declare class ReportGridBridgeComponent {
|
|
|
154
155
|
}[];
|
|
155
156
|
rowData: unknown[];
|
|
156
157
|
config: {
|
|
158
|
+
selectable: boolean;
|
|
157
159
|
rowSelection: "single" | "multiple";
|
|
158
160
|
selectionMode: "single" | "multiple";
|
|
159
161
|
checkboxSelection: boolean;
|
|
@@ -161,7 +163,6 @@ export declare class ReportGridBridgeComponent {
|
|
|
161
163
|
stateKey: string;
|
|
162
164
|
pageSize?: number;
|
|
163
165
|
pagination?: boolean;
|
|
164
|
-
selectable?: boolean;
|
|
165
166
|
showRowNumbers?: boolean;
|
|
166
167
|
allowColumnReorder?: boolean;
|
|
167
168
|
allowExport?: boolean;
|
|
@@ -4,6 +4,7 @@ import { ComponentActionDefinition } from '../../core/models/component-event.mod
|
|
|
4
4
|
import { GridRowClickAction } from '../../core/models/report-grid.model';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class ReportRuntimeComponent {
|
|
7
|
+
private readonly requests;
|
|
7
8
|
private readonly persistenceAdapter;
|
|
8
9
|
private readonly dataSourceAdapter;
|
|
9
10
|
private readonly sessionService;
|
|
@@ -10,6 +10,10 @@ export interface ReportViewPreset {
|
|
|
10
10
|
createdAt?: string;
|
|
11
11
|
}
|
|
12
12
|
export declare class RptReportComponent {
|
|
13
|
+
private readonly requests;
|
|
14
|
+
readonly presetError: import("@angular/core").WritableSignal<string | null>;
|
|
15
|
+
readonly isSavingPreset: import("@angular/core").WritableSignal<boolean>;
|
|
16
|
+
private readonly persistedDefinition;
|
|
13
17
|
private readonly exportService;
|
|
14
18
|
private readonly persistence;
|
|
15
19
|
readonly id: import("@angular/core").InputSignal<string | undefined>;
|
|
@@ -61,6 +65,7 @@ export declare class RptReportComponent {
|
|
|
61
65
|
closeSavePresetModal(): void;
|
|
62
66
|
saveCurrentPreset(): void;
|
|
63
67
|
deletePreset(presetId: string): void;
|
|
68
|
+
private persistPresets;
|
|
64
69
|
onExportExcel(): void;
|
|
65
70
|
onExportCsv(): void;
|
|
66
71
|
onPrintReport(): void;
|
|
@@ -8,7 +8,9 @@ export interface ChartDataItem {
|
|
|
8
8
|
}
|
|
9
9
|
export type ChartType = 'bar' | 'line' | 'donut';
|
|
10
10
|
export declare class ReportChartBridgeComponent {
|
|
11
|
-
readonly
|
|
11
|
+
private readonly injectedChart;
|
|
12
|
+
private readonly designerConfig;
|
|
13
|
+
get hostChartComponent(): Type<unknown> | null;
|
|
12
14
|
readonly definition: import("@angular/core").InputSignal<ReportComponentDefinition | undefined>;
|
|
13
15
|
readonly customData: import("@angular/core").InputSignal<ChartDataItem[] | undefined>;
|
|
14
16
|
readonly customChartType: import("@angular/core").InputSignal<ChartType | undefined>;
|
|
@@ -13,7 +13,6 @@ export declare class RptDropdownComponent implements OnDestroy {
|
|
|
13
13
|
private readonly sessionService;
|
|
14
14
|
private readonly elementRef;
|
|
15
15
|
private readonly reportingConfig;
|
|
16
|
-
private readonly overlay;
|
|
17
16
|
readonly scrollStrategy: ScrollStrategy;
|
|
18
17
|
readonly triggerWidth: import("@angular/core").WritableSignal<string | number>;
|
|
19
18
|
readonly overlayPositions: ConnectedPosition[];
|
|
@@ -66,7 +65,7 @@ export declare class RptDropdownComponent implements OnDestroy {
|
|
|
66
65
|
readonly hasExcessOptions: import("@angular/core").Signal<boolean>;
|
|
67
66
|
readonly excessOptionsCount: import("@angular/core").Signal<number>;
|
|
68
67
|
readonly waitingLabel: import("@angular/core").Signal<string>;
|
|
69
|
-
readonly statusKind: import("@angular/core").Signal<"error" | "
|
|
68
|
+
readonly statusKind: import("@angular/core").Signal<"error" | "waiting" | "idle" | "loading" | "ok" | "empty">;
|
|
70
69
|
readonly statusText: import("@angular/core").Signal<string>;
|
|
71
70
|
readonly isInvalid: import("@angular/core").Signal<boolean>;
|
|
72
71
|
readonly errorMessage: import("@angular/core").Signal<string>;
|
|
@@ -13,7 +13,6 @@ export interface SearchableSelectOption<T = any> {
|
|
|
13
13
|
}
|
|
14
14
|
export declare class RptSearchableSelectComponent implements ControlValueAccessor {
|
|
15
15
|
private readonly elementRef;
|
|
16
|
-
private readonly overlay;
|
|
17
16
|
readonly panelId: string;
|
|
18
17
|
readonly scrollStrategy: ScrollStrategy;
|
|
19
18
|
readonly triggerWidth: import("@angular/core").WritableSignal<string | number>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bways-report",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Enterprise-grade, metadata-driven reporting engine and visual page builder for Angular 18+ ERP applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"@angular/common": ">=18.0.0",
|
|
28
28
|
"@angular/core": ">=18.0.0",
|
|
29
29
|
"@angular/forms": ">=18.0.0",
|
|
30
|
+
"@angular/router": ">=18.0.0",
|
|
30
31
|
"@angular/cdk": ">=18.0.0",
|
|
31
32
|
"rxjs": "^7.8.0"
|
|
32
33
|
},
|
|
@@ -39,10 +40,11 @@
|
|
|
39
40
|
"tslib": "^2.3.0"
|
|
40
41
|
},
|
|
41
42
|
"schematics": "./schematics/collection.json",
|
|
42
|
-
"sideEffects":
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
"sideEffects": [
|
|
44
|
+
"**/*.css"
|
|
45
|
+
],
|
|
45
46
|
"exports": {
|
|
47
|
+
"./styles/theme.css": "./styles/theme.css",
|
|
46
48
|
"./package.json": {
|
|
47
49
|
"default": "./package.json"
|
|
48
50
|
},
|
|
@@ -52,5 +54,7 @@
|
|
|
52
54
|
"esm": "./esm2022/bways-report.mjs",
|
|
53
55
|
"default": "./fesm2022/bways-report.mjs"
|
|
54
56
|
}
|
|
55
|
-
}
|
|
57
|
+
},
|
|
58
|
+
"module": "fesm2022/bways-report.mjs",
|
|
59
|
+
"typings": "index.d.ts"
|
|
56
60
|
}
|
package/styles/theme.css
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BWays-Report Default CSS Theme Variables & Design Tokens
|
|
3
|
+
*
|
|
4
|
+
* Designed according to Enterprise Precision & Data-Dense Dashboard standards.
|
|
5
|
+
* Host ERP applications can easily override any of these variables
|
|
6
|
+
* in their global styles or container elements to match their design system.
|
|
7
|
+
*/
|
|
8
|
+
:root {
|
|
9
|
+
/* Typography */
|
|
10
|
+
--rpt-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', Helvetica, Arial, sans-serif;
|
|
11
|
+
--rpt-font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Fira Code', monospace;
|
|
12
|
+
--rpt-font-size-xs: 0.6875rem; /* 11px */
|
|
13
|
+
--rpt-font-size-sm: 0.75rem; /* 12px */
|
|
14
|
+
--rpt-font-size-base: 0.875rem; /* 14px */
|
|
15
|
+
--rpt-font-size-md: 1rem; /* 16px */
|
|
16
|
+
--rpt-font-size-lg: 1.125rem; /* 18px */
|
|
17
|
+
--rpt-font-size-xl: 1.375rem; /* 22px */
|
|
18
|
+
--rpt-font-size-2xl: 1.75rem; /* 28px */
|
|
19
|
+
--rpt-font-weight-normal: 400;
|
|
20
|
+
--rpt-font-weight-medium: 500;
|
|
21
|
+
--rpt-font-weight-semibold: 600;
|
|
22
|
+
--rpt-font-weight-bold: 700;
|
|
23
|
+
|
|
24
|
+
/* Spacing Scale (4/8px Rhythm) */
|
|
25
|
+
--rpt-space-xs: 4px;
|
|
26
|
+
--rpt-space-sm: 8px;
|
|
27
|
+
--rpt-space-md: 12px;
|
|
28
|
+
--rpt-space-lg: 16px;
|
|
29
|
+
--rpt-space-xl: 24px;
|
|
30
|
+
--rpt-space-2xl: 32px;
|
|
31
|
+
|
|
32
|
+
/* Brand / Primary Color Scale */
|
|
33
|
+
--rpt-color-primary: #2563eb;
|
|
34
|
+
--rpt-color-primary-hover: #1d4ed8;
|
|
35
|
+
--rpt-color-primary-active: #1e40af;
|
|
36
|
+
--rpt-color-primary-light: #eff6ff;
|
|
37
|
+
--rpt-color-primary-focus: rgba(37, 99, 235, 0.25);
|
|
38
|
+
--rpt-color-primary-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
|
|
39
|
+
|
|
40
|
+
/* Neutral Backgrounds & Surfaces */
|
|
41
|
+
--rpt-color-bg: #f8fafc;
|
|
42
|
+
--rpt-color-surface: #ffffff;
|
|
43
|
+
--rpt-color-surface-hover: #f1f5f9;
|
|
44
|
+
--rpt-color-surface-active: #e2e8f0;
|
|
45
|
+
--rpt-color-surface-elevated: #ffffff;
|
|
46
|
+
|
|
47
|
+
/* Text & Foreground */
|
|
48
|
+
--rpt-color-text: #0f172a;
|
|
49
|
+
--rpt-color-text-secondary: #334155;
|
|
50
|
+
--rpt-color-text-muted: #64748b;
|
|
51
|
+
--rpt-color-text-inverse: #ffffff;
|
|
52
|
+
|
|
53
|
+
/* Borders & Dividers */
|
|
54
|
+
--rpt-color-border: #cbd5e1;
|
|
55
|
+
--rpt-color-border-subtle: #e2e8f0;
|
|
56
|
+
--rpt-color-border-hover: #94a3b8;
|
|
57
|
+
--rpt-color-border-focus: #2563eb;
|
|
58
|
+
|
|
59
|
+
/* Status Colors */
|
|
60
|
+
--rpt-color-danger: #ef4444;
|
|
61
|
+
--rpt-color-danger-hover: #dc2626;
|
|
62
|
+
--rpt-color-danger-bg: #fef2f2;
|
|
63
|
+
--rpt-color-danger-border: #fecaca;
|
|
64
|
+
--rpt-color-success: #10b981;
|
|
65
|
+
--rpt-color-success-bg: #ecfdf5;
|
|
66
|
+
--rpt-color-success-border: #a7f3d0;
|
|
67
|
+
--rpt-color-warning: #f59e0b;
|
|
68
|
+
--rpt-color-warning-bg: #fffbeb;
|
|
69
|
+
--rpt-color-warning-border: #fde68a;
|
|
70
|
+
--rpt-color-info: #0284c7;
|
|
71
|
+
--rpt-color-info-bg: #f0f9ff;
|
|
72
|
+
--rpt-color-info-border: #bae6fd;
|
|
73
|
+
|
|
74
|
+
/* Border Radii */
|
|
75
|
+
--rpt-border-radius-xs: 3px;
|
|
76
|
+
--rpt-border-radius-sm: 4px;
|
|
77
|
+
--rpt-border-radius: 6px;
|
|
78
|
+
--rpt-border-radius-lg: 8px;
|
|
79
|
+
--rpt-border-radius-xl: 12px;
|
|
80
|
+
--rpt-border-radius-full: 9999px;
|
|
81
|
+
|
|
82
|
+
/* Transitions & Animation Speeds */
|
|
83
|
+
--rpt-transition-speed-fast: 100ms;
|
|
84
|
+
--rpt-transition-speed: 150ms;
|
|
85
|
+
--rpt-transition-speed-smooth: 250ms;
|
|
86
|
+
--rpt-transition-ease: cubic-bezier(0.16, 1, 0.3, 1);
|
|
87
|
+
|
|
88
|
+
/* Elevation Shadows */
|
|
89
|
+
--rpt-box-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
|
|
90
|
+
--rpt-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
|
|
91
|
+
--rpt-box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
|
|
92
|
+
--rpt-box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
|
|
93
|
+
--rpt-box-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
|
|
94
|
+
--rpt-box-shadow-focus: 0 0 0 3px var(--rpt-color-primary-focus);
|
|
95
|
+
|
|
96
|
+
/* Glassmorphism */
|
|
97
|
+
--rpt-glass-bg: rgba(255, 255, 255, 0.85);
|
|
98
|
+
--rpt-glass-border: rgba(255, 255, 255, 0.4);
|
|
99
|
+
--rpt-glass-blur: blur(10px);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* ==========================================================================
|
|
103
|
+
Global Helper & Accessibility Utilities
|
|
104
|
+
========================================================================== */
|
|
105
|
+
.rpt-tabular-nums {
|
|
106
|
+
font-variant-numeric: tabular-nums;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* Universal Form Control Typography Reset */
|
|
110
|
+
button,
|
|
111
|
+
input,
|
|
112
|
+
select,
|
|
113
|
+
textarea {
|
|
114
|
+
font-family: inherit;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Remove increment / decrement stepper arrows from all number inputs */
|
|
118
|
+
input[type=number]::-webkit-inner-spin-button,
|
|
119
|
+
input[type=number]::-webkit-outer-spin-button {
|
|
120
|
+
-webkit-appearance: none;
|
|
121
|
+
margin: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
input[type=number] {
|
|
125
|
+
-moz-appearance: textfield;
|
|
126
|
+
appearance: textfield;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Accessible focus ring */
|
|
130
|
+
:focus-visible {
|
|
131
|
+
outline: 2px solid var(--rpt-color-primary);
|
|
132
|
+
outline-offset: 2px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Respect reduced motion */
|
|
136
|
+
@media (prefers-reduced-motion: reduce) {
|
|
137
|
+
*, ::before, ::after {
|
|
138
|
+
animation-duration: 0.01ms !important;
|
|
139
|
+
animation-iteration-count: 1 !important;
|
|
140
|
+
transition-duration: 0.01ms !important;
|
|
141
|
+
scroll-behavior: auto !important;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* CDK Drag and Drop Global Styles */
|
|
146
|
+
.cdk-drag-preview {
|
|
147
|
+
box-sizing: border-box;
|
|
148
|
+
border-radius: var(--rpt-border-radius-lg, 8px);
|
|
149
|
+
box-shadow: 0 16px 32px -4px rgba(0, 0, 0, 0.28), 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
150
|
+
opacity: 0.96;
|
|
151
|
+
background: var(--rpt-color-surface, #ffffff);
|
|
152
|
+
border: 1px solid var(--rpt-color-primary, #2563eb);
|
|
153
|
+
z-index: 10000 !important;
|
|
154
|
+
font-family: var(--rpt-font-family, system-ui, sans-serif) !important;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.cdk-drag-preview * {
|
|
158
|
+
font-family: inherit !important;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.cdk-drag-placeholder {
|
|
162
|
+
opacity: 0.25 !important;
|
|
163
|
+
border: 2px dashed var(--rpt-color-primary, #2563eb) !important;
|
|
164
|
+
border-radius: var(--rpt-border-radius-lg, 8px) !important;
|
|
165
|
+
background: var(--rpt-color-primary-light, rgba(37, 99, 235, 0.05)) !important;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.cdk-drag-animating {
|
|
169
|
+
transition: transform 220ms var(--rpt-transition-ease, cubic-bezier(0.16, 1, 0.3, 1));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.canvas-grid.cdk-drop-list-dragging .canvas-component-card:not(.cdk-drag-placeholder) {
|
|
173
|
+
transition: transform 220ms var(--rpt-transition-ease, cubic-bezier(0.16, 1, 0.3, 1));
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* Optional library dialog appearance. Structural positioning is installed by the library. */
|
|
177
|
+
.rpt-dialog-panel {
|
|
178
|
+
max-width: 95vw;
|
|
179
|
+
max-height: 95vh;
|
|
180
|
+
}
|
|
181
|
+
.rpt-dialog-backdrop {
|
|
182
|
+
background-color: rgba(15, 23, 42, 0.48);
|
|
183
|
+
backdrop-filter: blur(3px);
|
|
184
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Google LLC.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|