@firestitch/report 18.6.1 → 18.7.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/app/reports/components/component-chart/component-chart.component.d.ts +6 -7
- package/app/reports/components/component-kpi/component-kpi.component.d.ts +8 -9
- package/app/reports/components/component-list/component-list.component.d.ts +33 -10
- package/app/reports/components/report-canvas/report-canvas.component.d.ts +0 -1
- package/app/reports/components/report-component/report-component.component.d.ts +4 -2
- package/app/reports/data/report.data.d.ts +2 -1
- package/app/reports/dialogs/list-columns/list-columns.component.d.ts +23 -0
- package/app/reports/dialogs/report-settings/report-locale-patch.d.ts +5 -0
- package/app/reports/dialogs/report-settings/report-settings.component.d.ts +20 -1
- package/app/reports/enums/report-chart-color.enum.d.ts +12 -0
- package/app/reports/enums/report-chart-data-labels.enum.d.ts +6 -0
- package/app/reports/enums/report-chart-date-label.enum.d.ts +5 -0
- package/app/reports/enums/report-chart-line-style.enum.d.ts +5 -0
- package/app/reports/enums/report-chart-mark-stat.enum.d.ts +6 -0
- package/app/reports/enums/report-list-column-format.enum.d.ts +6 -0
- package/app/reports/enums/report-number-units.enum.d.ts +6 -0
- package/app/reports/enums/report-value-format.enum.d.ts +5 -0
- package/app/reports/export/offscreen-chart.d.ts +2 -2
- package/app/reports/export/report-export-collector.service.d.ts +12 -9
- package/app/reports/export/report-pdf.service.d.ts +1 -0
- package/app/reports/export/report-pptx.service.d.ts +17 -0
- package/app/reports/format.d.ts +38 -3
- package/app/reports/interfaces/report.interface.d.ts +81 -10
- package/app/reports/list-config.d.ts +9 -0
- package/app/reports/option-builder.d.ts +69 -9
- package/app/reports/pipes/report-date.pipe.d.ts +2 -1
- package/app/reports/pipes/report-number.pipe.d.ts +8 -0
- package/app/reports/report-filter-items.d.ts +5 -2
- package/app/reports/report-url-state.d.ts +4 -0
- package/app/reports/services/report-filter-state.service.d.ts +26 -2
- package/app/reports/theme/palette.d.ts +3 -0
- package/app/reports/theme/typography.d.ts +1 -0
- package/esm2022/app/reports/components/component-chart/component-chart.component.mjs +19 -20
- package/esm2022/app/reports/components/component-kpi/component-kpi.component.mjs +23 -29
- package/esm2022/app/reports/components/component-list/component-list.component.mjs +158 -32
- package/esm2022/app/reports/components/report-canvas/report-canvas.component.mjs +3 -8
- package/esm2022/app/reports/components/report-component/report-component.component.mjs +81 -21
- package/esm2022/app/reports/data/report.data.mjs +17 -4
- package/esm2022/app/reports/dialogs/list-columns/list-columns.component.mjs +56 -0
- package/esm2022/app/reports/dialogs/report-settings/report-locale-patch.mjs +13 -0
- package/esm2022/app/reports/dialogs/report-settings/report-settings.component.mjs +137 -15
- package/esm2022/app/reports/enums/report-chart-color.enum.mjs +19 -0
- package/esm2022/app/reports/enums/report-chart-data-labels.enum.mjs +13 -0
- package/esm2022/app/reports/enums/report-chart-date-label.enum.mjs +13 -0
- package/esm2022/app/reports/enums/report-chart-line-style.enum.mjs +12 -0
- package/esm2022/app/reports/enums/report-chart-mark-stat.enum.mjs +12 -0
- package/esm2022/app/reports/enums/report-list-column-format.enum.mjs +14 -0
- package/esm2022/app/reports/enums/report-number-units.enum.mjs +14 -0
- package/esm2022/app/reports/enums/report-value-format.enum.mjs +13 -0
- package/esm2022/app/reports/export/offscreen-chart.mjs +5 -4
- package/esm2022/app/reports/export/report-export-collector.service.mjs +95 -40
- package/esm2022/app/reports/export/report-pdf.service.mjs +92 -36
- package/esm2022/app/reports/export/report-pptx.service.mjs +482 -86
- package/esm2022/app/reports/format.mjs +497 -58
- package/esm2022/app/reports/interfaces/report.interface.mjs +1 -1
- package/esm2022/app/reports/list-config.mjs +74 -0
- package/esm2022/app/reports/option-builder.mjs +868 -98
- package/esm2022/app/reports/pipes/report-date.pipe.mjs +7 -6
- package/esm2022/app/reports/pipes/report-number.pipe.mjs +25 -0
- package/esm2022/app/reports/report-filter-items.mjs +28 -3
- package/esm2022/app/reports/report-url-state.mjs +56 -15
- package/esm2022/app/reports/services/report-filter-state.service.mjs +235 -20
- package/esm2022/app/reports/theme/echarts.mjs +8 -2
- package/esm2022/app/reports/theme/palette.mjs +19 -1
- package/esm2022/app/reports/theme/typography.mjs +4 -1
- package/esm2022/app/reports/views/report/fs-ai-report.component.mjs +1 -1
- package/esm2022/public_api.mjs +9 -1
- package/fesm2022/{firestitch-report-echarts-Djtmaxj1.mjs → firestitch-report-echarts-u5ImuZT5.mjs} +9 -3
- package/fesm2022/firestitch-report-echarts-u5ImuZT5.mjs.map +1 -0
- package/fesm2022/{firestitch-report-firestitch-report-D3zseBZc.mjs → firestitch-report-firestitch-report-Cz-kA_id.mjs} +3221 -660
- package/fesm2022/firestitch-report-firestitch-report-Cz-kA_id.mjs.map +1 -0
- package/fesm2022/firestitch-report.mjs +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +8 -0
- package/fesm2022/firestitch-report-echarts-Djtmaxj1.mjs.map +0 -1
- package/fesm2022/firestitch-report-firestitch-report-D3zseBZc.mjs.map +0 -1
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { OnChanges } from '@angular/core';
|
|
2
1
|
import type { EChartsOption, ECharts } from 'echarts';
|
|
3
2
|
import { ComponentData, ReportComponent } from '../../interfaces/report.interface';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class ComponentChartComponent
|
|
6
|
-
component: ReportComponent
|
|
7
|
-
data: ComponentData
|
|
8
|
-
options: EChartsOption
|
|
4
|
+
export declare class ComponentChartComponent {
|
|
5
|
+
readonly component: import("@angular/core").InputSignal<ReportComponent>;
|
|
6
|
+
readonly data: import("@angular/core").InputSignal<ComponentData>;
|
|
7
|
+
readonly options: import("@angular/core").Signal<EChartsOption>;
|
|
9
8
|
private _chart;
|
|
10
|
-
|
|
9
|
+
private readonly _filterState;
|
|
11
10
|
onChartInit(chart: ECharts): void;
|
|
12
11
|
resize(): void;
|
|
13
12
|
getDataURL(pixelRatio?: number): string | null;
|
|
14
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentChartComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ComponentChartComponent, "app-report-component-chart", never, { "component": { "alias": "component"; "required":
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComponentChartComponent, "app-report-component-chart", never, { "component": { "alias": "component"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
16
15
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { OnChanges } from '@angular/core';
|
|
2
1
|
import { ComponentData, ReportComponent } from '../../interfaces/report.interface';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ComponentKpiComponent
|
|
5
|
-
component: ReportComponent
|
|
6
|
-
data: ComponentData
|
|
7
|
-
readonly
|
|
8
|
-
value: string
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
export declare class ComponentKpiComponent {
|
|
4
|
+
readonly component: import("@angular/core").InputSignal<ReportComponent>;
|
|
5
|
+
readonly data: import("@angular/core").InputSignal<ComponentData>;
|
|
6
|
+
readonly label: import("@angular/core").Signal<string>;
|
|
7
|
+
readonly value: import("@angular/core").Signal<string>;
|
|
8
|
+
private readonly _config;
|
|
9
|
+
private readonly _filterState;
|
|
11
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentKpiComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ComponentKpiComponent, "app-report-component-kpi", never, { "component": { "alias": "component"; "required":
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComponentKpiComponent, "app-report-component-kpi", never, { "component": { "alias": "component"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
13
12
|
}
|
|
@@ -1,27 +1,50 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { FsListComponent, FsListConfig } from '@firestitch/list';
|
|
3
|
-
import {
|
|
3
|
+
import { ReportListColumnFormat } from '../../enums/report-list-column-format.enum';
|
|
4
|
+
import { ListColumn, ReportComponent } from '../../interfaces/report.interface';
|
|
5
|
+
import { columnClasses } from '../../list-config';
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
export declare class ComponentListComponent implements OnInit {
|
|
6
|
-
reportId: number
|
|
7
|
-
component: ReportComponent
|
|
8
|
-
listComponent: FsListComponent
|
|
8
|
+
readonly reportId: import("@angular/core").InputSignal<number>;
|
|
9
|
+
readonly component: import("@angular/core").InputSignal<ReportComponent>;
|
|
10
|
+
readonly listComponent: import("@angular/core").Signal<FsListComponent<any>>;
|
|
9
11
|
listConfig: FsListConfig;
|
|
10
|
-
columns: import("@angular/core").WritableSignal<{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
format?: string;
|
|
14
|
-
}[]>;
|
|
12
|
+
columns: import("@angular/core").WritableSignal<(ListColumn & {
|
|
13
|
+
numeric: boolean;
|
|
14
|
+
})[]>;
|
|
15
15
|
pivoted: import("@angular/core").WritableSignal<boolean>;
|
|
16
16
|
truncated: import("@angular/core").WritableSignal<boolean>;
|
|
17
|
+
readonly searchNote: import("@angular/core").WritableSignal<string>;
|
|
18
|
+
readonly showTotals: import("@angular/core").WritableSignal<boolean>;
|
|
19
|
+
readonly totals: import("@angular/core").WritableSignal<Record<string, unknown>>;
|
|
20
|
+
readonly totalsNote: import("@angular/core").WritableSignal<string>;
|
|
21
|
+
readonly rowCount: import("@angular/core").WritableSignal<{
|
|
22
|
+
shown: number;
|
|
23
|
+
total: number;
|
|
24
|
+
}>;
|
|
17
25
|
readonly timezone: import("@angular/core").WritableSignal<string>;
|
|
26
|
+
readonly formatContext: import("@angular/core").WritableSignal<import("../../interfaces/report.interface").ReportFormatContext>;
|
|
27
|
+
readonly ReportListColumnFormat: typeof ReportListColumnFormat;
|
|
28
|
+
readonly pinned: import("@angular/core").Signal<number>;
|
|
29
|
+
readonly columnClasses: typeof columnClasses;
|
|
30
|
+
readonly hidden: import("@angular/core").Signal<Set<string>>;
|
|
31
|
+
readonly totalLabel = "Total";
|
|
32
|
+
readonly totalsLabelColumn: import("@angular/core").Signal<string>;
|
|
33
|
+
readonly caption: import("@angular/core").Signal<string>;
|
|
18
34
|
private _reportData;
|
|
19
35
|
private _filterState;
|
|
20
36
|
private _destroyRef;
|
|
37
|
+
private _elementRef;
|
|
38
|
+
private _injector;
|
|
39
|
+
private _pinOffsetsRef;
|
|
40
|
+
constructor();
|
|
21
41
|
ngOnInit(): void;
|
|
22
42
|
private _initListConfig;
|
|
23
43
|
private _fetch;
|
|
24
44
|
private _pivotColumns;
|
|
45
|
+
private _observePinOffsets;
|
|
46
|
+
private _schedulePinOffsets;
|
|
47
|
+
private _updatePinOffsets;
|
|
25
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentListComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ComponentListComponent, "app-report-component-list", never, { "reportId": { "alias": "reportId"; "required":
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComponentListComponent, "app-report-component-list", never, { "reportId": { "alias": "reportId"; "required": true; "isSignal": true; }; "component": { "alias": "component"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
27
50
|
}
|
|
@@ -59,7 +59,6 @@ export declare class ReportCanvasComponent implements OnChanges, AfterViewInit {
|
|
|
59
59
|
get headingSizePx(): number;
|
|
60
60
|
ngAfterViewInit(): void;
|
|
61
61
|
get isFlow(): boolean;
|
|
62
|
-
get ratioPercent(): boolean;
|
|
63
62
|
get activePage(): ReportPage | null;
|
|
64
63
|
get bands(): ReportHeaderFooter;
|
|
65
64
|
get masterComponents(): ReportComponent[];
|
|
@@ -27,7 +27,6 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
27
27
|
}>;
|
|
28
28
|
openSettings: EventEmitter<ReportComponentModel>;
|
|
29
29
|
readonly tokens: import("@angular/core").InputSignal<TextTokenContext>;
|
|
30
|
-
readonly ratioPercent: import("@angular/core").InputSignal<boolean>;
|
|
31
30
|
readonly removed: import("@angular/core").OutputEmitterRef<number>;
|
|
32
31
|
readonly textEditing: import("@angular/core").WritableSignal<boolean>;
|
|
33
32
|
chartComponent: ComponentChartComponent;
|
|
@@ -42,6 +41,7 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
42
41
|
private _process;
|
|
43
42
|
private _message;
|
|
44
43
|
private _prompt;
|
|
44
|
+
private _dialog;
|
|
45
45
|
private _lastPress;
|
|
46
46
|
private _destroyRef;
|
|
47
47
|
private _zone;
|
|
@@ -57,6 +57,8 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
57
57
|
get bodyPadding(): string;
|
|
58
58
|
get componentFilterGroups(): ReportFilterGroup[];
|
|
59
59
|
settings(): void;
|
|
60
|
+
get hidesColumns(): boolean;
|
|
61
|
+
chooseColumns(): void;
|
|
60
62
|
applySettings(settings: ComponentSettings): void;
|
|
61
63
|
exportCsv(): void;
|
|
62
64
|
stopCanvasPan(event: Event): void;
|
|
@@ -78,6 +80,6 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
78
80
|
private _applyGeometry;
|
|
79
81
|
private _load;
|
|
80
82
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportComponentComponent, never>;
|
|
81
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ReportComponentComponent, "app-report-component", never, { "reportId": { "alias": "reportId"; "required": false; }; "component": { "alias": "component"; "required": false; }; "groups": { "alias": "groups"; "required": false; }; "editMode": { "alias": "editMode"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; "snapper": { "alias": "snapper"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "tokens": { "alias": "tokens"; "required": false; "isSignal": true; };
|
|
83
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ReportComponentComponent, "app-report-component", never, { "reportId": { "alias": "reportId"; "required": false; }; "component": { "alias": "component"; "required": false; }; "groups": { "alias": "groups"; "required": false; }; "editMode": { "alias": "editMode"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; "snapper": { "alias": "snapper"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "tokens": { "alias": "tokens"; "required": false; "isSignal": true; }; }, { "selectComponent": "selectComponent"; "positionChanged": "positionChanged"; "flowReorder": "flowReorder"; "openSettings": "openSettings"; "removed": "removed"; }, never, never, true, never>;
|
|
82
84
|
}
|
|
83
85
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RequestConfig } from '@firestitch/api';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { ChartGranularity, ComponentDataState, ComponentExportResponse, FilterGroupDefault, ReportComponentSql, ReportFilterLevel, ReportTree, ResolvedFilterValue } from '../interfaces/report.interface';
|
|
3
|
+
import { ChartGranularity, ComponentDataState, ComponentExportResponse, FilterGroupDefault, ReportComponentSql, ReportFilterLevel, ReportLocales, ReportTree, ResolvedFilterValue } from '../interfaces/report.interface';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class ReportData<T = any> {
|
|
6
6
|
private _api;
|
|
@@ -77,6 +77,7 @@ export declare class ReportData<T = any> {
|
|
|
77
77
|
semanticBuildStop(config?: RequestConfig): Observable<T>;
|
|
78
78
|
semanticEntityFunctions(entity: string, config?: RequestConfig): Observable<T>;
|
|
79
79
|
settings(config?: RequestConfig): Observable<T>;
|
|
80
|
+
locales(config?: RequestConfig): Observable<ReportLocales>;
|
|
80
81
|
saveSettings(settings: {
|
|
81
82
|
semanticBuildConcurrency: number;
|
|
82
83
|
}, config?: RequestConfig): Observable<T>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export interface ListColumnsDialogData {
|
|
3
|
+
columns: {
|
|
4
|
+
column: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}[];
|
|
7
|
+
hidden: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare class ListColumnsComponent {
|
|
10
|
+
readonly data: ListColumnsDialogData;
|
|
11
|
+
readonly columns: {
|
|
12
|
+
column: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}[];
|
|
15
|
+
readonly hidden: import("@angular/core").WritableSignal<ReadonlySet<string>>;
|
|
16
|
+
readonly shownCount: import("@angular/core").Signal<number>;
|
|
17
|
+
private readonly _dialogRef;
|
|
18
|
+
isLastShown(name: string): boolean;
|
|
19
|
+
toggle(name: string, shown: boolean): void;
|
|
20
|
+
done(): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ListColumnsComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ListColumnsComponent, "ng-component", never, {}, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { ReportFilterGroup } from '../../interfaces/report.interface';
|
|
3
|
+
import { ReportFilterGroup, ReportLocales } from '../../interfaces/report.interface';
|
|
4
4
|
import { relativeLabel } from '../../report-filter-items';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export interface ReportSettingsResult {
|
|
@@ -22,6 +22,10 @@ interface FilterDefaultRow {
|
|
|
22
22
|
value: unknown;
|
|
23
23
|
}[]>;
|
|
24
24
|
}
|
|
25
|
+
interface LocaleSelectOption {
|
|
26
|
+
value: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}
|
|
25
29
|
export declare class ReportSettingsComponent implements OnInit {
|
|
26
30
|
selectedTab: string;
|
|
27
31
|
name: string;
|
|
@@ -35,6 +39,13 @@ export declare class ReportSettingsComponent implements OnInit {
|
|
|
35
39
|
layout: 'freeform' | 'flow';
|
|
36
40
|
timezone: string;
|
|
37
41
|
headingSize: number;
|
|
42
|
+
readonly locales: import("@angular/core").WritableSignal<ReportLocales>;
|
|
43
|
+
readonly locale: import("@angular/core").WritableSignal<string>;
|
|
44
|
+
readonly currency: import("@angular/core").WritableSignal<string>;
|
|
45
|
+
readonly ready: import("@angular/core").Signal<boolean>;
|
|
46
|
+
readonly localeOptions: import("@angular/core").Signal<LocaleSelectOption[]>;
|
|
47
|
+
readonly currencyOptions: import("@angular/core").Signal<LocaleSelectOption[]>;
|
|
48
|
+
readonly formatExample: import("@angular/core").Signal<string>;
|
|
38
49
|
readonly filterRows: import("@angular/core").WritableSignal<FilterDefaultRow[]>;
|
|
39
50
|
readonly relativeLabel: typeof relativeLabel;
|
|
40
51
|
private readonly _data;
|
|
@@ -43,13 +54,21 @@ export declare class ReportSettingsComponent implements OnInit {
|
|
|
43
54
|
private readonly _message;
|
|
44
55
|
private readonly _prompt;
|
|
45
56
|
private readonly _destroyRef;
|
|
57
|
+
private readonly _serverHasLocale;
|
|
58
|
+
private readonly _localesSettled;
|
|
59
|
+
private readonly _filtersReady;
|
|
60
|
+
private readonly _appliedLocale;
|
|
61
|
+
private readonly _defaultCurrency;
|
|
62
|
+
private readonly _appliedCurrency;
|
|
46
63
|
ngOnInit(): void;
|
|
47
64
|
delete(): void;
|
|
48
65
|
save: () => Observable<[any, ...any[]]>;
|
|
49
66
|
clearRelative(row: FilterDefaultRow): void;
|
|
50
67
|
private _pageDimension;
|
|
51
68
|
private _timezoneSetting;
|
|
69
|
+
private _storedOption;
|
|
52
70
|
private _buildFilterRows;
|
|
71
|
+
private _publishFilterRows;
|
|
53
72
|
private _rowDefault;
|
|
54
73
|
private _defaultChanged;
|
|
55
74
|
private _normalize;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ComponentData, ReportComponent } from '../interfaces/report.interface';
|
|
2
|
-
export declare function renderChartImage(component: ReportComponent, data: ComponentData, width: number, height: number, pixelRatio?: number): Promise<string>;
|
|
1
|
+
import { ComponentData, ReportComponent, ReportFormatContext } from '../interfaces/report.interface';
|
|
2
|
+
export declare function renderChartImage(component: ReportComponent, data: ComponentData, width: number, height: number, context: ReportFormatContext, pixelRatio?: number): Promise<string>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { ComponentData, Report, ReportComponent, ReportPage } from '../interfaces/report.interface';
|
|
2
|
+
import { ComponentData, ListColumn, Report, ReportComponent, ReportFormatContext, ReportLocaleTag, ReportPage } from '../interfaces/report.interface';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export interface CollectedComponent {
|
|
5
5
|
component: ReportComponent;
|
|
6
6
|
data: ComponentData | null;
|
|
7
|
+
search?: string;
|
|
8
|
+
hiddenColumns: string[];
|
|
7
9
|
}
|
|
8
10
|
export interface CollectedPage {
|
|
9
11
|
page: ReportPage;
|
|
@@ -14,18 +16,19 @@ export interface CollectedReport {
|
|
|
14
16
|
pages: CollectedPage[];
|
|
15
17
|
filterSummary: string[];
|
|
16
18
|
contextLines: string[];
|
|
19
|
+
formatContext: ReportFormatContext;
|
|
17
20
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
format?: string;
|
|
22
|
-
}
|
|
21
|
+
export type ExportListColumn = ListColumn & {
|
|
22
|
+
numeric: boolean;
|
|
23
|
+
};
|
|
23
24
|
export declare function emptyLabel(item: CollectedComponent): string;
|
|
25
|
+
export declare function exportTitle(component: ReportComponent, search?: string | null): string;
|
|
24
26
|
export declare function isFailed(item: CollectedComponent): boolean;
|
|
25
27
|
export declare function coverLines(collected: CollectedReport): string[];
|
|
26
|
-
export declare function exportCell(value: unknown,
|
|
27
|
-
export declare function listColumns(component: ReportComponent, data: ComponentData): ExportListColumn[];
|
|
28
|
-
export declare function listHeadings(component: ReportComponent, data: ComponentData): string[];
|
|
28
|
+
export declare function exportCell(value: unknown, column: ListColumn, timezone: string, context: ReportFormatContext): string;
|
|
29
|
+
export declare function listColumns(component: ReportComponent, data: ComponentData, locale: ReportLocaleTag, hidden?: readonly string[]): ExportListColumn[];
|
|
30
|
+
export declare function listHeadings(component: ReportComponent, data: ComponentData, locale: ReportLocaleTag, hidden?: readonly string[]): string[];
|
|
31
|
+
export declare function listTotalsRow(data: ComponentData, columns: readonly ExportListColumn[], timezone: string, context: ReportFormatContext): string[] | null;
|
|
29
32
|
export declare function moreRowsNotice(remaining: number): string;
|
|
30
33
|
export declare function failedPageNames(collected: CollectedReport): string[];
|
|
31
34
|
export declare class ReportExportCollectorService {
|
|
@@ -27,6 +27,7 @@ export declare class ReportPdfService {
|
|
|
27
27
|
private _continuationMargin;
|
|
28
28
|
private _continuedTitle;
|
|
29
29
|
private _renderKpi;
|
|
30
|
+
private _pdfText;
|
|
30
31
|
private _slug;
|
|
31
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportPdfService, never>;
|
|
32
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<ReportPdfService>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { ReportLocaleTag } from '../interfaces/report.interface';
|
|
1
2
|
import { CollectedReport } from './report-export-collector.service';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare const PPTX_LIST_ROWS = 100;
|
|
5
|
+
export declare const PPTX_AUTO_LABEL_MAX_POINTS = 24;
|
|
6
|
+
export declare function pptxRunOptions(options: Record<string, unknown>, valueLocale?: ReportLocaleTag): Record<string, unknown>;
|
|
4
7
|
export declare class ReportPptxService {
|
|
5
8
|
export(collected: CollectedReport): Promise<void>;
|
|
6
9
|
private _titleSlide;
|
|
@@ -8,12 +11,26 @@ export declare class ReportPptxService {
|
|
|
8
11
|
private _tokens;
|
|
9
12
|
private _renderComponent;
|
|
10
13
|
private _renderChart;
|
|
14
|
+
private _legendPosition;
|
|
15
|
+
private _referenceLines;
|
|
16
|
+
private _statLines;
|
|
17
|
+
private _constantEntry;
|
|
18
|
+
private _measureFormatCodes;
|
|
19
|
+
private _withDataLabels;
|
|
20
|
+
private _percentAxisOptions;
|
|
21
|
+
private _twoAxesOptions;
|
|
11
22
|
private _categoryOrderOptions;
|
|
23
|
+
private _valueAxisCode;
|
|
12
24
|
private _addChart;
|
|
25
|
+
private _entryPlan;
|
|
26
|
+
private _dataLabelPosition;
|
|
27
|
+
private _lineOptions;
|
|
13
28
|
private _renderWaterfall;
|
|
14
29
|
private _waterfallSeries;
|
|
15
30
|
private _categoryLabels;
|
|
16
31
|
private _axisTextOptions;
|
|
32
|
+
private _categoryTitleOptions;
|
|
33
|
+
private _valueAxisRangeOptions;
|
|
17
34
|
private _renderTable;
|
|
18
35
|
private _renderKpi;
|
|
19
36
|
private _slug;
|
package/app/reports/format.d.ts
CHANGED
|
@@ -1,8 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { ReportNumberUnits } from './enums/report-number-units.enum';
|
|
2
|
+
import { ChartMeasure, NumberFormatSpec, Report, ReportCurrencyCode, ReportFormatContext, ReportLocaleTag } from './interfaces/report.interface';
|
|
3
|
+
export declare const REPORT_FALLBACK_LOCALE: ReportLocaleTag;
|
|
4
|
+
export declare const REPORT_FALLBACK_CURRENCY: ReportCurrencyCode;
|
|
5
|
+
export declare const DEFAULT_FORMAT_CONTEXT: Readonly<ReportFormatContext>;
|
|
6
|
+
export declare function resolveReportLocale(tag: string | null | undefined): ReportLocaleTag;
|
|
7
|
+
export declare function resolveReportCurrency(code: string | null | undefined): ReportCurrencyCode;
|
|
8
|
+
export declare function resolveFormatContext(report: Pick<Report, 'effectiveLocale' | 'effectiveCurrency' | 'percentFormat'>): ReportFormatContext;
|
|
9
|
+
export declare function numberFormat(locale: string, options: Intl.NumberFormatOptions): Intl.NumberFormat;
|
|
10
|
+
export declare function dateFormat(locale: string, options: Intl.DateTimeFormatOptions, timeZone?: string): Intl.DateTimeFormat;
|
|
11
|
+
export type ResolvedUnits = ReportNumberUnits.None | ReportNumberUnits.Thousands | ReportNumberUnits.Millions;
|
|
12
|
+
export interface FormatNumberOptions {
|
|
13
|
+
empty?: string;
|
|
14
|
+
units?: ResolvedUnits;
|
|
15
|
+
decimals?: number | null;
|
|
16
|
+
}
|
|
17
|
+
export interface ChartNumberFormat {
|
|
18
|
+
units: ResolvedUnits;
|
|
19
|
+
decimals: number | null;
|
|
20
|
+
}
|
|
21
|
+
export declare function toFiniteNumber(value: unknown): number | null;
|
|
22
|
+
export declare function hasNumberFormat(spec?: NumberFormatSpec | null): boolean;
|
|
23
|
+
export declare function resolveUnits(units: ReportNumberUnits | null | undefined, magnitude: number, decimals: number): ResolvedUnits;
|
|
24
|
+
export declare function formatNumber(value: unknown, spec: NumberFormatSpec | null | undefined, context: ReportFormatContext, options?: FormatNumberOptions): string;
|
|
25
|
+
export declare function axisNumberFormat(measures: ChartMeasure[]): NumberFormatSpec | null;
|
|
26
|
+
export declare function resolveChartNumberFormat(spec: NumberFormatSpec, peak: number, context: ReportFormatContext): ChartNumberFormat;
|
|
27
|
+
export declare function numberFormatCode(spec: NumberFormatSpec, context: ReportFormatContext, chart: ChartNumberFormat, series: (number | null)[][], stacked: boolean): string;
|
|
28
|
+
export declare function formatPlainNumber(value: unknown, locale: ReportLocaleTag): string;
|
|
3
29
|
export declare const AXIS_SEPARATOR_THRESHOLD = 1000;
|
|
4
30
|
export declare function chartAxisFormatCode(series: (number | null)[][], stacked: boolean): string;
|
|
31
|
+
export declare function chartValuePeak(series: (number | null)[][], stacked: boolean): number;
|
|
5
32
|
export declare function resolveReportTimezone(report: Pick<Report, 'effectiveTimezone' | 'timezone'>): string;
|
|
6
|
-
export declare
|
|
33
|
+
export declare const DAY_SHORT: Intl.DateTimeFormatOptions;
|
|
34
|
+
export declare const DAY_LONG: Intl.DateTimeFormatOptions;
|
|
35
|
+
export declare const MONTH_LONG: Intl.DateTimeFormatOptions;
|
|
36
|
+
export declare const MONTH_YEAR: Intl.DateTimeFormatOptions;
|
|
37
|
+
export declare const MONTH_DAY: Intl.DateTimeFormatOptions;
|
|
38
|
+
export declare function formatLocalDate(date: Date, locale: ReportLocaleTag, options: Intl.DateTimeFormatOptions, timeZone?: string): string;
|
|
39
|
+
export declare function formatReportDate(value: unknown, timezone: string, locale: ReportLocaleTag): string;
|
|
40
|
+
export declare function localeName(tag: ReportLocaleTag): string;
|
|
41
|
+
export declare function currencyName(code: ReportCurrencyCode): string;
|
|
7
42
|
export declare function getTimezoneLabel(timezone: string): string;
|
|
8
43
|
export declare function getZonedNow(timezone: string): Date;
|
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
import { ReportChartColor } from '../enums/report-chart-color.enum';
|
|
2
|
+
import { ReportChartDataLabels } from '../enums/report-chart-data-labels.enum';
|
|
3
|
+
import { ReportChartDateLabel } from '../enums/report-chart-date-label.enum';
|
|
4
|
+
import { ReportChartLineStyle } from '../enums/report-chart-line-style.enum';
|
|
5
|
+
import { ReportChartMarkStat } from '../enums/report-chart-mark-stat.enum';
|
|
6
|
+
import { ReportListColumnFormat } from '../enums/report-list-column-format.enum';
|
|
7
|
+
import { ReportNumberUnits } from '../enums/report-number-units.enum';
|
|
8
|
+
import { ReportValueFormat } from '../enums/report-value-format.enum';
|
|
1
9
|
export type ReportLayout = 'freeform' | 'flow';
|
|
10
|
+
export type ReportLocaleTag = string;
|
|
11
|
+
export type ReportCurrencyCode = string;
|
|
2
12
|
export interface Report {
|
|
3
13
|
id: number;
|
|
4
14
|
name: string;
|
|
5
15
|
layout: ReportLayout;
|
|
6
16
|
timezone: string | null;
|
|
7
17
|
effectiveTimezone?: string;
|
|
18
|
+
locale?: ReportLocaleTag | null;
|
|
19
|
+
effectiveLocale?: ReportLocaleTag;
|
|
20
|
+
currency?: ReportCurrencyCode | null;
|
|
21
|
+
effectiveCurrency?: ReportCurrencyCode;
|
|
8
22
|
percentFormat?: 'ratio';
|
|
9
23
|
config: ReportConfig;
|
|
10
24
|
pageWidth: number;
|
|
@@ -17,6 +31,20 @@ export interface ReportMaster {
|
|
|
17
31
|
id: number;
|
|
18
32
|
components: ReportComponent[];
|
|
19
33
|
}
|
|
34
|
+
export interface ReportFormatContext {
|
|
35
|
+
locale: ReportLocaleTag;
|
|
36
|
+
currency: ReportCurrencyCode;
|
|
37
|
+
ratioPercent: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface ReportLocaleOption {
|
|
40
|
+
locale: ReportLocaleTag;
|
|
41
|
+
defaultCurrency: ReportCurrencyCode;
|
|
42
|
+
}
|
|
43
|
+
export interface ReportLocales {
|
|
44
|
+
defaultLocale: ReportLocaleTag;
|
|
45
|
+
options: ReportLocaleOption[];
|
|
46
|
+
currencies: ReportCurrencyCode[];
|
|
47
|
+
}
|
|
20
48
|
export interface ReportHeaderFooter {
|
|
21
49
|
headerHeight: number;
|
|
22
50
|
footerHeight: number;
|
|
@@ -98,6 +126,7 @@ export interface ChartConfig {
|
|
|
98
126
|
kind?: 'category' | 'time';
|
|
99
127
|
granularity?: ChartGranularity;
|
|
100
128
|
label?: string;
|
|
129
|
+
dateLabel?: ReportChartDateLabel;
|
|
101
130
|
};
|
|
102
131
|
measures?: ChartMeasure[];
|
|
103
132
|
splitBy?: {
|
|
@@ -109,25 +138,53 @@ export interface ChartConfig {
|
|
|
109
138
|
};
|
|
110
139
|
orientation?: 'vertical' | 'horizontal';
|
|
111
140
|
stacked?: boolean;
|
|
141
|
+
percentStacked?: boolean;
|
|
142
|
+
dataLabels?: ReportChartDataLabels;
|
|
143
|
+
valueAxis?: ChartValueAxis;
|
|
144
|
+
secondaryAxis?: ChartValueAxis;
|
|
145
|
+
references?: ChartReference[];
|
|
112
146
|
legend?: LegendPosition;
|
|
113
147
|
sort?: ReportSort;
|
|
114
148
|
limit?: number;
|
|
115
149
|
}
|
|
116
|
-
export interface
|
|
150
|
+
export interface ChartValueAxis {
|
|
151
|
+
label?: string;
|
|
152
|
+
min?: number;
|
|
153
|
+
max?: number;
|
|
154
|
+
interval?: number;
|
|
155
|
+
}
|
|
156
|
+
export interface ChartReference {
|
|
157
|
+
value: number;
|
|
158
|
+
label: string;
|
|
159
|
+
to?: number;
|
|
160
|
+
secondary?: boolean;
|
|
161
|
+
}
|
|
162
|
+
export interface NumberFormatSpec {
|
|
163
|
+
format?: ReportValueFormat | ReportListColumnFormat;
|
|
164
|
+
precision?: number;
|
|
165
|
+
units?: ReportNumberUnits;
|
|
166
|
+
}
|
|
167
|
+
export interface ChartMeasure extends NumberFormatSpec {
|
|
117
168
|
column: string;
|
|
118
169
|
aggregation?: 'sum' | 'count' | 'avg' | 'min' | 'max';
|
|
119
170
|
label?: string;
|
|
120
171
|
type?: AxisChartType;
|
|
121
|
-
format?:
|
|
122
|
-
|
|
172
|
+
format?: ReportValueFormat;
|
|
173
|
+
secondary?: boolean;
|
|
174
|
+
color?: ReportChartColor;
|
|
175
|
+
line?: ReportChartLineStyle;
|
|
176
|
+
markers?: boolean;
|
|
177
|
+
markLine?: ReportChartMarkStat;
|
|
178
|
+
}
|
|
179
|
+
export interface ListColumn extends NumberFormatSpec {
|
|
180
|
+
column: string;
|
|
181
|
+
label?: string;
|
|
182
|
+
format?: ReportListColumnFormat;
|
|
183
|
+
sortColumn?: string;
|
|
184
|
+
wrap?: boolean;
|
|
123
185
|
}
|
|
124
186
|
export interface ListConfig {
|
|
125
|
-
columns?:
|
|
126
|
-
column: string;
|
|
127
|
-
label?: string;
|
|
128
|
-
format?: 'date';
|
|
129
|
-
sortColumn?: string;
|
|
130
|
-
}[];
|
|
187
|
+
columns?: ListColumn[];
|
|
131
188
|
rowBy?: {
|
|
132
189
|
column: string;
|
|
133
190
|
label?: string;
|
|
@@ -135,8 +192,13 @@ export interface ListConfig {
|
|
|
135
192
|
pivotBy?: {
|
|
136
193
|
column: string;
|
|
137
194
|
};
|
|
138
|
-
sort?: ReportSort;
|
|
195
|
+
sort?: ReportSort | ReportSort[];
|
|
196
|
+
pinnedColumns?: number | null;
|
|
139
197
|
pageSize?: number;
|
|
198
|
+
totals?: boolean;
|
|
199
|
+
cellFormat?: NumberFormatSpec & {
|
|
200
|
+
format?: ReportValueFormat;
|
|
201
|
+
};
|
|
140
202
|
}
|
|
141
203
|
export interface KpiConfig {
|
|
142
204
|
measure?: ChartMeasure;
|
|
@@ -193,11 +255,15 @@ export interface FilterGroupValue {
|
|
|
193
255
|
export interface ReportUrlParams {
|
|
194
256
|
groups: Map<number, string>;
|
|
195
257
|
listSorts: Map<number, string>;
|
|
258
|
+
listSearches: Map<number, string>;
|
|
259
|
+
listHidden: Map<number, string>;
|
|
196
260
|
groupBy: string | null;
|
|
197
261
|
}
|
|
198
262
|
export interface ReportUrlSnapshot {
|
|
199
263
|
groups: Map<number, FilterGroupValue | null>;
|
|
200
264
|
listSorts: Map<number, ReportSort>;
|
|
265
|
+
listSearches: Map<number, string>;
|
|
266
|
+
listHidden: Map<number, string[]>;
|
|
201
267
|
frequency: ChartGranularity | null;
|
|
202
268
|
}
|
|
203
269
|
export interface ResolvedFilterValue {
|
|
@@ -212,6 +278,8 @@ export interface ComponentDataState {
|
|
|
212
278
|
page?: number;
|
|
213
279
|
pageSize?: number;
|
|
214
280
|
frequency?: ChartGranularity;
|
|
281
|
+
search?: string;
|
|
282
|
+
hiddenColumns?: string[];
|
|
215
283
|
}
|
|
216
284
|
export interface ComponentData {
|
|
217
285
|
columns: string[];
|
|
@@ -223,6 +291,9 @@ export interface ComponentData {
|
|
|
223
291
|
};
|
|
224
292
|
truncated: boolean;
|
|
225
293
|
granularity?: ChartGranularity | null;
|
|
294
|
+
searchNote?: string | null;
|
|
295
|
+
totals?: Record<string, unknown> | null;
|
|
296
|
+
totalsNote?: string | null;
|
|
226
297
|
}
|
|
227
298
|
export interface ComponentExportResponse {
|
|
228
299
|
url: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ListColumn, ListConfig, ReportSort } from './interfaces/report.interface';
|
|
2
|
+
export declare const MAX_PINNED_COLUMNS = 3;
|
|
3
|
+
export declare function listSortTerms(config: ListConfig | null | undefined): ReportSort[];
|
|
4
|
+
export declare function listHideableColumns(config: ListConfig | null | undefined): string[];
|
|
5
|
+
export declare function listHiddenColumns(config: ListConfig | null | undefined, names: readonly string[]): string[];
|
|
6
|
+
export declare function listPinnedColumns(config: ListConfig | null | undefined): number;
|
|
7
|
+
export declare function columnClasses(column: ListColumn, index: number, pinned: number): string;
|
|
8
|
+
export declare const LIST_TOTAL_LABEL = "Total";
|
|
9
|
+
export declare function listTotalsLabelColumn(columns: readonly ListColumn[], totals: Record<string, unknown> | null | undefined): string | null;
|