@firestitch/report 18.7.0 → 18.8.1
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-kpi/component-kpi.component.d.ts +12 -3
- package/app/reports/components/component-kpi/components/sparkline/sparkline.component.d.ts +8 -0
- package/app/reports/components/component-list/component-list.component.d.ts +7 -1
- package/app/reports/components/component-note/component-note.component.d.ts +12 -0
- package/app/reports/components/report-canvas/report-canvas.component.d.ts +0 -9
- package/app/reports/components/report-component/report-component.component.d.ts +2 -11
- package/app/reports/data/report.data.d.ts +0 -2
- package/app/reports/dialogs/component-settings/component-settings.component.d.ts +34 -2
- package/app/reports/dialogs/report-settings/report-settings.component.d.ts +0 -1
- package/app/reports/enums/report-change-polarity.enum.d.ts +5 -0
- package/app/reports/enums/report-kpi-trend.enum.d.ts +5 -0
- package/app/reports/export/report-export-collector.service.d.ts +29 -1
- package/app/reports/export/report-pdf.service.d.ts +5 -0
- package/app/reports/export/report-pptx.service.d.ts +7 -0
- package/app/reports/format.d.ts +29 -1
- package/app/reports/interfaces/report-chat-viewer-filter.interface.d.ts +2 -0
- package/app/reports/interfaces/report.interface.d.ts +124 -4
- package/app/reports/kpi-card.d.ts +48 -0
- package/app/reports/layout.d.ts +0 -9
- package/app/reports/list-config.d.ts +8 -1
- package/app/reports/option-builder.d.ts +7 -0
- package/app/reports/output-notes.d.ts +14 -0
- package/app/reports/pipes/report-output.pipe.d.ts +10 -0
- package/app/reports/services/report-filter-state.service.d.ts +1 -0
- package/app/reports/theme/palette.d.ts +5 -0
- package/app/reports/theme/typography.d.ts +1 -0
- package/esm2022/app/reports/components/component-chart/component-chart.component.mjs +8 -4
- package/esm2022/app/reports/components/component-kpi/component-kpi.component.mjs +50 -17
- package/esm2022/app/reports/components/component-kpi/components/sparkline/sparkline.component.mjs +19 -0
- package/esm2022/app/reports/components/component-list/component-list.component.mjs +66 -6
- package/esm2022/app/reports/components/component-note/component-note.component.mjs +30 -0
- package/esm2022/app/reports/components/report-canvas/report-canvas.component.mjs +7 -56
- package/esm2022/app/reports/components/report-component/report-component.component.mjs +21 -82
- package/esm2022/app/reports/data/report.data.mjs +5 -5
- package/esm2022/app/reports/dialogs/component-settings/component-settings.component.mjs +133 -13
- package/esm2022/app/reports/dialogs/report-settings/report-settings.component.mjs +4 -8
- package/esm2022/app/reports/enums/report-change-polarity.enum.mjs +11 -0
- package/esm2022/app/reports/enums/report-kpi-trend.enum.mjs +10 -0
- package/esm2022/app/reports/export/report-export-collector.service.mjs +123 -10
- package/esm2022/app/reports/export/report-pdf.service.mjs +257 -44
- package/esm2022/app/reports/export/report-pptx.service.mjs +324 -51
- package/esm2022/app/reports/format.mjs +452 -3
- package/esm2022/app/reports/interfaces/report-chat-viewer-filter.interface.mjs +1 -1
- package/esm2022/app/reports/interfaces/report.interface.mjs +1 -1
- package/esm2022/app/reports/kpi-card.mjs +187 -0
- package/esm2022/app/reports/layout.mjs +1 -46
- package/esm2022/app/reports/list-config.mjs +33 -1
- package/esm2022/app/reports/option-builder.mjs +637 -54
- package/esm2022/app/reports/output-notes.mjs +204 -0
- package/esm2022/app/reports/pipes/report-output.pipe.mjs +28 -0
- package/esm2022/app/reports/services/report-filter-state.service.mjs +40 -3
- package/esm2022/app/reports/theme/palette.mjs +22 -1
- package/esm2022/app/reports/theme/typography.mjs +5 -1
- package/esm2022/app/reports/views/report/fs-ai-report.component.mjs +2 -2
- package/esm2022/app/reports/views/report/report.component.mjs +3 -4
- package/esm2022/public_api.mjs +2 -1
- package/fesm2022/{firestitch-report-echarts-u5ImuZT5.mjs → firestitch-report-echarts-CFnbJx44.mjs} +2 -2
- package/fesm2022/{firestitch-report-echarts-u5ImuZT5.mjs.map → firestitch-report-echarts-CFnbJx44.mjs.map} +1 -1
- package/fesm2022/{firestitch-report-firestitch-report-Cz-kA_id.mjs → firestitch-report-firestitch-report-CSylkyko.mjs} +2735 -507
- package/fesm2022/firestitch-report-firestitch-report-CSylkyko.mjs.map +1 -0
- package/fesm2022/firestitch-report.mjs +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/fesm2022/firestitch-report-firestitch-report-Cz-kA_id.mjs.map +0 -1
|
@@ -1,11 +1,20 @@
|
|
|
1
|
+
import { ReportKpiTrend } from '../../enums/report-kpi-trend.enum';
|
|
1
2
|
import { ComponentData, ReportComponent } from '../../interfaces/report.interface';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class ComponentKpiComponent {
|
|
4
5
|
readonly component: import("@angular/core").InputSignal<ReportComponent>;
|
|
5
6
|
readonly data: import("@angular/core").InputSignal<ComponentData>;
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
|
|
7
|
+
readonly ReportKpiTrend: typeof ReportKpiTrend;
|
|
8
|
+
readonly tokens: {
|
|
9
|
+
valueSize: string;
|
|
10
|
+
text: string;
|
|
11
|
+
good: string;
|
|
12
|
+
bad: string;
|
|
13
|
+
neutral: string;
|
|
14
|
+
sparkline: string;
|
|
15
|
+
};
|
|
16
|
+
readonly view: import("@angular/core").Signal<import("../../kpi-card").KpiCardView>;
|
|
17
|
+
readonly hasNote: import("@angular/core").Signal<boolean>;
|
|
9
18
|
private readonly _filterState;
|
|
10
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentKpiComponent, never>;
|
|
11
20
|
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>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class SparklineComponent {
|
|
3
|
+
readonly values: import("@angular/core").InputSignal<number[]>;
|
|
4
|
+
readonly partial: import("@angular/core").InputSignal<boolean>;
|
|
5
|
+
readonly geometry: import("@angular/core").Signal<import("../../../../kpi-card").KpiSparklineGeometry>;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparklineComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparklineComponent, "app-component-kpi-sparkline", never, { "values": { "alias": "values"; "required": false; "isSignal": true; }; "partial": { "alias": "partial"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
8
|
+
}
|
|
@@ -2,7 +2,8 @@ import { OnInit } from '@angular/core';
|
|
|
2
2
|
import { FsListComponent, FsListConfig } from '@firestitch/list';
|
|
3
3
|
import { ReportListColumnFormat } from '../../enums/report-list-column-format.enum';
|
|
4
4
|
import { ListColumn, ReportComponent } from '../../interfaces/report.interface';
|
|
5
|
-
import { columnClasses } from '../../list-config';
|
|
5
|
+
import { ListOutputColumn, columnClasses } from '../../list-config';
|
|
6
|
+
import { ComponentNoteData } from '../../output-notes';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export declare class ComponentListComponent implements OnInit {
|
|
8
9
|
readonly reportId: import("@angular/core").InputSignal<number>;
|
|
@@ -18,6 +19,7 @@ export declare class ComponentListComponent implements OnInit {
|
|
|
18
19
|
readonly showTotals: import("@angular/core").WritableSignal<boolean>;
|
|
19
20
|
readonly totals: import("@angular/core").WritableSignal<Record<string, unknown>>;
|
|
20
21
|
readonly totalsNote: import("@angular/core").WritableSignal<string>;
|
|
22
|
+
readonly noteData: import("@angular/core").WritableSignal<ComponentNoteData>;
|
|
21
23
|
readonly rowCount: import("@angular/core").WritableSignal<{
|
|
22
24
|
shown: number;
|
|
23
25
|
total: number;
|
|
@@ -29,6 +31,8 @@ export declare class ComponentListComponent implements OnInit {
|
|
|
29
31
|
readonly columnClasses: typeof columnClasses;
|
|
30
32
|
readonly hidden: import("@angular/core").Signal<Set<string>>;
|
|
31
33
|
readonly totalLabel = "Total";
|
|
34
|
+
readonly outputColumns: import("@angular/core").Signal<Record<string, ListOutputColumn>>;
|
|
35
|
+
readonly columnNotes: import("@angular/core").Signal<Record<string, string>>;
|
|
32
36
|
readonly totalsLabelColumn: import("@angular/core").Signal<string>;
|
|
33
37
|
readonly caption: import("@angular/core").Signal<string>;
|
|
34
38
|
private _reportData;
|
|
@@ -42,6 +46,8 @@ export declare class ComponentListComponent implements OnInit {
|
|
|
42
46
|
private _initListConfig;
|
|
43
47
|
private _fetch;
|
|
44
48
|
private _pivotColumns;
|
|
49
|
+
private _noteData;
|
|
50
|
+
private _alignOutputColumns;
|
|
45
51
|
private _observePinOffsets;
|
|
46
52
|
private _schedulePinOffsets;
|
|
47
53
|
private _updatePinOffsets;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentNoteData } from '../../output-notes';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ComponentNoteComponent {
|
|
4
|
+
readonly data: import("@angular/core").InputSignal<ComponentNoteData>;
|
|
5
|
+
readonly windows: import("@angular/core").InputSignal<boolean>;
|
|
6
|
+
readonly windowDescriptions: import("@angular/core").InputSignal<boolean>;
|
|
7
|
+
readonly windowNotes: import("@angular/core").InputSignal<boolean>;
|
|
8
|
+
readonly lines: import("@angular/core").Signal<string[]>;
|
|
9
|
+
private readonly _filterState;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentNoteComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComponentNoteComponent, "app-report-component-note", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "windows": { "alias": "windows"; "required": false; "isSignal": true; }; "windowDescriptions": { "alias": "windowDescriptions"; "required": false; "isSignal": true; }; "windowNotes": { "alias": "windowNotes"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
@@ -39,7 +39,6 @@ export declare class ReportCanvasComponent implements OnChanges, AfterViewInit {
|
|
|
39
39
|
private _viewport;
|
|
40
40
|
private _guides;
|
|
41
41
|
readonly PX = 96;
|
|
42
|
-
readonly flowPadding = 0.25;
|
|
43
42
|
readonly pages: import("@angular/core").WritableSignal<ReportPage[]>;
|
|
44
43
|
readonly activePageIndex: import("@angular/core").WritableSignal<number>;
|
|
45
44
|
readonly zoom: import("@angular/core").WritableSignal<number>;
|
|
@@ -58,7 +57,6 @@ export declare class ReportCanvasComponent implements OnChanges, AfterViewInit {
|
|
|
58
57
|
ngOnChanges(changes: SimpleChanges): void;
|
|
59
58
|
get headingSizePx(): number;
|
|
60
59
|
ngAfterViewInit(): void;
|
|
61
|
-
get isFlow(): boolean;
|
|
62
60
|
get activePage(): ReportPage | null;
|
|
63
61
|
get bands(): ReportHeaderFooter;
|
|
64
62
|
get masterComponents(): ReportComponent[];
|
|
@@ -70,7 +68,6 @@ export declare class ReportCanvasComponent implements OnChanges, AfterViewInit {
|
|
|
70
68
|
addText(): void;
|
|
71
69
|
onComponentRemoved(componentId: number): void;
|
|
72
70
|
toggleMasterHidden(page: ReportPage): void;
|
|
73
|
-
get flowComponents(): ReportComponent[];
|
|
74
71
|
selectPage(index: number): void;
|
|
75
72
|
addPage(): void;
|
|
76
73
|
pageLabel(page: ReportPage, index: number): string;
|
|
@@ -88,12 +85,6 @@ export declare class ReportCanvasComponent implements OnChanges, AfterViewInit {
|
|
|
88
85
|
onPositionChanged(position: {
|
|
89
86
|
componentId: number;
|
|
90
87
|
} & Record<string, number>): void;
|
|
91
|
-
onFlowReorder(event: {
|
|
92
|
-
componentId: number;
|
|
93
|
-
clientX: number;
|
|
94
|
-
clientY: number;
|
|
95
|
-
}): void;
|
|
96
|
-
private _flowDropIndex;
|
|
97
88
|
private get _snapThreshold();
|
|
98
89
|
private _snapMove;
|
|
99
90
|
private _snapResize;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FilterConfig } from '@firestitch/filter';
|
|
3
|
-
import { ComponentData, ComponentSettings, ReportComponent as ReportComponentModel, ReportFilterGroup
|
|
3
|
+
import { ComponentData, ComponentSettings, ReportComponent as ReportComponentModel, ReportFilterGroup } from '../../interfaces/report.interface';
|
|
4
4
|
import { ComponentChartComponent } from '../component-chart/component-chart.component';
|
|
5
5
|
import { TextTokenContext } from '../../text';
|
|
6
6
|
import { CanvasSnapper } from '../report-canvas/report-canvas.component';
|
|
@@ -12,7 +12,6 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
12
12
|
component: ReportComponentModel;
|
|
13
13
|
groups: Map<number, ReportFilterGroup>;
|
|
14
14
|
editMode: boolean;
|
|
15
|
-
layout: ReportLayout;
|
|
16
15
|
zoom: number;
|
|
17
16
|
snapper: CanvasSnapper | null;
|
|
18
17
|
selected: boolean;
|
|
@@ -20,11 +19,6 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
20
19
|
positionChanged: EventEmitter<{
|
|
21
20
|
componentId: number;
|
|
22
21
|
} & Record<string, number>>;
|
|
23
|
-
flowReorder: EventEmitter<{
|
|
24
|
-
componentId: number;
|
|
25
|
-
clientX: number;
|
|
26
|
-
clientY: number;
|
|
27
|
-
}>;
|
|
28
22
|
openSettings: EventEmitter<ReportComponentModel>;
|
|
29
23
|
readonly tokens: import("@angular/core").InputSignal<TextTokenContext>;
|
|
30
24
|
readonly removed: import("@angular/core").OutputEmitterRef<number>;
|
|
@@ -66,8 +60,6 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
66
60
|
onDragStart(event: PointerEvent): void;
|
|
67
61
|
onResizeStart(event: PointerEvent, handle: Handle): void;
|
|
68
62
|
private _buildFilterConfig;
|
|
69
|
-
private _flowResize;
|
|
70
|
-
private _flowDrag;
|
|
71
63
|
private _origin;
|
|
72
64
|
private _track;
|
|
73
65
|
private _emitGeometry;
|
|
@@ -76,10 +68,9 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
76
68
|
get heightAuto(): boolean;
|
|
77
69
|
private _inches;
|
|
78
70
|
private _round;
|
|
79
|
-
private _snapFlowWidth;
|
|
80
71
|
private _applyGeometry;
|
|
81
72
|
private _load;
|
|
82
73
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportComponentComponent, never>;
|
|
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; }; "
|
|
74
|
+
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; }; "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"; "openSettings": "openSettings"; "removed": "removed"; }, never, never, true, never>;
|
|
84
75
|
}
|
|
85
76
|
export {};
|
|
@@ -46,8 +46,6 @@ export declare class ReportData<T = any> {
|
|
|
46
46
|
y: number;
|
|
47
47
|
w: number;
|
|
48
48
|
h: number;
|
|
49
|
-
flowWidth: number;
|
|
50
|
-
order: number;
|
|
51
49
|
}>)[], config?: RequestConfig): Observable<T>;
|
|
52
50
|
componentData(reportId: number, componentId: number, filters?: ResolvedFilterValue[], state?: ComponentDataState, isExport?: boolean, config?: RequestConfig): Observable<T>;
|
|
53
51
|
exportComponent(reportId: number, componentId: number, filters?: ResolvedFilterValue[], state?: ComponentDataState, config?: RequestConfig): Observable<ComponentExportResponse>;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
+
import { ReportChangePolarity } from '../../enums/report-change-polarity.enum';
|
|
5
|
+
import { ChartGranularity, ComponentSettings, Report, ReportComponent, ReportFilterType } from '../../interfaces/report.interface';
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
7
|
export interface ComponentSettingsResult {
|
|
6
8
|
settings?: ComponentSettings;
|
|
7
9
|
deleted?: boolean;
|
|
8
10
|
}
|
|
11
|
+
interface ComponentSettingsResponse {
|
|
12
|
+
id: number;
|
|
13
|
+
config?: Record<string, unknown> | null;
|
|
14
|
+
}
|
|
9
15
|
interface FilterRow {
|
|
10
16
|
column: string;
|
|
11
17
|
type: ReportFilterType;
|
|
@@ -24,6 +30,25 @@ export declare class ComponentSettingsComponent implements OnInit {
|
|
|
24
30
|
paddingBottom: number | string;
|
|
25
31
|
paddingLeft: number | string;
|
|
26
32
|
configJson: string;
|
|
33
|
+
readonly kpiPolarityOptions: {
|
|
34
|
+
value: ReportChangePolarity;
|
|
35
|
+
name: string;
|
|
36
|
+
}[];
|
|
37
|
+
readonly granularityOptions: {
|
|
38
|
+
value: ChartGranularity;
|
|
39
|
+
name: string;
|
|
40
|
+
}[];
|
|
41
|
+
readonly sparklineMinPeriods = 2;
|
|
42
|
+
readonly sparklineMaxPeriods = 60;
|
|
43
|
+
readonly kpiCard: import("@angular/core").WritableSignal<boolean>;
|
|
44
|
+
readonly increaseIs: import("@angular/core").WritableSignal<ReportChangePolarity>;
|
|
45
|
+
readonly targetValue: import("@angular/core").WritableSignal<string | number>;
|
|
46
|
+
readonly targetLabel: import("@angular/core").WritableSignal<string>;
|
|
47
|
+
readonly targetPercent: import("@angular/core").WritableSignal<boolean>;
|
|
48
|
+
readonly hasTarget: import("@angular/core").Signal<boolean>;
|
|
49
|
+
readonly sparkline: import("@angular/core").WritableSignal<boolean>;
|
|
50
|
+
readonly sparklineGranularity: import("@angular/core").WritableSignal<ChartGranularity>;
|
|
51
|
+
readonly sparklinePeriods: import("@angular/core").WritableSignal<string | number>;
|
|
27
52
|
readonly sql: import("@angular/core").WritableSignal<string>;
|
|
28
53
|
readonly sqlBaseline: import("@angular/core").WritableSignal<boolean>;
|
|
29
54
|
readonly sqlTimezone: import("@angular/core").WritableSignal<string>;
|
|
@@ -43,8 +68,15 @@ export declare class ComponentSettingsComponent implements OnInit {
|
|
|
43
68
|
ngOnInit(): void;
|
|
44
69
|
typeLabel(type: ReportFilterType): string;
|
|
45
70
|
delete(): void;
|
|
46
|
-
|
|
71
|
+
validateTarget: (control: AbstractControl) => void;
|
|
72
|
+
save: () => Observable<ComponentSettingsResponse>;
|
|
47
73
|
setExposure(row: FilterRow, target: 'report' | 'component', on: boolean): void;
|
|
74
|
+
private _seedKpiCard;
|
|
75
|
+
private _savedKpiCard;
|
|
76
|
+
private _kpiCardSettings;
|
|
77
|
+
private _targetShown;
|
|
78
|
+
private _targetStored;
|
|
79
|
+
private _number;
|
|
48
80
|
private _padding;
|
|
49
81
|
private _run;
|
|
50
82
|
private _rebuildRows;
|
|
@@ -36,7 +36,6 @@ export declare class ReportSettingsComponent implements OnInit {
|
|
|
36
36
|
headerHeight: number | string;
|
|
37
37
|
footerHeight: number | string;
|
|
38
38
|
readonly headerFooterMax = 3;
|
|
39
|
-
layout: 'freeform' | 'flow';
|
|
40
39
|
timezone: string;
|
|
41
40
|
headingSize: number;
|
|
42
41
|
readonly locales: import("@angular/core").WritableSignal<ReportLocales>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
2
|
import { ComponentData, ListColumn, Report, ReportComponent, ReportFormatContext, ReportLocaleTag, ReportPage } from '../interfaces/report.interface';
|
|
3
|
+
import { KpiCardView } from '../kpi-card';
|
|
4
|
+
import { ListOutputColumn } from '../list-config';
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
export interface CollectedComponent {
|
|
5
7
|
component: ReportComponent;
|
|
@@ -20,15 +22,41 @@ export interface CollectedReport {
|
|
|
20
22
|
}
|
|
21
23
|
export type ExportListColumn = ListColumn & {
|
|
22
24
|
numeric: boolean;
|
|
25
|
+
output?: ListOutputColumn;
|
|
23
26
|
};
|
|
27
|
+
export interface KpiExportHeights {
|
|
28
|
+
value: number;
|
|
29
|
+
label: number;
|
|
30
|
+
delta: number;
|
|
31
|
+
window: number;
|
|
32
|
+
target: number;
|
|
33
|
+
sparkline: number;
|
|
34
|
+
note: number;
|
|
35
|
+
}
|
|
36
|
+
export interface KpiExportParts {
|
|
37
|
+
delta: boolean;
|
|
38
|
+
window: boolean;
|
|
39
|
+
target: boolean;
|
|
40
|
+
sparkline: boolean;
|
|
41
|
+
notes: string[];
|
|
42
|
+
scale: number;
|
|
43
|
+
}
|
|
24
44
|
export declare function emptyLabel(item: CollectedComponent): string;
|
|
25
45
|
export declare function exportTitle(component: ReportComponent, search?: string | null): string;
|
|
26
46
|
export declare function isFailed(item: CollectedComponent): boolean;
|
|
27
47
|
export declare function coverLines(collected: CollectedReport): string[];
|
|
28
|
-
export declare function exportCell(value: unknown, column: ListColumn
|
|
48
|
+
export declare function exportCell(value: unknown, column: ListColumn & {
|
|
49
|
+
output?: ListOutputColumn;
|
|
50
|
+
}, timezone: string, context: ReportFormatContext, row?: Record<string, unknown> | null): string;
|
|
29
51
|
export declare function listColumns(component: ReportComponent, data: ComponentData, locale: ReportLocaleTag, hidden?: readonly string[]): ExportListColumn[];
|
|
30
52
|
export declare function listHeadings(component: ReportComponent, data: ComponentData, locale: ReportLocaleTag, hidden?: readonly string[]): string[];
|
|
31
53
|
export declare function listTotalsRow(data: ComponentData, columns: readonly ExportListColumn[], timezone: string, context: ReportFormatContext): string[] | null;
|
|
54
|
+
export declare function exportWindowsLine(item: CollectedComponent, timezone: string, locale: ReportLocaleTag): string;
|
|
55
|
+
export declare function exportNoteLines(item: CollectedComponent, timezone: string, locale: ReportLocaleTag): string[];
|
|
56
|
+
export declare function kpiCardHasExtras(view: KpiCardView, notes: readonly string[]): boolean;
|
|
57
|
+
export declare function kpiExportParts(view: KpiCardView, notes: readonly string[], available: number, heights: KpiExportHeights): KpiExportParts;
|
|
58
|
+
export declare function scaledKpiHeights(heights: KpiExportHeights, scale: number): KpiExportHeights;
|
|
59
|
+
export declare function kpiExportHeight(view: KpiCardView, parts: KpiExportParts, heights: KpiExportHeights): number;
|
|
32
60
|
export declare function moreRowsNotice(remaining: number): string;
|
|
33
61
|
export declare function failedPageNames(collected: CollectedReport): string[];
|
|
34
62
|
export declare class ReportExportCollectorService {
|
|
@@ -15,6 +15,8 @@ export declare class ReportPdfService {
|
|
|
15
15
|
private _alignOffset;
|
|
16
16
|
private _tokens;
|
|
17
17
|
private _renderComponent;
|
|
18
|
+
private _smallLine;
|
|
19
|
+
private _fit;
|
|
18
20
|
private _componentTitle;
|
|
19
21
|
private _boxNote;
|
|
20
22
|
private _renderTable;
|
|
@@ -27,6 +29,9 @@ export declare class ReportPdfService {
|
|
|
27
29
|
private _continuationMargin;
|
|
28
30
|
private _continuedTitle;
|
|
29
31
|
private _renderKpi;
|
|
32
|
+
private _kpiDelta;
|
|
33
|
+
private _kpiTarget;
|
|
34
|
+
private _kpiSparkline;
|
|
30
35
|
private _pdfText;
|
|
31
36
|
private _slug;
|
|
32
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportPdfService, never>;
|
|
@@ -10,6 +10,7 @@ export declare class ReportPptxService {
|
|
|
10
10
|
private _renderText;
|
|
11
11
|
private _tokens;
|
|
12
12
|
private _renderComponent;
|
|
13
|
+
private _lineRuns;
|
|
13
14
|
private _renderChart;
|
|
14
15
|
private _legendPosition;
|
|
15
16
|
private _referenceLines;
|
|
@@ -19,6 +20,7 @@ export declare class ReportPptxService {
|
|
|
19
20
|
private _withDataLabels;
|
|
20
21
|
private _percentAxisOptions;
|
|
21
22
|
private _twoAxesOptions;
|
|
23
|
+
private _rankAxisOptions;
|
|
22
24
|
private _categoryOrderOptions;
|
|
23
25
|
private _valueAxisCode;
|
|
24
26
|
private _addChart;
|
|
@@ -33,6 +35,11 @@ export declare class ReportPptxService {
|
|
|
33
35
|
private _valueAxisRangeOptions;
|
|
34
36
|
private _renderTable;
|
|
35
37
|
private _renderKpi;
|
|
38
|
+
private _kpiDelta;
|
|
39
|
+
private _estimatedWidth;
|
|
40
|
+
private _fitEstimate;
|
|
41
|
+
private _kpiTarget;
|
|
42
|
+
private _kpiSparkline;
|
|
36
43
|
private _slug;
|
|
37
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportPptxService, never>;
|
|
38
45
|
static ɵprov: i0.ɵɵInjectableDeclaration<ReportPptxService>;
|
package/app/reports/format.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReportNumberUnits } from './enums/report-number-units.enum';
|
|
2
|
-
import { ChartMeasure, NumberFormatSpec, Report, ReportCurrencyCode, ReportFormatContext, ReportLocaleTag } from './interfaces/report.interface';
|
|
2
|
+
import { ChartGranularity, ChartMeasure, ComparisonAgainst, ComparisonNoteCode, ComparisonOffset, ComparisonWindow, ComponentComparison, KpiNoteCode, NumberFormatSpec, OutputMeta, OutputRole, Report, ReportCurrencyCode, ReportFormatContext, ReportLocaleTag, WindowMeta, WindowNoteCode } from './interfaces/report.interface';
|
|
3
3
|
export declare const REPORT_FALLBACK_LOCALE: ReportLocaleTag;
|
|
4
4
|
export declare const REPORT_FALLBACK_CURRENCY: ReportCurrencyCode;
|
|
5
5
|
export declare const DEFAULT_FORMAT_CONTEXT: Readonly<ReportFormatContext>;
|
|
@@ -13,6 +13,7 @@ export interface FormatNumberOptions {
|
|
|
13
13
|
empty?: string;
|
|
14
14
|
units?: ResolvedUnits;
|
|
15
15
|
decimals?: number | null;
|
|
16
|
+
signed?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export interface ChartNumberFormat {
|
|
18
19
|
units: ResolvedUnits;
|
|
@@ -22,6 +23,18 @@ export declare function toFiniteNumber(value: unknown): number | null;
|
|
|
22
23
|
export declare function hasNumberFormat(spec?: NumberFormatSpec | null): boolean;
|
|
23
24
|
export declare function resolveUnits(units: ReportNumberUnits | null | undefined, magnitude: number, decimals: number): ResolvedUnits;
|
|
24
25
|
export declare function formatNumber(value: unknown, spec: NumberFormatSpec | null | undefined, context: ReportFormatContext, options?: FormatNumberOptions): string;
|
|
26
|
+
export interface OutputValueOptions {
|
|
27
|
+
measureSpec?: NumberFormatSpec | null;
|
|
28
|
+
prior?: unknown;
|
|
29
|
+
floor?: string | null;
|
|
30
|
+
empty?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface FormattedOutputValue {
|
|
33
|
+
text: string;
|
|
34
|
+
title: string | null;
|
|
35
|
+
}
|
|
36
|
+
export declare function formatOutputValue(value: unknown, output: OutputMeta | null | undefined, spec: NumberFormatSpec | null | undefined, context: ReportFormatContext, options?: OutputValueOptions): FormattedOutputValue;
|
|
37
|
+
export declare function laneOutputAlias(outputs: Record<string, OutputMeta> | null | undefined, alias: string, role: OutputRole): string | null;
|
|
25
38
|
export declare function axisNumberFormat(measures: ChartMeasure[]): NumberFormatSpec | null;
|
|
26
39
|
export declare function resolveChartNumberFormat(spec: NumberFormatSpec, peak: number, context: ReportFormatContext): ChartNumberFormat;
|
|
27
40
|
export declare function numberFormatCode(spec: NumberFormatSpec, context: ReportFormatContext, chart: ChartNumberFormat, series: (number | null)[][], stacked: boolean): string;
|
|
@@ -37,7 +50,22 @@ export declare const MONTH_YEAR: Intl.DateTimeFormatOptions;
|
|
|
37
50
|
export declare const MONTH_DAY: Intl.DateTimeFormatOptions;
|
|
38
51
|
export declare function formatLocalDate(date: Date, locale: ReportLocaleTag, options: Intl.DateTimeFormatOptions, timeZone?: string): string;
|
|
39
52
|
export declare function formatReportDate(value: unknown, timezone: string, locale: ReportLocaleTag): string;
|
|
53
|
+
export declare const TIME_SHORT: Intl.DateTimeFormatOptions;
|
|
54
|
+
export declare function formatDayRange(start: string | null | undefined, end: string | null | undefined, locale: ReportLocaleTag, options?: Intl.DateTimeFormatOptions): string;
|
|
55
|
+
export declare function formatThroughTime(through: string | null | undefined, timezone: string, locale: ReportLocaleTag): string;
|
|
56
|
+
export declare function formatDayWindow(meta: {
|
|
57
|
+
start: string | null;
|
|
58
|
+
end: string | null;
|
|
59
|
+
through?: string | null;
|
|
60
|
+
}, timezone: string, locale: ReportLocaleTag): string;
|
|
61
|
+
export declare function isReadOnOneDay(comparison: ComponentComparison | null | undefined): boolean;
|
|
62
|
+
export declare function formatReadingDay(window: Pick<ComparisonWindow, 'end'>, locale: ReportLocaleTag, lead?: boolean): string;
|
|
40
63
|
export declare function localeName(tag: ReportLocaleTag): string;
|
|
41
64
|
export declare function currencyName(code: ReportCurrencyCode): string;
|
|
65
|
+
export declare function comparisonOffsetLabel(offset: ComparisonOffset): string;
|
|
66
|
+
export declare function comparisonNoteText(code: ComparisonNoteCode, comparison?: ComponentComparison | null): string;
|
|
67
|
+
export declare function windowText(meta: WindowMeta, locale: ReportLocaleTag, granularity?: ChartGranularity | null): string;
|
|
68
|
+
export declare function windowNoteText(code: WindowNoteCode, meta: WindowMeta, locale: ReportLocaleTag, granularity?: ChartGranularity | null): string;
|
|
69
|
+
export declare function kpiNoteText(code: KpiNoteCode, against?: ComparisonAgainst | null): string;
|
|
42
70
|
export declare function getTimezoneLabel(timezone: string): string;
|
|
43
71
|
export declare function getZonedNow(timezone: string): Date;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReportChangePolarity } from '../enums/report-change-polarity.enum';
|
|
1
2
|
import { ReportChartColor } from '../enums/report-chart-color.enum';
|
|
2
3
|
import { ReportChartDataLabels } from '../enums/report-chart-data-labels.enum';
|
|
3
4
|
import { ReportChartDateLabel } from '../enums/report-chart-date-label.enum';
|
|
@@ -6,13 +7,11 @@ import { ReportChartMarkStat } from '../enums/report-chart-mark-stat.enum';
|
|
|
6
7
|
import { ReportListColumnFormat } from '../enums/report-list-column-format.enum';
|
|
7
8
|
import { ReportNumberUnits } from '../enums/report-number-units.enum';
|
|
8
9
|
import { ReportValueFormat } from '../enums/report-value-format.enum';
|
|
9
|
-
export type ReportLayout = 'freeform' | 'flow';
|
|
10
10
|
export type ReportLocaleTag = string;
|
|
11
11
|
export type ReportCurrencyCode = string;
|
|
12
12
|
export interface Report {
|
|
13
13
|
id: number;
|
|
14
14
|
name: string;
|
|
15
|
-
layout: ReportLayout;
|
|
16
15
|
timezone: string | null;
|
|
17
16
|
effectiveTimezone?: string;
|
|
18
17
|
locale?: ReportLocaleTag | null;
|
|
@@ -87,8 +86,6 @@ export interface ReportComponent {
|
|
|
87
86
|
w: number;
|
|
88
87
|
h: number;
|
|
89
88
|
autoHeight: boolean;
|
|
90
|
-
flowWidth: number;
|
|
91
|
-
order: number;
|
|
92
89
|
sql: string | null;
|
|
93
90
|
config: ChartConfig & ListConfig & KpiConfig & TextConfig & ComponentLayoutConfig & Record<string, unknown>;
|
|
94
91
|
filters: ReportFilter[];
|
|
@@ -110,6 +107,12 @@ export interface ComponentLayoutConfig {
|
|
|
110
107
|
export interface ComponentSettings {
|
|
111
108
|
title: string;
|
|
112
109
|
padding: ComponentPadding;
|
|
110
|
+
kpi?: KpiCardSettings;
|
|
111
|
+
}
|
|
112
|
+
export interface KpiCardSettings {
|
|
113
|
+
increaseIs: ReportChangePolarity | null;
|
|
114
|
+
target: KpiTargetConfig | null;
|
|
115
|
+
sparkline: KpiSparklineConfig | null;
|
|
113
116
|
}
|
|
114
117
|
export type LegendPosition = 'top' | 'bottom' | 'left' | 'right' | 'hidden';
|
|
115
118
|
export type ChartGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
@@ -202,6 +205,17 @@ export interface ListConfig {
|
|
|
202
205
|
}
|
|
203
206
|
export interface KpiConfig {
|
|
204
207
|
measure?: ChartMeasure;
|
|
208
|
+
increaseIs?: ReportChangePolarity | null;
|
|
209
|
+
target?: KpiTargetConfig | null;
|
|
210
|
+
sparkline?: KpiSparklineConfig | null;
|
|
211
|
+
}
|
|
212
|
+
export interface KpiTargetConfig {
|
|
213
|
+
value: number;
|
|
214
|
+
label?: string | null;
|
|
215
|
+
}
|
|
216
|
+
export interface KpiSparklineConfig {
|
|
217
|
+
granularity?: ChartGranularity | null;
|
|
218
|
+
periods?: number | null;
|
|
205
219
|
}
|
|
206
220
|
export interface ReportSort {
|
|
207
221
|
column: string;
|
|
@@ -252,6 +266,7 @@ export interface FilterGroupValue {
|
|
|
252
266
|
value?: string;
|
|
253
267
|
preset?: string;
|
|
254
268
|
}
|
|
269
|
+
export type ReportRelativeRange = 'thisWeek' | 'lastWeek' | 'last7Days' | 'last30Days' | 'last3Months' | 'last6Months' | 'last12Months' | 'thisMonth' | 'thisQuarter' | 'thisYear' | 'yearToDate';
|
|
255
270
|
export interface ReportUrlParams {
|
|
256
271
|
groups: Map<number, string>;
|
|
257
272
|
listSorts: Map<number, string>;
|
|
@@ -272,6 +287,7 @@ export interface ResolvedFilterValue {
|
|
|
272
287
|
end?: string;
|
|
273
288
|
values?: unknown[];
|
|
274
289
|
value?: string;
|
|
290
|
+
preset?: ReportRelativeRange;
|
|
275
291
|
}
|
|
276
292
|
export interface ComponentDataState {
|
|
277
293
|
sort?: ReportSort;
|
|
@@ -294,6 +310,110 @@ export interface ComponentData {
|
|
|
294
310
|
searchNote?: string | null;
|
|
295
311
|
totals?: Record<string, unknown> | null;
|
|
296
312
|
totalsNote?: string | null;
|
|
313
|
+
timeframe?: ComponentTimeframe | null;
|
|
314
|
+
comparison?: ComponentComparison | null;
|
|
315
|
+
outputs?: Record<string, OutputMeta>;
|
|
316
|
+
cellMeasures?: Record<string, string>;
|
|
317
|
+
windows?: Record<string, WindowMeta>;
|
|
318
|
+
kpi?: ComponentKpi | null;
|
|
319
|
+
partialPeriod?: string | null;
|
|
320
|
+
}
|
|
321
|
+
export type TimeframeSource = 'filter' | 'range' | 'fixed' | 'none';
|
|
322
|
+
export interface ComponentTimeframe {
|
|
323
|
+
column: string;
|
|
324
|
+
start: string | null;
|
|
325
|
+
end: string | null;
|
|
326
|
+
through: string | null;
|
|
327
|
+
range: ReportRelativeRange | null;
|
|
328
|
+
source: TimeframeSource;
|
|
329
|
+
}
|
|
330
|
+
export type ComparisonMode = 'range' | 'series' | 'period_end';
|
|
331
|
+
export type ComparisonAlign = 'to_date' | 'full';
|
|
332
|
+
export type ComparisonAgainst = 'previous_period' | 'previous_week' | 'previous_month' | 'previous_quarter' | 'previous_year' | 'range';
|
|
333
|
+
export type ComparisonNoteCode = 'no_window' | 'unit_inferred' | 'window_in_future' | 'other_date_filter' | 'grain_followed';
|
|
334
|
+
export interface ComparisonWindow {
|
|
335
|
+
start: string;
|
|
336
|
+
end: string;
|
|
337
|
+
through: string | null;
|
|
338
|
+
}
|
|
339
|
+
export interface ComparisonOffset {
|
|
340
|
+
against: ComparisonAgainst;
|
|
341
|
+
unit: ChartGranularity | null;
|
|
342
|
+
count: number | null;
|
|
343
|
+
}
|
|
344
|
+
export interface ComponentComparison {
|
|
345
|
+
mode: ComparisonMode;
|
|
346
|
+
timezone: string;
|
|
347
|
+
align: ComparisonAlign;
|
|
348
|
+
current: ComparisonWindow | null;
|
|
349
|
+
priors: ComparisonWindow[];
|
|
350
|
+
offsets: ComparisonOffset[];
|
|
351
|
+
floor: string | null;
|
|
352
|
+
notes: ComparisonNoteCode[];
|
|
353
|
+
}
|
|
354
|
+
export type OutputKind = 'value' | 'rank' | 'share';
|
|
355
|
+
export type OutputRole = 'current' | 'prior' | 'change' | 'percent_change';
|
|
356
|
+
export type OutputRankMethod = 'competition' | 'dense';
|
|
357
|
+
export interface OutputRank {
|
|
358
|
+
method: OutputRankMethod;
|
|
359
|
+
direction: 'asc' | 'desc';
|
|
360
|
+
within: string[];
|
|
361
|
+
}
|
|
362
|
+
export interface OutputShare {
|
|
363
|
+
within: string[];
|
|
364
|
+
}
|
|
365
|
+
export interface OutputMeta {
|
|
366
|
+
measure: string;
|
|
367
|
+
kind: OutputKind;
|
|
368
|
+
role: OutputRole | null;
|
|
369
|
+
offset: number | null;
|
|
370
|
+
window: boolean;
|
|
371
|
+
rank: OutputRank | null;
|
|
372
|
+
share: OutputShare | null;
|
|
373
|
+
}
|
|
374
|
+
export type WindowKind = 'running' | 'to_date' | 'rolling';
|
|
375
|
+
export type WindowNoteCode = 'snapped_start' | 'span_converted' | 'grain_too_coarse' | 'equal_grain_plain' | 'own_filter_caps_lead_in' | 'week_by_monday' | 'incomplete_head';
|
|
376
|
+
export interface WindowMeta {
|
|
377
|
+
kind: WindowKind;
|
|
378
|
+
periods: number | null;
|
|
379
|
+
unit: ChartGranularity | null;
|
|
380
|
+
drawnPeriods: number | null;
|
|
381
|
+
resetEvery: ChartGranularity | null;
|
|
382
|
+
average: boolean;
|
|
383
|
+
fromBeginning: boolean;
|
|
384
|
+
dateColumn: string | null;
|
|
385
|
+
start: string | null;
|
|
386
|
+
end: string | null;
|
|
387
|
+
leadIn: string | null;
|
|
388
|
+
notes: WindowNoteCode[];
|
|
389
|
+
description: string;
|
|
390
|
+
}
|
|
391
|
+
export type KpiDeltaShow = 'change' | 'percent_change';
|
|
392
|
+
export type KpiNoteCode = 'no_prior_data' | 'up_from_zero' | 'no_change' | 'no_data_either' | 'sign_change';
|
|
393
|
+
export interface ComponentKpiTarget {
|
|
394
|
+
value: number;
|
|
395
|
+
label: string | null;
|
|
396
|
+
progress: number | null;
|
|
397
|
+
met: boolean | null;
|
|
398
|
+
}
|
|
399
|
+
export interface ComponentKpiSparklinePoint {
|
|
400
|
+
period: string;
|
|
401
|
+
value: number | null;
|
|
402
|
+
}
|
|
403
|
+
export interface ComponentKpiSparkline {
|
|
404
|
+
granularity: ChartGranularity;
|
|
405
|
+
partial: boolean;
|
|
406
|
+
points: ComponentKpiSparklinePoint[];
|
|
407
|
+
}
|
|
408
|
+
export interface ComponentKpi {
|
|
409
|
+
value: number | null;
|
|
410
|
+
prior: number | null;
|
|
411
|
+
change: number | null;
|
|
412
|
+
percentChange: number | null;
|
|
413
|
+
show: KpiDeltaShow;
|
|
414
|
+
note: KpiNoteCode | null;
|
|
415
|
+
target: ComponentKpiTarget | null;
|
|
416
|
+
sparkline: ComponentKpiSparkline | null;
|
|
297
417
|
}
|
|
298
418
|
export interface ComponentExportResponse {
|
|
299
419
|
url: string;
|