@firestitch/report 18.8.0 → 18.9.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.
Files changed (52) hide show
  1. package/app/reports/components/component-text/component-text.component.d.ts +47 -2
  2. package/app/reports/components/component-text/value-embed.plugin.d.ts +67 -0
  3. package/app/reports/components/report-canvas/report-canvas.component.d.ts +34 -9
  4. package/app/reports/components/report-component/report-component.component.d.ts +10 -1
  5. package/app/reports/data/report.data.d.ts +2 -1
  6. package/app/reports/dialogs/component-settings/component-settings.component.d.ts +8 -0
  7. package/app/reports/enums/report-value-formula.enum.d.ts +6 -0
  8. package/app/reports/export/report-export-collector.service.d.ts +24 -0
  9. package/app/reports/export/report-export.service.d.ts +3 -1
  10. package/app/reports/export/report-pdf.service.d.ts +18 -2
  11. package/app/reports/export/report-pptx.service.d.ts +15 -2
  12. package/app/reports/export/report-text-layout.service.d.ts +35 -0
  13. package/app/reports/format.d.ts +5 -1
  14. package/app/reports/interfaces/report.interface.d.ts +22 -3
  15. package/app/reports/layout.d.ts +2 -0
  16. package/app/reports/services/report-filter-state.service.d.ts +1 -1
  17. package/app/reports/text.d.ts +50 -0
  18. package/app/reports/theme/palette.d.ts +2 -0
  19. package/app/reports/values.d.ts +17 -0
  20. package/esm2022/app/reports/components/component-text/component-text.component.mjs +213 -16
  21. package/esm2022/app/reports/components/component-text/value-embed.plugin.mjs +484 -0
  22. package/esm2022/app/reports/components/report-canvas/report-canvas.component.mjs +260 -34
  23. package/esm2022/app/reports/components/report-component/report-component.component.mjs +65 -19
  24. package/esm2022/app/reports/data/report.data.mjs +19 -1
  25. package/esm2022/app/reports/dialogs/component-settings/component-settings.component.mjs +134 -23
  26. package/esm2022/app/reports/enums/report-value-formula.enum.mjs +14 -0
  27. package/esm2022/app/reports/export/report-export-collector.service.mjs +170 -44
  28. package/esm2022/app/reports/export/report-export.service.mjs +57 -19
  29. package/esm2022/app/reports/export/report-pdf.service.mjs +339 -96
  30. package/esm2022/app/reports/export/report-pptx.service.mjs +316 -88
  31. package/esm2022/app/reports/export/report-text-layout.service.mjs +241 -0
  32. package/esm2022/app/reports/format.mjs +41 -10
  33. package/esm2022/app/reports/interfaces/report.interface.mjs +1 -1
  34. package/esm2022/app/reports/kpi-card.mjs +19 -6
  35. package/esm2022/app/reports/layout.mjs +11 -1
  36. package/esm2022/app/reports/option-builder.mjs +18 -5
  37. package/esm2022/app/reports/output-notes.mjs +57 -11
  38. package/esm2022/app/reports/services/report-filter-state.service.mjs +19 -10
  39. package/esm2022/app/reports/text.mjs +293 -85
  40. package/esm2022/app/reports/theme/palette.mjs +7 -2
  41. package/esm2022/app/reports/values.mjs +183 -0
  42. package/esm2022/app/reports/views/report/fs-ai-report.component.mjs +4 -1
  43. package/esm2022/app/reports/views/report/report.component.mjs +4 -1
  44. package/esm2022/public_api.mjs +2 -1
  45. package/fesm2022/{firestitch-report-echarts-qCBE3LqM.mjs → firestitch-report-echarts-DBMOHmBF.mjs} +2 -2
  46. package/fesm2022/{firestitch-report-echarts-qCBE3LqM.mjs.map → firestitch-report-echarts-DBMOHmBF.mjs.map} +1 -1
  47. package/fesm2022/{firestitch-report-firestitch-report-DbsWbE-j.mjs → firestitch-report-firestitch-report-CqbXT1gh.mjs} +3492 -1028
  48. package/fesm2022/firestitch-report-firestitch-report-CqbXT1gh.mjs.map +1 -0
  49. package/fesm2022/firestitch-report.mjs +1 -1
  50. package/package.json +1 -1
  51. package/public_api.d.ts +1 -0
  52. package/fesm2022/firestitch-report-firestitch-report-DbsWbE-j.mjs.map +0 -1
@@ -1,11 +1,31 @@
1
1
  export declare const DEFAULT_TEXT_SIZE = 12;
2
2
  export declare const HEADING_TEXT_SIZES: Record<number, number>;
3
3
  export declare const DEFAULT_TEXT_COLOR = "#1f2933";
4
+ export declare const TEXT_TABLE_BORDER_COLOR = "#cbd2d9";
5
+ export declare const TEXT_TABLE_BORDER_WIDTH = 0.75;
6
+ export declare const TEXT_TABLE_CELL_PADDING: {
7
+ vertical: number;
8
+ horizontal: number;
9
+ };
10
+ export declare const TEXT_TABLE_MARGIN = 4;
11
+ export interface TextValue {
12
+ name: string;
13
+ text?: string;
14
+ loading?: boolean;
15
+ reads?: string[];
16
+ }
4
17
  export interface TextTokenContext {
5
18
  pageNumber: number;
6
19
  pageName: string;
7
20
  reportName: string;
21
+ values?: Record<string, TextValue>;
22
+ valuePageId?: number | null;
8
23
  }
24
+ export declare const VALUE_TOKEN_PATTERN: RegExp;
25
+ export declare const VALUE_EMPTY_TEXT = "\u2014";
26
+ export declare const VALUE_LOADING_TEXT = "\u2026";
27
+ export declare function valueToken(key: string): string;
28
+ export declare function valueText(value: TextValue | undefined): string;
9
29
  export interface TextRun {
10
30
  text: string;
11
31
  bold?: boolean;
@@ -24,7 +44,37 @@ export interface TextParagraph {
24
44
  bullet?: 'bullet' | 'number';
25
45
  heading?: number;
26
46
  }
47
+ export interface TextTableCell {
48
+ paragraphs: TextParagraph[];
49
+ colSpan: number;
50
+ rowSpan: number;
51
+ row: number;
52
+ column: number;
53
+ align: 'left' | 'center' | 'right' | 'justify';
54
+ valign?: 'top' | 'middle' | 'bottom';
55
+ fill?: string;
56
+ }
57
+ export interface TextTableRow {
58
+ section: 'head' | 'body' | 'foot';
59
+ cells: TextTableCell[];
60
+ }
61
+ export interface TextTable {
62
+ rows: TextTableRow[];
63
+ columns: number;
64
+ }
65
+ export type TextBlock = {
66
+ kind: 'text';
67
+ paragraphs: TextParagraph[];
68
+ } | {
69
+ kind: 'table';
70
+ table: TextTable;
71
+ };
27
72
  export declare function fillTextTokens(html: string, context: TextTokenContext): string;
73
+ export declare function textBlocks(html: string, context: TextTokenContext): TextBlock[];
28
74
  export declare function textParagraphs(html: string, context: TextTokenContext): TextParagraph[];
75
+ export declare function blockParagraphs(blocks: TextBlock[]): TextParagraph[];
29
76
  export declare function textPlain(html: string, context: TextTokenContext): string;
77
+ export declare function splitAtTables(parent: Node): (Node[] | HTMLTableElement)[];
78
+ export declare function parseTable(element: HTMLTableElement): TextTable;
79
+ export declare function tableGrid(table: TextTable): TextTable;
30
80
  export declare function escapeHtml(value: string): string;
@@ -6,5 +6,7 @@ export declare const REPORT_CHART_COLORS_CSS: string[];
6
6
  export declare const REPORT_CHART_COLOR_BY_NAME: Record<ReportChartColor, string>;
7
7
  export declare const REPORT_REFERENCE_COLOR = "52606d";
8
8
  export declare const REPORT_WATERFALL_COLORS: Record<WaterfallStepKind, string>;
9
+ export declare const REPORT_MUTED_TEXT_COLOR = "7b8794";
9
10
  export declare const REPORT_KPI_CHANGE_COLORS: Record<ReportChangePolarity, string>;
11
+ export declare const REPORT_KPI_TRACK_COLOR = "e4e7eb";
10
12
  export declare const REPORT_KPI_SPARKLINE_COLOR: string;
@@ -0,0 +1,17 @@
1
+ import { Report, ReportComponent, ReportFormatContext, ReportPageValue } from './interfaces/report.interface';
2
+ import { TextValue } from './text';
3
+ export declare const NO_VALUE_KEYS: ReadonlySet<string>;
4
+ export declare function valueKeys(html: string | null | undefined): string[];
5
+ export declare function valueKey(component: ReportComponent): string;
6
+ export declare function operandKeys(value: ReportComponent): string[];
7
+ export declare function shownValues(values: ReportComponent[], texts: ReportComponent[]): ReportComponent[];
8
+ export declare function readKeys(shown: Iterable<string>, values: Record<string, TextValue>): Set<string>;
9
+ export declare function textValues(values: ReportComponent[], results: {
10
+ rows: ReadonlyMap<number, ReportPageValue>;
11
+ } | null, format: ReportFormatContext, loading?: ReadonlySet<number>): Record<string, TextValue>;
12
+ export declare function formatValueText(value: ReportComponent, row: ReportPageValue, layerValues: ReportComponent[], ctx: ReportFormatContext): string;
13
+ export declare function failedValueKeys(values: ReportComponent[], rows: ReadonlyMap<number, ReportPageValue>): string[];
14
+ export declare function sameTextValues(a: Record<string, TextValue> | undefined, b: Record<string, TextValue> | undefined): boolean;
15
+ export declare function reportComponents(report: Report | null): ReportComponent[];
16
+ export declare function layerValueKeys(report: Report | null): Map<number, Set<string>>;
17
+ export declare function isDrawn(component: ReportComponent): boolean;