we-report-angular 0.0.0-stage → 0.2.0
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/LICENSE +21 -0
- package/README.md +51 -2
- package/esm2022/lib/designer/bindable-input.component.mjs +111 -0
- package/esm2022/lib/designer/control-factory.mjs +48 -0
- package/esm2022/lib/designer/data-sources-dialog.component.mjs +266 -0
- package/esm2022/lib/designer/database-source-editor.component.mjs +412 -0
- package/esm2022/lib/designer/design-surface.component.mjs +695 -0
- package/esm2022/lib/designer/designer-fields.mjs +37 -0
- package/esm2022/lib/designer/designer-state.mjs +315 -0
- package/esm2022/lib/designer/expression-editor.component.mjs +168 -0
- package/esm2022/lib/designer/formatting-rule.mjs +41 -0
- package/esm2022/lib/designer/property-panel.component.mjs +295 -0
- package/esm2022/lib/designer/we-report-designer.component.mjs +318 -0
- package/esm2022/lib/locales/de.mjs +326 -0
- package/esm2022/lib/locales/es.mjs +326 -0
- package/esm2022/lib/locales/fr.mjs +326 -0
- package/esm2022/lib/viewer/we-report-page.component.mjs +206 -0
- package/esm2022/lib/viewer/we-report-viewer.component.mjs +301 -0
- package/esm2022/lib/we-report-backend.service.mjs +17 -0
- package/esm2022/lib/we-report-config.mjs +26 -0
- package/esm2022/lib/we-report-fonts.service.mjs +75 -0
- package/esm2022/lib/we-report-icon.pipe.mjs +19 -0
- package/esm2022/lib/we-report-icons.mjs +47 -0
- package/esm2022/lib/we-report-locale.mjs +654 -0
- package/esm2022/lib/we-report-locales.mjs +21 -0
- package/esm2022/public-api.mjs +18 -0
- package/esm2022/we-report-angular.mjs +5 -0
- package/fesm2022/we-report-angular.mjs +4977 -0
- package/fesm2022/we-report-angular.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/designer/bindable-input.component.d.ts +27 -0
- package/lib/designer/control-factory.d.ts +14 -0
- package/lib/designer/data-sources-dialog.component.d.ts +61 -0
- package/lib/designer/database-source-editor.component.d.ts +58 -0
- package/lib/designer/design-surface.component.d.ts +112 -0
- package/lib/designer/designer-fields.d.ts +16 -0
- package/lib/designer/designer-state.d.ts +74 -0
- package/lib/designer/expression-editor.component.d.ts +39 -0
- package/lib/designer/formatting-rule.d.ts +14 -0
- package/lib/designer/property-panel.component.d.ts +87 -0
- package/lib/designer/we-report-designer.component.d.ts +90 -0
- package/lib/locales/de.d.ts +3 -0
- package/lib/locales/es.d.ts +3 -0
- package/lib/locales/fr.d.ts +3 -0
- package/lib/viewer/we-report-page.component.d.ts +19 -0
- package/lib/viewer/we-report-viewer.component.d.ts +56 -0
- package/lib/we-report-backend.service.d.ts +10 -0
- package/lib/we-report-config.d.ts +34 -0
- package/lib/we-report-fonts.service.d.ts +19 -0
- package/lib/we-report-icon.pipe.d.ts +12 -0
- package/lib/we-report-icons.d.ts +44 -0
- package/lib/we-report-locale.d.ts +283 -0
- package/lib/we-report-locales.d.ts +8 -0
- package/package.json +48 -3
- package/public-api.d.ts +14 -0
- package/styles/we-report-theme.scss +106 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LayoutPage, PathItem, TextItem } from 'we-report-core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Draws one laid-out page as SVG in millimetre units. It only draws what the layout engine
|
|
5
|
+
* positioned — text lines included — so it matches the PDF exactly.
|
|
6
|
+
*/
|
|
7
|
+
export declare class WeReportPageComponent {
|
|
8
|
+
readonly page: import("@angular/core").InputSignal<LayoutPage>;
|
|
9
|
+
readonly zoom: import("@angular/core").InputSignal<number>;
|
|
10
|
+
protected readonly ptToMm: number;
|
|
11
|
+
protected text(item: unknown): TextItem;
|
|
12
|
+
protected path(item: unknown): PathItem;
|
|
13
|
+
protected paint(color: string | undefined): string;
|
|
14
|
+
protected stroke(color: string | undefined): string | null;
|
|
15
|
+
protected textColor(color: string): string;
|
|
16
|
+
protected family(item: TextItem): string;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WeReportPageComponent, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WeReportPageComponent, "we-report-page", never, { "page": { "alias": "page"; "required": true; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { LayoutDocument, LayoutProblem, ReportDefinition, ReportParameter } from 'we-report-core';
|
|
2
|
+
import { WeReportLocale } from '../we-report-locale';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/** Paged preview of a report with zoom, PDF download and print. No server involved. */
|
|
5
|
+
export declare class WeReportViewerComponent {
|
|
6
|
+
readonly report: import("@angular/core").InputSignal<ReportDefinition>;
|
|
7
|
+
/** Rows (or an object holding them) to print; replaces the report's own data source data. */
|
|
8
|
+
readonly data: import("@angular/core").InputSignal<unknown>;
|
|
9
|
+
readonly zoom: import("@angular/core").InputSignal<number>;
|
|
10
|
+
/** Overrides the `WE_REPORT_LOCALE` token. */
|
|
11
|
+
readonly locale: import("@angular/core").InputSignal<WeReportLocale | undefined>;
|
|
12
|
+
/** Print time; defaults to now. Fix it for reproducible output. */
|
|
13
|
+
readonly printDate: import("@angular/core").InputSignal<Date | undefined>;
|
|
14
|
+
/** Report parameter values from the host; the user can still change them in the parameter bar. */
|
|
15
|
+
readonly parameters: import("@angular/core").InputSignal<Record<string, unknown>>;
|
|
16
|
+
/** Fetch used for web-service data sources (add auth, or route through your backend). */
|
|
17
|
+
readonly fetchFn: import("@angular/core").InputSignal<typeof fetch | undefined>;
|
|
18
|
+
readonly problems: import("@angular/core").OutputEmitterRef<LayoutProblem[]>;
|
|
19
|
+
readonly rendered: import("@angular/core").OutputEmitterRef<LayoutDocument>;
|
|
20
|
+
private readonly config;
|
|
21
|
+
private readonly fontsService;
|
|
22
|
+
private readonly backend;
|
|
23
|
+
private readonly dom;
|
|
24
|
+
private readonly defaultLocale;
|
|
25
|
+
protected readonly strings: import("@angular/core").Signal<WeReportLocale>;
|
|
26
|
+
protected readonly zoomLevel: import("@angular/core").WritableSignal<number>;
|
|
27
|
+
protected readonly document: import("@angular/core").WritableSignal<LayoutDocument | null>;
|
|
28
|
+
protected readonly error: import("@angular/core").WritableSignal<string | null>;
|
|
29
|
+
protected readonly loadErrors: import("@angular/core").WritableSignal<string[]>;
|
|
30
|
+
protected readonly loadWarnings: import("@angular/core").WritableSignal<string[]>;
|
|
31
|
+
/** Values typed into the parameter bar, applied with "Run report". */
|
|
32
|
+
private readonly draftParams;
|
|
33
|
+
private readonly appliedParams;
|
|
34
|
+
protected readonly pageLabel: import("@angular/core").Signal<string>;
|
|
35
|
+
private fonts?;
|
|
36
|
+
private run;
|
|
37
|
+
/** What the current preview was laid out from, so exports use exactly the same data. */
|
|
38
|
+
private lastInput;
|
|
39
|
+
constructor();
|
|
40
|
+
protected setZoom(value: number): void;
|
|
41
|
+
protected paramValue(p: ReportParameter): unknown;
|
|
42
|
+
protected setParam(p: ReportParameter, value: unknown): void;
|
|
43
|
+
protected applyParams(): void;
|
|
44
|
+
private layout;
|
|
45
|
+
/** The current preview as PDF bytes. */
|
|
46
|
+
toPdf(): Promise<Uint8Array>;
|
|
47
|
+
/** The report's rows as an Excel workbook (one column per detail field, typed values). */
|
|
48
|
+
toXlsx(): Uint8Array;
|
|
49
|
+
protected downloadPdf(): Promise<void>;
|
|
50
|
+
protected downloadExcel(): void;
|
|
51
|
+
private save;
|
|
52
|
+
/** Prints the PDF through a hidden frame, so page size and margins are exact. */
|
|
53
|
+
protected print(): Promise<void>;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WeReportViewerComponent, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WeReportViewerComponent, "we-report-viewer", never, { "report": { "alias": "report"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "printDate": { "alias": "printDate"; "required": false; "isSignal": true; }; "parameters": { "alias": "parameters"; "required": false; "isSignal": true; }; "fetchFn": { "alias": "fetchFn"; "required": false; "isSignal": true; }; }, { "problems": "problems"; "rendered": "rendered"; }, never, never, true, never>;
|
|
56
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* The data backend address used for database sources and proxied web services. Starts from
|
|
4
|
+
* `provideWeReport({ backendUrl })`; the designer lets the user change it (e.g. the public Studio).
|
|
5
|
+
*/
|
|
6
|
+
export declare class WeReportBackendService {
|
|
7
|
+
readonly url: import("@angular/core").WritableSignal<string>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WeReportBackendService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WeReportBackendService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EnvironmentProviders, InjectionToken } from '@angular/core';
|
|
2
|
+
import { WeReportLocale } from './we-report-locale';
|
|
3
|
+
/** A font file: a URL to fetch or the bytes themselves. */
|
|
4
|
+
export type WeReportFontFile = string | Uint8Array;
|
|
5
|
+
export interface WeReportFontFamily {
|
|
6
|
+
family: string;
|
|
7
|
+
regular: WeReportFontFile;
|
|
8
|
+
bold?: WeReportFontFile;
|
|
9
|
+
italic?: WeReportFontFile;
|
|
10
|
+
boldItalic?: WeReportFontFile;
|
|
11
|
+
}
|
|
12
|
+
export interface WeReportConfig {
|
|
13
|
+
/** Font families reports can use, in addition to (or replacing) the bundled Noto Sans. */
|
|
14
|
+
fonts?: WeReportFontFamily[];
|
|
15
|
+
/**
|
|
16
|
+
* Where the bundled Noto Sans files are served from. Add this to `angular.json` assets:
|
|
17
|
+
* `{ "glob": "*.ttf", "input": "node_modules/we-report-core/fonts", "output": "assets/we-report/fonts" }`.
|
|
18
|
+
* Set to `null` to not load them (then `fonts` must provide at least one family).
|
|
19
|
+
*/
|
|
20
|
+
defaultFontsUrl?: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Address of a we-report data backend (any language implementing protocol/openapi.yaml), for live
|
|
23
|
+
* database data and proxied web services. Not needed for JSON, CSV or open web services.
|
|
24
|
+
*/
|
|
25
|
+
backendUrl?: string;
|
|
26
|
+
/** Number and currency formatting of report output (`tr-TR`, `TRY`). */
|
|
27
|
+
locale?: string;
|
|
28
|
+
currency?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const WE_REPORT_CONFIG: InjectionToken<WeReportConfig>;
|
|
31
|
+
export declare const DEFAULT_FONTS_URL = "assets/we-report/fonts/";
|
|
32
|
+
export declare function defaultFontFamily(baseUrl: string): WeReportFontFamily;
|
|
33
|
+
/** `provideWeReport({ fonts, locale: 'tr-TR', currency: 'TRY' }, weReportLocaleTr)` in app config. */
|
|
34
|
+
export declare function provideWeReport(config?: WeReportConfig, uiLocale?: WeReportLocale): EnvironmentProviders;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FontRegistry } from 'we-report-core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Loads the configured fonts once. The same bytes feed the layout engine (measurement), the PDF
|
|
5
|
+
* (embedding) and the browser (`FontFace`, used by the on-screen SVG), so preview and PDF match.
|
|
6
|
+
*/
|
|
7
|
+
export declare class WeReportFontsService {
|
|
8
|
+
private readonly config;
|
|
9
|
+
private readonly document;
|
|
10
|
+
private registry?;
|
|
11
|
+
/** CSS family the browser renders a report family with. Prefixed so an installed font of the same name can never be picked instead. */
|
|
12
|
+
static cssFamily(family: string): string;
|
|
13
|
+
ready(): Promise<FontRegistry>;
|
|
14
|
+
private load;
|
|
15
|
+
private read;
|
|
16
|
+
private addFontFaces;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WeReportFontsService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WeReportFontsService>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { SafeHtml } from '@angular/platform-browser';
|
|
3
|
+
import { WeReportIcons } from './we-report-icons';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/** `<span [innerHTML]="'print' | weReportIcon"></span>` — icons are trusted constants from the token, never report content. */
|
|
6
|
+
export declare class WeReportIconPipe implements PipeTransform {
|
|
7
|
+
private readonly icons;
|
|
8
|
+
private readonly sanitizer;
|
|
9
|
+
transform(name: keyof WeReportIcons): SafeHtml;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WeReportIconPipe, never>;
|
|
11
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<WeReportIconPipe, "weReportIcon", true>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
/** Inline SVG icons (24×24 viewBox, `currentColor`). Provide your own set to restyle. */
|
|
3
|
+
export interface WeReportIcons {
|
|
4
|
+
zoomIn: string;
|
|
5
|
+
zoomOut: string;
|
|
6
|
+
print: string;
|
|
7
|
+
download: string;
|
|
8
|
+
undo: string;
|
|
9
|
+
redo: string;
|
|
10
|
+
trash: string;
|
|
11
|
+
text: string;
|
|
12
|
+
field: string;
|
|
13
|
+
line: string;
|
|
14
|
+
rectangle: string;
|
|
15
|
+
ellipse: string;
|
|
16
|
+
image: string;
|
|
17
|
+
barcode: string;
|
|
18
|
+
qrcode: string;
|
|
19
|
+
pageInfo: string;
|
|
20
|
+
checkbox: string;
|
|
21
|
+
preview: string;
|
|
22
|
+
design: string;
|
|
23
|
+
database: string;
|
|
24
|
+
chart: string;
|
|
25
|
+
arrangeLeft: string;
|
|
26
|
+
arrangeCenter: string;
|
|
27
|
+
arrangeRight: string;
|
|
28
|
+
arrangeTop: string;
|
|
29
|
+
arrangeMiddle: string;
|
|
30
|
+
arrangeBottom: string;
|
|
31
|
+
distributeH: string;
|
|
32
|
+
distributeV: string;
|
|
33
|
+
sameWidth: string;
|
|
34
|
+
sameHeight: string;
|
|
35
|
+
bringToFront: string;
|
|
36
|
+
sendToBack: string;
|
|
37
|
+
cut: string;
|
|
38
|
+
copy: string;
|
|
39
|
+
paste: string;
|
|
40
|
+
outline: string;
|
|
41
|
+
fitWidth: string;
|
|
42
|
+
}
|
|
43
|
+
export declare const WE_REPORT_DEFAULT_ICONS: WeReportIcons;
|
|
44
|
+
export declare const WE_REPORT_ICONS: InjectionToken<WeReportIcons>;
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { BandKind, ReportControlType } from 'we-report-core';
|
|
3
|
+
/** Every user-facing string of the designer and viewer. Add new keys to both locales below. */
|
|
4
|
+
export interface WeReportLocale {
|
|
5
|
+
designerLabel: string;
|
|
6
|
+
bandNames: Record<BandKind, string>;
|
|
7
|
+
controlNames: Record<ReportControlType, string>;
|
|
8
|
+
zoomIn: string;
|
|
9
|
+
zoomOut: string;
|
|
10
|
+
print: string;
|
|
11
|
+
downloadPdf: string;
|
|
12
|
+
downloadExcel: string;
|
|
13
|
+
/** `{0}` = number of pages. */
|
|
14
|
+
pageCount: string;
|
|
15
|
+
problems: string;
|
|
16
|
+
loading: string;
|
|
17
|
+
layoutError: string;
|
|
18
|
+
runReport: string;
|
|
19
|
+
dataLoadError: string;
|
|
20
|
+
design: string;
|
|
21
|
+
preview: string;
|
|
22
|
+
undo: string;
|
|
23
|
+
redo: string;
|
|
24
|
+
delete: string;
|
|
25
|
+
duplicate: string;
|
|
26
|
+
cut: string;
|
|
27
|
+
copy: string;
|
|
28
|
+
paste: string;
|
|
29
|
+
selectAll: string;
|
|
30
|
+
arrange: string;
|
|
31
|
+
arrangeLeft: string;
|
|
32
|
+
arrangeCenter: string;
|
|
33
|
+
arrangeRight: string;
|
|
34
|
+
arrangeTop: string;
|
|
35
|
+
arrangeMiddle: string;
|
|
36
|
+
arrangeBottom: string;
|
|
37
|
+
distributeH: string;
|
|
38
|
+
distributeV: string;
|
|
39
|
+
sameWidth: string;
|
|
40
|
+
sameHeight: string;
|
|
41
|
+
bringToFront: string;
|
|
42
|
+
sendToBack: string;
|
|
43
|
+
arrangeHint: string;
|
|
44
|
+
explorer: string;
|
|
45
|
+
/** `{0}` = number of selected items. */
|
|
46
|
+
itemsSelected: string;
|
|
47
|
+
explorerHint: string;
|
|
48
|
+
emptyBand: string;
|
|
49
|
+
add: string;
|
|
50
|
+
data: string;
|
|
51
|
+
fitWidth: string;
|
|
52
|
+
basicMode: string;
|
|
53
|
+
advancedMode: string;
|
|
54
|
+
toolbox: string;
|
|
55
|
+
toolboxHint: string;
|
|
56
|
+
fields: string;
|
|
57
|
+
fieldsHint: string;
|
|
58
|
+
parentFields: string;
|
|
59
|
+
noFields: string;
|
|
60
|
+
properties: string;
|
|
61
|
+
addBand: string;
|
|
62
|
+
removeBand: string;
|
|
63
|
+
groupBy: string;
|
|
64
|
+
newText: string;
|
|
65
|
+
showData: string;
|
|
66
|
+
groupLayout: string;
|
|
67
|
+
groupContent: string;
|
|
68
|
+
groupAppearance: string;
|
|
69
|
+
groupBehaviour: string;
|
|
70
|
+
groupPage: string;
|
|
71
|
+
groupData: string;
|
|
72
|
+
reportName: string;
|
|
73
|
+
paper: string;
|
|
74
|
+
orientation: string;
|
|
75
|
+
portrait: string;
|
|
76
|
+
landscape: string;
|
|
77
|
+
customSize: string;
|
|
78
|
+
width: string;
|
|
79
|
+
height: string;
|
|
80
|
+
margins: string;
|
|
81
|
+
marginTop: string;
|
|
82
|
+
marginRight: string;
|
|
83
|
+
marginBottom: string;
|
|
84
|
+
marginLeft: string;
|
|
85
|
+
left: string;
|
|
86
|
+
top: string;
|
|
87
|
+
content: string;
|
|
88
|
+
staticText: string;
|
|
89
|
+
fromData: string;
|
|
90
|
+
expression: string;
|
|
91
|
+
expressionHint: string;
|
|
92
|
+
format: string;
|
|
93
|
+
formatNone: string;
|
|
94
|
+
formatNumber0: string;
|
|
95
|
+
formatNumber2: string;
|
|
96
|
+
formatCurrency: string;
|
|
97
|
+
formatPercent: string;
|
|
98
|
+
formatDate: string;
|
|
99
|
+
formatDateTime: string;
|
|
100
|
+
font: string;
|
|
101
|
+
fontSize: string;
|
|
102
|
+
bold: string;
|
|
103
|
+
italic: string;
|
|
104
|
+
underline: string;
|
|
105
|
+
alignment: string;
|
|
106
|
+
alignLeft: string;
|
|
107
|
+
alignCenter: string;
|
|
108
|
+
alignRight: string;
|
|
109
|
+
verticalAlignment: string;
|
|
110
|
+
alignTop: string;
|
|
111
|
+
alignMiddle: string;
|
|
112
|
+
alignBottom: string;
|
|
113
|
+
textColor: string;
|
|
114
|
+
backgroundColor: string;
|
|
115
|
+
noColor: string;
|
|
116
|
+
border: string;
|
|
117
|
+
borderWidth: string;
|
|
118
|
+
borderColor: string;
|
|
119
|
+
padding: string;
|
|
120
|
+
canGrow: string;
|
|
121
|
+
canGrowHint: string;
|
|
122
|
+
visibleWhen: string;
|
|
123
|
+
visibleWhenHint: string;
|
|
124
|
+
symbology: string;
|
|
125
|
+
barcodeValue: string;
|
|
126
|
+
showText: string;
|
|
127
|
+
imageSource: string;
|
|
128
|
+
chooseImage: string;
|
|
129
|
+
fit: string;
|
|
130
|
+
fitContain: string;
|
|
131
|
+
fitCover: string;
|
|
132
|
+
fitStretch: string;
|
|
133
|
+
fitNone: string;
|
|
134
|
+
lineDirection: string;
|
|
135
|
+
horizontal: string;
|
|
136
|
+
vertical: string;
|
|
137
|
+
diagonalDown: string;
|
|
138
|
+
diagonalUp: string;
|
|
139
|
+
lineWidth: string;
|
|
140
|
+
color: string;
|
|
141
|
+
shape: string;
|
|
142
|
+
rectangle: string;
|
|
143
|
+
roundedRectangle: string;
|
|
144
|
+
ellipse: string;
|
|
145
|
+
cornerRadius: string;
|
|
146
|
+
pageInfo: string;
|
|
147
|
+
pageNumber: string;
|
|
148
|
+
pageTotal: string;
|
|
149
|
+
pageNofM: string;
|
|
150
|
+
printDate: string;
|
|
151
|
+
checked: string;
|
|
152
|
+
bandHeight: string;
|
|
153
|
+
sortGroups: string;
|
|
154
|
+
sortAsc: string;
|
|
155
|
+
sortDesc: string;
|
|
156
|
+
sortNone: string;
|
|
157
|
+
keepTogether: string;
|
|
158
|
+
keepTogetherHint: string;
|
|
159
|
+
repeatOnEveryPage: string;
|
|
160
|
+
pageBreakBefore: string;
|
|
161
|
+
pageBreakAfter: string;
|
|
162
|
+
dataRows: string;
|
|
163
|
+
dataRowsHint: string;
|
|
164
|
+
dataSources: string;
|
|
165
|
+
close: string;
|
|
166
|
+
rowsSource: string;
|
|
167
|
+
noSources: string;
|
|
168
|
+
webService: string;
|
|
169
|
+
parameters: string;
|
|
170
|
+
parametersHint: string;
|
|
171
|
+
parameterName: string;
|
|
172
|
+
parameterType: string;
|
|
173
|
+
parameterLabel: string;
|
|
174
|
+
defaultValue: string;
|
|
175
|
+
addParameter: string;
|
|
176
|
+
sourceName: string;
|
|
177
|
+
wholeData: string;
|
|
178
|
+
rowCount: string;
|
|
179
|
+
useForRows: string;
|
|
180
|
+
jsonData: string;
|
|
181
|
+
invalidJson: string;
|
|
182
|
+
csvData: string;
|
|
183
|
+
method: string;
|
|
184
|
+
url: string;
|
|
185
|
+
test: string;
|
|
186
|
+
testing: string;
|
|
187
|
+
testOk: string;
|
|
188
|
+
headers: string;
|
|
189
|
+
headerName: string;
|
|
190
|
+
headerValue: string;
|
|
191
|
+
addHeader: string;
|
|
192
|
+
requestBody: string;
|
|
193
|
+
secretWarning: string;
|
|
194
|
+
removeSource: string;
|
|
195
|
+
typeText: string;
|
|
196
|
+
typeNumber: string;
|
|
197
|
+
typeDate: string;
|
|
198
|
+
typeYesNo: string;
|
|
199
|
+
database: string;
|
|
200
|
+
backendAddress: string;
|
|
201
|
+
connect: string;
|
|
202
|
+
connected: string;
|
|
203
|
+
connection: string;
|
|
204
|
+
writeSql: string;
|
|
205
|
+
sqlHint: string;
|
|
206
|
+
table: string;
|
|
207
|
+
columns: string;
|
|
208
|
+
filters: string;
|
|
209
|
+
fixedValue: string;
|
|
210
|
+
addFilter: string;
|
|
211
|
+
sortBy: string;
|
|
212
|
+
maxRows: string;
|
|
213
|
+
opLike: string;
|
|
214
|
+
opIsEmpty: string;
|
|
215
|
+
opIsNotEmpty: string;
|
|
216
|
+
rowLimitReached: string;
|
|
217
|
+
viaBackend: string;
|
|
218
|
+
viaBackendHint: string;
|
|
219
|
+
autoDesign: string;
|
|
220
|
+
autoDesignHint: string;
|
|
221
|
+
newReportTitle: string;
|
|
222
|
+
totalLabel: string;
|
|
223
|
+
pageOfFormat: string;
|
|
224
|
+
issueOutsidePage: string;
|
|
225
|
+
issueFormulaError: string;
|
|
226
|
+
issueUnknownField: string;
|
|
227
|
+
issueEmptyFormula: string;
|
|
228
|
+
issueOverlap: string;
|
|
229
|
+
fixIt: string;
|
|
230
|
+
noProblems: string;
|
|
231
|
+
chartType: string;
|
|
232
|
+
chartColumn: string;
|
|
233
|
+
chartBar: string;
|
|
234
|
+
chartLine: string;
|
|
235
|
+
chartPie: string;
|
|
236
|
+
chartDoughnut: string;
|
|
237
|
+
chartCategory: string;
|
|
238
|
+
chartValue: string;
|
|
239
|
+
chartAggregate: string;
|
|
240
|
+
aggSum: string;
|
|
241
|
+
aggCount: string;
|
|
242
|
+
aggAvg: string;
|
|
243
|
+
aggMin: string;
|
|
244
|
+
aggMax: string;
|
|
245
|
+
chartTitle: string;
|
|
246
|
+
showValues: string;
|
|
247
|
+
showLegend: string;
|
|
248
|
+
chartHint: string;
|
|
249
|
+
conditionalFormatting: string;
|
|
250
|
+
watermark: string;
|
|
251
|
+
reportLocale: string;
|
|
252
|
+
reportLocaleRegion: string;
|
|
253
|
+
reportCurrency: string;
|
|
254
|
+
reportLocaleDefault: string;
|
|
255
|
+
reportLocaleHint: string;
|
|
256
|
+
formulaEditor: string;
|
|
257
|
+
formulaEditorHint: string;
|
|
258
|
+
formulaResult: string;
|
|
259
|
+
formulaEmpty: string;
|
|
260
|
+
apply: string;
|
|
261
|
+
cancel: string;
|
|
262
|
+
fnLogic: string;
|
|
263
|
+
fnText: string;
|
|
264
|
+
fnNumber: string;
|
|
265
|
+
fnDate: string;
|
|
266
|
+
fnAggregate: string;
|
|
267
|
+
functions: string;
|
|
268
|
+
openFormulaEditor: string;
|
|
269
|
+
/** One sentence per function of `EXPRESSION_FUNCTIONS`, keyed by name. */
|
|
270
|
+
functionHelp: Record<string, string>;
|
|
271
|
+
watermarkHint: string;
|
|
272
|
+
watermarkAngle: string;
|
|
273
|
+
conditionalHint: string;
|
|
274
|
+
addRule: string;
|
|
275
|
+
ruleWhen: string;
|
|
276
|
+
ruleThen: string;
|
|
277
|
+
removeRule: string;
|
|
278
|
+
opContains: string;
|
|
279
|
+
ruleValue: string;
|
|
280
|
+
}
|
|
281
|
+
export declare const weReportLocaleEn: WeReportLocale;
|
|
282
|
+
export declare const weReportLocaleTr: WeReportLocale;
|
|
283
|
+
export declare const WE_REPORT_LOCALE: InjectionToken<WeReportLocale>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WeReportLocale } from './we-report-locale';
|
|
2
|
+
/**
|
|
3
|
+
* Every bundled UI language by its ISO 639-1 code. Importing this pulls in all of them; import a
|
|
4
|
+
* single `weReportLocaleXx` instead to ship only one.
|
|
5
|
+
*/
|
|
6
|
+
export declare const WE_REPORT_LOCALES: Record<string, WeReportLocale>;
|
|
7
|
+
/** The UI strings for a BCP 47 tag (`de-AT` → German); English when there is no translation. */
|
|
8
|
+
export declare function weReportLocaleFor(tag: string | undefined): WeReportLocale;
|
package/package.json
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "we-report-angular",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Free, native Angular banded report designer and viewer — drag-and-drop design, paper sizes, data binding, barcodes, PDF export. No backend required.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Emre CIRIK",
|
|
7
|
+
"homepage": "https://github.com/emrecirik/we-report#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/emrecirik/we-report.git",
|
|
11
|
+
"directory": "projects/we-report"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/emrecirik/we-report/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"angular",
|
|
18
|
+
"report",
|
|
19
|
+
"report-designer",
|
|
20
|
+
"report-viewer",
|
|
21
|
+
"reporting",
|
|
22
|
+
"pdf",
|
|
23
|
+
"barcode",
|
|
24
|
+
"banded-report",
|
|
25
|
+
"crystal-reports-alternative",
|
|
26
|
+
"devexpress-alternative"
|
|
27
|
+
],
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@angular/common": "^18.2.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
30
|
+
"@angular/core": "^18.2.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0",
|
|
31
|
+
"@angular/platform-browser": "^18.2.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"tslib": "^2.3.0",
|
|
35
|
+
"we-report-core": "~0.2.0"
|
|
36
|
+
},
|
|
37
|
+
"sideEffects": false,
|
|
38
|
+
"module": "fesm2022/we-report-angular.mjs",
|
|
39
|
+
"typings": "index.d.ts",
|
|
40
|
+
"exports": {
|
|
41
|
+
"./package.json": {
|
|
42
|
+
"default": "./package.json"
|
|
43
|
+
},
|
|
44
|
+
".": {
|
|
45
|
+
"types": "./index.d.ts",
|
|
46
|
+
"esm2022": "./esm2022/we-report-angular.mjs",
|
|
47
|
+
"esm": "./esm2022/we-report-angular.mjs",
|
|
48
|
+
"default": "./fesm2022/we-report-angular.mjs"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
6
51
|
}
|
package/public-api.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './lib/we-report-locale';
|
|
2
|
+
export * from './lib/locales/de';
|
|
3
|
+
export * from './lib/locales/fr';
|
|
4
|
+
export * from './lib/locales/es';
|
|
5
|
+
export * from './lib/we-report-locales';
|
|
6
|
+
export * from './lib/we-report-config';
|
|
7
|
+
export * from './lib/we-report-icons';
|
|
8
|
+
export * from './lib/we-report-icon.pipe';
|
|
9
|
+
export * from './lib/we-report-fonts.service';
|
|
10
|
+
export * from './lib/viewer/we-report-viewer.component';
|
|
11
|
+
export * from './lib/viewer/we-report-page.component';
|
|
12
|
+
export * from './lib/designer/we-report-designer.component';
|
|
13
|
+
export * from './lib/designer/designer-state';
|
|
14
|
+
export * from './lib/we-report-backend.service';
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// we-report designer/viewer theme. Every property must exist in all three blocks below.
|
|
2
|
+
// Override any of them in your app's styles to restyle the designer.
|
|
3
|
+
//
|
|
4
|
+
// The defaults follow Apple's Human Interface Guidelines: system type, quiet chrome that defers to
|
|
5
|
+
// the page, translucent toolbars, soft layered depth and one accent colour.
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--we-report-font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
|
|
9
|
+
--we-report-fg: #1d1d1f;
|
|
10
|
+
--we-report-muted-fg: rgba(60, 60, 67, 0.62);
|
|
11
|
+
--we-report-accent: #007aff;
|
|
12
|
+
--we-report-accent-fg: #ffffff;
|
|
13
|
+
--we-report-workspace-bg: #f2f2f7;
|
|
14
|
+
--we-report-toolbar-bg: rgba(250, 250, 252, 0.82);
|
|
15
|
+
--we-report-panel-bg: #fbfbfd;
|
|
16
|
+
--we-report-input-bg: rgba(118, 118, 128, 0.1);
|
|
17
|
+
--we-report-hover-bg: rgba(118, 118, 128, 0.12);
|
|
18
|
+
--we-report-segment-bg: rgba(118, 118, 128, 0.12);
|
|
19
|
+
--we-report-segment-on-bg: #ffffff;
|
|
20
|
+
--we-report-separator: rgba(60, 60, 67, 0.14);
|
|
21
|
+
--we-report-page-bg: #ffffff;
|
|
22
|
+
--we-report-page-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.05), 0 12px 32px rgba(0, 0, 0, 0.08);
|
|
23
|
+
--we-report-popover-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.14), 0 24px 64px rgba(0, 0, 0, 0.12);
|
|
24
|
+
--we-report-margin-guide: rgba(0, 122, 255, 0.18);
|
|
25
|
+
--we-report-band-border: rgba(60, 60, 67, 0.14);
|
|
26
|
+
--we-report-band-label-bg: rgba(118, 118, 128, 0.1);
|
|
27
|
+
--we-report-band-label-fg: rgba(60, 60, 67, 0.7);
|
|
28
|
+
--we-report-control-outline: rgba(60, 60, 67, 0.22);
|
|
29
|
+
--we-report-selection: #007aff;
|
|
30
|
+
--we-report-selection-fill: rgba(0, 122, 255, 0.07);
|
|
31
|
+
--we-report-guide: #ff375f;
|
|
32
|
+
--we-report-warning-bg: rgba(255, 149, 0, 0.12);
|
|
33
|
+
--we-report-warning-fg: #b25000;
|
|
34
|
+
--we-report-backdrop: rgba(0, 0, 0, 0.22);
|
|
35
|
+
--we-report-focus-ring: 0 0 0 3px rgba(0, 122, 255, 0.35);
|
|
36
|
+
--we-report-radius: 12px;
|
|
37
|
+
--we-report-control-radius: 7px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (prefers-color-scheme: dark) {
|
|
41
|
+
:root:not([data-theme='light']) {
|
|
42
|
+
--we-report-font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
|
|
43
|
+
--we-report-fg: #f5f5f7;
|
|
44
|
+
--we-report-muted-fg: rgba(235, 235, 245, 0.6);
|
|
45
|
+
--we-report-accent: #0a84ff;
|
|
46
|
+
--we-report-accent-fg: #ffffff;
|
|
47
|
+
--we-report-workspace-bg: #111113;
|
|
48
|
+
--we-report-toolbar-bg: rgba(30, 30, 32, 0.78);
|
|
49
|
+
--we-report-panel-bg: #1c1c1e;
|
|
50
|
+
--we-report-input-bg: rgba(118, 118, 128, 0.24);
|
|
51
|
+
--we-report-hover-bg: rgba(118, 118, 128, 0.24);
|
|
52
|
+
--we-report-segment-bg: rgba(118, 118, 128, 0.24);
|
|
53
|
+
--we-report-segment-on-bg: #636366;
|
|
54
|
+
--we-report-separator: rgba(84, 84, 88, 0.6);
|
|
55
|
+
--we-report-page-bg: #ffffff;
|
|
56
|
+
--we-report-page-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
|
|
57
|
+
--we-report-popover-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.5), 0 24px 64px rgba(0, 0, 0, 0.5);
|
|
58
|
+
--we-report-margin-guide: rgba(10, 132, 255, 0.28);
|
|
59
|
+
--we-report-band-border: rgba(60, 60, 67, 0.16);
|
|
60
|
+
--we-report-band-label-bg: rgba(118, 118, 128, 0.24);
|
|
61
|
+
--we-report-band-label-fg: rgba(235, 235, 245, 0.7);
|
|
62
|
+
--we-report-control-outline: rgba(60, 60, 67, 0.24);
|
|
63
|
+
--we-report-selection: #0a84ff;
|
|
64
|
+
--we-report-selection-fill: rgba(10, 132, 255, 0.1);
|
|
65
|
+
--we-report-guide: #ff375f;
|
|
66
|
+
--we-report-warning-bg: rgba(255, 159, 10, 0.18);
|
|
67
|
+
--we-report-warning-fg: #ffb340;
|
|
68
|
+
--we-report-backdrop: rgba(0, 0, 0, 0.45);
|
|
69
|
+
--we-report-focus-ring: 0 0 0 3px rgba(10, 132, 255, 0.5);
|
|
70
|
+
--we-report-radius: 12px;
|
|
71
|
+
--we-report-control-radius: 7px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:root[data-theme='dark'] {
|
|
76
|
+
--we-report-font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
|
|
77
|
+
--we-report-fg: #f5f5f7;
|
|
78
|
+
--we-report-muted-fg: rgba(235, 235, 245, 0.6);
|
|
79
|
+
--we-report-accent: #0a84ff;
|
|
80
|
+
--we-report-accent-fg: #ffffff;
|
|
81
|
+
--we-report-workspace-bg: #111113;
|
|
82
|
+
--we-report-toolbar-bg: rgba(30, 30, 32, 0.78);
|
|
83
|
+
--we-report-panel-bg: #1c1c1e;
|
|
84
|
+
--we-report-input-bg: rgba(118, 118, 128, 0.24);
|
|
85
|
+
--we-report-hover-bg: rgba(118, 118, 128, 0.24);
|
|
86
|
+
--we-report-segment-bg: rgba(118, 118, 128, 0.24);
|
|
87
|
+
--we-report-segment-on-bg: #636366;
|
|
88
|
+
--we-report-separator: rgba(84, 84, 88, 0.6);
|
|
89
|
+
--we-report-page-bg: #ffffff;
|
|
90
|
+
--we-report-page-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.5);
|
|
91
|
+
--we-report-popover-shadow: 0 0 0 0.5px rgba(255, 255, 255, 0.12), 0 8px 24px rgba(0, 0, 0, 0.5), 0 24px 64px rgba(0, 0, 0, 0.5);
|
|
92
|
+
--we-report-margin-guide: rgba(10, 132, 255, 0.28);
|
|
93
|
+
--we-report-band-border: rgba(60, 60, 67, 0.16);
|
|
94
|
+
--we-report-band-label-bg: rgba(118, 118, 128, 0.24);
|
|
95
|
+
--we-report-band-label-fg: rgba(235, 235, 245, 0.7);
|
|
96
|
+
--we-report-control-outline: rgba(60, 60, 67, 0.24);
|
|
97
|
+
--we-report-selection: #0a84ff;
|
|
98
|
+
--we-report-selection-fill: rgba(10, 132, 255, 0.1);
|
|
99
|
+
--we-report-guide: #ff375f;
|
|
100
|
+
--we-report-warning-bg: rgba(255, 159, 10, 0.18);
|
|
101
|
+
--we-report-warning-fg: #ffb340;
|
|
102
|
+
--we-report-backdrop: rgba(0, 0, 0, 0.45);
|
|
103
|
+
--we-report-focus-ring: 0 0 0 3px rgba(10, 132, 255, 0.5);
|
|
104
|
+
--we-report-radius: 12px;
|
|
105
|
+
--we-report-control-radius: 7px;
|
|
106
|
+
}
|