we-report-angular 0.1.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.
Files changed (44) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +6 -0
  3. package/esm2022/lib/designer/bindable-input.component.mjs +66 -52
  4. package/esm2022/lib/designer/control-factory.mjs +20 -1
  5. package/esm2022/lib/designer/data-sources-dialog.component.mjs +3 -3
  6. package/esm2022/lib/designer/database-source-editor.component.mjs +251 -251
  7. package/esm2022/lib/designer/design-surface.component.mjs +404 -167
  8. package/esm2022/lib/designer/designer-fields.mjs +21 -5
  9. package/esm2022/lib/designer/designer-state.mjs +136 -1
  10. package/esm2022/lib/designer/expression-editor.component.mjs +168 -0
  11. package/esm2022/lib/designer/formatting-rule.mjs +41 -0
  12. package/esm2022/lib/designer/property-panel.component.mjs +221 -5
  13. package/esm2022/lib/designer/table-ops.mjs +86 -0
  14. package/esm2022/lib/designer/we-report-designer.component.mjs +125 -23
  15. package/esm2022/lib/locales/de.mjs +355 -0
  16. package/esm2022/lib/locales/es.mjs +355 -0
  17. package/esm2022/lib/locales/fr.mjs +355 -0
  18. package/esm2022/lib/viewer/we-report-page.component.mjs +167 -167
  19. package/esm2022/lib/viewer/we-report-viewer.component.mjs +139 -139
  20. package/esm2022/lib/we-report-config.mjs +1 -1
  21. package/esm2022/lib/we-report-fonts.service.mjs +1 -1
  22. package/esm2022/lib/we-report-icons.mjs +20 -1
  23. package/esm2022/lib/we-report-locale.mjs +273 -1
  24. package/esm2022/lib/we-report-locales.mjs +21 -0
  25. package/esm2022/public-api.mjs +5 -1
  26. package/fesm2022/we-report-angular.mjs +3198 -801
  27. package/fesm2022/we-report-angular.mjs.map +1 -1
  28. package/lib/designer/bindable-input.component.d.ts +1 -0
  29. package/lib/designer/design-surface.component.d.ts +44 -1
  30. package/lib/designer/designer-fields.d.ts +6 -1
  31. package/lib/designer/designer-state.d.ts +26 -0
  32. package/lib/designer/expression-editor.component.d.ts +39 -0
  33. package/lib/designer/formatting-rule.d.ts +14 -0
  34. package/lib/designer/property-panel.component.d.ts +62 -4
  35. package/lib/designer/table-ops.d.ts +23 -0
  36. package/lib/designer/we-report-designer.component.d.ts +23 -1
  37. package/lib/locales/de.d.ts +3 -0
  38. package/lib/locales/es.d.ts +3 -0
  39. package/lib/locales/fr.d.ts +3 -0
  40. package/lib/we-report-icons.d.ts +19 -0
  41. package/lib/we-report-locale.d.ts +100 -0
  42. package/lib/we-report-locales.d.ts +8 -0
  43. package/package.json +2 -2
  44. package/public-api.d.ts +4 -0
@@ -12,6 +12,7 @@ export declare class BindableInputComponent {
12
12
  readonly strings: import("@angular/core").InputSignal<WeReportLocale>;
13
13
  readonly multiline: import("@angular/core").InputSignal<boolean>;
14
14
  readonly valueChange: import("@angular/core").OutputEmitterRef<Bindable<string>>;
15
+ protected readonly editorOpen: import("@angular/core").WritableSignal<boolean>;
15
16
  protected readonly bound: import("@angular/core").Signal<boolean>;
16
17
  protected readonly expression: import("@angular/core").Signal<string>;
17
18
  protected readonly fixedText: import("@angular/core").Signal<string>;
@@ -42,6 +42,21 @@ export declare class DesignSurfaceComponent implements OnDestroy {
42
42
  protected readonly handles: Handle[];
43
43
  protected readonly guides: import("@angular/core").WritableSignal<Guide[]>;
44
44
  protected readonly geometry: import("@angular/core").Signal<import("we-report-core").PageGeometry>;
45
+ /** Top ruler in screen pixels: 0 at the left margin, a tick per millimetre, a label per centimetre. */
46
+ protected readonly ruler: import("@angular/core").Signal<{
47
+ width: number;
48
+ left: number;
49
+ right: number;
50
+ ticks: string;
51
+ labels: {
52
+ x: number;
53
+ text: string;
54
+ }[];
55
+ selection: {
56
+ x: number;
57
+ width: number;
58
+ } | null;
59
+ }>;
45
60
  protected readonly padding: import("@angular/core").Signal<string>;
46
61
  private op;
47
62
  private readonly onMove;
@@ -55,8 +70,27 @@ export declare class DesignSurfaceComponent implements OnDestroy {
55
70
  protected guidesFor(bandId: string): Guide[];
56
71
  protected isBound(c: ReportControl): boolean;
57
72
  protected boundExpression(c: ReportControl): string;
58
- protected caption(c: ReportControl): string;
73
+ protected caption(c: ReportControl, band?: Band): string;
59
74
  protected textStyle(c: ReportControl): Record<string, string>;
75
+ /** Cells of a table control in mm relative to the control, with their text and look. */
76
+ protected tableCells(c: ReportControl, band?: Band): {
77
+ row: number;
78
+ index: number;
79
+ x: number;
80
+ y: number;
81
+ width: number;
82
+ height: number;
83
+ text: string;
84
+ bound: boolean;
85
+ style: Record<string, string>;
86
+ }[];
87
+ /** Inside an inner list the sample is the first item of the first row that has items, around that row. */
88
+ private sampleFor;
89
+ protected isCellSelected(controlId: string, row: number, cell: number): boolean;
90
+ protected selectCell(controlId: string, row: number, cell: number): void;
91
+ /** Fixed text, or a formula shown with the first data row when there is one. */
92
+ private bindableText;
93
+ private styleOf;
60
94
  protected shapeStyle(c: ReportControl): Record<string, string>;
61
95
  protected lineCoords(c: ReportControl): [number, number, number, number];
62
96
  protected lineColor(c: ReportControl): string;
@@ -84,6 +118,15 @@ export declare class DesignSurfaceComponent implements OnDestroy {
84
118
  private snapToGrid;
85
119
  protected onDragOver(e: DragEvent): void;
86
120
  protected onDrop(e: DragEvent, band: Band): void;
121
+ protected readonly defaultWatermarkColor = "#e3e6ea";
122
+ /** For a multi-column detail: where the first column ends (mm) and how many columns print. */
123
+ protected columnShade(band: Band): {
124
+ left: number;
125
+ count: number;
126
+ } | null;
127
+ /** Fixed watermark text, or its formula, shown faintly on the design page. */
128
+ protected watermarkText(): string;
129
+ protected chartLabel(c: ReportControl): string;
87
130
  /** Creates controls for a drop at (x, y) mm inside `band`. */
88
131
  dropAt(data: DesignerDragData, band: Band, x: number, y: number): void;
89
132
  private growBand;
@@ -9,8 +9,13 @@ export interface DesignerField {
9
9
  expression: string;
10
10
  depth: number;
11
11
  }
12
- /** Row fields, then fields of the object holding the rows (when the rows are a nested list). */
12
+ /**
13
+ * Row fields, fields of the object holding the rows (when the rows are a nested list), the lists
14
+ * inside a row (for an inner list) and the fields of the inner list's items.
15
+ */
13
16
  export declare function designerFields(report: ReportDefinition, data?: unknown): {
14
17
  rows: DesignerField[];
15
18
  parent: DesignerField[];
19
+ lists: string[];
20
+ inner: DesignerField[];
16
21
  };
@@ -1,4 +1,5 @@
1
1
  import { Band, ReportControl, ReportDefinition } from 'we-report-core';
2
+ import { TableCellRef } from './table-ops';
2
3
  import * as i0 from "@angular/core";
3
4
  export type Selection = {
4
5
  kind: 'none';
@@ -9,6 +10,7 @@ export type Selection = {
9
10
  kind: 'band';
10
11
  id: string;
11
12
  };
13
+ export type AlignEdge = 'left' | 'center' | 'right' | 'top' | 'middle' | 'bottom';
12
14
  /**
13
15
  * The designer's document, selection and undo history. Every edit goes through `update`, which
14
16
  * snapshots the previous state — so every edit is undoable and observable.
@@ -18,6 +20,14 @@ export declare class DesignerState {
18
20
  readonly selection: import("@angular/core").WritableSignal<Selection>;
19
21
  readonly canUndo: import("@angular/core").WritableSignal<boolean>;
20
22
  readonly canRedo: import("@angular/core").WritableSignal<boolean>;
23
+ /** The table cell last clicked; the inspector edits it while its table is selected. */
24
+ readonly tableCell: import("@angular/core").WritableSignal<TableCellRef | null>;
25
+ /** The first data row and its scope, for live values in the design and the formula editor. */
26
+ readonly sample: import("@angular/core").WritableSignal<{
27
+ row: unknown;
28
+ rows: readonly unknown[];
29
+ parent: unknown;
30
+ } | null>;
21
31
  readonly selectedControls: import("@angular/core").Signal<ReportControl[]>;
22
32
  readonly selectedBand: import("@angular/core").Signal<Band | null>;
23
33
  private past;
@@ -43,6 +53,22 @@ export declare class DesignerState {
43
53
  deleteSelection(): void;
44
54
  removeBand(id: string): void;
45
55
  duplicateSelection(): void;
56
+ /** Copies the selected controls to the designer clipboard (shared by every designer on the page). */
57
+ copySelection(): boolean;
58
+ cutSelection(): void;
59
+ /** Pastes into `bandId`, else the selected band, else each control's original kind of band. */
60
+ paste(bandId?: string): void;
61
+ hasClipboard(): boolean;
62
+ /** Selects every control of the selected band, or of the whole report. */
63
+ selectAll(): void;
64
+ /** Aligns the selection to the first selected control (the one clicked first). */
65
+ align(edge: AlignEdge): void;
66
+ /** Equal gaps between three or more controls, keeping the outermost two in place. */
67
+ distribute(axis: 'h' | 'v'): void;
68
+ /** Gives the selection the width and/or height of the first selected control. */
69
+ sameSize(dimension: 'width' | 'height' | 'both'): void;
70
+ /** Draw order inside a band: later controls paint on top. */
71
+ arrange(to: 'front' | 'back'): void;
46
72
  select(id: string, additive: boolean): void;
47
73
  private pruneSelection;
48
74
  private syncFlags;
@@ -0,0 +1,39 @@
1
+ import { AfterViewInit } from '@angular/core';
2
+ import { FunctionCategory, FunctionInfo } from 'we-report-core';
3
+ import { WeReportLocale } from '../we-report-locale';
4
+ import { DesignerField } from './designer-fields';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * A sheet for writing a formula: fields, parameters and every function with a one-line
8
+ * explanation, inserted at the cursor, and the result for the first data row as you type.
9
+ */
10
+ export declare class ExpressionEditorComponent implements AfterViewInit {
11
+ readonly expression: import("@angular/core").InputSignal<string>;
12
+ readonly fields: import("@angular/core").InputSignal<DesignerField[]>;
13
+ readonly strings: import("@angular/core").InputSignal<WeReportLocale>;
14
+ readonly applied: import("@angular/core").OutputEmitterRef<string>;
15
+ readonly closed: import("@angular/core").OutputEmitterRef<void>;
16
+ private readonly state;
17
+ private readonly config;
18
+ private readonly area;
19
+ protected readonly categories: {
20
+ id: FunctionCategory;
21
+ label: keyof WeReportLocale;
22
+ }[];
23
+ protected readonly draft: import("@angular/core").WritableSignal<string>;
24
+ protected readonly category: import("@angular/core").WritableSignal<FunctionCategory>;
25
+ protected readonly parameters: import("@angular/core").Signal<import("we-report-core").ReportParameter[]>;
26
+ protected readonly visibleFunctions: import("@angular/core").Signal<FunctionInfo[]>;
27
+ /** What the formula gives for the first row, or why it cannot be evaluated. */
28
+ protected readonly result: import("@angular/core").Signal<{
29
+ text: string;
30
+ error: boolean;
31
+ }>;
32
+ ngAfterViewInit(): void;
33
+ /** Inserts at the caret (replacing a selection); `caretBack` moves the caret left afterwards. */
34
+ protected insert(text: string, caretBack?: number): void;
35
+ /** Inserts `Name()` and puts the cursor between the brackets. */
36
+ protected insertFunction(f: FunctionInfo): void;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExpressionEditorComponent, never>;
38
+ 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
+ }
@@ -0,0 +1,14 @@
1
+ /** The no-formula form of a conditional-formatting rule: `[field] op value`. */
2
+ export interface SimpleCondition {
3
+ field: string;
4
+ op: ConditionOp;
5
+ value: string;
6
+ }
7
+ export type ConditionOp = '=' | '!=' | '<' | '<=' | '>' | '>=' | 'contains';
8
+ export declare const CONDITION_OPS: {
9
+ op: ConditionOp;
10
+ label: string;
11
+ }[];
12
+ export declare function buildCondition(c: SimpleCondition): string;
13
+ /** Reads a formula back into the simple form, or `null` when it is something else. */
14
+ export declare function parseCondition(expression: string): SimpleCondition | null;
@@ -1,7 +1,9 @@
1
- import { Band, Bindable, BorderStyle, ReportControl, ReportStyle } from 'we-report-core';
1
+ import { Band, Bindable, BorderStyle, ChartAggregate, ChartType, FormattingRule, TableCell, TextAlign, Watermark, LabelSheet, ReportControl, ReportStyle } from 'we-report-core';
2
+ import { WeReportIcons } from '../we-report-icons';
2
3
  import { WeReportLocale } from '../we-report-locale';
3
4
  import { DesignerField } from './designer-fields';
4
- import { DesignerState } from './designer-state';
5
+ import { AlignEdge, DesignerState } from './designer-state';
6
+ import { SimpleCondition } from './formatting-rule';
5
7
  import * as i0 from "@angular/core";
6
8
  /** Plain-language properties of the selection: a control, a band, or the report itself. */
7
9
  export declare class PropertyPanelComponent {
@@ -9,6 +11,8 @@ export declare class PropertyPanelComponent {
9
11
  readonly fields: import("@angular/core").InputSignal<DesignerField[]>;
10
12
  readonly fontFamilies: import("@angular/core").InputSignal<string[]>;
11
13
  readonly advanced: import("@angular/core").InputSignal<boolean>;
14
+ /** Lists inside a row that an inner list can repeat over. */
15
+ readonly lists: import("@angular/core").InputSignal<string[]>;
12
16
  protected readonly state: DesignerState;
13
17
  protected readonly papers: readonly import("we-report-core").PaperSize[];
14
18
  protected readonly symbologies: readonly string[];
@@ -16,20 +20,58 @@ export declare class PropertyPanelComponent {
16
20
  value: string;
17
21
  key: keyof WeReportLocale;
18
22
  }[];
23
+ protected readonly alignActions: {
24
+ edge: AlignEdge;
25
+ icon: keyof WeReportIcons;
26
+ label: keyof WeReportLocale & `arrange${string}`;
27
+ }[];
28
+ protected readonly chartTypes: {
29
+ type: ChartType;
30
+ label: keyof WeReportLocale;
31
+ }[];
32
+ protected readonly cultures: {
33
+ id: string;
34
+ name: string;
35
+ }[];
36
+ protected readonly labelSheets: readonly LabelSheet[];
37
+ protected readonly currencies: string[];
38
+ protected readonly aggregates: {
39
+ value: ChartAggregate;
40
+ label: keyof WeReportLocale;
41
+ }[];
42
+ protected readonly conditionOps: {
43
+ op: import("./formatting-rule").ConditionOp;
44
+ label: string;
45
+ }[];
19
46
  protected readonly controls: import("@angular/core").Signal<ReportControl[]>;
20
47
  protected readonly control: import("@angular/core").Signal<ReportControl | null>;
21
48
  protected readonly band: import("@angular/core").Signal<Band | null>;
22
49
  protected readonly report: import("@angular/core").Signal<import("we-report-core").ReportDefinition>;
23
50
  protected readonly style: import("@angular/core").Signal<import("we-report-core").ResolvedStyle | null>;
24
51
  protected readonly hasText: import("@angular/core").Signal<boolean>;
52
+ /** The clicked cell of the selected table, with its row and first column. */
53
+ protected readonly selectedCell: import("@angular/core").Signal<{
54
+ cell: TableCell;
55
+ row: number;
56
+ index: number;
57
+ column: number;
58
+ } | null>;
25
59
  protected readonly formatIsCustom: import("@angular/core").Signal<boolean>;
26
60
  protected setReport<K extends 'name'>(key: K, value: string): void;
61
+ /** Empty means "use the app's setting". */
62
+ protected setCulture(key: 'locale' | 'currency', value: string): void;
63
+ /** Empty text removes the watermark. */
64
+ protected setWatermark(patch: Partial<Watermark>): void;
27
65
  protected setPaper(paper: string): void;
28
66
  protected setPage(key: 'orientation' | 'width' | 'height', value: string): void;
29
67
  protected setMargin(side: 'top' | 'right' | 'bottom' | 'left', value: string): void;
30
68
  protected setRowsPath(path: string): void;
31
- protected setBand(key: 'height' | 'groupBy' | 'sort' | 'backgroundColor', value: string): void;
69
+ protected setBand(key: 'height' | 'groupBy' | 'sort' | 'backgroundColor' | 'rowsPath', value: string): void;
32
70
  protected toggleBand(key: 'keepTogether' | 'repeatOnEveryPage' | 'pageBreakBefore' | 'pageBreakAfter', value: boolean): void;
71
+ protected labelSheetName(l: LabelSheet): string;
72
+ protected applyLabelSheet(id: string): void;
73
+ /** Detail columns; one column removes the setting. */
74
+ protected setColumns(key: 'count' | 'gap', value: string): void;
33
75
  protected removeBand(): void;
34
76
  protected ids(): string[];
35
77
  protected setGeometry(key: 'x' | 'y' | 'width' | 'height', value: string): void;
@@ -38,6 +80,22 @@ export declare class PropertyPanelComponent {
38
80
  protected setBindable(key: 'text' | 'value' | 'source' | 'checked' | 'visible', value: Bindable<string>): void;
39
81
  protected visibleValue(c: ReportControl): Bindable<string>;
40
82
  protected setVisible(value: Bindable<string>): void;
83
+ protected setExpression(key: 'category' | 'value', expression: string): void;
84
+ /** Row/column commands act on the clicked cell, or on the last row/column. */
85
+ protected tableOp(op: 'insertRow' | 'insertColumn' | 'deleteRow' | 'deleteColumn' | 'mergeRight' | 'splitCell'): void;
86
+ private updateCell;
87
+ protected setCell(patch: Partial<TableCell>): void;
88
+ protected setCellStyle<K extends keyof ReportStyle>(key: K, value: ReportStyle[K] | undefined): void;
89
+ protected cellAlign(cell: TableCell): TextAlign;
90
+ protected setColumnWidth(column: number, value: string): void;
91
+ protected setRowHeight(row: number, value: string): void;
92
+ protected condition(when: string): SimpleCondition | null;
93
+ private updateRules;
94
+ protected addRule(): void;
95
+ protected removeRule(index: number): void;
96
+ protected setRule(index: number, patch: Partial<FormattingRule>): void;
97
+ protected setCondition(index: number, current: SimpleCondition, key: keyof SimpleCondition, value: string): void;
98
+ protected setRuleStyle<K extends keyof ReportStyle>(index: number, key: K, value: ReportStyle[K] | undefined): void;
41
99
  protected checkedValue(c: ReportControl): Bindable<string>;
42
100
  protected setStyle<K extends keyof ReportStyle>(key: K, value: ReportStyle[K] | undefined): void;
43
101
  protected setBorder(patch: Partial<BorderStyle> | null): void;
@@ -47,5 +105,5 @@ export declare class PropertyPanelComponent {
47
105
  protected num(value: number | undefined | null): string;
48
106
  protected asNumber(value: string, fallback: number): number;
49
107
  static ɵfac: i0.ɵɵFactoryDeclaration<PropertyPanelComponent, never>;
50
- static ɵcmp: i0.ɵɵComponentDeclaration<PropertyPanelComponent, "we-report-property-panel", never, { "strings": { "alias": "strings"; "required": true; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; "isSignal": true; }; "fontFamilies": { "alias": "fontFamilies"; "required": false; "isSignal": true; }; "advanced": { "alias": "advanced"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
108
+ static ɵcmp: i0.ɵɵComponentDeclaration<PropertyPanelComponent, "we-report-property-panel", never, { "strings": { "alias": "strings"; "required": true; "isSignal": true; }; "fields": { "alias": "fields"; "required": false; "isSignal": true; }; "fontFamilies": { "alias": "fontFamilies"; "required": false; "isSignal": true; }; "advanced": { "alias": "advanced"; "required": false; "isSignal": true; }; "lists": { "alias": "lists"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
51
109
  }
@@ -0,0 +1,23 @@
1
+ import { TableControl, TableRow } from 'we-report-core';
2
+ /** A cell of a table control, addressed by row and position in that row's `cells`. */
3
+ export interface TableCellRef {
4
+ controlId: string;
5
+ row: number;
6
+ cell: number;
7
+ }
8
+ /** First column (0-based) covered by a cell. */
9
+ export declare function columnOf(row: TableRow, cellIndex: number): number;
10
+ /** Index of the cell covering `column`, or -1. */
11
+ export declare function cellAt(row: TableRow, column: number): number;
12
+ /** Width and height follow the grid. */
13
+ export declare function syncSize(t: TableControl): void;
14
+ /** A new row under `rowIndex` with the same cell layout and look, but no content. */
15
+ export declare function insertRow(t: TableControl, rowIndex: number): void;
16
+ export declare function deleteRow(t: TableControl, rowIndex: number): void;
17
+ /** A new column right of `column`, as wide as it; a cell spanning across it just gets wider. */
18
+ export declare function insertColumn(t: TableControl, column: number): void;
19
+ export declare function deleteColumn(t: TableControl, column: number): void;
20
+ /** Joins a cell with the next one in its row; the first cell's content stays. */
21
+ export declare function mergeRight(t: TableControl, rowIndex: number, cellIndex: number): void;
22
+ /** Undoes a merge: the cell keeps one column and empty cells fill the rest. */
23
+ export declare function splitCell(t: TableControl, rowIndex: number, cellIndex: number): void;
@@ -1,4 +1,4 @@
1
- import { Band, BandKind, ReportControlType, ReportDefinition, ReportIssue } from 'we-report-core';
1
+ import { Band, BandKind, ReportControl, ReportControlType, ReportDefinition, ReportIssue } from 'we-report-core';
2
2
  import { WeReportIcons } from '../we-report-icons';
3
3
  import { WeReportLocale } from '../we-report-locale';
4
4
  import { DesignSample } from './design-surface.component';
@@ -37,6 +37,15 @@ export declare class WeReportDesignerComponent {
37
37
  protected readonly bandMenuOpen: import("@angular/core").WritableSignal<boolean>;
38
38
  protected readonly dataDialogOpen: import("@angular/core").WritableSignal<boolean>;
39
39
  protected readonly problemsOpen: import("@angular/core").WritableSignal<boolean>;
40
+ protected readonly leftTab: import("@angular/core").WritableSignal<"add" | "outline">;
41
+ /** Right-click menu: screen position and the band it was opened on. */
42
+ protected readonly contextMenu: import("@angular/core").WritableSignal<{
43
+ x: number;
44
+ y: number;
45
+ bandId: string | null;
46
+ onControl: boolean;
47
+ } | null>;
48
+ private readonly canvas;
40
49
  /** Design problems, checked on every edit; field names are judged only when there is data. */
41
50
  protected readonly issues: import("@angular/core").Signal<ReportIssue[]>;
42
51
  /** Show the first data row inside bound controls instead of their formulas. */
@@ -45,10 +54,23 @@ export declare class WeReportDesignerComponent {
45
54
  protected readonly fields: import("@angular/core").Signal<{
46
55
  rows: DesignerField[];
47
56
  parent: DesignerField[];
57
+ lists: string[];
58
+ inner: DesignerField[];
48
59
  }>;
49
60
  protected readonly allFields: import("@angular/core").Signal<DesignerField[]>;
50
61
  protected readonly addableBands: import("@angular/core").Signal<BandKind[]>;
51
62
  constructor();
63
+ /** Short label of a control for the outline: its name, its text or formula, else its type. */
64
+ protected outlineLabel(c: ReportControl): string;
65
+ protected outlineIcon(c: ReportControl): keyof WeReportIcons;
66
+ protected selectFromOutline(e: MouseEvent, id: string): void;
67
+ protected isSelected(id: string): boolean;
68
+ protected fitWidth(): void;
69
+ protected onCanvasWheel(e: WheelEvent): void;
70
+ protected openContextMenu(e: MouseEvent): void;
71
+ /** Runs a context-menu command and closes the menu. */
72
+ protected menu(action: () => void): void;
73
+ protected closeMenus(e: PointerEvent): void;
52
74
  protected iconName(name: string): keyof WeReportIcons;
53
75
  protected setZoom(value: number): void;
54
76
  protected onToolDragStart(e: DragEvent, item: {
@@ -0,0 +1,3 @@
1
+ import { WeReportLocale } from '../we-report-locale';
2
+ /** Deutsch. */
3
+ export declare const weReportLocaleDe: WeReportLocale;
@@ -0,0 +1,3 @@
1
+ import { WeReportLocale } from '../we-report-locale';
2
+ /** Español. */
3
+ export declare const weReportLocaleEs: WeReportLocale;
@@ -0,0 +1,3 @@
1
+ import { WeReportLocale } from '../we-report-locale';
2
+ /** Français. */
3
+ export declare const weReportLocaleFr: WeReportLocale;
@@ -21,6 +21,25 @@ export interface WeReportIcons {
21
21
  preview: string;
22
22
  design: string;
23
23
  database: string;
24
+ chart: string;
25
+ table: string;
26
+ arrangeLeft: string;
27
+ arrangeCenter: string;
28
+ arrangeRight: string;
29
+ arrangeTop: string;
30
+ arrangeMiddle: string;
31
+ arrangeBottom: string;
32
+ distributeH: string;
33
+ distributeV: string;
34
+ sameWidth: string;
35
+ sameHeight: string;
36
+ bringToFront: string;
37
+ sendToBack: string;
38
+ cut: string;
39
+ copy: string;
40
+ paste: string;
41
+ outline: string;
42
+ fitWidth: string;
24
43
  }
25
44
  export declare const WE_REPORT_DEFAULT_ICONS: WeReportIcons;
26
45
  export declare const WE_REPORT_ICONS: InjectionToken<WeReportIcons>;
@@ -23,6 +23,32 @@ export interface WeReportLocale {
23
23
  redo: string;
24
24
  delete: string;
25
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;
26
52
  basicMode: string;
27
53
  advancedMode: string;
28
54
  toolbox: string;
@@ -200,8 +226,82 @@ export interface WeReportLocale {
200
226
  issueUnknownField: string;
201
227
  issueEmptyFormula: string;
202
228
  issueOverlap: string;
229
+ issueOutsideColumn: string;
203
230
  fixIt: string;
204
231
  noProblems: string;
232
+ chartType: string;
233
+ chartColumn: string;
234
+ chartBar: string;
235
+ chartLine: string;
236
+ chartPie: string;
237
+ chartDoughnut: string;
238
+ chartCategory: string;
239
+ chartValue: string;
240
+ chartAggregate: string;
241
+ aggSum: string;
242
+ aggCount: string;
243
+ aggAvg: string;
244
+ aggMin: string;
245
+ aggMax: string;
246
+ chartTitle: string;
247
+ showValues: string;
248
+ showLegend: string;
249
+ chartHint: string;
250
+ conditionalFormatting: string;
251
+ watermark: string;
252
+ innerList: string;
253
+ innerListOf: string;
254
+ innerListHint: string;
255
+ innerFields: string;
256
+ tableSection: string;
257
+ addRow: string;
258
+ addColumn: string;
259
+ deleteRow: string;
260
+ deleteColumn: string;
261
+ mergeCells: string;
262
+ splitCell: string;
263
+ selectedCell: string;
264
+ columnWidth: string;
265
+ rowHeight: string;
266
+ tableHint: string;
267
+ columnN: string;
268
+ labelSheet: string;
269
+ labelSheetChoose: string;
270
+ labelSheetHint: string;
271
+ labelsCount: string;
272
+ columnsCount: string;
273
+ columnGap: string;
274
+ columnsHint: string;
275
+ repeatsAcross: string;
276
+ reportLocale: string;
277
+ reportLocaleRegion: string;
278
+ reportCurrency: string;
279
+ reportLocaleDefault: string;
280
+ reportLocaleHint: string;
281
+ formulaEditor: string;
282
+ formulaEditorHint: string;
283
+ formulaResult: string;
284
+ formulaEmpty: string;
285
+ apply: string;
286
+ cancel: string;
287
+ fnLogic: string;
288
+ fnText: string;
289
+ fnNumber: string;
290
+ fnDate: string;
291
+ fnAggregate: string;
292
+ functions: string;
293
+ openFormulaEditor: string;
294
+ /** One sentence per function of `EXPRESSION_FUNCTIONS`, keyed by name. */
295
+ functionHelp: Record<string, string>;
296
+ watermarkHint: string;
297
+ watermarkAngle: string;
298
+ conditionalHint: string;
299
+ addRule: string;
300
+ ruleWhen: string;
301
+ ruleThen: string;
302
+ removeRule: string;
303
+ opContains: string;
304
+ ruleValue: string;
205
305
  }
206
306
  export declare const weReportLocaleEn: WeReportLocale;
207
307
  export declare const weReportLocaleTr: 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,6 @@
1
1
  {
2
2
  "name": "we-report-angular",
3
- "version": "0.1.0",
3
+ "version": "0.3.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.1.0"
35
+ "we-report-core": "~0.3.0"
36
36
  },
37
37
  "sideEffects": false,
38
38
  "module": "fesm2022/we-report-angular.mjs",
package/public-api.d.ts CHANGED
@@ -1,4 +1,8 @@
1
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';
2
6
  export * from './lib/we-report-config';
3
7
  export * from './lib/we-report-icons';
4
8
  export * from './lib/we-report-icon.pipe';