@firestitch/report 18.10.1 → 18.10.2
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-text/component-text.component.d.ts +1 -0
- package/app/reports/components/component-text/value-embed.plugin.d.ts +25 -1
- package/app/reports/components/report-canvas/report-canvas.component.d.ts +12 -0
- package/app/reports/components/report-component/report-component.component.d.ts +1 -0
- package/app/reports/data/report.data.d.ts +2 -2
- package/app/reports/dialogs/component-settings/component-settings.component.d.ts +13 -1
- package/app/reports/export/report-export-collector.service.d.ts +13 -5
- package/app/reports/export/report-filter-lines.d.ts +3 -0
- package/app/reports/filter-text.d.ts +8 -0
- package/app/reports/format.d.ts +1 -0
- package/app/reports/interfaces/report-export-lines-input.interface.d.ts +1 -0
- package/app/reports/report-filter-items.d.ts +9 -0
- package/app/reports/text.d.ts +16 -0
- package/esm2022/app/reports/components/component-text/component-text.component.mjs +34 -22
- package/esm2022/app/reports/components/component-text/value-embed.plugin.mjs +254 -42
- package/esm2022/app/reports/components/report-canvas/report-canvas.component.mjs +118 -13
- package/esm2022/app/reports/components/report-component/report-component.component.mjs +30 -11
- package/esm2022/app/reports/data/report.data.mjs +12 -7
- package/esm2022/app/reports/dialogs/component-settings/component-settings.component.mjs +57 -14
- package/esm2022/app/reports/export/report-export-collector.service.mjs +84 -33
- package/esm2022/app/reports/export/report-filter-lines.mjs +25 -8
- package/esm2022/app/reports/export/report-pdf.service.mjs +31 -21
- package/esm2022/app/reports/export/report-pptx.service.mjs +21 -11
- package/esm2022/app/reports/filter-text.mjs +154 -0
- package/esm2022/app/reports/format.mjs +3 -2
- package/esm2022/app/reports/interfaces/report-export-lines-input.interface.mjs +1 -1
- package/esm2022/app/reports/report-filter-items.mjs +24 -2
- package/esm2022/app/reports/text.mjs +59 -13
- package/esm2022/app/reports/views/report/fs-ai-report.component.mjs +14 -11
- package/esm2022/app/reports/views/report/report.component.mjs +15 -12
- package/fesm2022/{firestitch-report-echarts-DHEH_K_q.mjs → firestitch-report-echarts-CyHkFToO.mjs} +2 -2
- package/fesm2022/{firestitch-report-echarts-DHEH_K_q.mjs.map → firestitch-report-echarts-CyHkFToO.mjs.map} +1 -1
- package/fesm2022/{firestitch-report-firestitch-report-ZcHTnNKq.mjs → firestitch-report-firestitch-report-DftB7M1o.mjs} +2653 -1955
- package/fesm2022/firestitch-report-firestitch-report-DftB7M1o.mjs.map +1 -0
- package/fesm2022/firestitch-report.mjs +1 -1
- package/package.json +1 -1
- package/fesm2022/firestitch-report-firestitch-report-ZcHTnNKq.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin, PluginConfig } from '@firestitch/html-editor';
|
|
2
|
-
import { TextValue } from '../../text';
|
|
2
|
+
import { TextTokenContext, TextValue } from '../../text';
|
|
3
3
|
export declare const VALUE_EMBED_ATTRIBUTES: string[];
|
|
4
4
|
export interface ValueEmbedBlock {
|
|
5
5
|
count: number;
|
|
@@ -10,10 +10,19 @@ export interface ValueEmbedRemoval {
|
|
|
10
10
|
after: string[];
|
|
11
11
|
undo: () => void;
|
|
12
12
|
}
|
|
13
|
+
export interface EmbedMenuEntry {
|
|
14
|
+
token: string;
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
13
17
|
export interface ValueEmbedPluginConfig extends PluginConfig {
|
|
14
18
|
host: () => HTMLElement;
|
|
15
19
|
values: () => Record<string, TextValue>;
|
|
16
20
|
scope: () => string;
|
|
21
|
+
fields: () => TextTokenContext;
|
|
22
|
+
menu: {
|
|
23
|
+
command: string;
|
|
24
|
+
entries: () => EmbedMenuEntry[];
|
|
25
|
+
};
|
|
17
26
|
showNames: () => boolean;
|
|
18
27
|
click: (key: string, chip: HTMLElement) => void;
|
|
19
28
|
blocked: (block: ValueEmbedBlock) => void;
|
|
@@ -32,11 +41,15 @@ export declare class ValueEmbedPlugin extends Plugin {
|
|
|
32
41
|
initialize(): void;
|
|
33
42
|
destroy(): void;
|
|
34
43
|
refresh(): void;
|
|
44
|
+
insert(token: string): void;
|
|
35
45
|
hideToolbar(): void;
|
|
36
46
|
undo(): void;
|
|
37
47
|
removeKey(key: string): void;
|
|
38
48
|
remove(chip: HTMLElement): void;
|
|
39
49
|
private _chips;
|
|
50
|
+
private _fieldChips;
|
|
51
|
+
private _fillMenu;
|
|
52
|
+
private _menuItem;
|
|
40
53
|
private _chipCounts;
|
|
41
54
|
private _reportRemoved;
|
|
42
55
|
private _watchCommands;
|
|
@@ -45,14 +58,21 @@ export declare class ValueEmbedPlugin extends Plugin {
|
|
|
45
58
|
private _toChips;
|
|
46
59
|
private _keepsPasted;
|
|
47
60
|
private _splitText;
|
|
61
|
+
private _embedTokens;
|
|
62
|
+
private _tokenChip;
|
|
48
63
|
private _toTokenText;
|
|
49
64
|
private _createChip;
|
|
50
65
|
private _label;
|
|
66
|
+
private _createFieldChip;
|
|
67
|
+
private _labelField;
|
|
51
68
|
private _toTokens;
|
|
52
69
|
private _onKeydown;
|
|
53
70
|
private _onBeforeInput;
|
|
54
71
|
private _guardSelection;
|
|
72
|
+
private _removeAdjacentField;
|
|
73
|
+
private _onCut;
|
|
55
74
|
private _onCopy;
|
|
75
|
+
private _copyTokens;
|
|
56
76
|
private _plainText;
|
|
57
77
|
private _onClick;
|
|
58
78
|
private _onChip;
|
|
@@ -61,7 +81,11 @@ export declare class ValueEmbedPlugin extends Plugin {
|
|
|
61
81
|
private _changed;
|
|
62
82
|
private _selection;
|
|
63
83
|
private _range;
|
|
84
|
+
private _inBlocks;
|
|
85
|
+
private _edgeBlock;
|
|
64
86
|
private _chipsIn;
|
|
87
|
+
private _fieldChipsIn;
|
|
65
88
|
private _adjacentChip;
|
|
89
|
+
private _reach;
|
|
66
90
|
private _granularity;
|
|
67
91
|
}
|
|
@@ -55,6 +55,7 @@ export declare class ReportCanvasComponent implements OnChanges, AfterViewInit {
|
|
|
55
55
|
readonly valueKeysElsewhere: (text: ReportComponent) => ReadonlySet<string>;
|
|
56
56
|
private _reportData;
|
|
57
57
|
private _filterState;
|
|
58
|
+
private _filterOptions;
|
|
58
59
|
private _prompt;
|
|
59
60
|
private _message;
|
|
60
61
|
private _destroyRef;
|
|
@@ -69,6 +70,11 @@ export declare class ReportCanvasComponent implements OnChanges, AfterViewInit {
|
|
|
69
70
|
private _pageValues;
|
|
70
71
|
private _masterValues;
|
|
71
72
|
private _valuesRevision;
|
|
73
|
+
private _filterRevision;
|
|
74
|
+
private _optionNames;
|
|
75
|
+
private _optionNamesAsked;
|
|
76
|
+
private _groupOptions;
|
|
77
|
+
private _selectPicks;
|
|
72
78
|
private _valueKeysByLayer;
|
|
73
79
|
constructor();
|
|
74
80
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -84,6 +90,7 @@ export declare class ReportCanvasComponent implements OnChanges, AfterViewInit {
|
|
|
84
90
|
onComponentRemoved(componentId: number): void;
|
|
85
91
|
onTextSaved(text: ReportComponent, html: string): void;
|
|
86
92
|
openValueSettings(text: ReportComponent, key: string): void;
|
|
93
|
+
componentTokens(component: ReportComponent): TextTokenContext;
|
|
87
94
|
toggleMasterHidden(page: ReportPage): void;
|
|
88
95
|
selectPage(index: number): void;
|
|
89
96
|
addPage(): void;
|
|
@@ -103,6 +110,10 @@ export declare class ReportCanvasComponent implements OnChanges, AfterViewInit {
|
|
|
103
110
|
componentId: number;
|
|
104
111
|
} & Record<string, number>): void;
|
|
105
112
|
private _init;
|
|
113
|
+
private _watchFilters;
|
|
114
|
+
private _filterValuesKey;
|
|
115
|
+
private _forgetUnreadNames;
|
|
116
|
+
private _watchOptionNames;
|
|
106
117
|
private _valueLayer;
|
|
107
118
|
private _watchValues;
|
|
108
119
|
private _reloadIfChanged;
|
|
@@ -111,6 +122,7 @@ export declare class ReportCanvasComponent implements OnChanges, AfterViewInit {
|
|
|
111
122
|
private _shownValues;
|
|
112
123
|
private _loadValues;
|
|
113
124
|
private _tokenContext;
|
|
125
|
+
private _filterFields;
|
|
114
126
|
private _dropRemovedValueChips;
|
|
115
127
|
private _isMasterComponent;
|
|
116
128
|
private get _snapThreshold();
|
|
@@ -72,6 +72,7 @@ export declare class ReportComponentComponent implements OnInit, OnChanges {
|
|
|
72
72
|
ngOnInit(): void;
|
|
73
73
|
ngOnChanges(changes: SimpleChanges): void;
|
|
74
74
|
get filterKey(): string;
|
|
75
|
+
get shownTitle(): string;
|
|
75
76
|
get isText(): boolean;
|
|
76
77
|
editText(): void;
|
|
77
78
|
removeValue(key: string): void;
|
|
@@ -57,8 +57,8 @@ export declare class ReportData<T = any> {
|
|
|
57
57
|
}>)[], config?: RequestConfig): Observable<T>;
|
|
58
58
|
componentData(reportId: number, componentId: number, filters?: ResolvedFilterValue[], state?: ComponentDataState, isExport?: boolean, config?: RequestConfig): Observable<T>;
|
|
59
59
|
pageValues(reportId: number, pageId: number, filters?: ResolvedFilterValue[], isExport?: boolean, config?: RequestConfig, matchAnyGroupIds?: number[]): Observable<ReportPageValue[]>;
|
|
60
|
-
exportComponent(reportId: number, componentId: number, filters?: ResolvedFilterValue[], state?: ComponentDataState, config?: RequestConfig): Observable<ComponentExportResponse>;
|
|
61
|
-
exportReport(reportId: number, filters?: ResolvedFilterValue[], pageId?: number | null, frequency?: ChartGranularity | null, filterLines?: ReportExportLine[], states?: Record<number, ComponentDataState>, viewId?: number | null, viewChanged?: boolean, config?: RequestConfig): Observable<T>;
|
|
60
|
+
exportComponent(reportId: number, componentId: number, filters?: ResolvedFilterValue[], state?: ComponentDataState, title?: string, config?: RequestConfig): Observable<ComponentExportResponse>;
|
|
61
|
+
exportReport(reportId: number, filters?: ResolvedFilterValue[], pageId?: number | null, frequency?: ChartGranularity | null, filterLines?: ReportExportLine[], states?: Record<number, ComponentDataState>, viewId?: number | null, viewChanged?: boolean, titles?: Record<number, string>, config?: RequestConfig): Observable<T>;
|
|
62
62
|
filterOptions(reportId: number, filterId: number, config?: RequestConfig): Observable<T>;
|
|
63
63
|
componentSql(reportId: number, componentId: number, config?: RequestConfig): Observable<ReportComponentSql>;
|
|
64
64
|
componentColumns(reportId: number, componentId: number, config?: RequestConfig): Observable<T>;
|
|
@@ -7,11 +7,17 @@ import { FilterBarPlacement } from '../../interfaces/filter-bar-placement.type';
|
|
|
7
7
|
import { FilterComponentToggleState } from '../../interfaces/filter-component-toggle-state.interface';
|
|
8
8
|
import { FilterSettingsOption } from '../../interfaces/filter-settings-option.interface';
|
|
9
9
|
import { FilterTypeSelectState } from '../../interfaces/filter-type-select-state.interface';
|
|
10
|
+
import { TextTokenContext } from '../../text';
|
|
10
11
|
import * as i0 from "@angular/core";
|
|
11
12
|
export interface ComponentSettingsResult {
|
|
12
13
|
settings?: ComponentSettings;
|
|
13
14
|
deleted?: boolean;
|
|
14
15
|
}
|
|
16
|
+
export interface ComponentSettingsDialogData {
|
|
17
|
+
report: Report;
|
|
18
|
+
component: ReportComponent;
|
|
19
|
+
tokens: TextTokenContext;
|
|
20
|
+
}
|
|
15
21
|
interface ComponentSettingsResponse {
|
|
16
22
|
id: number;
|
|
17
23
|
config?: Record<string, unknown> | null;
|
|
@@ -31,7 +37,10 @@ export declare class ComponentSettingsComponent implements OnInit {
|
|
|
31
37
|
component: ReportComponent;
|
|
32
38
|
report: Report;
|
|
33
39
|
selectedTab: string;
|
|
34
|
-
title: string
|
|
40
|
+
readonly title: import("@angular/core").WritableSignal<string>;
|
|
41
|
+
readonly titleFields: import("@angular/core").Signal<import("../../text").TextField[]>;
|
|
42
|
+
readonly titleShownAs: import("@angular/core").Signal<string>;
|
|
43
|
+
readonly heading: import("@angular/core").Signal<string>;
|
|
35
44
|
paddingTop: number | string;
|
|
36
45
|
paddingRight: number | string;
|
|
37
46
|
paddingBottom: number | string;
|
|
@@ -72,6 +81,7 @@ export declare class ComponentSettingsComponent implements OnInit {
|
|
|
72
81
|
private _pickedTypes;
|
|
73
82
|
private readonly _typeLabels;
|
|
74
83
|
private readonly _data;
|
|
84
|
+
private readonly _titleInput;
|
|
75
85
|
private readonly _dialogRef;
|
|
76
86
|
private readonly _reportData;
|
|
77
87
|
private readonly _message;
|
|
@@ -80,6 +90,7 @@ export declare class ComponentSettingsComponent implements OnInit {
|
|
|
80
90
|
ngOnInit(): void;
|
|
81
91
|
typeLabel(type: ReportFilterType): string;
|
|
82
92
|
delete(): void;
|
|
93
|
+
insertField(field: string): void;
|
|
83
94
|
validateTarget: (control: AbstractControl) => void;
|
|
84
95
|
save: () => Observable<ComponentSettingsResponse>;
|
|
85
96
|
setType(row: FilterRow, type: ReportFilterType): void;
|
|
@@ -89,6 +100,7 @@ export declare class ComponentSettingsComponent implements OnInit {
|
|
|
89
100
|
private _applyValueLevel;
|
|
90
101
|
private _addFilter;
|
|
91
102
|
private _patchRow;
|
|
103
|
+
private _shownTitle;
|
|
92
104
|
private _formulaLine;
|
|
93
105
|
private _dependentsNote;
|
|
94
106
|
private _layerValues;
|
|
@@ -4,7 +4,7 @@ import { ReportExportSnapshot } from '../interfaces/report-export-snapshot.inter
|
|
|
4
4
|
import { ComponentData, ListColumn, Report, ReportComponent, ReportFormatContext, ReportLocaleTag, ReportPage } from '../interfaces/report.interface';
|
|
5
5
|
import { KpiCardView } from '../kpi-card';
|
|
6
6
|
import { ListOutputColumn } from '../list-config';
|
|
7
|
-
import { TextTokenContext, TextValue } from '../text';
|
|
7
|
+
import { TextFilterField, TextTokenContext, TextValue } from '../text';
|
|
8
8
|
import * as i0 from "@angular/core";
|
|
9
9
|
export interface CollectedComponent {
|
|
10
10
|
component: ReportComponent;
|
|
@@ -25,9 +25,15 @@ export interface CollectedReport {
|
|
|
25
25
|
masterValues: Record<string, TextValue>;
|
|
26
26
|
masterFailedValues: string[];
|
|
27
27
|
filterSummary: string[];
|
|
28
|
+
filterFields: Record<number, TextFilterField>;
|
|
28
29
|
contextLines: string[];
|
|
29
30
|
formatContext: ReportFormatContext;
|
|
30
31
|
}
|
|
32
|
+
export interface ReportExportWording {
|
|
33
|
+
lines: ReportExportLine[];
|
|
34
|
+
filterFields: Record<number, TextFilterField>;
|
|
35
|
+
titles: Record<number, string>;
|
|
36
|
+
}
|
|
31
37
|
export interface TextOverflow {
|
|
32
38
|
componentId: number;
|
|
33
39
|
page: string;
|
|
@@ -61,7 +67,7 @@ export interface KpiExportParts {
|
|
|
61
67
|
}
|
|
62
68
|
export declare const HEADER_FOOTER_NAME = "Header & footer";
|
|
63
69
|
export declare function emptyLabel(item: CollectedComponent): string;
|
|
64
|
-
export declare function exportTitle(component: ReportComponent, search?: string | null, crumbs?: readonly string[] | null): string;
|
|
70
|
+
export declare function exportTitle(component: ReportComponent, tokens: TextTokenContext, search?: string | null, crumbs?: readonly string[] | null): string;
|
|
65
71
|
export declare function isFailed(item: CollectedComponent): boolean;
|
|
66
72
|
export declare function textOverflow(component: ReportComponent, page: string, tokens: TextTokenContext): TextOverflow;
|
|
67
73
|
export declare function coverLines(collected: CollectedReport): string[];
|
|
@@ -79,7 +85,7 @@ export declare function scaledKpiHeights(heights: KpiExportHeights, scale: numbe
|
|
|
79
85
|
export declare function kpiExportHeight(view: KpiCardView, parts: KpiExportParts, heights: KpiExportHeights): number;
|
|
80
86
|
export declare function moreRowsNotice(remaining: number): string;
|
|
81
87
|
export declare function failedPageNames(collected: CollectedReport): string[];
|
|
82
|
-
export declare function coverFilterLines(snapshot: ReportExportSnapshot, lines: readonly ReportExportLine[], pages: readonly Pick<CollectedPage, 'components'>[]): string[];
|
|
88
|
+
export declare function coverFilterLines(snapshot: ReportExportSnapshot, lines: readonly ReportExportLine[], pages: readonly Pick<CollectedPage, 'components'>[], titles?: Readonly<Record<number, string>>): string[];
|
|
83
89
|
export declare function isExportSlot(component: ReportComponent): boolean;
|
|
84
90
|
export declare class ReportExportCollectorService {
|
|
85
91
|
private _reportData;
|
|
@@ -88,7 +94,8 @@ export declare class ReportExportCollectorService {
|
|
|
88
94
|
private _views;
|
|
89
95
|
collect(report: Report, listRows: number): Observable<CollectedReport>;
|
|
90
96
|
snapshot(report: Report): ReportExportSnapshot;
|
|
91
|
-
|
|
97
|
+
exportWording(report: Report, snapshot: ReportExportSnapshot, pageId?: number | null): Observable<ReportExportWording>;
|
|
98
|
+
private _exportTitles;
|
|
92
99
|
private _jobs;
|
|
93
100
|
private _valuesJobs;
|
|
94
101
|
private _runJob;
|
|
@@ -98,7 +105,8 @@ export declare class ReportExportCollectorService {
|
|
|
98
105
|
private _pageValues;
|
|
99
106
|
private _file;
|
|
100
107
|
private _contextLines;
|
|
101
|
-
private
|
|
108
|
+
private _filterFields;
|
|
109
|
+
private _pickNamer;
|
|
102
110
|
static ɵfac: i0.ɵɵFactoryDeclaration<ReportExportCollectorService, never>;
|
|
103
111
|
static ɵprov: i0.ɵɵInjectableDeclaration<ReportExportCollectorService>;
|
|
104
112
|
}
|
|
@@ -11,6 +11,9 @@ export declare const MATCH_ANY_CHIP = "Match: any filter";
|
|
|
11
11
|
export declare const MATCH_ANY_LINE = "Filters in the report bar: match any";
|
|
12
12
|
export declare const MATCH_ALL_CHIP = "Match: all filters";
|
|
13
13
|
export declare function filterLineText(group: Pick<ReportFilterGroup, 'label' | 'level'>, value: FilterGroupValue | null | undefined, context: ReportFilterLineContext, form: ReportFilterLineForm): string | null;
|
|
14
|
+
export declare function filterChipValueText(value: FilterGroupValue | null | undefined, context: ReportFilterLineContext): string | null;
|
|
15
|
+
export declare function excludes(value: FilterGroupValue | null | undefined): boolean;
|
|
16
|
+
export declare function valuePicks(value: FilterGroupValue | null | undefined): unknown[];
|
|
14
17
|
export declare function matchLineText(match: ReportFilterMatch | null | undefined, form: ReportFilterLineForm): string | null;
|
|
15
18
|
export declare function drillLineText(component: Pick<ReportComponent, 'title'>, path: readonly ReportDrillStep[], formatContext: Pick<ReportFormatContext, 'locale'>): string;
|
|
16
19
|
export declare function viewLineText(view: Pick<ReportViewSummary, 'name' | 'shared'> | null | undefined, changed: boolean): string | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FilterGroupValue, ReportFilterGroup, ReportLocaleTag } from './interfaces/report.interface';
|
|
2
|
+
import { TextFilterField } from './text';
|
|
3
|
+
export declare function layerFilterGroups(groups: ReportFilterGroup[], pageId: number | null): ReportFilterGroup[];
|
|
4
|
+
export declare function layerFilterFields(fields: Record<number, TextFilterField>, groups: ReportFilterGroup[], pageId: number | null): Record<number, TextFilterField>;
|
|
5
|
+
export declare function filterFieldName(group: Pick<ReportFilterGroup, 'label' | 'name'>): string;
|
|
6
|
+
export declare function textFilterFields(groups: ReportFilterGroup[], value: (groupId: number) => FilterGroupValue | null | undefined, locale: ReportLocaleTag, names: (group: ReportFilterGroup, values: unknown[]) => readonly string[] | null | undefined): Record<number, TextFilterField>;
|
|
7
|
+
export declare function filterFieldText(group: Pick<ReportFilterGroup, 'type'>, value: FilterGroupValue | null | undefined, locale: ReportLocaleTag, names?: readonly string[]): string;
|
|
8
|
+
export declare function sameFilterFields(a: Record<number, TextFilterField> | undefined, b: Record<number, TextFilterField> | undefined): boolean;
|
package/app/reports/format.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export declare function formatDayWindow(meta: {
|
|
|
62
62
|
}, timezone: string, locale: ReportLocaleTag): string;
|
|
63
63
|
export declare function isReadOnOneDay(comparison: ComponentComparison | null | undefined): boolean;
|
|
64
64
|
export declare function formatReadingDay(window: Pick<ComparisonWindow, 'end'>, locale: ReportLocaleTag, lead?: boolean): string;
|
|
65
|
+
export declare function writeDayRange(first: Date, last: Date, locale: ReportLocaleTag, options: Intl.DateTimeFormatOptions): string;
|
|
65
66
|
export declare function localeName(tag: ReportLocaleTag): string;
|
|
66
67
|
export declare function currencyName(code: ReportCurrencyCode): string;
|
|
67
68
|
export declare function comparisonOffsetLabel(offset: ComparisonOffset): string;
|
|
@@ -17,6 +17,15 @@ export declare function itemRangeName(name: string, end: ItemRangeEnd): string;
|
|
|
17
17
|
export declare function groupItemName(group: Pick<ReportFilterGroup, 'id'>): string;
|
|
18
18
|
export declare function loadGroupOptions(group: ReportFilterGroup, reportData: ReportData, reportId: number): Observable<ReportFilterOptionPair[]>;
|
|
19
19
|
export declare function resolveOptionValues(options$: Observable<ReportFilterOptionPair[]>, values: unknown[], label?: (value: unknown) => string | null): Observable<ReportFilterOptionPair[]>;
|
|
20
|
+
export type GroupOptionsReader = (group: ReportFilterGroup, reportId: number) => Observable<{
|
|
21
|
+
name: string;
|
|
22
|
+
value: unknown;
|
|
23
|
+
}[]>;
|
|
24
|
+
export declare function groupOptionsReader(reportData: ReportData): GroupOptionsReader;
|
|
25
|
+
export declare function pickedOptionNames(options$: Observable<{
|
|
26
|
+
name: string;
|
|
27
|
+
value: unknown;
|
|
28
|
+
}[]>, values: unknown[], label?: (value: unknown) => string | null): Observable<string[] | null>;
|
|
20
29
|
export declare function matchOptions(options$: Observable<ReportFilterOptionPair[]>, keyword?: string): Observable<ReportFilterOptionPair[]>;
|
|
21
30
|
export declare const OPTIONS_TRUNCATED_NOTE = "Showing the first 500. Type to narrow.";
|
|
22
31
|
export declare const OPTIONS_FAILED_NOTE = "Could not load the list.";
|
package/app/reports/text.d.ts
CHANGED
|
@@ -14,14 +14,22 @@ export interface TextValue {
|
|
|
14
14
|
loading?: boolean;
|
|
15
15
|
reads?: string[];
|
|
16
16
|
}
|
|
17
|
+
export interface TextFilterField {
|
|
18
|
+
name: string;
|
|
19
|
+
order: number;
|
|
20
|
+
text?: string;
|
|
21
|
+
loading?: boolean;
|
|
22
|
+
}
|
|
17
23
|
export interface TextTokenContext {
|
|
18
24
|
pageNumber: number;
|
|
19
25
|
pageName: string;
|
|
20
26
|
reportName: string;
|
|
21
27
|
values?: Record<string, TextValue>;
|
|
28
|
+
filters?: Record<number, TextFilterField>;
|
|
22
29
|
valuePageId?: number | null;
|
|
23
30
|
}
|
|
24
31
|
export declare const VALUE_TOKEN_PATTERN: RegExp;
|
|
32
|
+
export declare const FIELD_TOKEN_PATTERN: RegExp;
|
|
25
33
|
export declare const VALUE_EMPTY_TEXT = "\u2014";
|
|
26
34
|
export declare const VALUE_LOADING_TEXT = "\u2026";
|
|
27
35
|
export declare function valueToken(key: string): string;
|
|
@@ -69,7 +77,15 @@ export type TextBlock = {
|
|
|
69
77
|
kind: 'table';
|
|
70
78
|
table: TextTable;
|
|
71
79
|
};
|
|
80
|
+
export interface TextField {
|
|
81
|
+
field: string;
|
|
82
|
+
name: string;
|
|
83
|
+
}
|
|
84
|
+
export declare function textFields(context: TextTokenContext): TextField[];
|
|
85
|
+
export declare function fieldToken(field: string): string;
|
|
72
86
|
export declare function fillTextTokens(html: string, context: TextTokenContext): string;
|
|
87
|
+
export declare function fillTitleTokens(title: string | null | undefined, context: TextTokenContext): string;
|
|
88
|
+
export declare function fieldText(field: string, context: TextTokenContext): string;
|
|
73
89
|
export declare function textBlocks(html: string, context: TextTokenContext): TextBlock[];
|
|
74
90
|
export declare function textParagraphs(html: string, context: TextTokenContext): TextParagraph[];
|
|
75
91
|
export declare function blockParagraphs(blocks: TextBlock[]): TextParagraph[];
|