bways-report 0.2.13 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/esm2022/lib/core/models/selection-workflow.model.mjs +1 -1
  2. package/esm2022/lib/core/services/designer-form-context.service.mjs +11 -2
  3. package/esm2022/lib/core/services/report-data-discovery.service.mjs +5 -3
  4. package/esm2022/lib/core/services/report-execution-query.service.mjs +67 -0
  5. package/esm2022/lib/core/utils/report-form-values.util.mjs +23 -3
  6. package/esm2022/lib/core/utils/selection-workflow.util.mjs +20 -4
  7. package/esm2022/lib/features/designer/components/property-editor/formula-editor.component.mjs +3 -3
  8. package/esm2022/lib/features/designer/components/property-editor/parameter-binding-editor.component.mjs +359 -21
  9. package/esm2022/lib/features/designer/components/property-editor/property-editor-action.component.mjs +3 -3
  10. package/esm2022/lib/features/designer/components/property-editor/property-editor-datasource.component.mjs +3 -3
  11. package/esm2022/lib/features/designer/components/property-editor/property-editor-grid.component.mjs +22 -4
  12. package/esm2022/lib/features/designer/components/property-editor/property-editor.component.mjs +9 -8
  13. package/esm2022/lib/features/designer/components/property-editor/selection-workflow-editor.component.mjs +279 -96
  14. package/esm2022/lib/features/designer/components/property-editor/workflow-source-editor.component.mjs +67 -13
  15. package/esm2022/lib/features/runtime/report-execution.service.mjs +7 -2
  16. package/esm2022/lib/features/runtime/selection-workflow.service.mjs +58 -7
  17. package/fesm2022/bways-report.mjs +914 -155
  18. package/fesm2022/bways-report.mjs.map +1 -1
  19. package/lib/core/models/selection-workflow.model.d.ts +5 -0
  20. package/lib/core/services/designer-form-context.service.d.ts +1 -0
  21. package/lib/core/services/report-execution-query.service.d.ts +18 -0
  22. package/lib/core/utils/report-form-values.util.d.ts +1 -0
  23. package/lib/features/designer/components/property-editor/parameter-binding-editor.component.d.ts +24 -1
  24. package/lib/features/designer/components/property-editor/property-editor-grid.component.d.ts +10 -1
  25. package/lib/features/designer/components/property-editor/property-editor.component.d.ts +1 -0
  26. package/lib/features/designer/components/property-editor/selection-workflow-editor.component.d.ts +5 -1
  27. package/lib/features/designer/components/property-editor/workflow-source-editor.component.d.ts +4 -0
  28. package/lib/features/runtime/report-execution.service.d.ts +1 -0
  29. package/package.json +1 -1
@@ -1,9 +1,14 @@
1
1
  import { ReportGridDefinition } from './report-grid.model';
2
+ export type SelectionCaseType = 'all_sp_rows' | 'custom_parameter' | 'sp_selection_grid';
2
3
  /** A record picker. Radio workflows use one per option; dropdown workflows use one shared picker. */
3
4
  export interface SelectionWorkflowCase {
4
5
  value: string | number;
5
6
  /** Normal-report branch without interactive row selection; selected-row bindings resolve all lookup rows on Run. */
6
7
  direct?: boolean;
8
+ /** High-level mode of this case in a radio selection workflow. */
9
+ caseType?: SelectionCaseType;
10
+ /** Custom parameter literal value passed to final SP when caseType is 'custom_parameter'. */
11
+ customParameter?: string | number | boolean;
7
12
  /** Multiple selections send CSV values; omitted preserves legacy single-row behavior. */
8
13
  selectionMode?: 'single' | 'multiple';
9
14
  /** Join selected IDs and column values with this literal separator. Default comma; empty means concatenate. */
@@ -17,6 +17,7 @@ export declare class DesignerFormContextService {
17
17
  key: string | number;
18
18
  label: string;
19
19
  }[]): void;
20
+ setSelectionLiteral(key: string, value: unknown): void;
20
21
  setControlValue(key: string, value: unknown): void;
21
22
  static ɵfac: i0.ɵɵFactoryDeclaration<DesignerFormContextService, never>;
22
23
  static ɵprov: i0.ɵɵInjectableDeclaration<DesignerFormContextService>;
@@ -0,0 +1,18 @@
1
+ import { ReportDataSourceDefinition } from '../models/report-datasource.model';
2
+ import * as i0 from "@angular/core";
3
+ export interface ReportExecutionQuery {
4
+ sql: string | null;
5
+ error: string | null;
6
+ requestedAt: Date;
7
+ }
8
+ /** In-memory diagnostic snapshots, isolated by source object and never persisted in reports. */
9
+ export declare class ReportExecutionQueryService {
10
+ private readonly queries;
11
+ private entry;
12
+ lastQuery(source: ReportDataSourceDefinition | undefined): ReportExecutionQuery | null;
13
+ record(source: ReportDataSourceDefinition, parameters: Record<string, unknown>): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ReportExecutionQueryService, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<ReportExecutionQueryService>;
16
+ }
17
+ /** SQL equivalent for inspection/copying; the adapter still receives parameterized arguments. */
18
+ export declare function formatProcedureExecution(source: ReportDataSourceDefinition, parameters: Record<string, unknown>): string;
@@ -1,4 +1,5 @@
1
1
  import type { AbstractControl, FormGroup } from '@angular/forms';
2
+ export declare function createSelectionLiteralRecord(value: unknown): Record<string, unknown>;
2
3
  export declare function rememberSelectedOption(control: AbstractControl, value: unknown, record?: Record<string, unknown>, records?: Record<string, unknown>[], separator?: string): void;
3
4
  /** Keep form values primitive. Selection metadata never becomes a wire argument. */
4
5
  export declare function extractReportFormValues(form: FormGroup): Record<string, unknown>;
@@ -1,5 +1,6 @@
1
1
  import { ProcedureParameterMetadata } from '../../../../data-access/contracts/schema-discovery.contract';
2
2
  import { ReportComponentDefinition } from '../../../../core/models/report-component.model';
3
+ import { SelectionWorkflowDefinition, SelectionWorkflowCase, SelectionCaseType } from '../../../../core/models/selection-workflow.model';
3
4
  import { ParameterDateFormat } from '../../../../core/utils/report-parameter.util';
4
5
  import * as i0 from "@angular/core";
5
6
  /** Transient designer metadata connecting a visible radio field with its managed row selection. */
@@ -26,8 +27,30 @@ export declare class ParameterBindingEditorComponent {
26
27
  label?: string;
27
28
  }[]>;
28
29
  readonly selectionSources: import("@angular/core").InputSignal<SelectionBindingSource[]>;
30
+ readonly selectionWorkflows: import("@angular/core").InputSignal<SelectionWorkflowDefinition[]>;
31
+ readonly internalRadioOption: import("@angular/core").WritableSignal<string | number | null>;
32
+ readonly selectedRadioField: import("@angular/core").Signal<ReportComponentDefinition | undefined>;
33
+ readonly radioWorkflow: import("@angular/core").Signal<SelectionWorkflowDefinition | null>;
34
+ readonly radioOptions: import("@angular/core").Signal<{
35
+ label: string;
36
+ value: string | number;
37
+ }[]>;
38
+ readonly selectedRadioOptionValue: import("@angular/core").Signal<string | number | null>;
39
+ readonly selectedRadioOptionLabel: import("@angular/core").Signal<string>;
40
+ readonly selectedRadioCase: import("@angular/core").Signal<SelectionWorkflowCase | null>;
41
+ readonly selectedRadioCaseType: import("@angular/core").Signal<SelectionCaseType | null>;
42
+ readonly radioCaseColumns: import("@angular/core").Signal<{
43
+ field: string;
44
+ label?: string;
45
+ }[]>;
46
+ readonly selectedRadioColumn: import("@angular/core").Signal<string>;
47
+ onRadioOptionSelected(value: string | number): void;
48
+ onRadioColumnSelected(column: string): void;
29
49
  readonly effectiveSelectionSources: import("@angular/core").Signal<SelectionBindingSource[]>;
30
50
  readonly selectedRowSource: import("@angular/core").Signal<SelectionBindingSource | undefined>;
51
+ readonly standaloneSelectionSources: import("@angular/core").Signal<SelectionBindingSource[]>;
52
+ readonly selectedFieldChoice: import("@angular/core").Signal<string>;
53
+ readonly selectedTriggerType: import("@angular/core").Signal<string>;
31
54
  readonly selectedRowColumnChoice: import("@angular/core").Signal<string>;
32
55
  readonly selectedRowColumns: import("@angular/core").Signal<{
33
56
  field: string;
@@ -85,5 +108,5 @@ export declare class ParameterBindingEditorComponent {
85
108
  onFixedValueChanged(val: unknown): void;
86
109
  onContextSelected(ctxKey: string): void;
87
110
  static ɵfac: i0.ɵɵFactoryDeclaration<ParameterBindingEditorComponent, never>;
88
- static ɵcmp: i0.ɵɵComponentDeclaration<ParameterBindingEditorComponent, "rpt-parameter-binding-editor", never, { "param": { "alias": "param"; "required": true; "isSignal": true; }; "currentValue": { "alias": "currentValue"; "required": false; "isSignal": true; }; "allComponents": { "alias": "allComponents"; "required": false; "isSignal": true; }; "selectionKey": { "alias": "selectionKey"; "required": false; "isSignal": true; }; "selectionColumns": { "alias": "selectionColumns"; "required": false; "isSignal": true; }; "selectionSources": { "alias": "selectionSources"; "required": false; "isSignal": true; }; "currentComponentId": { "alias": "currentComponentId"; "required": false; "isSignal": true; }; "isAdvancedMode": { "alias": "isAdvancedMode"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "linkedFieldChange": "linkedFieldChange"; }, never, never, true, never>;
111
+ static ɵcmp: i0.ɵɵComponentDeclaration<ParameterBindingEditorComponent, "rpt-parameter-binding-editor", never, { "param": { "alias": "param"; "required": true; "isSignal": true; }; "currentValue": { "alias": "currentValue"; "required": false; "isSignal": true; }; "allComponents": { "alias": "allComponents"; "required": false; "isSignal": true; }; "selectionKey": { "alias": "selectionKey"; "required": false; "isSignal": true; }; "selectionColumns": { "alias": "selectionColumns"; "required": false; "isSignal": true; }; "selectionSources": { "alias": "selectionSources"; "required": false; "isSignal": true; }; "selectionWorkflows": { "alias": "selectionWorkflows"; "required": false; "isSignal": true; }; "currentComponentId": { "alias": "currentComponentId"; "required": false; "isSignal": true; }; "isAdvancedMode": { "alias": "isAdvancedMode"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "linkedFieldChange": "linkedFieldChange"; }, never, never, true, never>;
89
112
  }
@@ -1,4 +1,6 @@
1
+ import { ReportExecutionQuery } from '../../../../core/services/report-execution-query.service';
1
2
  import { GridColumnDefinition, GridRowClickAction, ReportGridDefinition } from '../../../../core/models/report-grid.model';
3
+ import { SelectionWorkflowDefinition } from '../../../../core/models/selection-workflow.model';
2
4
  import { ReportDataSourceDefinition } from '../../../../core/models/report-datasource.model';
3
5
  import { ReportComponentDefinition } from '../../../../core/models/report-component.model';
4
6
  import { DatabaseEntityMetadata, ProcedureParameterMetadata } from '../../../../data-access/contracts/schema-discovery.contract';
@@ -6,6 +8,12 @@ import { SearchableSelectOption } from '../../../../primitives/components';
6
8
  import { SelectionBindingSource } from './parameter-binding-editor.component';
7
9
  import * as i0 from "@angular/core";
8
10
  export declare class PropertyEditorGridComponent {
11
+ private readonly executionQuery;
12
+ private readonly clipboard;
13
+ readonly lastExecutionQuery: import("@angular/core").Signal<ReportExecutionQuery | null>;
14
+ private readonly queryCopyResult;
15
+ readonly queryCopyStatus: import("@angular/core").Signal<string>;
16
+ copyExecutionQuery(): void;
9
17
  private readonly endpointScope;
10
18
  private readonly dataDiscovery;
11
19
  private readonly endpoints;
@@ -13,6 +21,7 @@ export declare class PropertyEditorGridComponent {
13
21
  /** Names of the report's formulas, offered as a source for each column. */
14
22
  readonly formulaNames: import("@angular/core").InputSignal<string[]>;
15
23
  readonly selectionSources: import("@angular/core").InputSignal<SelectionBindingSource[]>;
24
+ readonly selectionWorkflows: import("@angular/core").InputSignal<SelectionWorkflowDefinition[]>;
16
25
  readonly selectionKey: import("@angular/core").InputSignal<string>;
17
26
  readonly selectionColumns: import("@angular/core").InputSignal<GridColumnDefinition[]>;
18
27
  readonly dataSource: import("@angular/core").InputSignal<ReportDataSourceDefinition | undefined>;
@@ -95,5 +104,5 @@ export declare class PropertyEditorGridComponent {
95
104
  updateMappingValue(index: number, newValue: string): void;
96
105
  removeMapping(index: number): void;
97
106
  static ɵfac: i0.ɵɵFactoryDeclaration<PropertyEditorGridComponent, never>;
98
- static ɵcmp: i0.ɵɵComponentDeclaration<PropertyEditorGridComponent, "rpt-property-editor-grid", never, { "grid": { "alias": "grid"; "required": false; "isSignal": true; }; "formulaNames": { "alias": "formulaNames"; "required": false; "isSignal": true; }; "selectionSources": { "alias": "selectionSources"; "required": false; "isSignal": true; }; "selectionKey": { "alias": "selectionKey"; "required": false; "isSignal": true; }; "selectionColumns": { "alias": "selectionColumns"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "availableEntities": { "alias": "availableEntities"; "required": false; "isSignal": true; }; "procedureParameters": { "alias": "procedureParameters"; "required": false; "isSignal": true; }; "allComponents": { "alias": "allComponents"; "required": false; "isSignal": true; }; "isRefreshingMetadata": { "alias": "isRefreshingMetadata"; "required": false; "isSignal": true; }; "metadataRefreshError": { "alias": "metadataRefreshError"; "required": false; "isSignal": true; }; "isDetecting": { "alias": "isDetecting"; "required": false; "isSignal": true; }; "statusMessage": { "alias": "statusMessage"; "required": false; "isSignal": true; }; "statusKind": { "alias": "statusKind"; "required": false; "isSignal": true; }; }, { "refreshMetadata": "refreshMetadata"; "addGrid": "addGrid"; "removeGrid": "removeGrid"; "addColumn": "addColumn"; "autoDetectColumns": "autoDetectColumns"; "removeColumn": "removeColumn"; "updateColumn": "updateColumn"; "updateOption": "updateOption"; "updateRowClickAction": "updateRowClickAction"; "setDataSource": "setDataSource"; "updateDataSourceParameters": "updateDataSourceParameters"; "entityChanged": "entityChanged"; }, never, never, true, never>;
107
+ static ɵcmp: i0.ɵɵComponentDeclaration<PropertyEditorGridComponent, "rpt-property-editor-grid", never, { "grid": { "alias": "grid"; "required": false; "isSignal": true; }; "formulaNames": { "alias": "formulaNames"; "required": false; "isSignal": true; }; "selectionSources": { "alias": "selectionSources"; "required": false; "isSignal": true; }; "selectionWorkflows": { "alias": "selectionWorkflows"; "required": false; "isSignal": true; }; "selectionKey": { "alias": "selectionKey"; "required": false; "isSignal": true; }; "selectionColumns": { "alias": "selectionColumns"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "required": false; "isSignal": true; }; "availableEntities": { "alias": "availableEntities"; "required": false; "isSignal": true; }; "procedureParameters": { "alias": "procedureParameters"; "required": false; "isSignal": true; }; "allComponents": { "alias": "allComponents"; "required": false; "isSignal": true; }; "isRefreshingMetadata": { "alias": "isRefreshingMetadata"; "required": false; "isSignal": true; }; "metadataRefreshError": { "alias": "metadataRefreshError"; "required": false; "isSignal": true; }; "isDetecting": { "alias": "isDetecting"; "required": false; "isSignal": true; }; "statusMessage": { "alias": "statusMessage"; "required": false; "isSignal": true; }; "statusKind": { "alias": "statusKind"; "required": false; "isSignal": true; }; }, { "refreshMetadata": "refreshMetadata"; "addGrid": "addGrid"; "removeGrid": "removeGrid"; "addColumn": "addColumn"; "autoDetectColumns": "autoDetectColumns"; "removeColumn": "removeColumn"; "updateColumn": "updateColumn"; "updateOption": "updateOption"; "updateRowClickAction": "updateRowClickAction"; "setDataSource": "setDataSource"; "updateDataSourceParameters": "updateDataSourceParameters"; "entityChanged": "entityChanged"; }, never, never, true, never>;
99
108
  }
@@ -70,6 +70,7 @@ export declare class PropertyEditorComponent {
70
70
  updateReport(key: string, value: unknown): void;
71
71
  updateSelectionWorkflow(settings: Partial<ReportDefinition>): void;
72
72
  updateFormulas(settings: Partial<ReportDefinition>): void;
73
+ readonly selectionWorkflows: import("@angular/core").Signal<import("bways-report").SelectionWorkflowDefinition[]>;
73
74
  readonly selectionSources: import("@angular/core").Signal<{
74
75
  key: string;
75
76
  triggerKey: string | undefined;
@@ -1,7 +1,7 @@
1
1
  import { ReportDefinition } from '../../../../core/models/report-definition.model';
2
2
  import { ReportDataSourceDefinition } from '../../../../core/models/report-datasource.model';
3
3
  import { ReportGridDefinition } from '../../../../core/models/report-grid.model';
4
- import { SelectionWorkflowDefinition, SelectionWorkflowCase } from '../../../../core/models/selection-workflow.model';
4
+ import { SelectionWorkflowDefinition, SelectionWorkflowCase, SelectionCaseType } from '../../../../core/models/selection-workflow.model';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class SelectionWorkflowEditorComponent {
7
7
  readonly definition: import("@angular/core").InputSignal<ReportDefinition>;
@@ -39,6 +39,10 @@ export declare class SelectionWorkflowEditorComponent {
39
39
  chooseLookupMode(mode: 'radio' | 'dropdown' | 'button'): void;
40
40
  chooseLookupButton(id: string): void;
41
41
  readonly currentCase: import("@angular/core").Signal<SelectionWorkflowCase>;
42
+ readonly currentCaseType: import("@angular/core").Signal<SelectionCaseType>;
43
+ onCaseTypeChange(type: SelectionCaseType): void;
44
+ readonly configuredLookupCase: import("@angular/core").Signal<SelectionWorkflowCase | undefined>;
45
+ readonly configuredLookupSpName: import("@angular/core").Signal<string>;
42
46
  readonly lookupSource: import("@angular/core").Signal<ReportDataSourceDefinition>;
43
47
  readonly resultGrid: import("@angular/core").Signal<ReportGridDefinition>;
44
48
  readonly resultSource: import("@angular/core").Signal<ReportDataSourceDefinition>;
@@ -40,6 +40,10 @@ export declare class WorkflowSourceEditorComponent {
40
40
  setMapping(name: string, value: string | number | boolean): void;
41
41
  bindSelection(name: string, column: string): void;
42
42
  detectColumns(): void;
43
+ readonly visibleColumnCount: import("@angular/core").Signal<number>;
44
+ readonly allColumnsSelected: import("@angular/core").Signal<boolean>;
45
+ readonly someColumnsSelected: import("@angular/core").Signal<boolean>;
46
+ toggleAllColumns(visible: boolean): void;
43
47
  columnChange(index: number, patch: Partial<GridColumnDefinition>): void;
44
48
  static ɵfac: i0.ɵɵFactoryDeclaration<WorkflowSourceEditorComponent, never>;
45
49
  static ɵcmp: i0.ɵɵComponentDeclaration<WorkflowSourceEditorComponent, "rpt-workflow-source-editor", never, { "source": { "alias": "source"; "required": true; "isSignal": true; }; "grid": { "alias": "grid"; "required": true; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "components": { "alias": "components"; "required": false; "isSignal": true; }; "selectionSources": { "alias": "selectionSources"; "required": false; "isSignal": true; }; "selectionKey": { "alias": "selectionKey"; "required": false; "isSignal": true; }; "selectedColumns": { "alias": "selectedColumns"; "required": false; "isSignal": true; }; "previewValues": { "alias": "previewValues"; "required": false; "isSignal": true; }; }, { "sourceChange": "sourceChange"; "gridChange": "gridChange"; }, never, never, true, never>;
@@ -6,6 +6,7 @@ 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 executionQuery;
9
10
  private readonly config;
10
11
  private readonly endpoints;
11
12
  private guard;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bways-report",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "description": "Enterprise-grade, metadata-driven reporting engine and visual page builder for Angular 18+ ERP applications.",
5
5
  "keywords": [
6
6
  "angular",