we-report-angular 0.7.0 → 0.8.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.
@@ -22,6 +22,7 @@ export type DesignerDragData = {
22
22
  path: string;
23
23
  parent: boolean;
24
24
  format?: string;
25
+ caption?: string;
25
26
  };
26
27
  export declare const DRAG_MIME = "application/x-we-report";
27
28
  /**
@@ -2,7 +2,10 @@ import { FieldType, ReportDefinition } from 'we-report-core';
2
2
  /** A field the user can drop or pick, flattened from the data schema. */
3
3
  export interface DesignerField {
4
4
  path: string;
5
+ /** The host's display name (`fieldLabels`), else the field name. */
5
6
  label: string;
7
+ /** The host's display name when it gave one; captions dropped fields. */
8
+ caption?: string;
6
9
  type: FieldType;
7
10
  /** Belongs to the object around the rows (`[^.x]`), e.g. the invoice header. */
8
11
  parent: boolean;
@@ -15,9 +18,12 @@ export interface DesignerField {
15
18
  */
16
19
  export declare function designerFields(report: ReportDefinition, data?: unknown,
17
20
  /** Inside a sub-report: the row around it, whose fields `[^.field]` reads. */
18
- outerRow?: unknown): {
21
+ outerRow?: unknown,
22
+ /** Display names by path from the data root (`Supplier.SupplierName`, `Items.ProductName`). */
23
+ labels?: Record<string, string>): {
19
24
  rows: DesignerField[];
20
25
  parent: DesignerField[];
21
26
  lists: string[];
27
+ listLabels: Record<string, string>;
22
28
  inner: DesignerField[];
23
29
  };
@@ -13,6 +13,8 @@ export declare class PropertyPanelComponent {
13
13
  readonly advanced: import("@angular/core").InputSignal<boolean>;
14
14
  /** Lists inside a row that an inner list can repeat over. */
15
15
  readonly lists: import("@angular/core").InputSignal<string[]>;
16
+ /** Display names of the lists (`fieldLabels` of the designer), by list path. */
17
+ readonly listLabels: import("@angular/core").InputSignal<Record<string, string>>;
16
18
  /** A sub-report's design: its page comes from the box, so paper and margins are not offered. */
17
19
  readonly embedded: import("@angular/core").InputSignal<boolean>;
18
20
  protected readonly state: DesignerState;
@@ -136,5 +138,5 @@ export declare class PropertyPanelComponent {
136
138
  protected num(value: number | undefined | null): string;
137
139
  protected asNumber(value: string, fallback: number): number;
138
140
  static ɵfac: i0.ɵɵFactoryDeclaration<PropertyPanelComponent, never>;
139
- 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; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
141
+ 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; }; "listLabels": { "alias": "listLabels"; "required": false; "isSignal": true; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
140
142
  }
@@ -25,6 +25,12 @@ export declare class WeReportDesignerComponent {
25
25
  readonly outerRow: import("@angular/core").InputSignal<unknown>;
26
26
  /** Designing a sub-report inside another designer: its page comes from the box (no paper settings). */
27
27
  readonly embedded: import("@angular/core").InputSignal<boolean>;
28
+ /**
29
+ * Display names for data fields by path from the data root: `OrderNumber`, `Supplier.SupplierName`,
30
+ * `Items.ProductName` (lists without `[]`), and objects or lists themselves (`Supplier`, `Items`).
31
+ * Only what the designer shows; formulas and the saved report keep the real names.
32
+ */
33
+ readonly fieldLabels: import("@angular/core").InputSignal<Record<string, string> | undefined>;
28
34
  protected readonly state: DesignerState;
29
35
  private readonly fontsService;
30
36
  private readonly config;
@@ -112,16 +118,31 @@ export declare class WeReportDesignerComponent {
112
118
  rows: DesignerField[];
113
119
  parent: DesignerField[];
114
120
  lists: string[];
121
+ listLabels: Record<string, string>;
115
122
  inner: DesignerField[];
116
123
  }>;
117
124
  protected readonly fieldFilter: import("@angular/core").WritableSignal<string>;
118
- /** The field list narrowed to names containing the filter text. */
125
+ /** Objects opened in the field list (`rows:Supplier`); all start closed. */
126
+ protected readonly openNodes: import("@angular/core").WritableSignal<ReadonlySet<string>>;
127
+ /**
128
+ * The field list with closed objects' fields hidden; a filter shows the fields whose label or
129
+ * name contains it, with the objects around them open.
130
+ */
119
131
  protected readonly shownFields: import("@angular/core").Signal<{
120
132
  rows: DesignerField[];
133
+ inner: DesignerField[];
121
134
  parent: DesignerField[];
122
135
  lists: string[];
123
- inner: DesignerField[];
136
+ listLabels: Record<string, string>;
124
137
  }>;
138
+ protected nodeOpen(section: string, path: string): boolean;
139
+ protected toggleNode(section: string, path: string): void;
140
+ /** Lists in the data the detail rows can come from ("Rows: Items"); empty when there is no choice. */
141
+ protected readonly rowLists: import("@angular/core").Signal<{
142
+ path: string;
143
+ label: string;
144
+ }[]>;
145
+ protected setRowsPath(path: string): void;
125
146
  protected readonly allFields: import("@angular/core").Signal<DesignerField[]>;
126
147
  protected readonly addableBands: import("@angular/core").Signal<BandKind[]>;
127
148
  constructor();
@@ -205,6 +226,7 @@ export declare class WeReportDesignerComponent {
205
226
  title: string;
206
227
  fields: {
207
228
  name: string;
229
+ label: string;
208
230
  on: boolean;
209
231
  }[];
210
232
  groupBy: string;
@@ -227,5 +249,5 @@ export declare class WeReportDesignerComponent {
227
249
  protected fixIssue(issue: ReportIssue): void;
228
250
  protected onKeydown(e: KeyboardEvent): void;
229
251
  static ɵfac: i0.ɵɵFactoryDeclaration<WeReportDesignerComponent, never>;
230
- static ɵcmp: i0.ɵɵComponentDeclaration<WeReportDesignerComponent, "we-report-designer", never, { "report": { "alias": "report"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; "fetchFn": { "alias": "fetchFn"; "required": false; "isSignal": true; }; "outerRow": { "alias": "outerRow"; "required": false; "isSignal": true; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; }, { "report": "reportChange"; }, never, never, true, never>;
252
+ static ɵcmp: i0.ɵɵComponentDeclaration<WeReportDesignerComponent, "we-report-designer", never, { "report": { "alias": "report"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "zoom": { "alias": "zoom"; "required": false; "isSignal": true; }; "fetchFn": { "alias": "fetchFn"; "required": false; "isSignal": true; }; "outerRow": { "alias": "outerRow"; "required": false; "isSignal": true; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; "fieldLabels": { "alias": "fieldLabels"; "required": false; "isSignal": true; }; }, { "report": "reportChange"; }, never, never, true, never>;
231
253
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "we-report-angular",
3
- "version": "0.7.0",
3
+ "version": "0.8.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.7.0"
35
+ "we-report-core": "~0.8.0"
36
36
  },
37
37
  "sideEffects": false,
38
38
  "module": "fesm2022/we-report-angular.mjs",