@firestitch/report 18.6.0 → 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 -8
- package/app/reports/components/component-list/component-list.component.d.ts +33 -11
- package/app/reports/components/report-component/report-component.component.d.ts +3 -0
- 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 +39 -4
- package/app/reports/interfaces/report.interface.d.ts +82 -10
- package/app/reports/list-config.d.ts +9 -0
- package/app/reports/option-builder.d.ts +69 -8
- 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 +5 -0
- package/app/reports/services/report-filter-state.service.d.ts +29 -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 -26
- package/esm2022/app/reports/components/component-list/component-list.component.mjs +157 -53
- package/esm2022/app/reports/components/report-component/report-component.component.mjs +81 -19
- package/esm2022/app/reports/data/report.data.mjs +17 -4
- package/esm2022/app/reports/dialogs/global-settings/global-settings.component.mjs +2 -2
- 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 +96 -39
- package/esm2022/app/reports/export/report-pdf.service.mjs +94 -37
- package/esm2022/app/reports/export/report-pptx.service.mjs +482 -85
- package/esm2022/app/reports/format.mjs +502 -57
- 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 +880 -95
- 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 +60 -15
- package/esm2022/app/reports/services/report-filter-state.service.mjs +275 -29
- 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 +11 -4
- package/esm2022/app/reports/views/report/report.component.mjs +6 -2
- package/esm2022/public_api.mjs +9 -1
- package/fesm2022/{firestitch-report-echarts-B9nl9XKM.mjs → firestitch-report-echarts-u5ImuZT5.mjs} +9 -3
- package/fesm2022/firestitch-report-echarts-u5ImuZT5.mjs.map +1 -0
- package/fesm2022/{firestitch-report-firestitch-report-Bb65HEYB.mjs → firestitch-report-firestitch-report-Cz-kA_id.mjs} +3213 -613
- 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-B9nl9XKM.mjs.map +0 -1
- package/fesm2022/firestitch-report-firestitch-report-Bb65HEYB.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,12 +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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentKpiComponent, never>;
|
|
11
|
-
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>;
|
|
12
12
|
}
|
|
@@ -1,28 +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;
|
|
25
|
-
private
|
|
45
|
+
private _observePinOffsets;
|
|
46
|
+
private _schedulePinOffsets;
|
|
47
|
+
private _updatePinOffsets;
|
|
26
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentListComponent, never>;
|
|
27
|
-
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>;
|
|
28
50
|
}
|
|
@@ -41,6 +41,7 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
41
41
|
private _process;
|
|
42
42
|
private _message;
|
|
43
43
|
private _prompt;
|
|
44
|
+
private _dialog;
|
|
44
45
|
private _lastPress;
|
|
45
46
|
private _destroyRef;
|
|
46
47
|
private _zone;
|
|
@@ -56,6 +57,8 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
56
57
|
get bodyPadding(): string;
|
|
57
58
|
get componentFilterGroups(): ReportFilterGroup[];
|
|
58
59
|
settings(): void;
|
|
60
|
+
get hidesColumns(): boolean;
|
|
61
|
+
chooseColumns(): void;
|
|
59
62
|
applySettings(settings: ComponentSettings): void;
|
|
60
63
|
exportCsv(): void;
|
|
61
64
|
stopCanvasPan(event: Event): void;
|
|
@@ -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;
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
31
|
+
export declare function chartValuePeak(series: (number | null)[][], stacked: boolean): number;
|
|
32
|
+
export declare function resolveReportTimezone(report: Pick<Report, 'effectiveTimezone' | 'timezone'>): string;
|
|
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,25 @@
|
|
|
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;
|
|
22
|
+
percentFormat?: 'ratio';
|
|
8
23
|
config: ReportConfig;
|
|
9
24
|
pageWidth: number;
|
|
10
25
|
pageHeight: number;
|
|
@@ -16,6 +31,20 @@ export interface ReportMaster {
|
|
|
16
31
|
id: number;
|
|
17
32
|
components: ReportComponent[];
|
|
18
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
|
+
}
|
|
19
48
|
export interface ReportHeaderFooter {
|
|
20
49
|
headerHeight: number;
|
|
21
50
|
footerHeight: number;
|
|
@@ -97,6 +126,7 @@ export interface ChartConfig {
|
|
|
97
126
|
kind?: 'category' | 'time';
|
|
98
127
|
granularity?: ChartGranularity;
|
|
99
128
|
label?: string;
|
|
129
|
+
dateLabel?: ReportChartDateLabel;
|
|
100
130
|
};
|
|
101
131
|
measures?: ChartMeasure[];
|
|
102
132
|
splitBy?: {
|
|
@@ -108,25 +138,53 @@ export interface ChartConfig {
|
|
|
108
138
|
};
|
|
109
139
|
orientation?: 'vertical' | 'horizontal';
|
|
110
140
|
stacked?: boolean;
|
|
141
|
+
percentStacked?: boolean;
|
|
142
|
+
dataLabels?: ReportChartDataLabels;
|
|
143
|
+
valueAxis?: ChartValueAxis;
|
|
144
|
+
secondaryAxis?: ChartValueAxis;
|
|
145
|
+
references?: ChartReference[];
|
|
111
146
|
legend?: LegendPosition;
|
|
112
147
|
sort?: ReportSort;
|
|
113
148
|
limit?: number;
|
|
114
149
|
}
|
|
115
|
-
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 {
|
|
116
168
|
column: string;
|
|
117
169
|
aggregation?: 'sum' | 'count' | 'avg' | 'min' | 'max';
|
|
118
170
|
label?: string;
|
|
119
171
|
type?: AxisChartType;
|
|
120
|
-
format?:
|
|
121
|
-
|
|
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;
|
|
122
185
|
}
|
|
123
186
|
export interface ListConfig {
|
|
124
|
-
columns?:
|
|
125
|
-
column: string;
|
|
126
|
-
label?: string;
|
|
127
|
-
format?: 'date';
|
|
128
|
-
sortColumn?: string;
|
|
129
|
-
}[];
|
|
187
|
+
columns?: ListColumn[];
|
|
130
188
|
rowBy?: {
|
|
131
189
|
column: string;
|
|
132
190
|
label?: string;
|
|
@@ -134,8 +192,13 @@ export interface ListConfig {
|
|
|
134
192
|
pivotBy?: {
|
|
135
193
|
column: string;
|
|
136
194
|
};
|
|
137
|
-
sort?: ReportSort;
|
|
195
|
+
sort?: ReportSort | ReportSort[];
|
|
196
|
+
pinnedColumns?: number | null;
|
|
138
197
|
pageSize?: number;
|
|
198
|
+
totals?: boolean;
|
|
199
|
+
cellFormat?: NumberFormatSpec & {
|
|
200
|
+
format?: ReportValueFormat;
|
|
201
|
+
};
|
|
139
202
|
}
|
|
140
203
|
export interface KpiConfig {
|
|
141
204
|
measure?: ChartMeasure;
|
|
@@ -192,11 +255,15 @@ export interface FilterGroupValue {
|
|
|
192
255
|
export interface ReportUrlParams {
|
|
193
256
|
groups: Map<number, string>;
|
|
194
257
|
listSorts: Map<number, string>;
|
|
258
|
+
listSearches: Map<number, string>;
|
|
259
|
+
listHidden: Map<number, string>;
|
|
195
260
|
groupBy: string | null;
|
|
196
261
|
}
|
|
197
262
|
export interface ReportUrlSnapshot {
|
|
198
263
|
groups: Map<number, FilterGroupValue | null>;
|
|
199
264
|
listSorts: Map<number, ReportSort>;
|
|
265
|
+
listSearches: Map<number, string>;
|
|
266
|
+
listHidden: Map<number, string[]>;
|
|
200
267
|
frequency: ChartGranularity | null;
|
|
201
268
|
}
|
|
202
269
|
export interface ResolvedFilterValue {
|
|
@@ -211,6 +278,8 @@ export interface ComponentDataState {
|
|
|
211
278
|
page?: number;
|
|
212
279
|
pageSize?: number;
|
|
213
280
|
frequency?: ChartGranularity;
|
|
281
|
+
search?: string;
|
|
282
|
+
hiddenColumns?: string[];
|
|
214
283
|
}
|
|
215
284
|
export interface ComponentData {
|
|
216
285
|
columns: string[];
|
|
@@ -222,6 +291,9 @@ export interface ComponentData {
|
|
|
222
291
|
};
|
|
223
292
|
truncated: boolean;
|
|
224
293
|
granularity?: ChartGranularity | null;
|
|
294
|
+
searchNote?: string | null;
|
|
295
|
+
totals?: Record<string, unknown> | null;
|
|
296
|
+
totalsNote?: string | null;
|
|
225
297
|
}
|
|
226
298
|
export interface ComponentExportResponse {
|
|
227
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;
|