bways-report 0.2.1 → 0.2.2
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 +18 -0
- package/esm2022/lib/core/config/bways-report-config.mjs +1 -1
- package/esm2022/lib/core/services/report-session-context.service.mjs +1 -44
- package/esm2022/lib/core/utils/report-parameter.util.mjs +14 -2
- package/esm2022/lib/features/designer/components/property-editor/parameter-binding-editor.component.mjs +55 -2
- package/esm2022/lib/features/designer/components/property-editor/property-editor-datasource.component.mjs +9 -7
- package/esm2022/lib/features/designer/components/property-editor/property-editor-grid.component.mjs +7 -14
- package/esm2022/lib/features/designer/components/toolbar/designer-toolbar.component.mjs +11 -11
- package/esm2022/lib/features/designer/designer.component.mjs +3 -3
- package/esm2022/lib/features/designer/services/designer-state.service.mjs +5 -3
- package/esm2022/lib/primitives/components/dropdown/rpt-dropdown.component.mjs +4 -4
- package/fesm2022/bways-report.mjs +94 -81
- package/fesm2022/bways-report.mjs.map +1 -1
- package/lib/core/config/bways-report-config.d.ts +3 -0
- package/lib/core/services/report-session-context.service.d.ts +0 -5
- package/lib/core/utils/report-parameter.util.d.ts +2 -0
- package/lib/features/designer/components/property-editor/parameter-binding-editor.component.d.ts +7 -0
- package/lib/features/designer/components/property-editor/property-editor-datasource.component.d.ts +1 -0
- package/package.json +1 -1
- package/styles/theme.css +9 -12
|
@@ -105,6 +105,9 @@ export interface BwaysReportConfig {
|
|
|
105
105
|
* a plain object, a factory function, an Observable, or a Signal.
|
|
106
106
|
*
|
|
107
107
|
* @example
|
|
108
|
+
* Browser login storage is never inspected automatically. Omitted page sessions inherit
|
|
109
|
+
* explicitly configured application sessions; use session: {} to isolate a page.
|
|
110
|
+
*
|
|
108
111
|
* session: PlaygroundSessionService
|
|
109
112
|
* session: () => inject(AuthService).session()
|
|
110
113
|
* session: { branchId: 1, companyId: 10 }
|
|
@@ -74,11 +74,6 @@ export declare class ReportSessionContextService implements OnDestroy {
|
|
|
74
74
|
* Always pulls the latest runtime state. Never throws or crashes the thread.
|
|
75
75
|
*/
|
|
76
76
|
getCurrentSessionContext(): SessionContextMap;
|
|
77
|
-
/**
|
|
78
|
-
* Safely detects session parameters from host project browser storage
|
|
79
|
-
* (sessionStorage: user_Info, currentUser; localStorage: currentUser, CompanyData, user_Info).
|
|
80
|
-
*/
|
|
81
|
-
private detectBrowserSession;
|
|
82
77
|
/**
|
|
83
78
|
* Normalizes a parameter or session key into a lowercase alphanumeric string
|
|
84
79
|
* for reliable, case-insensitive, and symbol-insensitive matching.
|
|
@@ -44,6 +44,8 @@ export declare function parseSqlExecStatement(sql: string): ParsedSqlExec | null
|
|
|
44
44
|
* - anything else -> sanitized literal value (fixed value)
|
|
45
45
|
*/
|
|
46
46
|
export declare function resolveParameterValue(raw: unknown, session: Record<string, unknown>, formValues: Record<string, unknown>): unknown;
|
|
47
|
+
/** Replace a single mapping and remove all stale aliases for the same argument. */
|
|
48
|
+
export declare function setParameterMapping(mappings: ParameterMappings | undefined, name: string, value: string | number | boolean): ParameterMappings;
|
|
47
49
|
/** Canonical SQL argument names. Equal aliases collapse; conflicting values fail explicitly. */
|
|
48
50
|
export declare function normalizeParameterNames(parameters: Record<string, unknown>): Record<string, unknown>;
|
|
49
51
|
/** Resolves mappings into one concrete value per parameter, without @ aliases. */
|
package/lib/features/designer/components/property-editor/parameter-binding-editor.component.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export type ParameterBindingMode = 'session' | 'control' | 'fixed' | 'context' | 'custom';
|
|
6
6
|
export declare class ParameterBindingEditorComponent {
|
|
7
7
|
private readonly sessionService;
|
|
8
|
+
private readonly reportingConfig;
|
|
8
9
|
readonly param: import("@angular/core").InputSignal<ProcedureParameterMetadata>;
|
|
9
10
|
readonly currentValue: import("@angular/core").InputSignal<string | number | boolean>;
|
|
10
11
|
readonly allComponents: import("@angular/core").InputSignal<ReportComponentDefinition[]>;
|
|
@@ -18,6 +19,7 @@ export declare class ParameterBindingEditorComponent {
|
|
|
18
19
|
}>;
|
|
19
20
|
readonly internalMode: import("@angular/core").WritableSignal<ParameterBindingMode | null>;
|
|
20
21
|
readonly sessionMatch: import("@angular/core").Signal<import("../../../../core/services/report-session-context.service").SessionParamMatch | null>;
|
|
22
|
+
readonly unavailableSessionBinding: import("@angular/core").Signal<boolean | undefined>;
|
|
21
23
|
readonly friendlyLabel: import("@angular/core").Signal<string>;
|
|
22
24
|
readonly displayType: import("@angular/core").Signal<"Date" | "Text" | "Number" | "Yes / No">;
|
|
23
25
|
readonly isCurrentValue: (val: string | number) => boolean;
|
|
@@ -26,6 +28,11 @@ export declare class ParameterBindingEditorComponent {
|
|
|
26
28
|
value: string | number;
|
|
27
29
|
}[]>;
|
|
28
30
|
readonly compatibleControls: import("@angular/core").Signal<ReportComponentDefinition[]>;
|
|
31
|
+
readonly selectedDropdownField: import("@angular/core").Signal<ReportComponentDefinition | undefined>;
|
|
32
|
+
readonly dropdownExample: import("@angular/core").Signal<{
|
|
33
|
+
label: string;
|
|
34
|
+
value: string;
|
|
35
|
+
} | null>;
|
|
29
36
|
readonly dateFormats: readonly ["yyyy-MM-dd", "yyyyMMdd", "dd/MM/yyyy", "MM/dd/yyyy", "dd-MM-yyyy"];
|
|
30
37
|
readonly selectedDateField: import("@angular/core").Signal<ReportComponentDefinition | undefined>;
|
|
31
38
|
readonly selectedDateFormat: import("@angular/core").Signal<"dd/MM/yyyy" | "yyyy-MM-dd" | "yyyyMMdd" | "MM/dd/yyyy" | "dd-MM-yyyy">;
|
package/lib/features/designer/components/property-editor/property-editor-datasource.component.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare class PropertyEditorDatasourceComponent implements OnDestroy {
|
|
|
12
12
|
private entitiesSub?;
|
|
13
13
|
private readonly discoveryAdapter;
|
|
14
14
|
private readonly sessionService;
|
|
15
|
+
private readonly reportingConfig;
|
|
15
16
|
private readonly designerState;
|
|
16
17
|
private readonly dataDiscovery;
|
|
17
18
|
private readonly endpoints;
|
package/package.json
CHANGED
package/styles/theme.css
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
/* Typography */
|
|
10
10
|
--rpt-font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', Helvetica, Arial, sans-serif;
|
|
11
11
|
--rpt-font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Fira Code', monospace;
|
|
12
|
-
--rpt-font-size-xs:
|
|
13
|
-
--rpt-font-size-sm:
|
|
14
|
-
--rpt-font-size-base:
|
|
15
|
-
--rpt-font-size-md:
|
|
16
|
-
--rpt-font-size-lg:
|
|
17
|
-
--rpt-font-size-xl:
|
|
18
|
-
--rpt-font-size-2xl:
|
|
12
|
+
--rpt-font-size-xs: 11px; /* 11px */
|
|
13
|
+
--rpt-font-size-sm: 12px; /* 12px */
|
|
14
|
+
--rpt-font-size-base: 14px; /* 14px */
|
|
15
|
+
--rpt-font-size-md: 16px; /* 16px */
|
|
16
|
+
--rpt-font-size-lg: 18px; /* 18px */
|
|
17
|
+
--rpt-font-size-xl: 22px; /* 22px */
|
|
18
|
+
--rpt-font-size-2xl: 28px; /* 28px */
|
|
19
19
|
--rpt-font-weight-normal: 400;
|
|
20
20
|
--rpt-font-weight-medium: 500;
|
|
21
21
|
--rpt-font-weight-semibold: 600;
|
|
@@ -106,11 +106,8 @@
|
|
|
106
106
|
font-variant-numeric: tabular-nums;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
/*
|
|
110
|
-
button,
|
|
111
|
-
input,
|
|
112
|
-
select,
|
|
113
|
-
textarea {
|
|
109
|
+
/* Library typography only: do not reset the host application controls. */
|
|
110
|
+
:where(rpt-designer, rpt-report-designer, rpt-runtime, rpt-report, rpt-report-saved-dialog) :is(button, input, select, textarea) {
|
|
114
111
|
font-family: inherit;
|
|
115
112
|
}
|
|
116
113
|
|