@formancy/report-builder-angular 0.2.0 → 0.3.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CanvasBox, DiagnosticEntry, DragSubject, DropTarget, EditorAction, EditorOutcome, EditorPanel, EditorState, EditorText, HideablePanel, OutlineNode, PaletteEntry, PropertyField, ReportEditor } from "@formancy/report-builder-core";
|
|
1
|
+
import { CanvasBox, DiagnosticEntry, DragSubject, DropTarget, EditorAction, EditorOutcome, EditorPanel, EditorState, EditorText, HideablePanel, OutlineNode, OutlinePart, PaletteEntry, PropertyAction, PropertyField, ReportEditor } from "@formancy/report-builder-core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import { Signal, TemplateRef } from "@angular/core";
|
|
4
4
|
/** Marks the template a host gives `<report-builder>` as its view. */
|
|
@@ -44,6 +44,12 @@ type FocusAfter =
|
|
|
44
44
|
{
|
|
45
45
|
readonly to: 'pane';
|
|
46
46
|
readonly panel: EditorPanel;
|
|
47
|
+
} |
|
|
48
|
+
/** Where a group's button says the keyboard goes once it is done (`then`, 0044): a button of the group with that key, or its first field. */
|
|
49
|
+
{
|
|
50
|
+
readonly to: 'group';
|
|
51
|
+
readonly group: string;
|
|
52
|
+
readonly button?: number;
|
|
47
53
|
};
|
|
48
54
|
export declare class ReportEditorRoot {
|
|
49
55
|
/** The editor this builder renders and acts on. Several builders may share one; each is told of the others' edits. */
|
|
@@ -77,13 +83,14 @@ export declare class ReportEditorRoot {
|
|
|
77
83
|
*/
|
|
78
84
|
dispatch(action: EditorAction, focus?: FocusAfter): EditorOutcome;
|
|
79
85
|
/**
|
|
80
|
-
* Sends `action`, and moves focus as `focus` says only when it was done
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
86
|
+
* Sends `action`, and moves focus as `focus` says only when it was done,
|
|
87
|
+
* or where the outcome says, where the action decided it only once done
|
|
88
|
+
* -- a run's button, whose run a split moved (0061): a refused one leaves
|
|
89
|
+
* the keyboard where the person pressed, the live region saying why -- a
|
|
90
|
+
* Remove of an image something draws (0033). The render the action
|
|
91
|
+
* causes comes after this returns, so it finds the focus asked for.
|
|
85
92
|
*/
|
|
86
|
-
attempt(action: EditorAction, focus
|
|
93
|
+
attempt(action: EditorAction, focus?: FocusAfter): EditorOutcome;
|
|
87
94
|
/**
|
|
88
95
|
* Opens the place chooser for `subject`, remembering `opener` to come back
|
|
89
96
|
* to. It floats over the outline pane, so that is the pane a narrow screen
|
|
@@ -132,6 +139,8 @@ export declare class ReportEditorRoot {
|
|
|
132
139
|
*/
|
|
133
140
|
private dropped;
|
|
134
141
|
private moveFocus;
|
|
142
|
+
/** The button at `button` of the properties' group with the key `key`, or its first field: the groups stand in the form in the order of the state's rows. */
|
|
143
|
+
private inGroup;
|
|
135
144
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportEditorRoot, never>;
|
|
136
145
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ReportEditorRoot, "[reportEditor]", never, {
|
|
137
146
|
"editor": {
|
|
@@ -170,7 +179,10 @@ export declare class ReportCanvas {
|
|
|
170
179
|
protected readonly canvas: import("@angular/core").Signal<import("@formancy/report-builder-core").Canvas>;
|
|
171
180
|
/** The component being moved, drawn faded where it stands. */
|
|
172
181
|
protected readonly dragged: import("@angular/core").Signal<string | null>;
|
|
182
|
+
/** What a box says beyond its name, as its description: that it runs over, and that a word it prints is missing in the language edited. */
|
|
183
|
+
protected described(box: CanvasBox): string | null;
|
|
173
184
|
protected select(box: CanvasBox): void;
|
|
185
|
+
protected selectBill(): void;
|
|
174
186
|
protected drag(box: CanvasBox, event: DragEvent): void;
|
|
175
187
|
/**
|
|
176
188
|
* The place nearest the pointer, among those whose list it is over;
|
|
@@ -183,7 +195,7 @@ export declare class ReportCanvas {
|
|
|
183
195
|
static ɵcmp: i0.ɵɵComponentDeclaration<ReportCanvas, "section[reportCanvas]", never, {}, {}, never, never, true, never>;
|
|
184
196
|
}
|
|
185
197
|
/** A node with its place among its siblings. */
|
|
186
|
-
interface Row {
|
|
198
|
+
interface Row$1 {
|
|
187
199
|
readonly node: OutlineNode;
|
|
188
200
|
readonly position: number;
|
|
189
201
|
readonly siblings: number;
|
|
@@ -193,20 +205,24 @@ export declare class ReportOutline {
|
|
|
193
205
|
private readonly host;
|
|
194
206
|
protected readonly t: import("@angular/core").Signal<import("@formancy/report-builder-core").EditorText>;
|
|
195
207
|
protected readonly regions: import("@angular/core").Signal<{
|
|
196
|
-
region: "body" | "summary" | "reportHeader" | "pageHeader" | "pageFooter";
|
|
208
|
+
region: "body" | "summary" | "reportHeader" | "firstPageHeader" | "pageHeader" | "pageFooter";
|
|
197
209
|
label: string;
|
|
198
|
-
rows: Row[];
|
|
210
|
+
rows: Row$1[];
|
|
199
211
|
}[]>;
|
|
200
212
|
private readonly all;
|
|
213
|
+
/** The rows of the parts of the report's own level, after the regions'. */
|
|
214
|
+
protected readonly parts: import("@angular/core").Signal<readonly OutlinePart[]>;
|
|
201
215
|
/** The row Tab lands on: the selected one, else the first; none when the tree is empty. */
|
|
202
216
|
protected readonly stop: import("@angular/core").Signal<string>;
|
|
203
|
-
protected problems(
|
|
217
|
+
protected problems(row: OutlineNode | OutlinePart): string;
|
|
204
218
|
protected overflow(node: OutlineNode): string;
|
|
205
219
|
/** The ids of what describes a row: how many problems it has, and that it is wider than its place. */
|
|
206
220
|
protected described(node: OutlineNode): string | null;
|
|
207
221
|
protected select(node: OutlineNode): void;
|
|
208
222
|
/** Focus that arrives on a row -- by Tab, or put there after an undo -- selects it, so the properties beside it are the focused row's. */
|
|
209
223
|
protected focused(node: OutlineNode): void;
|
|
224
|
+
protected selectPart(part: OutlinePart): void;
|
|
225
|
+
protected focusedPart(part: OutlinePart): void;
|
|
210
226
|
protected drag(node: OutlineNode, event: DragEvent): void;
|
|
211
227
|
/**
|
|
212
228
|
* The place beside the row the pointer is over: before it over its upper
|
|
@@ -257,25 +273,61 @@ declare const CONTROLS: {
|
|
|
257
273
|
readonly checkbox: "checkbox";
|
|
258
274
|
};
|
|
259
275
|
type Control = (typeof CONTROLS)[keyof typeof CONTROLS] | 'textarea';
|
|
276
|
+
/** A field as the properties draw it: with its control and its ids. */
|
|
260
277
|
interface Shown {
|
|
261
278
|
readonly field: PropertyField;
|
|
262
279
|
readonly control: Control;
|
|
263
280
|
readonly id: string;
|
|
264
281
|
readonly errorId: string | null;
|
|
282
|
+
/** The id of the note under a field at a word in another language than the report's own (0063). */
|
|
283
|
+
readonly noteId: string | null;
|
|
284
|
+
/** What describes the control: its error, then its note; null when it has neither. */
|
|
285
|
+
readonly describedBy: string | null;
|
|
286
|
+
}
|
|
287
|
+
declare class ReportPropertyRow {
|
|
288
|
+
private readonly root;
|
|
289
|
+
readonly shown: import("@angular/core").InputSignal<Shown>;
|
|
290
|
+
/** The field as the editor has it now. */
|
|
291
|
+
private now;
|
|
292
|
+
/** `value` sent, where it is not what the field holds; then, for a typed control, what the field reads back in it. */
|
|
293
|
+
protected commit(field: PropertyField, value: string | boolean, control?: HTMLInputElement | HTMLTextAreaElement): void;
|
|
294
|
+
protected enter(field: PropertyField, event: Event): void;
|
|
295
|
+
/** Escape: what the report holds, back in the field, so nothing typed since is committed when it is left. */
|
|
296
|
+
protected giveBack(field: PropertyField, event: Event): void;
|
|
297
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReportPropertyRow, never>;
|
|
298
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReportPropertyRow, "div[reportPropertyRow]", never, {
|
|
299
|
+
"shown": {
|
|
300
|
+
"alias": "shown";
|
|
301
|
+
"required": true;
|
|
302
|
+
"isSignal": true;
|
|
303
|
+
};
|
|
304
|
+
}, {}, never, never, true, never>;
|
|
305
|
+
}
|
|
306
|
+
/** A group of fields as the form draws it: its name, its fields and its buttons. */
|
|
307
|
+
interface ShownGroup {
|
|
308
|
+
readonly label: string;
|
|
309
|
+
readonly fields: readonly Shown[];
|
|
310
|
+
readonly actions: readonly PropertyAction[];
|
|
311
|
+
}
|
|
312
|
+
/** A row of the form: a field by itself, or a group of them with its button; the other one null. */
|
|
313
|
+
interface Row {
|
|
314
|
+
readonly key: string;
|
|
315
|
+
readonly field: Shown | null;
|
|
316
|
+
readonly group: ShownGroup | null;
|
|
265
317
|
}
|
|
266
318
|
export declare class ReportProperties {
|
|
267
319
|
protected readonly root: ReportEditorRoot;
|
|
268
320
|
/**
|
|
269
|
-
* Each field with its control and ids. The ids carry whose
|
|
270
|
-
* are, and the rows are tracked by them, so a field of the
|
|
271
|
-
* is a new control rather than one still holding what was
|
|
272
|
-
* last selection's.
|
|
321
|
+
* Each row, each field with its control and ids. The ids carry whose
|
|
322
|
+
* fields these are, and the rows are tracked by them, so a field of the
|
|
323
|
+
* next selection is a new control rather than one still holding what was
|
|
324
|
+
* typed into the last selection's.
|
|
273
325
|
*/
|
|
274
|
-
protected readonly
|
|
275
|
-
|
|
276
|
-
protected
|
|
277
|
-
/**
|
|
278
|
-
protected
|
|
326
|
+
protected readonly rows: import("@angular/core").Signal<readonly Row[]>;
|
|
327
|
+
/** The field of a row that is no group. */
|
|
328
|
+
protected fieldOf(row: Row): Shown;
|
|
329
|
+
/** A group's button: what it says it does, the keyboard going where the editor says once it is done. */
|
|
330
|
+
protected press(action: PropertyAction, group: HTMLElement): void;
|
|
279
331
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportProperties, never>;
|
|
280
332
|
static ɵcmp: i0.ɵɵComponentDeclaration<ReportProperties, "form[reportProperties]", never, {}, {}, never, never, true, never>;
|
|
281
333
|
}
|