react-semaphor 0.1.543 → 0.1.545
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/dist/activity/index.js +73 -0
- package/dist/analytics-protocol/index.js +35 -34
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +56 -52
- package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
- package/dist/chunks/{apply-dashboard-operations-CG9S7MGt.js → apply-dashboard-operations-CZEMsx8E.js} +778 -958
- package/dist/chunks/{assistant-chat-BFMRUYoB.js → assistant-chat-D7sWTypJ.js} +26 -27
- package/dist/chunks/calendar-day-equality-dvoQp1xW.js +410 -0
- package/dist/chunks/{comparison-window-caption-Bv18samq.js → comparison-window-caption-D4E6IHPD.js} +462 -456
- package/dist/chunks/{custom-visual-inputs-DUtpYZOk.js → custom-visual-inputs-DLCD9Y5V.js} +8 -2
- package/dist/chunks/dashboard-B1tMju0u.js +14 -0
- package/dist/chunks/dashboard-briefing-launcher-CePgIu0Z.js +3720 -0
- package/dist/chunks/{dashboard-controls-UGpjOM2k.js → dashboard-controls-Cq05n3e0.js} +526 -521
- package/dist/chunks/{dashboard-json-DG8dz0eX.js → dashboard-json-CoYRPqxx.js} +3 -3
- package/dist/chunks/document-dashboard-inputs-BesAHZvB.js +3112 -0
- package/dist/chunks/{edit-dashboard-visual-CDpA4y5e.js → edit-dashboard-visual-JPtNfJRb.js} +5628 -5618
- package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
- package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-ff7osJr7.js} +1 -1
- package/dist/chunks/{index-l5LclZvs.js → index-DRWiuqyd.js} +378 -332
- package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-DnCyRXJE.js} +13 -13
- package/dist/chunks/{numeric-presentation-F_-H6VAw.js → numeric-presentation-7X_IrD58.js} +2572 -2573
- package/dist/chunks/{pivot-result-lifecycle-DupbRk-R.js → pivot-result-lifecycle-DM4CyGKs.js} +285 -393
- package/dist/chunks/{raw-temporal-presentation-D-azM_98.js → raw-temporal-presentation-C3mUgnEx.js} +2 -2
- package/dist/chunks/{zoned-wall-clock-MulfA26h.js → relative-date-label-Bk2j94pA.js} +21 -64
- package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
- package/dist/chunks/{report-preferences-dialog-CPwRwEJx.js → report-preferences-dialog-DUtuUL_5.js} +640 -612
- package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +9415 -0
- package/dist/chunks/{saved-dashboard-context-BKvMfRfC.js → saved-dashboard-context-LrF_kW0l.js} +183 -211
- package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
- package/dist/chunks/{semaphor-ready-indicator-CN2AHm2x.js → semaphor-ready-indicator-BxF96Yhv.js} +46859 -47102
- package/dist/chunks/shelf-drop-preview-context-CNaM_Gmh.js +2469 -0
- package/dist/chunks/{switch-C3jLxlG0.js → switch-uDtPgQlQ.js} +44 -45
- package/dist/chunks/{table-export-sheet-BDRXLLdq.js → table-export-sheet-YzMioA7Y.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BnclfB2k.js → use-create-flow-overlay-state-CjB7ig1o.js} +153 -164
- package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +553 -541
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.js +241 -227
- package/dist/index.js +354 -331
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/activity.d.ts +2 -0
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +33 -6
- package/dist/types/briefings/index.d.ts +6 -5
- package/dist/types/components/activity/activity-bell.d.ts +11 -0
- package/dist/types/components/activity/activity-instance.d.ts +50 -0
- package/dist/types/components/activity/activity-notices.d.ts +7 -0
- package/dist/types/components/activity/activity-provider.d.ts +21 -0
- package/dist/types/components/activity/activity-types.d.ts +177 -0
- package/dist/types/components/activity/index.d.ts +6 -0
- package/dist/types/components/activity/use-activity.d.ts +20 -0
- package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
- package/dist/types/components/briefings/briefing-author.d.ts +14 -12
- package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +5 -0
- package/dist/types/components/briefings/use-briefing-run-detail.d.ts +34 -0
- package/dist/types/components/index.d.ts +1 -4
- package/dist/types/components/surfboard/filter/types.d.ts +0 -14
- package/dist/types/lib/activity-identity.d.ts +21 -0
- package/dist/types/lib/api/exports-api.d.ts +4 -4
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +35 -1
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +199 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
- package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
- package/dist/types/lib/download-pdf.d.ts +75 -1
- package/dist/types/lib/hooks/index.d.ts +1 -3
- package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
- package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
- package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
- package/dist/types/lib/stores/dashboard-store.d.ts +39 -55
- package/dist/types/lib/stores/editor-store.d.ts +0 -3
- package/dist/types/lib/types/common-types.d.ts +21 -6
- package/dist/types/shared/activity/activity-contract.d.ts +84 -0
- package/dist/types/shared/activity/index.d.ts +5 -0
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -11
- package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +6 -0
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +12 -12
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +92 -0
- package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
- package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/format-utils/export-policy.d.ts +12 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
- package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
- package/package.json +6 -2
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
- package/dist/chunks/dashboard-B9mKTJoy.js +0 -14
- package/dist/chunks/dashboard-briefing-launcher-Bdmry_oG.js +0 -4248
- package/dist/chunks/document-dashboard-inputs-OwqCbrVp.js +0 -8087
- package/dist/chunks/document-sheet-utils-BTb3VZxV.js +0 -3619
- package/dist/chunks/shelf-drop-preview-context-BGl_rxcW.js +0 -2407
- package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
- package/dist/types/components/briefings/briefing-author/run-ui.d.ts +0 -81
- package/dist/types/components/briefings/use-briefing-run-polling.d.ts +0 -34
- package/dist/types/components/notifications/export-notification-item.d.ts +0 -24
- package/dist/types/components/notifications/export-notification-list.d.ts +0 -8
- package/dist/types/components/notifications/index.d.ts +0 -3
- package/dist/types/components/notifications/notification-bell.d.ts +0 -13
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
- package/dist/types/lib/exports/bounded-request.d.ts +0 -12
- package/dist/types/lib/hooks/use-export-polling.d.ts +0 -32
- package/dist/types/lib/hooks/use-export-recovery.d.ts +0 -11
- package/dist/types/lib/stores/export-store.d.ts +0 -62
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { DashboardInputValues, TDashboard } from '../types/common-types.js';
|
|
2
2
|
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
3
3
|
import { CalendarContext } from '../../shared/report-runtime-context/index.js';
|
|
4
|
+
import { HostFilterValue } from '../../shared/dashboard-authoring/filter-model/filter-values.js';
|
|
4
5
|
import { ViewerTableSettings } from '../../shared/dashboard-viewer/table-settings.js';
|
|
5
6
|
import { Bookmark, BookmarkState } from '../../shared/dashboard-viewer/viewer-contract.js';
|
|
6
7
|
/** The report runtime's calendar, as filter defaults read it. */
|
|
7
8
|
/** The viewer's report calendar, from report preferences (card query assembly CQ-D8). */
|
|
8
9
|
export type ViewerCalendar = CalendarContext;
|
|
9
|
-
|
|
10
|
-
export type HostFilterValue = TFilterValue | {
|
|
11
|
-
readonly filterId: string;
|
|
12
|
-
readonly values: string[] | number[];
|
|
13
|
-
};
|
|
10
|
+
export type { HostFilterValue };
|
|
14
11
|
/** Host app defaults, exactly as hydration receives them today (embed props). */
|
|
15
12
|
export type HostDefaults = {
|
|
16
13
|
readonly filterValues?: readonly HostFilterValue[];
|
|
@@ -19,7 +16,11 @@ export type HostDefaults = {
|
|
|
19
16
|
readonly selectedSheetId?: string;
|
|
20
17
|
};
|
|
21
18
|
export type ViewerBaseline = {
|
|
22
|
-
|
|
19
|
+
/**
|
|
20
|
+
* The host's filter defaults as input slots (M5 `hostFilterValuesToSlots`).
|
|
21
|
+
* Authored defaults are not seeded: input resolution hydrates them.
|
|
22
|
+
*/
|
|
23
|
+
readonly hostInputValues: DashboardInputValues;
|
|
23
24
|
/** Passed to `setDashboardWithFilterValues` as `runtimeOverrides`. */
|
|
24
25
|
readonly controlOverrides: Readonly<Record<string, unknown>> | undefined;
|
|
25
26
|
/** The host's sheet when valid, else the author's first sheet. */
|
|
@@ -55,9 +56,10 @@ export type RememberedSettingsWrite = {
|
|
|
55
56
|
};
|
|
56
57
|
/** The store values a view consists of. */
|
|
57
58
|
export type ViewerValues = {
|
|
58
|
-
|
|
59
|
+
/** Runtime-only values no filter defines (one filter model SPEC 5.8). */
|
|
60
|
+
readonly adHocFilterValues: readonly TFilterValue[];
|
|
59
61
|
readonly controlOverrides: Readonly<Record<string, unknown>> | undefined;
|
|
60
|
-
/** Runtime input slots: a bookmark's slots
|
|
62
|
+
/** Runtime input slots: the host's defaults with a bookmark's slots over them. Never completed as `cleared`. */
|
|
61
63
|
readonly dashboardInputValues: DashboardInputValues;
|
|
62
64
|
/** Card inline filter values when they differ from the cards' defaults. Absent: the defaults. */
|
|
63
65
|
readonly inlineFilterValuesMap?: Readonly<Record<string, readonly TFilterValue[]>>;
|
|
@@ -90,7 +92,7 @@ export type ViewerLiveState = {
|
|
|
90
92
|
readonly previousDashboard: TDashboard;
|
|
91
93
|
/** The baseline of the previous hydration; a changed host prop wins over the live value. */
|
|
92
94
|
readonly previousBaseline: ViewerBaseline | null;
|
|
93
|
-
readonly
|
|
95
|
+
readonly adHocFilterValues: readonly TFilterValue[];
|
|
94
96
|
/**
|
|
95
97
|
* Live control values, flattened. `undefined` when the control contract
|
|
96
98
|
* changed: the baseline's control defaults apply again.
|
|
@@ -44,7 +44,41 @@ export type VisualPdfParams = {
|
|
|
44
44
|
presentationExecutionSnapshot: PresentationExecutionSnapshot;
|
|
45
45
|
timezone?: string;
|
|
46
46
|
};
|
|
47
|
-
type
|
|
47
|
+
type DashboardPdfParams = {
|
|
48
|
+
/** The viewer's table settings captured at the click (PLAN B20). */
|
|
49
|
+
viewerTableSettings?: Readonly<Record<string, ViewerTableSettings>>;
|
|
50
|
+
authToken: AuthToken;
|
|
51
|
+
theme: string;
|
|
52
|
+
filterValues: TFilterValue[];
|
|
53
|
+
defaultControlValues?: Record<string, unknown>;
|
|
54
|
+
controlDefinitions?: ControlDefinition[];
|
|
55
|
+
cardControlDefinitions?: ControlDefinition[];
|
|
56
|
+
controlBindings?: ControlBinding[];
|
|
57
|
+
dashboardId: string;
|
|
58
|
+
fileName: string;
|
|
59
|
+
password?: string;
|
|
60
|
+
cardTitle?: string;
|
|
61
|
+
filterLine?: string;
|
|
62
|
+
timezone?: string;
|
|
63
|
+
dashboardTitle?: string;
|
|
64
|
+
selectedSheetId?: string;
|
|
65
|
+
sheetSelection?: 'current' | 'all';
|
|
66
|
+
visualId?: string;
|
|
67
|
+
frameId?: string;
|
|
68
|
+
tableMode?: boolean;
|
|
69
|
+
pdfMode?: 'document';
|
|
70
|
+
documentSheetId?: string;
|
|
71
|
+
dashboardInputExecutionSnapshot?: DashboardInputExecutionSnapshot;
|
|
72
|
+
printInputCapture?: PrintInputCapture;
|
|
73
|
+
presentationExecutionSnapshot: PresentationExecutionSnapshot;
|
|
74
|
+
documentInputValues?: DocumentInputRuntimeValues;
|
|
75
|
+
cardType?: string;
|
|
76
|
+
pageSize?: string;
|
|
77
|
+
orientation?: string;
|
|
78
|
+
expandedState?: Record<string, boolean>;
|
|
79
|
+
wideTableStrategy?: 'auto' | 'fit' | 'horizontal_paginate';
|
|
80
|
+
};
|
|
81
|
+
export type VisualPrintRuntimeOverrides = {
|
|
48
82
|
filterValues?: TFilterValue[];
|
|
49
83
|
/** Replaces the store's viewer table settings (`{}` where the authored table applies, such as the editor preview). */
|
|
50
84
|
viewerTableSettings?: Readonly<Record<string, ViewerTableSettings>>;
|
|
@@ -73,6 +107,46 @@ export declare function appendControlContractParams(urlParams: URLSearchParams,
|
|
|
73
107
|
cardControlDefinitions?: ControlDefinition[];
|
|
74
108
|
controlBindings?: ControlBinding[];
|
|
75
109
|
}): void;
|
|
110
|
+
/**
|
|
111
|
+
* The render state the print view needs to reproduce what the user saw. It is
|
|
112
|
+
* posted with the presentation snapshot and stored server-side behind the
|
|
113
|
+
* snapshot reference; it never travels in a URL. Key names match the print
|
|
114
|
+
* view's props contract in the app (`PrintViewState`).
|
|
115
|
+
*/
|
|
116
|
+
type PrintViewStateInput = Pick<DashboardPdfParams, 'filterValues' | 'defaultControlValues' | 'controlDefinitions' | 'cardControlDefinitions' | 'controlBindings' | 'documentInputValues' | 'dashboardInputExecutionSnapshot' | 'printInputCapture' | 'expandedState' | 'viewerTableSettings'>;
|
|
117
|
+
export declare function buildPrintViewState(params: PrintViewStateInput): {
|
|
118
|
+
viewerTableSettings: Readonly<Record<string, ViewerTableSettings>>;
|
|
119
|
+
expandedState?: Record<string, boolean> | undefined;
|
|
120
|
+
printInputCapture?: PrintInputCapture | undefined;
|
|
121
|
+
dashboardInputExecutionSnapshot?: DashboardInputExecutionSnapshot | undefined;
|
|
122
|
+
documentInputValues?: DocumentInputRuntimeValues | undefined;
|
|
123
|
+
controlBindings?: ControlBinding[] | undefined;
|
|
124
|
+
cardControlDefinitions?: ControlDefinition[] | undefined;
|
|
125
|
+
controlDefinitions?: ControlDefinition[] | undefined;
|
|
126
|
+
filterValues: TFilterValue[];
|
|
127
|
+
controlValues: Record<string, unknown>;
|
|
128
|
+
};
|
|
129
|
+
/** A rendered export the server refused or could not make, with its error code when it sent one. */
|
|
130
|
+
export declare class RenderedExportError extends Error {
|
|
131
|
+
readonly code: string | null;
|
|
132
|
+
constructor(message: string, code: string | null);
|
|
133
|
+
}
|
|
134
|
+
export type PrintViewStateBody = ReturnType<typeof buildPrintViewState>;
|
|
135
|
+
/**
|
|
136
|
+
* The one transport for every file the renderer draws from the print view
|
|
137
|
+
* (PDF and PNG, PNG exports SPEC §3.1): the view state goes into a print
|
|
138
|
+
* render record, `query` (identity and options) and the record reference go
|
|
139
|
+
* to `GET /v1/pdf`, and the returned link is saved as `fileName`. Undefined
|
|
140
|
+
* when another rendered export is running in this dashboard; nothing is sent.
|
|
141
|
+
*/
|
|
142
|
+
export declare function requestRenderedFile(apiServiceUrl: string, request: {
|
|
143
|
+
authToken: AuthToken;
|
|
144
|
+
viewState: PrintViewStateBody;
|
|
145
|
+
presentationExecutionSnapshot: PresentationExecutionSnapshot;
|
|
146
|
+
password?: string;
|
|
147
|
+
query: URLSearchParams;
|
|
148
|
+
fileName: string;
|
|
149
|
+
}): Promise<PdfDownloadResponse | undefined>;
|
|
76
150
|
export declare function getDashboardParamsForPrint(authToken: AuthToken | undefined, options?: {
|
|
77
151
|
selectedSheetId?: string | null;
|
|
78
152
|
sheetSelection?: 'current' | 'all';
|
|
@@ -6,8 +6,6 @@ import { useDebounce } from './use-debounce.js';
|
|
|
6
6
|
import { useDebouncedEditorValue } from './use-debounced-editor-value.js';
|
|
7
7
|
import { useClickOutside } from './use-click-outside.js';
|
|
8
8
|
import { useStableValue, rowsEqual } from './use-stable-value.js';
|
|
9
|
-
import { useExportPolling } from './use-export-polling.js';
|
|
10
|
-
import { useExportRecovery } from './use-export-recovery.js';
|
|
11
9
|
import { useCalendarContext, useResolvedDateStyle, useResolvedDateTimeDateStyle, useResolvedDateTimeTimeStyle, useResolvedDefaultCurrency, useResolvedValueFormatLocale, useReportPreferenceSources, useResolvedValueFormatPreferences, useTimezone, useWeekStart } from './use-calendar-context.js';
|
|
12
10
|
import { useValueFormatPreferences } from './use-value-format-preferences.js';
|
|
13
|
-
export { useDashboard, useCard, useDataColumns, useAddNewFrame, useDebounce, useDebouncedEditorValue, useClickOutside, useStableValue, rowsEqual,
|
|
11
|
+
export { useDashboard, useCard, useDataColumns, useAddNewFrame, useDebounce, useDebouncedEditorValue, useClickOutside, useStableValue, rowsEqual, useCalendarContext, useResolvedDateStyle, useResolvedDateTimeDateStyle, useResolvedDateTimeTimeStyle, useResolvedDefaultCurrency, useResolvedValueFormatLocale, useReportPreferenceSources, useResolvedValueFormatPreferences, useTimezone, useWeekStart, useValueFormatPreferences, };
|
|
@@ -4,6 +4,11 @@ type UseDateFilterOptions = FilterStorageOptions;
|
|
|
4
4
|
type DateFilterChangeOptions = {
|
|
5
5
|
temporalPrecision?: TemporalPrecision;
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* The public hook: the filter resolves through the filter model, so any
|
|
9
|
+
* dashboard filter works, and its value is its input's slot on the current
|
|
10
|
+
* tab (one filter model SPEC 4.7).
|
|
11
|
+
*/
|
|
7
12
|
export declare function useDateFilterHook(filterId: string): {
|
|
8
13
|
records: Record<string, unknown>[] | undefined;
|
|
9
14
|
isLoading: boolean;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { TFilter, TFilterValue, TSelectedRecord, FilterStorageOptions } from '../../components/surfboard/filter/types.js';
|
|
2
2
|
import { FilterMode } from '../filter-values/filter-mode.js';
|
|
3
|
+
/**
|
|
4
|
+
* The public hook: the filter resolves through the filter model, so any
|
|
5
|
+
* dashboard filter works, and its value is its input's slot on the current
|
|
6
|
+
* tab (one filter model SPEC 4.7).
|
|
7
|
+
*/
|
|
3
8
|
export declare function useTextFilterHook(filterId: string): {
|
|
4
9
|
isLoading: boolean;
|
|
5
10
|
isFetching: boolean;
|
|
@@ -13,8 +13,9 @@ export declare const MATRIX_EXPORT_CONTENT: readonly [{
|
|
|
13
13
|
/**
|
|
14
14
|
* What a Matrix download or attachment may be: PDF, CSV and Excel for the
|
|
15
15
|
* layout, CSV and Excel for Flat content, which is a data file only
|
|
16
|
-
* (XL-D16).
|
|
17
|
-
*
|
|
16
|
+
* (XL-D16). A PNG is the Matrix as it opens, so it belongs to the current
|
|
17
|
+
* layout only (PNG exports PN-SI-9). Downloads off leaves PDF and PNG of the
|
|
18
|
+
* layout. One policy for the export dialog and Briefing attachments.
|
|
18
19
|
*/
|
|
19
20
|
export declare function matrixDeliveryOptions(allowDownload?: boolean, content?: MatrixExportContent): {
|
|
20
21
|
contents: ({
|
|
@@ -27,7 +28,7 @@ export declare function matrixDeliveryOptions(allowDownload?: boolean, content?:
|
|
|
27
28
|
readonly value: "flat";
|
|
28
29
|
readonly label: "Flat aggregate table";
|
|
29
30
|
})[];
|
|
30
|
-
formats:
|
|
31
|
+
formats: ("csv" | "xlsx" | "pdf" | "png")[];
|
|
31
32
|
};
|
|
32
33
|
/** Matrix delivery requires an effective capture, never resident cells. */
|
|
33
|
-
export declare function resolveMatrixExportEngine(card: TCard | null | undefined, hasContext: boolean): "
|
|
34
|
+
export declare function resolveMatrixExportEngine(card: TCard | null | undefined, hasContext: boolean): "window" | "unavailable" | "ordinary";
|
|
@@ -758,4 +758,8 @@ export declare function buildMatrixDeliveryPayload(input: {
|
|
|
758
758
|
/** A Matrix data file request (CSV or Excel) for the direct path or a job. */
|
|
759
759
|
export type MatrixFileExportRequest = ReturnType<typeof buildMatrixDeliveryPayload> & {
|
|
760
760
|
format: ExportFileFormat;
|
|
761
|
+
/** One logical export (BA-D17): the direct attempt, its fallback and Run in background share it. */
|
|
762
|
+
exportRequestId: string;
|
|
763
|
+
/** 'background' skips the direct attempt (Run in background, BA-D11). */
|
|
764
|
+
delivery?: 'direct' | 'background';
|
|
761
765
|
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { TFilterValue } from '../../components/surfboard/filter/types.js';
|
|
2
|
+
import { CardViewStateMap } from '../dashboard-view-state/index.js';
|
|
3
|
+
import { DashboardInputValues, ResolvedDashboardInputContext, TCard, TDashboard } from '../types/common-types.js';
|
|
4
|
+
import { PaginationConfig } from '../types/explorer-types.js';
|
|
5
|
+
import { ResolvedPrimaryDateField, SemanticExecutionPayload } from '../types/semantic-runtime-types.js';
|
|
6
|
+
import { TransientInputContext } from '../dashboard-inputs/transient-input-context.js';
|
|
7
|
+
import { prepareMatrixCard, MatrixCardCatalog } from '../matrix-table/matrix-card-adapter.js';
|
|
8
|
+
import { ViewerTableSettings } from '../../shared/dashboard-viewer/index.js';
|
|
9
|
+
import { CalendarContext } from '../../shared/report-runtime-context/index.js';
|
|
10
|
+
import { CardQueryContext, CompiledCardQueryContext } from './build-card-query-context.js';
|
|
11
|
+
import { DashboardCardQueryContractResult } from './build-dashboard-card-query-contract.js';
|
|
12
|
+
import { CardQueryBlock, CompiledDashboardCardFilters } from './compile-dashboard-card-filters.js';
|
|
13
|
+
import { DocumentSectionCardRuntime } from './document-section-card-query.js';
|
|
14
|
+
import { CardRequestPayload } from './card-server-request.js';
|
|
15
|
+
/**
|
|
16
|
+
* The one assembly of a card's query (card query assembly plan, CQ-D1): live
|
|
17
|
+
* cards, Matrix cards, exports, PDFs, Briefings, query keys, summaries, drill
|
|
18
|
+
* captures and the assistant all ask this module, so the same state always
|
|
19
|
+
* means the same query. Nothing else builds a card's query context or
|
|
20
|
+
* compiles it (the `check:guards` guard, CQ-INV-2).
|
|
21
|
+
*
|
|
22
|
+
* A caller's differences are data in its source and its place (CQ-D2); the
|
|
23
|
+
* module decides what each means. It is pure: hooks read the store and pass
|
|
24
|
+
* what they read.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* The state a card's query is built from: the dashboard store's current
|
|
28
|
+
* values, a capture's, or a print's.
|
|
29
|
+
*/
|
|
30
|
+
export type CardQuerySource = {
|
|
31
|
+
dashboard: TDashboard;
|
|
32
|
+
/**
|
|
33
|
+
* Runtime-only values no filter defines (chart clicks, summary chips; one
|
|
34
|
+
* filter model SPEC 5.8). Authored filter values are `dashboardInputValues`.
|
|
35
|
+
*/
|
|
36
|
+
adHocFilterValues: TFilterValue[] | undefined;
|
|
37
|
+
controlValues: Record<string, unknown> | undefined;
|
|
38
|
+
inlineFilterValuesMap: Record<string, TFilterValue[] | undefined> | undefined;
|
|
39
|
+
cardControlValuesMap: Record<string, Record<string, unknown>> | undefined;
|
|
40
|
+
dashboardInputValues: DashboardInputValues | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Carried contexts in effect on the dashboard. Required so that every
|
|
43
|
+
* caller decides; see `buildCardQueryContext`. A section never receives them.
|
|
44
|
+
*/
|
|
45
|
+
transientContexts: readonly TransientInputContext[] | undefined;
|
|
46
|
+
/** Drill paths by card. Required so that every caller decides; a section card does not drill. */
|
|
47
|
+
cardViewStates: CardViewStateMap | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Viewer table settings by card (dashboard bookmarks). Required so that
|
|
50
|
+
* every caller decides; a section card is not a viewer-customizable table.
|
|
51
|
+
*/
|
|
52
|
+
viewerTableSettings: Readonly<Record<string, ViewerTableSettings>> | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* The viewer's report calendar (report preferences): input defaults
|
|
55
|
+
* resolve in it and cards compile in its zone (CQ-D8). Null only before
|
|
56
|
+
* the report context loads.
|
|
57
|
+
*/
|
|
58
|
+
calendar: CalendarContext | null;
|
|
59
|
+
/**
|
|
60
|
+
* The editor's preview: its card filter values win for the cards it shows,
|
|
61
|
+
* and it previews the authored table (no viewer table settings).
|
|
62
|
+
*/
|
|
63
|
+
editor?: {
|
|
64
|
+
inlineFilterValuesMap: Record<string, TFilterValue[] | undefined>;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
/** Where a card runs: a sheet of the dashboard, or a Document section with its own runtime. */
|
|
68
|
+
export type CardQueryPlace = {
|
|
69
|
+
kind: 'sheet';
|
|
70
|
+
sheetId: string | null | undefined;
|
|
71
|
+
} | {
|
|
72
|
+
kind: 'documentSection';
|
|
73
|
+
section: DocumentSectionCardRuntime;
|
|
74
|
+
};
|
|
75
|
+
export type AssembledCardQuery = {
|
|
76
|
+
/** The card the query runs: a section's card carries its document's control definitions. */
|
|
77
|
+
card: TCard;
|
|
78
|
+
context: CardQueryContext;
|
|
79
|
+
/** The inputs resolved for the card, when the dashboard resolves inputs. */
|
|
80
|
+
inputContext: ResolvedDashboardInputContext | undefined;
|
|
81
|
+
};
|
|
82
|
+
/** How a dashboard's cards compile (CQ-D3); one per dashboard, payload and calendar. */
|
|
83
|
+
export type CardQueryCompileScope = {
|
|
84
|
+
calendarContext: CalendarContext;
|
|
85
|
+
/** Whether every card the dashboard date reaches has a timestamp field. */
|
|
86
|
+
allowGlobalDateMinutePrecision: boolean;
|
|
87
|
+
semanticExecutionPayload: SemanticExecutionPayload | undefined;
|
|
88
|
+
globalCacheConfig: TDashboard['globalCacheConfig'];
|
|
89
|
+
};
|
|
90
|
+
export type CompiledCardQuery = {
|
|
91
|
+
status: 'ready';
|
|
92
|
+
card: TCard;
|
|
93
|
+
queryContext: CompiledCardQueryContext;
|
|
94
|
+
compiledFilters: CompiledDashboardCardFilters;
|
|
95
|
+
resolvedPrimaryDateField: ResolvedPrimaryDateField;
|
|
96
|
+
} | ({
|
|
97
|
+
status: 'blocked';
|
|
98
|
+
card: TCard;
|
|
99
|
+
cardId: string;
|
|
100
|
+
resolvedPrimaryDateField: ResolvedPrimaryDateField;
|
|
101
|
+
} & CardQueryBlock);
|
|
102
|
+
/** The compiler's inputs for a card at its place, from a source. */
|
|
103
|
+
export declare function assembleCardQueryContext({ card, place, source, }: {
|
|
104
|
+
card: TCard;
|
|
105
|
+
place: CardQueryPlace;
|
|
106
|
+
source: CardQuerySource;
|
|
107
|
+
}): AssembledCardQuery;
|
|
108
|
+
export declare function resolveCardQueryCompileScope(dashboard: TDashboard, semanticExecutionPayload: SemanticExecutionPayload | undefined, calendar: CalendarContext | null): CardQueryCompileScope;
|
|
109
|
+
/** Compiles an assembled card in its dashboard's scope. */
|
|
110
|
+
export declare function compileCardQuery(assembled: Pick<AssembledCardQuery, 'card' | 'context'>, scope: CardQueryCompileScope): CompiledCardQuery;
|
|
111
|
+
/**
|
|
112
|
+
* The request contract of an assembled card: its compiled filters, query
|
|
113
|
+
* identity and request payload.
|
|
114
|
+
*/
|
|
115
|
+
export declare function buildCardQueryContract(assembled: Pick<AssembledCardQuery, 'card' | 'context'>, scope: CardQueryCompileScope, options?: {
|
|
116
|
+
resolvePaginationConfig?: (queryInputIdentity: string) => PaginationConfig | undefined;
|
|
117
|
+
}): DashboardCardQueryContractResult & {
|
|
118
|
+
resolvedPrimaryDateField: ResolvedPrimaryDateField;
|
|
119
|
+
};
|
|
120
|
+
export type AssembledCardQueryResult = (Extract<CompiledCardQuery, {
|
|
121
|
+
status: 'ready';
|
|
122
|
+
}> & {
|
|
123
|
+
matrix?: ReturnType<typeof prepareMatrixCard>;
|
|
124
|
+
/**
|
|
125
|
+
* The request the card posts to /api/v1/query, from these same assembled
|
|
126
|
+
* inputs (`withRequest`; not for Matrix, which runs on its window path).
|
|
127
|
+
*/
|
|
128
|
+
request?: CardRequestPayload;
|
|
129
|
+
}) | BlockedCardQuery;
|
|
130
|
+
/**
|
|
131
|
+
* A card query that cannot run, and why (SPEC 4.8): the compile's `mapping`
|
|
132
|
+
* and `requiredInput`, or the assembly's `metadata`, `configuration` and
|
|
133
|
+
* `coverage`. `message` is set for every reason except `mapping`, whose
|
|
134
|
+
* wording each surface owns.
|
|
135
|
+
*/
|
|
136
|
+
export type BlockedCardQuery = {
|
|
137
|
+
status: 'blocked';
|
|
138
|
+
cardId: string;
|
|
139
|
+
mappingDispositions: CompiledDashboardCardFilters['mappingDispositions'];
|
|
140
|
+
reason: CardQueryBlock['reason'] | 'metadata' | 'configuration' | 'coverage';
|
|
141
|
+
missingRequiredLabels: string[];
|
|
142
|
+
message?: string;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* A card's compiled query, as the Matrix runtime and every capture run it: a
|
|
146
|
+
* Matrix card is prepared from the catalog (its spec owns its filters, and
|
|
147
|
+
* the dashboard date's precision covers only the cards it reaches).
|
|
148
|
+
*/
|
|
149
|
+
export declare function assembleCardQuery({ card: targetCard, place, source, semanticExecutionPayload, matrixCatalog, withRequest, }: {
|
|
150
|
+
card: TCard;
|
|
151
|
+
place: CardQueryPlace;
|
|
152
|
+
source: CardQuerySource;
|
|
153
|
+
semanticExecutionPayload: SemanticExecutionPayload | undefined;
|
|
154
|
+
/** Columns metadata for every Matrix target the dashboard date covers. */
|
|
155
|
+
matrixCatalog: MatrixCardCatalog | undefined;
|
|
156
|
+
/** Also build the card's request (the analytics agent replays it on the server, D3b-2). */
|
|
157
|
+
withRequest?: boolean;
|
|
158
|
+
}): AssembledCardQueryResult;
|
|
@@ -33,8 +33,8 @@ export type BuildCardQueryContextParams = {
|
|
|
33
33
|
* sort while the viewer sees their own.
|
|
34
34
|
*/
|
|
35
35
|
viewerTableSettings: ViewerTableSettings | undefined;
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
/** Runtime-only values no filter defines (SPEC 5.8); authored values are input slots. */
|
|
37
|
+
adHocFilterValues: TFilterValue[] | undefined;
|
|
38
38
|
selectedSheetId: string | null | undefined;
|
|
39
39
|
inlineFilterValuesMap: Record<string, TFilterValue[] | undefined> | undefined;
|
|
40
40
|
dashboardControls?: ControlDefinition[] | undefined;
|
|
@@ -73,4 +73,4 @@ export type CompiledCardQueryContext = Omit<CardQueryContext, 'filterCompilation
|
|
|
73
73
|
globalDateComparisonSelection?: GlobalDateComparisonSelection;
|
|
74
74
|
dateComparisonInputs?: ResolvedDashboardDateComparisonInput[];
|
|
75
75
|
};
|
|
76
|
-
export declare function buildCardQueryContext({ card, dashboard, transientContexts, cardViewState, viewerTableSettings,
|
|
76
|
+
export declare function buildCardQueryContext({ card, dashboard, transientContexts, cardViewState, viewerTableSettings, adHocFilterValues, selectedSheetId, inlineFilterValuesMap, dashboardControls, dashboardControlValues, cardControlValuesMap, dashboardInputContext, includeAuthoredFilters, }: BuildCardQueryContextParams): CardQueryContext;
|
|
@@ -5,7 +5,7 @@ import { TableConfig } from '../types/query-types.js';
|
|
|
5
5
|
import { CardQueryContext, CompiledCardQueryContext } from './build-card-query-context.js';
|
|
6
6
|
import { CalendarContext } from '../../shared/report-runtime-context/index.js';
|
|
7
7
|
import { DashboardCardQueryRequestPayloadBase } from '../../shared/dashboard-authoring/card-query-request.js';
|
|
8
|
-
import { CompiledDashboardCardFilters, CompileDashboardCardFiltersParams } from './compile-dashboard-card-filters.js';
|
|
8
|
+
import { CardQueryBlock, CompiledDashboardCardFilters, CompileDashboardCardFiltersParams } from './compile-dashboard-card-filters.js';
|
|
9
9
|
export type { DashboardCardQueryRequestPayloadBase } from '../../shared/dashboard-authoring/card-query-request.js';
|
|
10
10
|
export type DashboardCardQueryContract = {
|
|
11
11
|
status: 'ready';
|
|
@@ -16,12 +16,11 @@ export type DashboardCardQueryContract = {
|
|
|
16
16
|
tableConfig: TableConfig;
|
|
17
17
|
compiledFilters: CompiledDashboardCardFilters;
|
|
18
18
|
};
|
|
19
|
-
export type DashboardCardQueryContractResult = DashboardCardQueryContract | {
|
|
19
|
+
export type DashboardCardQueryContractResult = DashboardCardQueryContract | ({
|
|
20
20
|
status: 'blocked';
|
|
21
21
|
cardId: string;
|
|
22
|
-
mappingDispositions: CompiledDashboardCardFilters['mappingDispositions'];
|
|
23
22
|
tableConfig: TableConfig;
|
|
24
|
-
};
|
|
23
|
+
} & CardQueryBlock);
|
|
25
24
|
/** Test/invariant helper for fixtures that cannot contain mapped inputs. */
|
|
26
25
|
export declare function requireReadyDashboardCardQueryContract(result: DashboardCardQueryContractResult): DashboardCardQueryContract;
|
|
27
26
|
export type DashboardCardQueryExecutionOptions = {
|
|
@@ -36,11 +35,21 @@ export type DashboardCardQueryExecutionOptions = {
|
|
|
36
35
|
resolvePaginationConfig?: (queryInputIdentity: string) => PaginationConfig | undefined;
|
|
37
36
|
};
|
|
38
37
|
/** One final compilation for interactive requests and immutable input captures. */
|
|
39
|
-
export declare function compileDashboardCardQueryContext(card: TCard, context: CardQueryContext, execution: Omit<CompileDashboardCardFiltersParams, 'card' | 'cardConfig' | 'input'>): {
|
|
38
|
+
export declare function compileDashboardCardQueryContext(card: TCard, context: CardQueryContext, execution: Omit<CompileDashboardCardFiltersParams, 'card' | 'cardConfig' | 'input'>): ({
|
|
39
|
+
status: "blocked";
|
|
40
|
+
cardId: string;
|
|
41
|
+
} & {
|
|
42
|
+
reason: "mapping";
|
|
43
|
+
mappingDispositions: import('./dashboard-filter-mapping-resolution.js').DashboardFilterMappingDisposition[];
|
|
44
|
+
missingRequiredLabels: [];
|
|
45
|
+
}) | ({
|
|
40
46
|
status: "blocked";
|
|
41
47
|
cardId: string;
|
|
48
|
+
} & {
|
|
49
|
+
reason: "requiredInput";
|
|
42
50
|
mappingDispositions: import('./dashboard-filter-mapping-resolution.js').DashboardFilterMappingDisposition[];
|
|
43
|
-
|
|
51
|
+
missingRequiredLabels: string[];
|
|
52
|
+
}) | {
|
|
44
53
|
status: "ready";
|
|
45
54
|
queryContext: CompiledCardQueryContext;
|
|
46
55
|
compiledFilters: CompiledDashboardCardFilters & {
|
|
@@ -6,18 +6,22 @@ import { TransientInputContext } from '../dashboard-inputs/transient-input-conte
|
|
|
6
6
|
import { SemanticExecutionPayload } from '../types/semantic-runtime-types.js';
|
|
7
7
|
import { ViewerTableSettings } from '../../shared/dashboard-viewer/index.js';
|
|
8
8
|
import { CompiledCardQueryContext } from './build-card-query-context.js';
|
|
9
|
-
import { CompiledDashboardCardFilters } from './compile-dashboard-card-filters.js';
|
|
10
9
|
import { CardRequestPayload } from './card-server-request.js';
|
|
11
10
|
import { DocumentSectionCardRuntime } from './document-section-card-query.js';
|
|
12
11
|
import { MatrixCardCatalog, prepareMatrixCard } from '../matrix-table/matrix-card-adapter.js';
|
|
12
|
+
import { BlockedCardQuery } from './assemble-card-query.js';
|
|
13
13
|
export type DashboardExecutionSnapshot = {
|
|
14
14
|
selectedSheetId: string | null;
|
|
15
15
|
filterValues: TFilterValue[];
|
|
16
16
|
controlValues: Record<string, unknown>;
|
|
17
17
|
};
|
|
18
18
|
type BuildDashboardExecutionSnapshotParams = {
|
|
19
|
-
dashboard:
|
|
20
|
-
|
|
19
|
+
dashboard: TDashboard | undefined;
|
|
20
|
+
/** Authored filter values: input slots (one filter model Phase 4a). */
|
|
21
|
+
dashboardInputValues: DashboardInputValues | undefined;
|
|
22
|
+
adHocFilterValues: TFilterValue[] | undefined;
|
|
23
|
+
/** The report calendar defaults resolve in. */
|
|
24
|
+
calendar: CalendarContext | null;
|
|
21
25
|
selectedSheetId: string | null | undefined;
|
|
22
26
|
sheetSelection?: 'current' | 'all';
|
|
23
27
|
dashboardControlValues?: Record<string, unknown>;
|
|
@@ -25,7 +29,7 @@ type BuildDashboardExecutionSnapshotParams = {
|
|
|
25
29
|
semanticExecutionPayload?: SemanticExecutionPayload;
|
|
26
30
|
timezone?: string;
|
|
27
31
|
};
|
|
28
|
-
export declare function buildDashboardExecutionSnapshot({ dashboard,
|
|
32
|
+
export declare function buildDashboardExecutionSnapshot({ dashboard, dashboardInputValues, adHocFilterValues, calendar, selectedSheetId, sheetSelection, dashboardControlValues, cardControlValuesMap, semanticExecutionPayload, timezone, }: BuildDashboardExecutionSnapshotParams): DashboardExecutionSnapshot;
|
|
29
33
|
export type BuildDashboardCardExecutionSnapshotParams = {
|
|
30
34
|
dashboard: TDashboard | undefined;
|
|
31
35
|
cardId: string;
|
|
@@ -41,7 +45,7 @@ export type BuildDashboardCardExecutionSnapshotParams = {
|
|
|
41
45
|
* sort. Required so that every caller decides; see `buildCardQueryContext`.
|
|
42
46
|
*/
|
|
43
47
|
viewerTableSettings: Readonly<Record<string, ViewerTableSettings>> | undefined;
|
|
44
|
-
|
|
48
|
+
adHocFilterValues: TFilterValue[] | undefined;
|
|
45
49
|
inlineFilterValuesMap: Record<string, TFilterValue[] | undefined> | undefined;
|
|
46
50
|
dashboardControlValues?: Record<string, unknown> | undefined;
|
|
47
51
|
cardControlValuesMap?: Record<string, Record<string, unknown> | undefined> | undefined;
|
|
@@ -80,14 +84,8 @@ export type DashboardCardExecutionSnapshot = {
|
|
|
80
84
|
/** The request the card posts to /api/v1/query (`withRequest`; never for Matrix). */
|
|
81
85
|
request?: CardRequestPayload;
|
|
82
86
|
};
|
|
83
|
-
export type DashboardCardExecutionSnapshotResult = DashboardCardExecutionSnapshot |
|
|
84
|
-
status: 'blocked';
|
|
85
|
-
cardId: string;
|
|
86
|
-
mappingDispositions: CompiledDashboardCardFilters['mappingDispositions'];
|
|
87
|
-
reason?: 'metadata' | 'configuration' | 'coverage';
|
|
88
|
-
message?: string;
|
|
89
|
-
} | null;
|
|
87
|
+
export type DashboardCardExecutionSnapshotResult = DashboardCardExecutionSnapshot | BlockedCardQuery | null;
|
|
90
88
|
export declare function requireReadyDashboardCardExecutionSnapshot(result: DashboardCardExecutionSnapshotResult): DashboardCardExecutionSnapshot | null;
|
|
91
89
|
/** One card's compiled query from captured or current values, through the card query assembly. */
|
|
92
|
-
export declare function buildDashboardCardExecutionSnapshot({ dashboard, cardId, transientContexts, cardViewStates, viewerTableSettings, semanticExecutionPayload,
|
|
90
|
+
export declare function buildDashboardCardExecutionSnapshot({ dashboard, cardId, transientContexts, cardViewStates, viewerTableSettings, semanticExecutionPayload, adHocFilterValues, inlineFilterValuesMap, dashboardControlValues, cardControlValuesMap, dashboardInputValues, calendar, matrixCatalog, cardOverride, sheetId, documentSection, editor, withRequest, }: BuildDashboardCardExecutionSnapshotParams): DashboardCardExecutionSnapshotResult;
|
|
93
91
|
export {};
|
|
@@ -12,8 +12,11 @@ import { ResolvedCardDateFields } from './resolve-card-primary-date-field.js';
|
|
|
12
12
|
* they must not merge or retarget values before handing them to the compiler.
|
|
13
13
|
*/
|
|
14
14
|
export type DashboardCardFilterCompilationInput = {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Runtime-only values no filter defines (chart clicks, summary chips;
|
|
17
|
+
* one filter model SPEC 5.8). Authored values live in input slots.
|
|
18
|
+
*/
|
|
19
|
+
adHocFilterValues: TFilterValue[];
|
|
17
20
|
selectedSheetId: string | null | undefined;
|
|
18
21
|
inlineFilterValues: TFilterValue[];
|
|
19
22
|
shouldApplyDashboardFilters: boolean;
|
|
@@ -44,24 +47,31 @@ export type CompiledDashboardCardFilters = {
|
|
|
44
47
|
globalDateComparison: GlobalDateComparisonContext | undefined;
|
|
45
48
|
mappingDispositions: DashboardFilterMappingDisposition[];
|
|
46
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* Why a card's query cannot run (one filter model SPEC 4.8). `requiredInput`
|
|
52
|
+
* is reported over `mapping` when both apply: the viewer can resolve it.
|
|
53
|
+
*/
|
|
54
|
+
export type CardQueryBlock = {
|
|
55
|
+
reason: 'mapping';
|
|
56
|
+
mappingDispositions: DashboardFilterMappingDisposition[];
|
|
57
|
+
missingRequiredLabels: [];
|
|
58
|
+
} | {
|
|
59
|
+
reason: 'requiredInput';
|
|
60
|
+
mappingDispositions: DashboardFilterMappingDisposition[];
|
|
61
|
+
missingRequiredLabels: string[];
|
|
62
|
+
};
|
|
47
63
|
export type DashboardCardFilterCompilationResult = (CompiledDashboardCardFilters & {
|
|
48
64
|
status: 'ready';
|
|
49
|
-
}) | {
|
|
65
|
+
}) | ({
|
|
50
66
|
status: 'blocked';
|
|
51
67
|
cardId: string;
|
|
52
|
-
|
|
53
|
-
|
|
68
|
+
} & CardQueryBlock);
|
|
69
|
+
/** What a card shows, and exports and captures refuse with, for a `requiredInput` block. */
|
|
70
|
+
export declare function describeMissingRequiredInputs(labels: readonly string[]): string;
|
|
54
71
|
/** Test/invariant helper for call sites that construct a provably unmapped input. */
|
|
55
72
|
export declare function requireReadyDashboardCardFilters(result: DashboardCardFilterCompilationResult): CompiledDashboardCardFilters & {
|
|
56
73
|
status: 'ready';
|
|
57
74
|
};
|
|
58
|
-
/**
|
|
59
|
-
* Whether a filter input still applies when a carried context turns the
|
|
60
|
-
* dashboard's own filters off (`resolveContextAwareFilterPolicy`): only inputs
|
|
61
|
-
* authored for specific cards and the cards' inline filters do. The one rule
|
|
62
|
-
* for the compiler and for any reader that says which filters a view applies.
|
|
63
|
-
*/
|
|
64
|
-
export declare function filterInputSurvivesCarriedContext(input: Pick<NormalizedDashboardInput, 'kind' | 'scope' | 'compatibility'>): boolean;
|
|
65
75
|
export declare function composeCardFilterValues(card: TCard, input: DashboardCardFilterCompilationInput): {
|
|
66
76
|
status: 'ready';
|
|
67
77
|
filterValues: TFilterValue[];
|