we-report-angular 0.5.0 → 0.6.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/esm2022/lib/designer/design-surface.component.mjs +45 -13
- package/esm2022/lib/designer/designer-state.mjs +9 -1
- package/esm2022/lib/designer/expression-editor.component.mjs +125 -5
- package/esm2022/lib/designer/property-panel.component.mjs +3 -3
- package/esm2022/lib/designer/we-report-designer.component.mjs +129 -23
- package/esm2022/lib/locales/de.mjs +11 -1
- package/esm2022/lib/locales/es.mjs +11 -1
- package/esm2022/lib/locales/fr.mjs +11 -1
- package/esm2022/lib/we-report-icons.mjs +2 -1
- package/esm2022/lib/we-report-locale.mjs +21 -1
- package/fesm2022/we-report-angular.mjs +355 -38
- package/fesm2022/we-report-angular.mjs.map +1 -1
- package/lib/designer/design-surface.component.d.ts +5 -0
- package/lib/designer/designer-state.d.ts +3 -0
- package/lib/designer/expression-editor.component.d.ts +21 -0
- package/lib/designer/we-report-designer.component.d.ts +27 -2
- package/lib/we-report-icons.d.ts +1 -0
- package/lib/we-report-locale.d.ts +9 -0
- package/package.json +2 -2
|
@@ -61,6 +61,11 @@ export declare class DesignSurfaceComponent implements OnDestroy {
|
|
|
61
61
|
protected readonly handles: Handle[];
|
|
62
62
|
protected readonly guides: import("@angular/core").WritableSignal<Guide[]>;
|
|
63
63
|
protected readonly gaps: import("@angular/core").WritableSignal<Gap[]>;
|
|
64
|
+
private readonly fontsService;
|
|
65
|
+
/** Texts (without Grow to fit text) whose content does not fit, measured with the report's fonts like the print. */
|
|
66
|
+
readonly cutTexts: import("@angular/core").WritableSignal<ReadonlySet<string>>;
|
|
67
|
+
private measureRun;
|
|
68
|
+
private readonly measureTexts;
|
|
64
69
|
/** The rubber band while dragging on an empty part of a section (mm in that section). */
|
|
65
70
|
protected readonly marquee: import("@angular/core").WritableSignal<{
|
|
66
71
|
bandId: string;
|
|
@@ -24,6 +24,9 @@ export declare class DesignerState {
|
|
|
24
24
|
readonly canRedo: import("@angular/core").WritableSignal<boolean>;
|
|
25
25
|
/** The table cell last clicked; the inspector edits it while its table is selected. */
|
|
26
26
|
readonly tableCell: import("@angular/core").WritableSignal<TableCellRef | null>;
|
|
27
|
+
/** Sections folded away in the designer to save room (not saved in the report). */
|
|
28
|
+
readonly collapsed: import("@angular/core").WritableSignal<ReadonlySet<string>>;
|
|
29
|
+
toggleCollapsed(bandId: string): void;
|
|
27
30
|
/** Format painter: the look picked up from one item, applied to the next item clicked. */
|
|
28
31
|
readonly painter: import("@angular/core").WritableSignal<Pick<ReportControl, "style" | "styleOverrides"> | null>;
|
|
29
32
|
/** Text being typed on the page (double-click / F2): a text control, or a cell of a table. */
|
|
@@ -3,6 +3,13 @@ import { FunctionCategory, FunctionInfo } from 'we-report-core';
|
|
|
3
3
|
import { WeReportLocale } from '../we-report-locale';
|
|
4
4
|
import { DesignerField } from './designer-fields';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
interface Suggestion {
|
|
7
|
+
label: string;
|
|
8
|
+
insert: string;
|
|
9
|
+
/** How far the caret moves back after inserting (into a function's brackets). */
|
|
10
|
+
back: number;
|
|
11
|
+
help: string;
|
|
12
|
+
}
|
|
6
13
|
/**
|
|
7
14
|
* A sheet for writing a formula: fields, parameters and every function with a one-line
|
|
8
15
|
* explanation, inserted at the cursor, and the result for the first data row as you type.
|
|
@@ -32,8 +39,22 @@ export declare class ExpressionEditorComponent implements AfterViewInit {
|
|
|
32
39
|
ngAfterViewInit(): void;
|
|
33
40
|
/** Inserts at the caret (replacing a selection); `caretBack` moves the caret left afterwards. */
|
|
34
41
|
protected insert(text: string, caretBack?: number): void;
|
|
42
|
+
/** The word (or `[field` start) before the caret that suggestions complete. */
|
|
43
|
+
protected readonly token: import("@angular/core").WritableSignal<{
|
|
44
|
+
start: number;
|
|
45
|
+
text: string;
|
|
46
|
+
field: boolean;
|
|
47
|
+
} | null>;
|
|
48
|
+
protected readonly active: import("@angular/core").WritableSignal<number>;
|
|
49
|
+
/** Functions, fields and parameters matching the word being typed, best first. */
|
|
50
|
+
protected readonly suggestions: import("@angular/core").Signal<Suggestion[]>;
|
|
51
|
+
/** Finds the word at the caret: letters after an operator, or an unfinished `[field`. */
|
|
52
|
+
protected findToken(): void;
|
|
53
|
+
protected onKey(e: KeyboardEvent): void;
|
|
54
|
+
protected accept(s: Suggestion): void;
|
|
35
55
|
/** Inserts `Name()` and puts the cursor between the brackets. */
|
|
36
56
|
protected insertFunction(f: FunctionInfo): void;
|
|
37
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<ExpressionEditorComponent, never>;
|
|
38
58
|
static ɵcmp: i0.ɵɵComponentDeclaration<ExpressionEditorComponent, "we-report-expression-editor", never, { "expression": { "alias": "expression"; "required": false; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; "isSignal": true; }; "strings": { "alias": "strings"; "required": true; "isSignal": true; }; }, { "applied": "applied"; "closed": "closed"; }, never, never, true, never>;
|
|
39
59
|
}
|
|
60
|
+
export {};
|
|
@@ -50,6 +50,7 @@ export declare class WeReportDesignerComponent {
|
|
|
50
50
|
};
|
|
51
51
|
} | null>;
|
|
52
52
|
private readonly canvas;
|
|
53
|
+
private readonly host;
|
|
53
54
|
private readonly surface;
|
|
54
55
|
protected readonly shortcutsOpen: import("@angular/core").WritableSignal<boolean>;
|
|
55
56
|
/** Side panel widths in px; 0 hides a panel. Remembered in this browser. */
|
|
@@ -107,6 +108,14 @@ export declare class WeReportDesignerComponent {
|
|
|
107
108
|
lists: string[];
|
|
108
109
|
inner: DesignerField[];
|
|
109
110
|
}>;
|
|
111
|
+
protected readonly fieldFilter: import("@angular/core").WritableSignal<string>;
|
|
112
|
+
/** The field list narrowed to names containing the filter text. */
|
|
113
|
+
protected readonly shownFields: import("@angular/core").Signal<{
|
|
114
|
+
rows: DesignerField[];
|
|
115
|
+
parent: DesignerField[];
|
|
116
|
+
lists: string[];
|
|
117
|
+
inner: DesignerField[];
|
|
118
|
+
}>;
|
|
110
119
|
protected readonly allFields: import("@angular/core").Signal<DesignerField[]>;
|
|
111
120
|
protected readonly addableBands: import("@angular/core").Signal<BandKind[]>;
|
|
112
121
|
constructor();
|
|
@@ -115,10 +124,13 @@ export declare class WeReportDesignerComponent {
|
|
|
115
124
|
protected outlineIcon(c: ReportControl): keyof WeReportIcons;
|
|
116
125
|
protected selectFromOutline(e: MouseEvent, id: string): void;
|
|
117
126
|
protected isSelected(id: string): boolean;
|
|
127
|
+
/** Unique per designer, so two designers on one page do not share the size list. */
|
|
128
|
+
protected readonly sizeListId: string;
|
|
118
129
|
protected readonly zoomSteps: number[];
|
|
119
130
|
protected readonly gridSteps: number[];
|
|
120
131
|
/** Snap grid in mm; 0 turns the grid off. */
|
|
121
132
|
protected readonly gridSize: import("@angular/core").WritableSignal<number>;
|
|
133
|
+
private readonly rememberView;
|
|
122
134
|
protected pickZoom(value: string): void;
|
|
123
135
|
protected fitWidth(): void;
|
|
124
136
|
protected onCanvasWheel(e: WheelEvent): void;
|
|
@@ -128,6 +140,17 @@ export declare class WeReportDesignerComponent {
|
|
|
128
140
|
x: number;
|
|
129
141
|
y: number;
|
|
130
142
|
}): void;
|
|
143
|
+
/** A single bound text in the detail section: it can get a total ("insert summary"). */
|
|
144
|
+
protected readonly totalTarget: import("@angular/core").Signal<import("we-report-core").TextControl | null>;
|
|
145
|
+
protected groupByValue(): void;
|
|
146
|
+
/** Puts `Sum(...)` of the selected column under it in every group footer and the report footer. */
|
|
147
|
+
protected addTotal(): void;
|
|
148
|
+
protected readonly hasTextSelected: import("@angular/core").Signal<boolean>;
|
|
149
|
+
/**
|
|
150
|
+
* Sizes the selected texts to what they show on the page (fixed text, or the sample value),
|
|
151
|
+
* measured with the report's fonts, so it matches the printed size.
|
|
152
|
+
*/
|
|
153
|
+
protected fitToText(): Promise<void>;
|
|
131
154
|
/** Shrinks (or grows) a section to just below its lowest item. */
|
|
132
155
|
protected fitBand(bandId: string | null): void;
|
|
133
156
|
/** Runs a context-menu command and closes the menu. */
|
|
@@ -148,7 +171,7 @@ export declare class WeReportDesignerComponent {
|
|
|
148
171
|
}): void;
|
|
149
172
|
protected onFieldDragStart(e: DragEvent, field: DesignerField): void;
|
|
150
173
|
private setDrag;
|
|
151
|
-
protected addBand(kind: BandKind): void;
|
|
174
|
+
protected addBand(kind: BandKind, groupBy?: string): void;
|
|
152
175
|
/** The report wizard's choices while it is open. */
|
|
153
176
|
protected readonly wizard: import("@angular/core").WritableSignal<{
|
|
154
177
|
title: string;
|
|
@@ -164,13 +187,15 @@ export declare class WeReportDesignerComponent {
|
|
|
164
187
|
} | null>;
|
|
165
188
|
/** Opens the report wizard: pick columns, grouping, totals and paper, then a tidy list is built. */
|
|
166
189
|
protected autoDesign(): void;
|
|
190
|
+
/** At least one column (or a grouping) to build from. */
|
|
191
|
+
protected readonly wizardReady: import("@angular/core").Signal<boolean>;
|
|
167
192
|
protected updateWizard(change: Partial<NonNullable<ReturnType<typeof this.wizard>>>): void;
|
|
168
193
|
protected toggleWizardField(name: string): void;
|
|
169
194
|
/** Replaces the layout with the wizard's list report (undoable). */
|
|
170
195
|
protected runWizard(): void;
|
|
171
196
|
protected issueText(issue: ReportIssue): string;
|
|
172
197
|
protected showIssue(issue: ReportIssue): void;
|
|
173
|
-
/** Moves (and if needed narrows) an item back inside the paper. */
|
|
198
|
+
/** Moves (and if needed narrows) an item back inside the paper; a cut text grows to fit instead. */
|
|
174
199
|
protected fixIssue(issue: ReportIssue): void;
|
|
175
200
|
protected onKeydown(e: KeyboardEvent): void;
|
|
176
201
|
static ɵfac: i0.ɵɵFactoryDeclaration<WeReportDesignerComponent, never>;
|
package/lib/we-report-icons.d.ts
CHANGED
|
@@ -275,6 +275,15 @@ export interface WeReportLocale {
|
|
|
275
275
|
wizardTotals: string;
|
|
276
276
|
automatic: string;
|
|
277
277
|
createReport: string;
|
|
278
|
+
issueTextCut: string;
|
|
279
|
+
stretch: string;
|
|
280
|
+
stretchHint: string;
|
|
281
|
+
fitToText: string;
|
|
282
|
+
collapseBand: string;
|
|
283
|
+
expandBand: string;
|
|
284
|
+
groupByThis: string;
|
|
285
|
+
addTotal: string;
|
|
286
|
+
filterFields: string;
|
|
278
287
|
previousMatch: string;
|
|
279
288
|
nextMatch: string;
|
|
280
289
|
zoomLevel: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "we-report-angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
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
5
|
"license": "MIT",
|
|
6
6
|
"author": "Emre CIRIK",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"tslib": "^2.3.0",
|
|
35
|
-
"we-report-core": "~0.
|
|
35
|
+
"we-report-core": "~0.6.0"
|
|
36
36
|
},
|
|
37
37
|
"sideEffects": false,
|
|
38
38
|
"module": "fesm2022/we-report-angular.mjs",
|