we-report-angular 0.3.0 → 0.5.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 +358 -19
- package/esm2022/lib/designer/designer-state.mjs +99 -5
- package/esm2022/lib/designer/property-panel.component.mjs +15 -3
- package/esm2022/lib/designer/we-report-designer.component.mjs +348 -23
- package/esm2022/lib/locales/de.mjs +45 -1
- package/esm2022/lib/locales/es.mjs +45 -1
- package/esm2022/lib/locales/fr.mjs +45 -1
- package/esm2022/lib/viewer/we-report-page.component.mjs +41 -8
- package/esm2022/lib/viewer/we-report-viewer.component.mjs +238 -20
- package/esm2022/lib/we-report-icons.mjs +20 -1
- package/esm2022/lib/we-report-locale.mjs +89 -1
- package/fesm2022/we-report-angular.mjs +1570 -311
- package/fesm2022/we-report-angular.mjs.map +1 -1
- package/lib/designer/design-surface.component.d.ts +61 -2
- package/lib/designer/designer-state.d.ts +33 -3
- package/lib/designer/property-panel.component.d.ts +3 -0
- package/lib/designer/we-report-designer.component.d.ts +89 -3
- package/lib/viewer/we-report-page.component.d.ts +10 -1
- package/lib/viewer/we-report-viewer.component.d.ts +31 -1
- package/lib/we-report-icons.d.ts +19 -0
- package/lib/we-report-locale.d.ts +44 -0
- package/package.json +2 -2
- package/styles/we-report-theme.scss +3 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { Band, ReportControl, ReportControlType } from 'we-report-core';
|
|
3
|
+
import { DesignerField } from './designer-fields';
|
|
3
4
|
import { WeReportLocale } from '../we-report-locale';
|
|
4
5
|
import { DesignerState } from './designer-state';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
@@ -21,11 +22,27 @@ export type DesignerDragData = {
|
|
|
21
22
|
format?: string;
|
|
22
23
|
};
|
|
23
24
|
export declare const DRAG_MIME = "application/x-we-report";
|
|
25
|
+
export interface Rect {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
}
|
|
24
31
|
interface Guide {
|
|
25
32
|
bandId: string;
|
|
26
33
|
orientation: 'v' | 'h';
|
|
27
34
|
at: number;
|
|
28
35
|
}
|
|
36
|
+
/** The gap between a dragged item and its nearest neighbour, shown while moving (mm). */
|
|
37
|
+
export interface Gap {
|
|
38
|
+
bandId: string;
|
|
39
|
+
orientation: 'v' | 'h';
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
length: number;
|
|
43
|
+
}
|
|
44
|
+
/** Gaps from `p` to the nearest rect on each side that faces it (overlaps on the other axis). */
|
|
45
|
+
export declare function gapsAround(p: Rect, others: Rect[], bandId: string, max?: number): Gap[];
|
|
29
46
|
type Handle = 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
|
|
30
47
|
/** The page, its bands and controls, with selection, drag, resize, snapping and drop targets. */
|
|
31
48
|
export declare class DesignSurfaceComponent implements OnDestroy {
|
|
@@ -35,12 +52,34 @@ export declare class DesignSurfaceComponent implements OnDestroy {
|
|
|
35
52
|
readonly gridSize: import("@angular/core").InputSignal<number>;
|
|
36
53
|
/** When set, bound text shows this data instead of its formula. */
|
|
37
54
|
readonly sample: import("@angular/core").InputSignal<DesignSample | null>;
|
|
55
|
+
/** Fields for the formula editor opened by double-clicking a bound item. */
|
|
56
|
+
readonly fields: import("@angular/core").InputSignal<DesignerField[]>;
|
|
38
57
|
protected readonly state: DesignerState;
|
|
39
58
|
private readonly config;
|
|
40
59
|
private readonly dom;
|
|
41
60
|
private readonly host;
|
|
42
61
|
protected readonly handles: Handle[];
|
|
43
62
|
protected readonly guides: import("@angular/core").WritableSignal<Guide[]>;
|
|
63
|
+
protected readonly gaps: import("@angular/core").WritableSignal<Gap[]>;
|
|
64
|
+
/** The rubber band while dragging on an empty part of a section (mm in that section). */
|
|
65
|
+
protected readonly marquee: import("@angular/core").WritableSignal<{
|
|
66
|
+
bandId: string;
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
width: number;
|
|
70
|
+
height: number;
|
|
71
|
+
} | null>;
|
|
72
|
+
/** A bound item whose formula is open in the editor. */
|
|
73
|
+
protected readonly formulaEdit: import("@angular/core").WritableSignal<{
|
|
74
|
+
controlId: string;
|
|
75
|
+
row?: number;
|
|
76
|
+
cell?: number;
|
|
77
|
+
expression: string;
|
|
78
|
+
} | null>;
|
|
79
|
+
/** A key typed on a selected text: editing starts with it instead of the old text. */
|
|
80
|
+
private readonly editSeed;
|
|
81
|
+
/** The text an in-place editor starts with. */
|
|
82
|
+
protected readonly editText: import("@angular/core").Signal<string>;
|
|
44
83
|
protected readonly geometry: import("@angular/core").Signal<import("we-report-core").PageGeometry>;
|
|
45
84
|
/** Top ruler in screen pixels: 0 at the left margin, a tick per millimetre, a label per centimetre. */
|
|
46
85
|
protected readonly ruler: import("@angular/core").Signal<{
|
|
@@ -100,7 +139,22 @@ export declare class DesignSurfaceComponent implements OnDestroy {
|
|
|
100
139
|
protected isQr(c: ReportControl): boolean;
|
|
101
140
|
protected barcodeLabel(c: ReportControl): string;
|
|
102
141
|
protected selectBand(id: string): void;
|
|
103
|
-
|
|
142
|
+
/** On an empty part of a section: starts a rubber-band selection (Shift/Ctrl add to the selection). */
|
|
143
|
+
protected onBodyPointerDown(e: PointerEvent, band: Band): void;
|
|
144
|
+
protected isEditing(controlId: string, row?: number, cell?: number): boolean;
|
|
145
|
+
/** Double-click / F2: fixed text is typed on the page, a formula opens the formula editor. */
|
|
146
|
+
startEditing(c: ReportControl, row?: number, cell?: number, seed?: string): void;
|
|
147
|
+
/** Enter or Escape pressed before the editor had focus: keep or drop what was typed. */
|
|
148
|
+
finishEditing(keep: boolean): void;
|
|
149
|
+
/** Keys typed before the editor has focus (fast typists) are not lost. */
|
|
150
|
+
appendToEdit(key: string): void;
|
|
151
|
+
/** Enter keeps the text, Shift+Enter starts a new line, Escape leaves it as it was. */
|
|
152
|
+
protected onEditorKey(e: KeyboardEvent): void;
|
|
153
|
+
protected commitEditing(e: FocusEvent): void;
|
|
154
|
+
protected applyFormula(expression: string): void;
|
|
155
|
+
private setText;
|
|
156
|
+
/** Pointer position in mm inside the section under it, for the status bar. */
|
|
157
|
+
protected trackPointer(e: PointerEvent): void;
|
|
104
158
|
protected onControlPointerDown(e: PointerEvent, c: ReportControl, band: Band): void;
|
|
105
159
|
protected onHandlePointerDown(e: PointerEvent, c: ReportControl, band: Band, handle: Handle): void;
|
|
106
160
|
protected onBandResizePointerDown(e: PointerEvent, band: Band): void;
|
|
@@ -127,10 +181,15 @@ export declare class DesignSurfaceComponent implements OnDestroy {
|
|
|
127
181
|
/** Fixed watermark text, or its formula, shown faintly on the design page. */
|
|
128
182
|
protected watermarkText(): string;
|
|
129
183
|
protected chartLabel(c: ReportControl): string;
|
|
184
|
+
private readFile;
|
|
185
|
+
/** A picture at (x, y) mm, at its natural size up to 80 mm wide (PNG/JPEG data URI). */
|
|
186
|
+
addImage(band: Band, x: number, y: number, src: string): void;
|
|
187
|
+
/** Text pasted from elsewhere becomes a text item, tall enough for its lines. */
|
|
188
|
+
addText(band: Band, x: number, y: number, text: string): void;
|
|
130
189
|
/** Creates controls for a drop at (x, y) mm inside `band`. */
|
|
131
190
|
dropAt(data: DesignerDragData, band: Band, x: number, y: number): void;
|
|
132
191
|
private growBand;
|
|
133
192
|
static ɵfac: i0.ɵɵFactoryDeclaration<DesignSurfaceComponent, never>;
|
|
134
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DesignSurfaceComponent, "we-report-design-surface", never, { "strings": { "alias": "strings"; "required": true; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; "gridSize": { "alias": "gridSize"; "required": false; "isSignal": true; }; "sample": { "alias": "sample"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
193
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DesignSurfaceComponent, "we-report-design-surface", never, { "strings": { "alias": "strings"; "required": true; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; "gridSize": { "alias": "gridSize"; "required": false; "isSignal": true; }; "sample": { "alias": "sample"; "required": false; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
135
194
|
}
|
|
136
195
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Band, ReportControl, ReportDefinition } from 'we-report-core';
|
|
1
|
+
import { Band, ReportControl, ReportDefinition, ReportStyle } from 'we-report-core';
|
|
2
2
|
import { TableCellRef } from './table-ops';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export type Selection = {
|
|
@@ -11,6 +11,8 @@ export type Selection = {
|
|
|
11
11
|
id: string;
|
|
12
12
|
};
|
|
13
13
|
export type AlignEdge = 'left' | 'center' | 'right' | 'top' | 'middle' | 'bottom';
|
|
14
|
+
/** Marks designer items on the system clipboard, so they paste into another tab or window. */
|
|
15
|
+
export declare const CLIPBOARD_MARKER = "we-report/controls+json:";
|
|
14
16
|
/**
|
|
15
17
|
* The designer's document, selection and undo history. Every edit goes through `update`, which
|
|
16
18
|
* snapshots the previous state — so every edit is undoable and observable.
|
|
@@ -22,6 +24,20 @@ export declare class DesignerState {
|
|
|
22
24
|
readonly canRedo: import("@angular/core").WritableSignal<boolean>;
|
|
23
25
|
/** The table cell last clicked; the inspector edits it while its table is selected. */
|
|
24
26
|
readonly tableCell: import("@angular/core").WritableSignal<TableCellRef | null>;
|
|
27
|
+
/** Format painter: the look picked up from one item, applied to the next item clicked. */
|
|
28
|
+
readonly painter: import("@angular/core").WritableSignal<Pick<ReportControl, "style" | "styleOverrides"> | null>;
|
|
29
|
+
/** Text being typed on the page (double-click / F2): a text control, or a cell of a table. */
|
|
30
|
+
readonly editing: import("@angular/core").WritableSignal<{
|
|
31
|
+
controlId: string;
|
|
32
|
+
row?: number;
|
|
33
|
+
cell?: number;
|
|
34
|
+
} | null>;
|
|
35
|
+
/** Where the pointer is on the page, for the status bar: band and mm inside it. */
|
|
36
|
+
readonly pointer: import("@angular/core").WritableSignal<{
|
|
37
|
+
bandId: string;
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
} | null>;
|
|
25
41
|
/** The first data row and its scope, for live values in the design and the formula editor. */
|
|
26
42
|
readonly sample: import("@angular/core").WritableSignal<{
|
|
27
43
|
row: unknown;
|
|
@@ -43,8 +59,8 @@ export declare class DesignerState {
|
|
|
43
59
|
update(mutate: (draft: ReportDefinition) => void, coalesce?: string): void;
|
|
44
60
|
undo(): void;
|
|
45
61
|
redo(): void;
|
|
46
|
-
/** A new id not used by any band or control. */
|
|
47
|
-
newId(prefix: string): string;
|
|
62
|
+
/** A new id not used by any band or control; pass the same `taken` set when making several ids before the report changes. */
|
|
63
|
+
newId(prefix: string, taken?: Set<string>): string;
|
|
48
64
|
findBandOf(controlId: string, def?: ReportDefinition): Band | undefined;
|
|
49
65
|
addControls(bandId: string, controls: ReportControl[]): void;
|
|
50
66
|
/** Mutates every selected control (or the given ids) in one undoable step. */
|
|
@@ -58,6 +74,10 @@ export declare class DesignerState {
|
|
|
58
74
|
cutSelection(): void;
|
|
59
75
|
/** Pastes into `bandId`, else the selected band, else each control's original kind of band. */
|
|
60
76
|
paste(bandId?: string): void;
|
|
77
|
+
/** The copied items as text for the system clipboard. */
|
|
78
|
+
clipboardText(): string;
|
|
79
|
+
/** Takes items copied in another designer (another tab or window); false when it is not ours. */
|
|
80
|
+
loadClipboard(text: string): boolean;
|
|
61
81
|
hasClipboard(): boolean;
|
|
62
82
|
/** Selects every control of the selected band, or of the whole report. */
|
|
63
83
|
selectAll(): void;
|
|
@@ -67,6 +87,16 @@ export declare class DesignerState {
|
|
|
67
87
|
distribute(axis: 'h' | 'v'): void;
|
|
68
88
|
/** Gives the selection the width and/or height of the first selected control. */
|
|
69
89
|
sameSize(dimension: 'width' | 'height' | 'both'): void;
|
|
90
|
+
/**
|
|
91
|
+
* Sets one style property on the selection, the way a format bar does: on the clicked table
|
|
92
|
+
* cell when a single table is selected and a cell of it is chosen, else on every selected item.
|
|
93
|
+
* `undefined` removes the override (back to the style sheet).
|
|
94
|
+
*/
|
|
95
|
+
applyStyle<K extends keyof ReportStyle>(key: K, value: ReportStyle[K] | undefined): void;
|
|
96
|
+
/** Grows or shrinks the selection by (dw, dh) mm, never below 1 mm. */
|
|
97
|
+
resizeSelection(dw: number, dh: number): void;
|
|
98
|
+
/** Tab order of a band: top to bottom, then left to right. */
|
|
99
|
+
selectNext(step: 1 | -1): void;
|
|
70
100
|
/** Draw order inside a band: later controls paint on top. */
|
|
71
101
|
arrange(to: 'front' | 'back'): void;
|
|
72
102
|
select(id: string, additive: boolean): void;
|
|
@@ -70,6 +70,9 @@ export declare class PropertyPanelComponent {
|
|
|
70
70
|
protected toggleBand(key: 'keepTogether' | 'repeatOnEveryPage' | 'pageBreakBefore' | 'pageBreakAfter', value: boolean): void;
|
|
71
71
|
protected labelSheetName(l: LabelSheet): string;
|
|
72
72
|
protected applyLabelSheet(id: string): void;
|
|
73
|
+
protected readonly fieldExpressions: import("@angular/core").Signal<Set<string>>;
|
|
74
|
+
/** The detail's first sort key; further keys (set in the file) are kept. */
|
|
75
|
+
protected setSort(expression: string, descending: boolean): void;
|
|
73
76
|
/** Detail columns; one column removes the setting. */
|
|
74
77
|
protected setColumns(key: 'count' | 'gap', value: string): void;
|
|
75
78
|
protected removeBand(): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Band, BandKind, ReportControl, ReportControlType, ReportDefinition, ReportIssue } from 'we-report-core';
|
|
1
|
+
import { Band, BandKind, ReportControl, ReportControlType, ReportDefinition, ReportIssue, ReportStyle, TextAlign } from 'we-report-core';
|
|
2
2
|
import { WeReportIcons } from '../we-report-icons';
|
|
3
3
|
import { WeReportLocale } from '../we-report-locale';
|
|
4
|
-
import { DesignSample } from './design-surface.component';
|
|
4
|
+
import { DesignSample, DesignerDragData } from './design-surface.component';
|
|
5
5
|
import { DesignerField } from './designer-fields';
|
|
6
6
|
import { DesignerState } from './designer-state';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
@@ -44,8 +44,58 @@ export declare class WeReportDesignerComponent {
|
|
|
44
44
|
y: number;
|
|
45
45
|
bandId: string | null;
|
|
46
46
|
onControl: boolean;
|
|
47
|
+
at?: {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
};
|
|
47
51
|
} | null>;
|
|
48
52
|
private readonly canvas;
|
|
53
|
+
private readonly surface;
|
|
54
|
+
protected readonly shortcutsOpen: import("@angular/core").WritableSignal<boolean>;
|
|
55
|
+
/** Side panel widths in px; 0 hides a panel. Remembered in this browser. */
|
|
56
|
+
protected readonly leftWidth: import("@angular/core").WritableSignal<number>;
|
|
57
|
+
protected readonly rightWidth: import("@angular/core").WritableSignal<number>;
|
|
58
|
+
protected readonly fontSizes: number[];
|
|
59
|
+
protected readonly textAligns: {
|
|
60
|
+
value: TextAlign;
|
|
61
|
+
icon: keyof WeReportIcons;
|
|
62
|
+
label: 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify';
|
|
63
|
+
}[];
|
|
64
|
+
/** The look of the first selected item (or the clicked table cell), shown in the format bar. */
|
|
65
|
+
protected readonly formatStyle: import("@angular/core").Signal<import("we-report-core").ResolvedStyle | null>;
|
|
66
|
+
/** One line about the selection for the status bar. */
|
|
67
|
+
protected readonly selectionInfo: import("@angular/core").Signal<{
|
|
68
|
+
title: string;
|
|
69
|
+
box: {
|
|
70
|
+
x: number;
|
|
71
|
+
y: number;
|
|
72
|
+
width: number;
|
|
73
|
+
height: number;
|
|
74
|
+
};
|
|
75
|
+
} | {
|
|
76
|
+
title: string;
|
|
77
|
+
box: null;
|
|
78
|
+
}>;
|
|
79
|
+
protected readonly pointerInfo: import("@angular/core").Signal<string>;
|
|
80
|
+
protected mm(v: number): string;
|
|
81
|
+
/** Where a click-added item goes: the selected section, the selected item's section, else the detail rows. */
|
|
82
|
+
private targetBand;
|
|
83
|
+
/** Adds a toolbox item or a field without dragging: under (or, for rows, beside) what is there. */
|
|
84
|
+
protected addByClick(data: DesignerDragData): void;
|
|
85
|
+
protected onToolClick(item: {
|
|
86
|
+
type: ReportControlType;
|
|
87
|
+
variant?: string;
|
|
88
|
+
}): void;
|
|
89
|
+
protected onFieldDblClick(field: DesignerField): void;
|
|
90
|
+
/** Dragging a panel edge; a double-click hides the panel or brings it back. */
|
|
91
|
+
protected startResize(e: PointerEvent, side: 'left' | 'right'): void;
|
|
92
|
+
protected togglePanel(side: 'left' | 'right'): void;
|
|
93
|
+
protected editSelected(): void;
|
|
94
|
+
protected format<K extends keyof ReportStyle>(key: K, value: ReportStyle[K] | undefined): void;
|
|
95
|
+
private typeStartsEditing;
|
|
96
|
+
protected toggleFormat(key: 'bold' | 'italic' | 'underline'): void;
|
|
97
|
+
protected togglePainter(): void;
|
|
98
|
+
protected setBorder(on: boolean): void;
|
|
49
99
|
/** Design problems, checked on every edit; field names are judged only when there is data. */
|
|
50
100
|
protected readonly issues: import("@angular/core").Signal<ReportIssue[]>;
|
|
51
101
|
/** Show the first data row inside bound controls instead of their formulas. */
|
|
@@ -65,11 +115,30 @@ export declare class WeReportDesignerComponent {
|
|
|
65
115
|
protected outlineIcon(c: ReportControl): keyof WeReportIcons;
|
|
66
116
|
protected selectFromOutline(e: MouseEvent, id: string): void;
|
|
67
117
|
protected isSelected(id: string): boolean;
|
|
118
|
+
protected readonly zoomSteps: number[];
|
|
119
|
+
protected readonly gridSteps: number[];
|
|
120
|
+
/** Snap grid in mm; 0 turns the grid off. */
|
|
121
|
+
protected readonly gridSize: import("@angular/core").WritableSignal<number>;
|
|
122
|
+
protected pickZoom(value: string): void;
|
|
68
123
|
protected fitWidth(): void;
|
|
69
124
|
protected onCanvasWheel(e: WheelEvent): void;
|
|
70
125
|
protected openContextMenu(e: MouseEvent): void;
|
|
126
|
+
/** A new text where the section was right-clicked, ready to type in. */
|
|
127
|
+
protected addTextAt(bandId: string | null, at?: {
|
|
128
|
+
x: number;
|
|
129
|
+
y: number;
|
|
130
|
+
}): void;
|
|
131
|
+
/** Shrinks (or grows) a section to just below its lowest item. */
|
|
132
|
+
protected fitBand(bandId: string | null): void;
|
|
71
133
|
/** Runs a context-menu command and closes the menu. */
|
|
72
134
|
protected menu(action: () => void): void;
|
|
135
|
+
/** Ctrl+C/X/V pressed on the page and not yet answered by a clipboard event. */
|
|
136
|
+
private pendingClipboardKey;
|
|
137
|
+
/** Copy and cut also put the items on the system clipboard, so they paste in another tab. */
|
|
138
|
+
protected onCopy(e: ClipboardEvent): void;
|
|
139
|
+
/** Pastes our items, else a picture (screenshot) or text from any other program. */
|
|
140
|
+
protected onPaste(e: ClipboardEvent): void;
|
|
141
|
+
private isTyping;
|
|
73
142
|
protected closeMenus(e: PointerEvent): void;
|
|
74
143
|
protected iconName(name: string): keyof WeReportIcons;
|
|
75
144
|
protected setZoom(value: number): void;
|
|
@@ -80,8 +149,25 @@ export declare class WeReportDesignerComponent {
|
|
|
80
149
|
protected onFieldDragStart(e: DragEvent, field: DesignerField): void;
|
|
81
150
|
private setDrag;
|
|
82
151
|
protected addBand(kind: BandKind): void;
|
|
83
|
-
/**
|
|
152
|
+
/** The report wizard's choices while it is open. */
|
|
153
|
+
protected readonly wizard: import("@angular/core").WritableSignal<{
|
|
154
|
+
title: string;
|
|
155
|
+
fields: {
|
|
156
|
+
name: string;
|
|
157
|
+
on: boolean;
|
|
158
|
+
}[];
|
|
159
|
+
groupBy: string;
|
|
160
|
+
sortBy: string;
|
|
161
|
+
sortDescending: boolean;
|
|
162
|
+
totals: boolean;
|
|
163
|
+
orientation: "" | "portrait" | "landscape";
|
|
164
|
+
} | null>;
|
|
165
|
+
/** Opens the report wizard: pick columns, grouping, totals and paper, then a tidy list is built. */
|
|
84
166
|
protected autoDesign(): void;
|
|
167
|
+
protected updateWizard(change: Partial<NonNullable<ReturnType<typeof this.wizard>>>): void;
|
|
168
|
+
protected toggleWizardField(name: string): void;
|
|
169
|
+
/** Replaces the layout with the wizard's list report (undoable). */
|
|
170
|
+
protected runWizard(): void;
|
|
85
171
|
protected issueText(issue: ReportIssue): string;
|
|
86
172
|
protected showIssue(issue: ReportIssue): void;
|
|
87
173
|
/** Moves (and if needed narrows) an item back inside the paper. */
|
|
@@ -7,7 +7,16 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
export declare class WeReportPageComponent {
|
|
8
8
|
readonly page: import("@angular/core").InputSignal<LayoutPage>;
|
|
9
9
|
readonly zoom: import("@angular/core").InputSignal<number>;
|
|
10
|
+
/** Lines containing this text are highlighted (case-insensitive). */
|
|
11
|
+
readonly highlight: import("@angular/core").InputSignal<string>;
|
|
12
|
+
/** The match the viewer is showing now, drawn stronger. */
|
|
13
|
+
readonly current: import("@angular/core").InputSignal<{
|
|
14
|
+
item: number;
|
|
15
|
+
line: number;
|
|
16
|
+
} | null>;
|
|
17
|
+
readonly locale: import("@angular/core").InputSignal<string | undefined>;
|
|
10
18
|
protected readonly ptToMm: number;
|
|
19
|
+
protected isHit(text: string): boolean;
|
|
11
20
|
protected text(item: unknown): TextItem;
|
|
12
21
|
protected path(item: unknown): PathItem;
|
|
13
22
|
protected paint(color: string | undefined): string;
|
|
@@ -15,5 +24,5 @@ export declare class WeReportPageComponent {
|
|
|
15
24
|
protected textColor(color: string): string;
|
|
16
25
|
protected family(item: TextItem): string;
|
|
17
26
|
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>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WeReportPageComponent, "we-report-page", never, { "page": { "alias": "page"; "required": true; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; "highlight": { "alias": "highlight"; "required": false; "isSignal": true; }; "current": { "alias": "current"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
19
28
|
}
|
|
@@ -17,7 +17,7 @@ export declare class WeReportViewerComponent {
|
|
|
17
17
|
readonly fetchFn: import("@angular/core").InputSignal<typeof fetch | undefined>;
|
|
18
18
|
readonly problems: import("@angular/core").OutputEmitterRef<LayoutProblem[]>;
|
|
19
19
|
readonly rendered: import("@angular/core").OutputEmitterRef<LayoutDocument>;
|
|
20
|
-
|
|
20
|
+
protected readonly config: import("../we-report-config").WeReportConfig;
|
|
21
21
|
private readonly fontsService;
|
|
22
22
|
private readonly backend;
|
|
23
23
|
private readonly dom;
|
|
@@ -37,6 +37,36 @@ export declare class WeReportViewerComponent {
|
|
|
37
37
|
/** What the current preview was laid out from, so exports use exactly the same data. */
|
|
38
38
|
private lastInput;
|
|
39
39
|
constructor();
|
|
40
|
+
protected readonly zoomSteps: number[];
|
|
41
|
+
protected readonly showThumbs: import("@angular/core").WritableSignal<boolean>;
|
|
42
|
+
protected readonly thumbZoom = 0.18;
|
|
43
|
+
protected readonly currentPage: import("@angular/core").WritableSignal<number>;
|
|
44
|
+
protected readonly pageTotal: import("@angular/core").Signal<number>;
|
|
45
|
+
protected readonly query: import("@angular/core").WritableSignal<string>;
|
|
46
|
+
protected readonly matchIndex: import("@angular/core").WritableSignal<number>;
|
|
47
|
+
private readonly scroller;
|
|
48
|
+
private readonly thumbs;
|
|
49
|
+
private readonly searchBox;
|
|
50
|
+
/** Every line containing the search text: page, item and line index, in reading order. */
|
|
51
|
+
protected readonly matches: import("@angular/core").Signal<{
|
|
52
|
+
page: number;
|
|
53
|
+
item: number;
|
|
54
|
+
line: number;
|
|
55
|
+
}[]>;
|
|
56
|
+
protected readonly currentHit: import("@angular/core").Signal<{
|
|
57
|
+
page: number;
|
|
58
|
+
item: number;
|
|
59
|
+
line: number;
|
|
60
|
+
}>;
|
|
61
|
+
protected setQuery(value: string): void;
|
|
62
|
+
protected nextMatch(step: 1 | -1): void;
|
|
63
|
+
private revealHit;
|
|
64
|
+
protected goToPage(n: number): void;
|
|
65
|
+
/** The page whose top is nearest the top of the view is the current page. */
|
|
66
|
+
protected onScroll(): void;
|
|
67
|
+
private setCurrent;
|
|
68
|
+
protected pickZoom(value: string): void;
|
|
69
|
+
protected onKeydown(e: KeyboardEvent): void;
|
|
40
70
|
protected setZoom(value: number): void;
|
|
41
71
|
protected paramValue(p: ReportParameter): unknown;
|
|
42
72
|
protected setParam(p: ReportParameter, value: unknown): void;
|
package/lib/we-report-icons.d.ts
CHANGED
|
@@ -23,6 +23,25 @@ export interface WeReportIcons {
|
|
|
23
23
|
database: string;
|
|
24
24
|
chart: string;
|
|
25
25
|
table: string;
|
|
26
|
+
textLeft: string;
|
|
27
|
+
textCenter: string;
|
|
28
|
+
textRight: string;
|
|
29
|
+
textJustify: string;
|
|
30
|
+
borderAll: string;
|
|
31
|
+
borderNone: string;
|
|
32
|
+
brush: string;
|
|
33
|
+
firstPage: string;
|
|
34
|
+
previousPage: string;
|
|
35
|
+
nextPage: string;
|
|
36
|
+
lastPage: string;
|
|
37
|
+
chevronUp: string;
|
|
38
|
+
chevronDown: string;
|
|
39
|
+
thumbnails: string;
|
|
40
|
+
keyboard: string;
|
|
41
|
+
edit: string;
|
|
42
|
+
fitHeight: string;
|
|
43
|
+
noColor: string;
|
|
44
|
+
wand: string;
|
|
26
45
|
arrangeLeft: string;
|
|
27
46
|
arrangeCenter: string;
|
|
28
47
|
arrangeRight: string;
|
|
@@ -249,6 +249,50 @@ export interface WeReportLocale {
|
|
|
249
249
|
chartHint: string;
|
|
250
250
|
conditionalFormatting: string;
|
|
251
251
|
watermark: string;
|
|
252
|
+
firstPage: string;
|
|
253
|
+
previousPage: string;
|
|
254
|
+
nextPage: string;
|
|
255
|
+
lastPage: string;
|
|
256
|
+
pageOf: string;
|
|
257
|
+
search: string;
|
|
258
|
+
matches: string;
|
|
259
|
+
noMatches: string;
|
|
260
|
+
fitPage: string;
|
|
261
|
+
keyboardShortcuts: string;
|
|
262
|
+
editText: string;
|
|
263
|
+
editFormula: string;
|
|
264
|
+
moveItem: string;
|
|
265
|
+
moveFine: string;
|
|
266
|
+
resizeItem: string;
|
|
267
|
+
nextItem: string;
|
|
268
|
+
rubberBand: string;
|
|
269
|
+
noSnap: string;
|
|
270
|
+
dragCopy: string;
|
|
271
|
+
wizardTitle: string;
|
|
272
|
+
wizardReportTitle: string;
|
|
273
|
+
wizardColumns: string;
|
|
274
|
+
noGrouping: string;
|
|
275
|
+
wizardTotals: string;
|
|
276
|
+
automatic: string;
|
|
277
|
+
createReport: string;
|
|
278
|
+
previousMatch: string;
|
|
279
|
+
nextMatch: string;
|
|
280
|
+
zoomLevel: string;
|
|
281
|
+
sortRows: string;
|
|
282
|
+
dataOrder: string;
|
|
283
|
+
addTextHere: string;
|
|
284
|
+
fitBandToContent: string;
|
|
285
|
+
thumbnails: string;
|
|
286
|
+
snapGrid: string;
|
|
287
|
+
gridOff: string;
|
|
288
|
+
formatPainter: string;
|
|
289
|
+
addByClick: string;
|
|
290
|
+
resizePanel: string;
|
|
291
|
+
alignJustify: string;
|
|
292
|
+
noSelection: string;
|
|
293
|
+
formatBar: string;
|
|
294
|
+
allBorders: string;
|
|
295
|
+
noBorder: string;
|
|
252
296
|
innerList: string;
|
|
253
297
|
innerListOf: string;
|
|
254
298
|
innerListHint: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "we-report-angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.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.5.0"
|
|
36
36
|
},
|
|
37
37
|
"sideEffects": false,
|
|
38
38
|
"module": "fesm2022/we-report-angular.mjs",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
--we-report-selection: #007aff;
|
|
30
30
|
--we-report-selection-fill: rgba(0, 122, 255, 0.07);
|
|
31
31
|
--we-report-guide: #ff375f;
|
|
32
|
+
--we-report-search-highlight: rgba(255, 204, 0, 0.45);
|
|
32
33
|
--we-report-warning-bg: rgba(255, 149, 0, 0.12);
|
|
33
34
|
--we-report-warning-fg: #b25000;
|
|
34
35
|
--we-report-backdrop: rgba(0, 0, 0, 0.22);
|
|
@@ -63,6 +64,7 @@
|
|
|
63
64
|
--we-report-selection: #0a84ff;
|
|
64
65
|
--we-report-selection-fill: rgba(10, 132, 255, 0.1);
|
|
65
66
|
--we-report-guide: #ff375f;
|
|
67
|
+
--we-report-search-highlight: rgba(255, 204, 0, 0.5);
|
|
66
68
|
--we-report-warning-bg: rgba(255, 159, 10, 0.18);
|
|
67
69
|
--we-report-warning-fg: #ffb340;
|
|
68
70
|
--we-report-backdrop: rgba(0, 0, 0, 0.45);
|
|
@@ -97,6 +99,7 @@
|
|
|
97
99
|
--we-report-selection: #0a84ff;
|
|
98
100
|
--we-report-selection-fill: rgba(10, 132, 255, 0.1);
|
|
99
101
|
--we-report-guide: #ff375f;
|
|
102
|
+
--we-report-search-highlight: rgba(255, 204, 0, 0.5);
|
|
100
103
|
--we-report-warning-bg: rgba(255, 159, 10, 0.18);
|
|
101
104
|
--we-report-warning-fg: #ffb340;
|
|
102
105
|
--we-report-backdrop: rgba(0, 0, 0, 0.45);
|