@firestitch/report 18.18.2 → 18.19.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/chart-axis-settings.d.ts +4 -0
- package/app/reports/components/report-component/report-component.component.d.ts +1 -0
- package/app/reports/dialogs/component-settings/component-settings.component.d.ts +24 -0
- package/app/reports/enums/report-chart-date-label.enum.d.ts +2 -1
- package/app/reports/enums/report-chart-span-mode.enum.d.ts +5 -0
- package/app/reports/enums/report-chart-span-through.enum.d.ts +3 -0
- package/app/reports/format.d.ts +1 -0
- package/app/reports/interfaces/report-chart-axis-settings.interface.d.ts +6 -0
- package/app/reports/interfaces/report-chart-span.interface.d.ts +6 -0
- package/app/reports/interfaces/report.interface.d.ts +5 -0
- package/esm2022/app/reports/chart-axis-settings.mjs +24 -0
- package/esm2022/app/reports/components/report-component/report-component.component.mjs +27 -4
- package/esm2022/app/reports/dialogs/component-settings/component-settings.component.mjs +121 -16
- package/esm2022/app/reports/enums/report-chart-date-label.enum.mjs +5 -2
- package/esm2022/app/reports/enums/report-chart-span-mode.enum.mjs +10 -0
- package/esm2022/app/reports/enums/report-chart-span-through.enum.mjs +11 -0
- package/esm2022/app/reports/format.mjs +3 -1
- package/esm2022/app/reports/interfaces/report-chart-axis-settings.interface.mjs +2 -0
- package/esm2022/app/reports/interfaces/report-chart-span.interface.mjs +2 -0
- package/esm2022/app/reports/interfaces/report.interface.mjs +1 -1
- package/esm2022/app/reports/option-builder.mjs +34 -10
- package/esm2022/public_api.mjs +4 -1
- package/fesm2022/{firestitch-report-echarts-DKuqS_De.mjs → firestitch-report-echarts-WOx5HoDM.mjs} +2 -2
- package/fesm2022/{firestitch-report-echarts-DKuqS_De.mjs.map → firestitch-report-echarts-WOx5HoDM.mjs.map} +1 -1
- package/fesm2022/{firestitch-report-firestitch-report-CkTkXk5B.mjs → firestitch-report-firestitch-report-DztXL6p8.mjs} +244 -52
- package/fesm2022/firestitch-report-firestitch-report-DztXL6p8.mjs.map +1 -0
- package/fesm2022/firestitch-report.mjs +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +3 -0
- package/fesm2022/firestitch-report-firestitch-report-CkTkXk5B.mjs.map +0 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ReportChartAxisSettings } from './interfaces/report-chart-axis-settings.interface';
|
|
2
|
+
import { ChartConfig } from './interfaces/report.interface';
|
|
3
|
+
export declare function chartAxisSettings(config: ChartConfig | null | undefined): ReportChartAxisSettings;
|
|
4
|
+
export declare function sameChartAxisSettings(a: ReportChartAxisSettings, b: ReportChartAxisSettings): boolean;
|
|
@@ -87,6 +87,7 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
87
87
|
applySettings(settings: ComponentSettings): void;
|
|
88
88
|
exportCsv(): void;
|
|
89
89
|
exportExcel(): void;
|
|
90
|
+
private _axisWith;
|
|
90
91
|
private _export;
|
|
91
92
|
onMarkClick(click: ReportMarkClick): void;
|
|
92
93
|
onMarkMiss(): void;
|
|
@@ -2,6 +2,8 @@ import { EventEmitter, OnInit } from '@angular/core';
|
|
|
2
2
|
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { ReportChangePolarity } from '../../enums/report-change-polarity.enum';
|
|
5
|
+
import { ReportChartDateLabel } from '../../enums/report-chart-date-label.enum';
|
|
6
|
+
import { ReportChartSpanMode } from '../../enums/report-chart-span-mode.enum';
|
|
5
7
|
import { ChartGranularity, ComponentSettings, Report, ReportComponent, ReportFilterType } from '../../interfaces/report.interface';
|
|
6
8
|
import { FilterBarPlacement } from '../../interfaces/filter-bar-placement.type';
|
|
7
9
|
import { FilterComponentToggleState } from '../../interfaces/filter-component-toggle-state.interface';
|
|
@@ -68,6 +70,23 @@ export declare class ComponentSettingsComponent implements OnInit {
|
|
|
68
70
|
readonly sparkline: import("@angular/core").WritableSignal<boolean>;
|
|
69
71
|
readonly sparklineGranularity: import("@angular/core").WritableSignal<ChartGranularity>;
|
|
70
72
|
readonly sparklinePeriods: import("@angular/core").WritableSignal<string | number>;
|
|
73
|
+
readonly dateLabelOptions: {
|
|
74
|
+
value: ReportChartDateLabel;
|
|
75
|
+
name: string;
|
|
76
|
+
}[];
|
|
77
|
+
readonly spanModeOptions: {
|
|
78
|
+
value: ReportChartSpanMode;
|
|
79
|
+
name: string;
|
|
80
|
+
}[];
|
|
81
|
+
readonly spanMinPeriods = 1;
|
|
82
|
+
readonly spanMaxPeriods = 400;
|
|
83
|
+
readonly ReportChartSpanMode: typeof ReportChartSpanMode;
|
|
84
|
+
readonly timeAxis: import("@angular/core").WritableSignal<boolean>;
|
|
85
|
+
readonly spanAllowed: import("@angular/core").WritableSignal<boolean>;
|
|
86
|
+
readonly dateLabel: import("@angular/core").WritableSignal<ReportChartDateLabel>;
|
|
87
|
+
readonly spanMode: import("@angular/core").WritableSignal<ReportChartSpanMode>;
|
|
88
|
+
readonly spanPeriods: import("@angular/core").WritableSignal<string | number>;
|
|
89
|
+
readonly spanStart: import("@angular/core").WritableSignal<Date>;
|
|
71
90
|
readonly sql: import("@angular/core").WritableSignal<string>;
|
|
72
91
|
readonly sqlBaseline: import("@angular/core").WritableSignal<boolean>;
|
|
73
92
|
readonly sqlTimezone: import("@angular/core").WritableSignal<string>;
|
|
@@ -106,6 +125,11 @@ export declare class ComponentSettingsComponent implements OnInit {
|
|
|
106
125
|
private _layerValues;
|
|
107
126
|
private _valueName;
|
|
108
127
|
private _seedKpiCard;
|
|
128
|
+
private _seedTimeAxis;
|
|
129
|
+
private _chartAxisSettings;
|
|
130
|
+
private _span;
|
|
131
|
+
private _sentAxisKeys;
|
|
132
|
+
private _savedChartAxis;
|
|
109
133
|
private _savedKpiCard;
|
|
110
134
|
private _kpiCardSettings;
|
|
111
135
|
private _targetShown;
|
package/app/reports/format.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare const DAY_LONG: Intl.DateTimeFormatOptions;
|
|
|
50
50
|
export declare const MONTH_LONG: Intl.DateTimeFormatOptions;
|
|
51
51
|
export declare const MONTH_YEAR: Intl.DateTimeFormatOptions;
|
|
52
52
|
export declare const MONTH_DAY: Intl.DateTimeFormatOptions;
|
|
53
|
+
export declare const DAY_NUMERIC: Intl.DateTimeFormatOptions;
|
|
53
54
|
export declare function formatLocalDate(date: Date, locale: ReportLocaleTag, options: Intl.DateTimeFormatOptions, timeZone?: string): string;
|
|
54
55
|
export declare function formatReportDate(value: unknown, timezone: string, locale: ReportLocaleTag): string;
|
|
55
56
|
export declare const TIME_SHORT: Intl.DateTimeFormatOptions;
|
|
@@ -11,6 +11,8 @@ import { ReportValueFormat } from '../enums/report-value-format.enum';
|
|
|
11
11
|
import { ReportValueFormula } from '../enums/report-value-formula.enum';
|
|
12
12
|
import { ComponentDataApplied } from './component-data-applied.interface';
|
|
13
13
|
import { ComponentDataDrill } from './component-data-drill.interface';
|
|
14
|
+
import { ReportChartAxisSettings } from './report-chart-axis-settings.interface';
|
|
15
|
+
import { ReportChartSpan } from './report-chart-span.interface';
|
|
14
16
|
import { ReportDrillStep } from './report-drill-step.interface';
|
|
15
17
|
import { GridConfig } from './report-grid-config.interface';
|
|
16
18
|
import { ReportViewerFeature } from './report-viewer-feature.type';
|
|
@@ -140,6 +142,7 @@ export interface ComponentSettings {
|
|
|
140
142
|
title: string;
|
|
141
143
|
padding: ComponentPadding;
|
|
142
144
|
kpi?: KpiCardSettings;
|
|
145
|
+
chartAxis?: ReportChartAxisSettings;
|
|
143
146
|
}
|
|
144
147
|
export interface KpiCardSettings {
|
|
145
148
|
increaseIs: ReportChangePolarity | null;
|
|
@@ -162,10 +165,12 @@ export interface ChartConfig {
|
|
|
162
165
|
granularity?: ChartGranularity;
|
|
163
166
|
label?: string;
|
|
164
167
|
dateLabel?: ReportChartDateLabel;
|
|
168
|
+
span?: ReportChartSpan;
|
|
165
169
|
};
|
|
166
170
|
measures?: ChartMeasure[];
|
|
167
171
|
splitBy?: {
|
|
168
172
|
column: string;
|
|
173
|
+
label?: string;
|
|
169
174
|
};
|
|
170
175
|
colorBy?: {
|
|
171
176
|
column: string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReportChartDateLabel } from './enums/report-chart-date-label.enum';
|
|
2
|
+
// A time-axis chart's settings-dialog keys (dateLabel and span), from its
|
|
3
|
+
// config.xAxis; null where the config has none.
|
|
4
|
+
export function chartAxisSettings(config) {
|
|
5
|
+
return {
|
|
6
|
+
dateLabel: config?.xAxis?.dateLabel ?? null,
|
|
7
|
+
span: config?.xAxis?.span ?? null,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
// Whether two sets of time-axis keys draw the same chart. Short and an absent
|
|
11
|
+
// dateLabel are one, as are a span's absent and null periods or start.
|
|
12
|
+
export function sameChartAxisSettings(a, b) {
|
|
13
|
+
return JSON.stringify(normalizedAxisSettings(a)) === JSON.stringify(normalizedAxisSettings(b));
|
|
14
|
+
}
|
|
15
|
+
function normalizedAxisSettings(settings) {
|
|
16
|
+
const { dateLabel, span } = settings;
|
|
17
|
+
return {
|
|
18
|
+
dateLabel: dateLabel === ReportChartDateLabel.Short ? null : (dateLabel ?? null),
|
|
19
|
+
span: span
|
|
20
|
+
? { through: span.through, periods: span.periods ?? undefined, start: span.start || undefined }
|
|
21
|
+
: null,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hhcnQtYXhpcy1zZXR0aW5ncy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9hcHAvcmVwb3J0cy9jaGFydC1heGlzLXNldHRpbmdzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBSzVFLDBFQUEwRTtBQUMxRSxnREFBZ0Q7QUFDaEQsTUFBTSxVQU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